remote-events.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * The one home of this application's forwarded-Host-event allowlist. Both
  3. * compiler faces list this file, so the Host forwarding loop and the consumer
  4. * `ctx.remote.$on` key face read one declaration instead of two copies that
  5. * could drift; `./types.ts` derives the type projection from it and stays
  6. * type-only.
  7. */
  8. import type {} from '@deepseek-ai/dsh-api-session-controller/remote-events'
  9. import type { TypertForwardableEventEntry } from '@deepseek-ai/dsh-typert-protocol'
  10. /**
  11. * Host events this application forwards without renaming. The explicit mode is
  12. * both the Host dispatch strategy and the legal key set of `ctx.remote.$on`.
  13. */
  14. export const API_REMOTE_FORWARDED_EVENTS = [
  15. { event: 'agent-preset/selected', mode: 'emit' },
  16. { event: 'approval/request', mode: 'waterfall' },
  17. { event: 'api-session/activity', mode: 'emit' },
  18. { event: 'api-session/added', mode: 'emit' },
  19. { event: 'api-session/error', mode: 'emit' },
  20. { event: 'api-session/removed', mode: 'emit' },
  21. { event: 'api-session/status', mode: 'emit' },
  22. { event: 'commands/change', mode: 'emit' },
  23. { event: 'credentials/reference-updated', mode: 'emit' },
  24. { event: 'cordis/request-run', mode: 'emit' },
  25. { event: 'cordis/request-run-resolved', mode: 'emit' },
  26. { event: 'cordis/dynamic-package', mode: 'emit' },
  27. { event: 'cordis/dynamic-retract', mode: 'emit' },
  28. { event: 'cordis/inspect-query', mode: 'emit' },
  29. { event: 'cordis/inspect-query-resolved', mode: 'emit' },
  30. { event: 'llm/adapters-updated', mode: 'emit' },
  31. { event: 'settings/document-updated', mode: 'emit' },
  32. { event: 'user-questions/request', mode: 'waterfall' },
  33. ] as const satisfies readonly TypertForwardableEventEntry[]