@catalyst-cloud/sdk 0.16.2 → 0.16.4
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/dist/node.js +44 -0
- package/package.json +5 -5
package/dist/node.js
CHANGED
|
@@ -3435,6 +3435,18 @@ var durableEventTypes = {
|
|
|
3435
3435
|
ingestVerb: "coordination.publish",
|
|
3436
3436
|
wakes: false
|
|
3437
3437
|
},
|
|
3438
|
+
// ⭐ CTC-5517 — the three facts an agent working a branch waits on. All three are minted inside the
|
|
3439
|
+
// tenant object (`apps/mirror/src/do/pr-branch-events.ts`) and refused on every publish route, so
|
|
3440
|
+
// only the cloud can produce a type that may interrupt a running agent. Each costs four DO rows and
|
|
3441
|
+
// three off-DO writes (`event-backbone.ts`), so each fires on a boundary, never on a level.
|
|
3442
|
+
"branch.moved": {
|
|
3443
|
+
rationale: "A pull request's head branch moved to a new commit, read from GitHub's own push delivery rather than from the pusher's report, so a lost robot receipt cannot lose it. One per push to an open pull request's branch; a push to a branch with no open pull request adds nothing beyond github.push.",
|
|
3444
|
+
ingestVerb: "mirror.derived",
|
|
3445
|
+
wakes: false,
|
|
3446
|
+
entity: "pull_request",
|
|
3447
|
+
publishers: ["cloud"],
|
|
3448
|
+
urgency: "interrupt"
|
|
3449
|
+
},
|
|
3438
3450
|
"comms.message.posted": {
|
|
3439
3451
|
rationale: "A real cross-agent/human communication fact \u2014 an actual message was posted, not sampled.",
|
|
3440
3452
|
ingestVerb: "coordination.publish",
|
|
@@ -4872,6 +4884,26 @@ var durableEventTypes = {
|
|
|
4872
4884
|
// replica reader could see it. The payload contract is `PromptRunFinishedPayload`
|
|
4873
4885
|
// (packages/protocol/src/prompt-run.ts): identifiers, outcome, failure class and duration, never
|
|
4874
4886
|
// the prompt text or the receipt summary.
|
|
4887
|
+
// CTC-5517 — the conflicted boundary, never every mergeability state change: GitHub nulls
|
|
4888
|
+
// `mergeable` on every open pull request at each base push and recomputes it, so a type fired on
|
|
4889
|
+
// each change would fire once per open pull request per main merge (`remediate-trigger.ts`'s
|
|
4890
|
+
// "TRANSITION, NEVER LEVEL").
|
|
4891
|
+
"pr.conflict.detected": {
|
|
4892
|
+
rationale: "An open pull request crossed into conflicting with its base, as GitHub decided it. Announced once when the conflict starts, not on each recompute, so the agent working the branch and the upkeep robot can act on it.",
|
|
4893
|
+
ingestVerb: "mirror.derived",
|
|
4894
|
+
wakes: false,
|
|
4895
|
+
entity: "pull_request",
|
|
4896
|
+
publishers: ["cloud"],
|
|
4897
|
+
urgency: "interrupt"
|
|
4898
|
+
},
|
|
4899
|
+
"pr.mergeability.changed": {
|
|
4900
|
+
rationale: "An open pull request crossed the conflicted boundary in either direction: into conflicting with its base, or out of it. A recompute through GitHub's unknown state that lands where it started is no change.",
|
|
4901
|
+
ingestVerb: "mirror.derived",
|
|
4902
|
+
wakes: false,
|
|
4903
|
+
entity: "pull_request",
|
|
4904
|
+
publishers: ["cloud"],
|
|
4905
|
+
urgency: "next-turn"
|
|
4906
|
+
},
|
|
4875
4907
|
"prompt.run.finished": {
|
|
4876
4908
|
rationale: "An operator prompt run left `running` for good: its lease was released with a receipt, released without one, refused after the claim, or recovered after an interrupted container. ADR-0039's own durable-fact example ('a runner reported an outcome'), for the third work-unit kind. It fires once per run, in the transaction that closes the run's row.",
|
|
4877
4909
|
// ⚠️ Minted inside the mirror DO, like ask.replied: coordination.publish is the closest true verb.
|
|
@@ -5243,6 +5275,10 @@ var telemetryEventTypes = {
|
|
|
5243
5275
|
reason: "CTC-289 \u2014 a verified, tenant-routable delivery whose repo/team is not a provisioned `projects` row. Carries the account, the scope key and the fence mode: the scope key is the entire diagnostic value (it answers 'why is repo Y in my mirror' and 'why is repo Y missing'), and the mode distinguishes an observed would-drop from an actual drop. Unsampled while the fence rolls out \u2014 the `observe` soak that gates enforcement reads exactly this signal, and a sampled soak cannot support a data-discarding flip. Revisit the class once enforce has been stable.",
|
|
5244
5276
|
sampling: { kind: "always" }
|
|
5245
5277
|
},
|
|
5278
|
+
"mirror.webhook.ci-skipped": {
|
|
5279
|
+
reason: "CTC-5300 \u2014 a verified, in-scope GitHub CI delivery the Worker edge withheld from the ingest queue (or, under `shadow`, would have): a non-final workflow_job, workflow_run or check_suite action nobody reads. Carries the account, the event type, the action and the filter mode; the mode distinguishes a would-skip from an actual skip. Unsampled for the same reason as mirror.webhook.out-of-scope: the `shadow` soak that gates a data-discarding flip reads exactly this signal, and a sampled soak cannot support it. Expected volume at enforce is about 31.6k/day fleet-wide. Revisit the class once enforce has been stable.",
|
|
5280
|
+
sampling: { kind: "always" }
|
|
5281
|
+
},
|
|
5246
5282
|
"mirror.dispatch-queue.derive-refused": {
|
|
5247
5283
|
reason: "CTC-1510 \u2014 one point per fail-closed `deriveDispatchQueue` refusal (an unresolved, missing or ambiguous team_workflow_mapping), carrying the team and WHICH resolution failed. Not durable: the refusal is a description of a configuration state, not a state transition, and it repeats every pass until the mapping is fixed \u2014 the durable fact is the mapping row itself. `always`-sampled: rare by design (a healthy tenant never emits it) and it is the ONLY machine-readable signal that a team's queue stopped advancing on purpose, which is exactly what a sampled-away point would hide. Repeats inside the DO's announce window are folded into `count`, never dropped.",
|
|
5248
5284
|
sampling: { kind: "always" }
|
|
@@ -5406,6 +5442,14 @@ var ALL_CLASSIFIED_EVENT_TYPES = [
|
|
|
5406
5442
|
var WAKE_ELIGIBLE_EVENT_TYPES = DURABLE_EVENT_TYPES.filter(
|
|
5407
5443
|
(t) => durableEventTypes[t].wakes !== false
|
|
5408
5444
|
);
|
|
5445
|
+
function hasExternalPublisher(t) {
|
|
5446
|
+
if (!Object.prototype.hasOwnProperty.call(durableEventTypes, t)) return false;
|
|
5447
|
+
const spec = durableEventTypes[t];
|
|
5448
|
+
return spec.publishers === void 0 || spec.publishers.some((p) => p !== "cloud");
|
|
5449
|
+
}
|
|
5450
|
+
var CLOUD_ONLY_EVENT_TYPES = DURABLE_EVENT_TYPES.filter(
|
|
5451
|
+
(t) => !hasExternalPublisher(t)
|
|
5452
|
+
);
|
|
5409
5453
|
|
|
5410
5454
|
// node_modules/@catalyst-cloud/schema/src/events/retention.ts
|
|
5411
5455
|
var EVENT_HOT_WINDOW_MS = 7 * 24 * 60 * 60 * 1e3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@catalyst-cloud/sdk",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4",
|
|
4
4
|
"description": "Read and update your Catalyst Cloud data, and receive live changes in your apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Coalesce Labs",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
],
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@catalyst-cloud/read-model": "^0.16.0",
|
|
103
|
-
"@catalyst-cloud/replicate": "0.16.
|
|
104
|
-
"@catalyst-cloud/schema": "0.16.
|
|
103
|
+
"@catalyst-cloud/replicate": "0.16.3",
|
|
104
|
+
"@catalyst-cloud/schema": "0.16.3",
|
|
105
105
|
"@opentelemetry/api": "^1.9.0",
|
|
106
106
|
"@opentelemetry/context-async-hooks": "^2.8.0",
|
|
107
107
|
"@opentelemetry/resources": "^2.8.0",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"@sqlite.org/sqlite-wasm": "*",
|
|
120
120
|
"better-sqlite3": "*",
|
|
121
121
|
"@catalyst-cloud/read-model": "^0.16.0",
|
|
122
|
-
"@catalyst-cloud/replicate": "0.16.
|
|
123
|
-
"@catalyst-cloud/schema": "0.16.
|
|
122
|
+
"@catalyst-cloud/replicate": "0.16.3",
|
|
123
|
+
"@catalyst-cloud/schema": "0.16.3"
|
|
124
124
|
},
|
|
125
125
|
"peerDependenciesMeta": {
|
|
126
126
|
"@opentelemetry/api": {
|