@catalyst-cloud/schema 0.1.34 → 0.1.36

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@catalyst-cloud/schema",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
4
4
  "type": "module",
5
5
  "description": "Typed Drizzle schema = single source of truth for the per-tenant Mirror DO SQLite store (CTC-13 / ADR-0002). Shared by the mirror Worker, the host-sync replica, and the browser OPFS replica.",
6
6
  "license": "MIT",
@@ -82,6 +82,13 @@ export const durableEventTypes = {
82
82
  ingestVerb: "coordination.publish",
83
83
  wakes: { consumerClass: "host-channel" },
84
84
  },
85
+ "ask.replied": {
86
+ rationale:
87
+ "A human answered — or tried to answer — an ask in its own thread, and the mirror's ask-decision trigger reached a named outcome. ADR-0039's own durable-fact example ('a human answer was received'), applied to the customer-facing ask loop (CTC-1326). Wake-eligible because the operator learning about it LATE is the defect CTC-1326 exists to close: before this, the only surface was a 15-minute Linear read poll.",
88
+ ingestVerb: "webhook.ingest",
89
+ wakes: { consumerClass: "host-channel" },
90
+ entity: "ticket",
91
+ },
85
92
  "broker.daemon.gc": {
86
93
  rationale:
87
94
  "The coordination broker daemon's own garbage-collection pass completing — a discrete lifecycle event of the process that OWNS the coordination log, worth recording to explain gaps in the log's own continuity.",
@@ -605,42 +612,42 @@ export const durableEventTypes = {
605
612
  },
606
613
  "phase.dispatch.claim-lost": {
607
614
  rationale:
608
- "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): a dispatch claim was lost to a concurrent race — a real coordination fact about who owns the work.",
615
+ "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): a dispatch claim was lost to a concurrent race — a real coordination fact about who owns the work. PRODUCER (CTC-1365, ADR-0070): apps/mirror/src/do/MirrorDO.ts's handleWorkAcquire, on a lease_held refusal that reliably names the winning holder+generation.",
609
616
  ingestVerb: "coordination.publish",
610
617
  wakes: false,
611
618
  entity: "ticket",
612
619
  },
613
620
  "phase.dispatch.escalated": {
614
621
  rationale:
615
- "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): the phase escalated to a human.",
622
+ "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): the phase escalated to a human. PRODUCER (CTC-1365, ADR-0070): apps/mirror/src/do/runner-start-dispatch.ts, once per failure episode, on the attempt where its backoff ladder saturates.",
616
623
  ingestVerb: "coordination.publish",
617
624
  wakes: { consumerClass: "host-channel" },
618
625
  entity: "ticket",
619
626
  },
620
627
  "phase.dispatch.failed": {
621
628
  rationale:
622
- "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): the phase reported failure.",
629
+ "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): the phase reported failure. PRODUCER (CTC-1365, ADR-0070): both apps/mirror/src/do/runner-start-dispatch.ts (a container never came to exist, scope:'container') and MirrorDO.ts's handleWorkAcquire (a post-claim routing/slot failure, scope:'assignment').",
623
630
  ingestVerb: "coordination.publish",
624
631
  wakes: false,
625
632
  entity: "ticket",
626
633
  },
627
634
  "phase.dispatch.launched": {
628
635
  rationale:
629
- "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): the phase's worker actually started running.",
636
+ "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): the phase's worker actually started running. PRODUCER (CTC-1365, ADR-0070): apps/mirror/src/do/MirrorDO.ts's handleWorkAcquire, on every successful POST /work/acquire claim — carries the SAME nonce the terminal phase.<p>.complete/.failed event carries.",
630
637
  ingestVerb: "coordination.publish",
631
638
  wakes: { consumerClass: "dispatcher" },
632
639
  entity: "ticket",
633
640
  },
634
641
  "phase.dispatch.requested": {
635
642
  rationale:
636
- "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): work became eligible for dispatch — the phase was requested.",
643
+ "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): work became eligible for dispatch — the phase was requested. PRODUCER (CTC-1365, ADR-0070): apps/mirror/src/do/runner-start-dispatch.ts's createNextSupervisorEpisode, once per supervisor episode, attributed to the team's head-of-queue eligible unit with an explicit nonce: null — no lease exists yet.",
637
644
  ingestVerb: "coordination.publish",
638
645
  wakes: { consumerClass: "dispatcher" },
639
646
  entity: "ticket",
640
647
  },
641
648
  "phase.dispatch.runaway": {
642
649
  rationale:
643
- "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): a dispatch safety guard fired (runaway detection) — a real operational fact.",
650
+ "ADR-0039 durable-fact example ('a phase started, completed, failed, or was preempted'): a dispatch safety guard fired (runaway detection) — a real operational fact. PRODUCER (CTC-1365, ADR-0070): apps/mirror/src/do/runner-start-dispatch.ts, when a waiting/unknown supervisor is superseded past its start grace window with zero live leases held by its dispatch key.",
644
651
  ingestVerb: "coordination.publish",
645
652
  wakes: false,
646
653
  entity: "ticket",