index.ts 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * apiproxy contract-layer barrel. api/ has zero Node dependencies and is
  3. * importable from the browser; the TypeScript interfaces are authoritative,
  4. * while HTTP supplies the carrier.
  5. */
  6. import type { HostApi } from './host.ts'
  7. import type { AgentPresetsApi } from './agent-presets.ts'
  8. import type { SkillsApi } from './skills.ts'
  9. import type { SubagentsApi } from './subagents.ts'
  10. import type { SettingsApi } from './settings.ts'
  11. import type { CredentialsApi } from './credentials.ts'
  12. import type { LlmApi } from './llm.ts'
  13. import type { DownloadsApi } from './downloads.ts'
  14. /** Root interface of the unified API. New client-request domain = one new file pair + one field here + one map row. */
  15. export interface ApiProxy {
  16. subagents: SubagentsApi
  17. host: HostApi
  18. skills: SkillsApi
  19. agentPresets: AgentPresetsApi
  20. settings: SettingsApi
  21. credentials: CredentialsApi
  22. llm: LlmApi
  23. /** Host-only download surfaces (GET, no wire envelope); absent from IApiClient. */
  24. downloads: DownloadsApi
  25. }
  26. // ---- Domain interfaces and payload entities ----
  27. export type {
  28. ModelCatalog, ModelCatalogFailure, ModelCatalogModel, ModelProviderGroup, ModelReasoning,
  29. ModelReasoningEffort, ModelSelection,
  30. } from '@deepseek-ai/dsh-api-session-controller/types'
  31. export type { DirectoryEntry, DirectoryListing, HostApi } from './host.ts'
  32. export type {
  33. SubagentAddress, SubagentCatalog, SubagentInterruptReceipt, SubagentListEntry,
  34. SubagentPromptReceipt, SubagentsApi,
  35. } from './subagents.ts'
  36. export type { SkillsApi, SkillEntry } from './skills.ts'
  37. export type { AgentPresetsApi } from './agent-presets.ts'
  38. export type { SettingsApi, SettingsNamespaceView, SettingsPathOpView, SettingsSecretView } from './settings.ts'
  39. export type { CredentialsApi, CredentialView } from './credentials.ts'
  40. export type { ConfigurableProviderView, DiscoveredModelView, LlmApi } from './llm.ts'
  41. export type { DownloadsApi } from './downloads.ts'
  42. // ---- Message layer: narrow forms (domain-signature view) ----
  43. export type { RpcRequest, RpcResponse } from './rpc.ts'
  44. // ---- Message layer: unary wire forms ----
  45. export type {
  46. ClientRequest,
  47. RpcMessage,
  48. ServerResponse,
  49. } from './rpc.ts'
  50. // ---- Errors and ids ----
  51. export { RpcId, transportError } from './rpc.ts'
  52. export type { RpcError, RpcErrorCode, RpcErrorDetailsMap, RpcResult } from './rpc.ts'
  53. export {
  54. clientRequestSchema,
  55. serverResponseSchema,
  56. } from './rpc.schema.ts'
  57. // ---- Method registry and derived generics ----
  58. export type { RequestPayload, ResponseValue, RpcMethodMap } from './rpc-map.ts'