index.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /** Host BFF entry and Loader shell for the Remote contribution assembly. */
  2. import type { TypertForwardableEvent } from '@deepseek-ai/dsh-typert-protocol'
  3. import { API_REMOTE_FORWARDED_EVENTS } from './remote-events.ts'
  4. // The owner packages' client-safe `./types` exports carry the cordis `Events`
  5. // declarations for every allowlisted event. Pulling them into this face is what
  6. // makes the shape assertion below judge real signatures rather than an empty
  7. // event vocabulary.
  8. import type {} from '@deepseek-ai/dsh-commands/types'
  9. import type {} from '@deepseek-ai/dsh-cordis-host-runner/types'
  10. import type {} from '@deepseek-ai/dsh-credentials/types'
  11. import type {} from '@deepseek-ai/dsh-llm/types'
  12. import type {} from '@deepseek-ai/dsh-agent-presets/types'
  13. import type {} from '@deepseek-ai/dsh-settings/types'
  14. export {
  15. ApiRemoteSessionNotFound,
  16. ApiRemoteSubagentSessionOwnership,
  17. apiRemoteSubagentOwnershipError,
  18. createApiRemoteAgentResolver,
  19. hasApiRemoteSubagentOwner,
  20. inspectApiRemoteSession,
  21. } from './agent-lookup.ts'
  22. export type {
  23. ApiRemoteAgentOptions,
  24. ApiRemoteAgentResult,
  25. ApiRemoteLookupError,
  26. } from './agent-lookup.ts'
  27. export { API_REMOTE_FORWARDED_EVENTS } from './remote-events.ts'
  28. export type { ApiRemoteForwardedEvent } from './types.ts'
  29. // Shape gate over the allowlist, kept in the Host face because the Host's event
  30. // vocabulary is the authoritative one. It pins three things at compile time:
  31. // every entry NAMES a declared event (the predicate is keyed on `keyof
  32. // Events`), no entry BINDS a Scope (a scoped event's `ThisParameterType` is not
  33. // `unknown`, which is how "must not depend on AgentScope" is stated statically),
  34. // and every entry is ONE-WAY (a waterfall or bail shape returns something other
  35. // than void and is excluded). Widening the array to an event that fails any of
  36. // these fails here, not on the wire.
  37. API_REMOTE_FORWARDED_EVENTS satisfies readonly TypertForwardableEvent[]
  38. /** Host plugin body; the selected contributions mount only in Client environments. */
  39. export function apply(): void {}