index.ts 2.6 KB

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