remote-events.ts 1.1 KB

1234567891011121314151617181920212223242526272829
  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. /**
  9. * Host events this application forwards to consumers verbatim: no projection,
  10. * no redaction, no renaming. The wire name is the Host cordis event name and
  11. * the payload is its argument list, so this array is simultaneously the whole
  12. * control point over what a consumer can receive and the legal key set of
  13. * `ctx.remote.$on`. Forwarding one more event is an entry here and nothing
  14. * else.
  15. */
  16. export const API_REMOTE_FORWARDED_EVENTS = [
  17. 'agent-preset/selected',
  18. 'commands/change',
  19. 'credentials/reference-updated',
  20. 'cordis/request-run',
  21. 'cordis/request-run-resolved',
  22. 'cordis/dynamic-package',
  23. 'cordis/dynamic-retract',
  24. 'cordis/inspect-query',
  25. 'cordis/inspect-query-resolved',
  26. 'llm/adapters-updated',
  27. 'settings/document-updated',
  28. ] as const