index.ts 2.0 KB

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