@consiliency/agent-board-schema 1.53.0 → 1.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/fixtures/already-applied.json +615 -607
  2. package/migrations/20261004000100_agent_board_callback_consumer_intent.sql +52 -0
  3. package/migrations/20261005000100_agent_board_enroll_token_single_use.sql +886 -0
  4. package/package.json +1 -1
  5. package/schema-manifest.json +21 -3
  6. package/src/tooling.test.mjs +5 -2
  7. package/tests/agent_board_atomic_fleet_onboarding.test.sql +35 -35
  8. package/tests/agent_board_atomic_fleet_onboarding_backfill.test.sql +5 -5
  9. package/tests/agent_board_atomic_fleet_onboarding_runtime.test.sql +32 -32
  10. package/tests/agent_board_enroll_federated_identity.test.sql +11 -10
  11. package/tests/agent_board_enroll_pop_binding.test.sql +12 -12
  12. package/tests/agent_board_enroll_resumption.test.sql +1 -1
  13. package/tests/agent_board_enroll_token_single_use.test.sql +538 -0
  14. package/tests/agent_board_enrollment_audit_content.test.sql +3 -3
  15. package/tests/agent_board_federated_lock_order_class.test.sql +5 -5
  16. package/tests/agent_board_fedsession.test.sql +1 -1
  17. package/tests/agent_board_fk_lock_edges.test.sql +23 -0
  18. package/tests/agent_board_identity_providers.test.sql +3 -2
  19. package/tests/agent_board_portal_offline_invariant.test.sql +1 -1
  20. package/tests/agent_board_roomlink.test.sql +2 -2
  21. package/tests/agent_board_write_enforcement_class.test.sql +5 -2
  22. package/tests/catalog/function_execute_privileges.json +12 -3
  23. package/tests/catalog/p_metadata_parameters.json +6 -2
  24. package/tests/isolation/expected/atomic_fedsession_fleet_lock_order.out +1 -1
  25. package/tests/isolation/expected/atomic_fleet_authority_races.out +8 -8
  26. package/tests/isolation/expected/atomic_fleet_binding_revoke.out +2 -2
  27. package/tests/isolation/expected/atomic_fleet_board_archive.out +2 -2
  28. package/tests/isolation/expected/atomic_fleet_human_fresh_revoke.out +2 -2
  29. package/tests/isolation/expected/atomic_fleet_identity_disposition.out +2 -2
  30. package/tests/isolation/expected/atomic_fleet_lifecycle_races.out +22 -22
  31. package/tests/isolation/expected/atomic_fleet_onboarding.out +2 -2
  32. package/tests/isolation/expected/atomic_fleet_subtree_lock_order.out +1 -1
  33. package/tests/isolation/expected/enroll_identity_board_owner_lock_order.out +1 -1
  34. package/tests/isolation/expected/enroll_token_fleet_abort.out +81 -0
  35. package/tests/isolation/expected/enroll_token_pk_backstop.out +36 -0
  36. package/tests/isolation/expected/enroll_token_placement.out +86 -0
  37. package/tests/isolation/expected/enroll_token_rollback_unstrands.out +59 -0
  38. package/tests/isolation/expected/enroll_token_route_race_fleet_first.out +72 -0
  39. package/tests/isolation/expected/enroll_token_route_race_identity_first.out +72 -0
  40. package/tests/isolation/expected/enroll_token_same_key_fleet_then_identity.out +73 -0
  41. package/tests/isolation/expected/enroll_token_same_key_identity_then_fleet.out +73 -0
  42. package/tests/isolation/expected/enroll_token_same_key_resume.out +59 -0
  43. package/tests/isolation/expected/enroll_token_same_token_race.out +58 -0
  44. package/tests/isolation/expected/onboarding_ceiling_lock_order.out +2 -2
  45. package/tests/isolation/specs/atomic_fedsession_fleet_lock_order.spec +1 -1
  46. package/tests/isolation/specs/atomic_fleet_authority_races.spec +2 -2
  47. package/tests/isolation/specs/atomic_fleet_binding_revoke.spec +2 -2
  48. package/tests/isolation/specs/atomic_fleet_board_archive.spec +2 -2
  49. package/tests/isolation/specs/atomic_fleet_human_fresh_revoke.spec +2 -2
  50. package/tests/isolation/specs/atomic_fleet_identity_disposition.spec +2 -2
  51. package/tests/isolation/specs/atomic_fleet_lifecycle_races.spec +2 -2
  52. package/tests/isolation/specs/atomic_fleet_onboarding.spec +2 -2
  53. package/tests/isolation/specs/atomic_fleet_subtree_lock_order.spec +2 -2
  54. package/tests/isolation/specs/enroll_identity_board_owner_lock_order.spec +1 -1
  55. package/tests/isolation/specs/enroll_token_fleet_abort.spec +138 -0
  56. package/tests/isolation/specs/enroll_token_pk_backstop.spec +37 -0
  57. package/tests/isolation/specs/enroll_token_placement.spec +136 -0
  58. package/tests/isolation/specs/enroll_token_rollback_unstrands.spec +71 -0
  59. package/tests/isolation/specs/enroll_token_route_race_fleet_first.spec +119 -0
  60. package/tests/isolation/specs/enroll_token_route_race_identity_first.spec +120 -0
  61. package/tests/isolation/specs/enroll_token_same_key_fleet_then_identity.spec +112 -0
  62. package/tests/isolation/specs/enroll_token_same_key_identity_then_fleet.spec +113 -0
  63. package/tests/isolation/specs/enroll_token_same_key_resume.spec +70 -0
  64. package/tests/isolation/specs/enroll_token_same_token_race.spec +80 -0
  65. package/tests/isolation/specs/onboarding_ceiling_lock_order.spec +1 -1
@@ -0,0 +1,52 @@
1
+ -- CALLBACKCONSUMER: say out loud who the callback subsystem is FOR.
2
+ --
3
+ -- WHY THIS MIGRATION EXISTS, and why a comment is the whole of it.
4
+ --
5
+ -- This subsystem is complete, correctly permissioned and wired: `_queue_inbox_callbacks`
6
+ -- is called by five live RPCs, the drain claims only `endpoint_status = 'verified'`, and
7
+ -- delivery outcomes are recorded. Yet on the live board it has 0 endpoints, 0
8
+ -- subscriptions and 0 events ever, against 12 agents — because it fires per SUBSCRIPTION
9
+ -- and nothing ever subscribed. Correct-and-idle is indistinguishable from broken when
10
+ -- read from outside, and three issues (message-board#385, #445, #319) spent weeks
11
+ -- describing it as a broken notification path that needed a drainer built.
12
+ --
13
+ -- It did not need a drainer. It needed its AUDIENCE written down.
14
+ --
15
+ -- `callback_endpoints.endpoint_url` is NOT NULL: registering means telling the board an
16
+ -- inbound address where the owner can be reached. AGENT PROCESSES DO NOT HAVE ONE, and
17
+ -- deliberately so — the wake architecture's frozen interface `IF-0-WAKESELF-1` is
18
+ -- "nothing written to the board to say where an agent can be reached. No handle, no
19
+ -- port, no registry", kept by all four shipped wake lanes (Claude Code, codex, pi,
20
+ -- opencode). This subsystem is dated 2026-05; that interface was ratified 2026-09. They
21
+ -- are two answers to one question, and for AGENTS the wake lanes are the answer.
22
+ --
23
+ -- So: this subsystem is for HOSTED CONSUMERS that genuinely have an inbound URL — a
24
+ -- dashboard, an operator view, an external service, a portal page. It is NOT the way an
25
+ -- agent gets told about its inbox; that is the wake lanes' job. An endpoint is still
26
+ -- owned by an agent id (`owner_agent_id` is NOT NULL), so a hosted consumer registers
27
+ -- under an agent identity of its own.
28
+ --
29
+ -- Nothing re-checks prose (AGENTS.md rule 5), which is why this is recorded IN THE
30
+ -- CATALOG, beside the objects it describes, rather than only in a plan that a reader of
31
+ -- the schema would never open.
32
+
33
+ comment on table agent_board.callback_endpoints is
34
+ 'Durable callback endpoint registration with verification and disablement metadata. '
35
+ 'AUDIENCE: hosted consumers that have an inbound URL — a dashboard, operator view, '
36
+ 'external service or portal page — registered under an agent identity '
37
+ '(owner_agent_id). NOT the path by which an agent process is told about its inbox: '
38
+ 'agent processes have no inbound URL by design (wake interface IF-0-WAKESELF-1), and '
39
+ 'are reached by the wake lanes instead. See message-board#445.';
40
+
41
+ comment on table agent_board.callback_subscriptions is
42
+ 'What a registered endpoint has asked to be told about, by scope, event category and '
43
+ 'optionally board. The outbox is produced PER SUBSCRIPTION, so with no subscription '
44
+ 'the queue functions run on every send and correctly write nothing — idle, not broken. '
45
+ 'See the audience note on agent_board.callback_endpoints.';
46
+
47
+ comment on table agent_board.callback_outbox_events is
48
+ 'Queued callback deliveries, one row per (event, subscription). Drained by '
49
+ 'agent_board.claim_callback_outbox_events, which claims only endpoints whose '
50
+ 'endpoint_status is ''verified'' — an unverified endpoint accumulates nothing '
51
+ 'deliverable. Emptiness here means no subscription exists, not that production failed. '
52
+ 'See the audience note on agent_board.callback_endpoints.';