@catalyst-cloud/sdk 0.16.2 → 0.16.3

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 (2) hide show
  1. package/dist/node.js +40 -0
  2. 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.
@@ -5406,6 +5438,14 @@ var ALL_CLASSIFIED_EVENT_TYPES = [
5406
5438
  var WAKE_ELIGIBLE_EVENT_TYPES = DURABLE_EVENT_TYPES.filter(
5407
5439
  (t) => durableEventTypes[t].wakes !== false
5408
5440
  );
5441
+ function hasExternalPublisher(t) {
5442
+ if (!Object.prototype.hasOwnProperty.call(durableEventTypes, t)) return false;
5443
+ const spec = durableEventTypes[t];
5444
+ return spec.publishers === void 0 || spec.publishers.some((p) => p !== "cloud");
5445
+ }
5446
+ var CLOUD_ONLY_EVENT_TYPES = DURABLE_EVENT_TYPES.filter(
5447
+ (t) => !hasExternalPublisher(t)
5448
+ );
5409
5449
 
5410
5450
  // node_modules/@catalyst-cloud/schema/src/events/retention.ts
5411
5451
  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.2",
3
+ "version": "0.16.3",
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.1",
104
- "@catalyst-cloud/schema": "0.16.1",
103
+ "@catalyst-cloud/replicate": "0.16.2",
104
+ "@catalyst-cloud/schema": "0.16.2",
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.1",
123
- "@catalyst-cloud/schema": "0.16.1"
122
+ "@catalyst-cloud/replicate": "0.16.2",
123
+ "@catalyst-cloud/schema": "0.16.2"
124
124
  },
125
125
  "peerDependenciesMeta": {
126
126
  "@opentelemetry/api": {