index.ts 2.3 KB

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