agents-relay 2.0.218 → 2.0.220

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.
@@ -92,6 +92,27 @@ export class LocalAuthorityDurableStore {
92
92
  priority: 200,
93
93
  });
94
94
  }
95
+ /** Host-owned mobile Review is a SQLite lifecycle fact, never a GitHub
96
+ * projection. Use the same authoritative host-invocation ledger as the
97
+ * preview CLI and do not acknowledge a decision without durable storage. */
98
+ async recordHostInvocationEvent(delivery, outcome, fingerprint) {
99
+ if (!this.authority.recordHostInvocationEvent)
100
+ throw new Error('SQLite host invocation event ledger unavailable');
101
+ await this.authority.recordHostInvocationEvent(delivery, outcome, fingerprint);
102
+ }
103
+ async hasHostInvocationDecision(jobId, taskId, invocationId, fingerprint) {
104
+ if (!this.authority.hasHostInvocationDecision)
105
+ throw new Error('SQLite host invocation decision ledger unavailable');
106
+ return this.authority.hasHostInvocationDecision(jobId, taskId, invocationId, fingerprint);
107
+ }
108
+ async recordHostInvocationDecision(delivery, fingerprint) {
109
+ if (!this.authority.recordHostInvocationDecision)
110
+ throw new Error('SQLite host invocation decision ledger unavailable');
111
+ const receipt = await this.authority.recordHostInvocationDecision(delivery, fingerprint);
112
+ if (receipt.outcome === 'accepted')
113
+ publishLocalCommit(await this.load(delivery.jobId));
114
+ return receipt;
115
+ }
95
116
  async recordExecutionProcess(record) {
96
117
  await this.authority.recordExecutionProcess(record);
97
118
  }
package/dist/pool.js CHANGED
@@ -217,7 +217,11 @@ export class RepositoryWorkerPool {
217
217
  return;
218
218
  if (routedWebhook)
219
219
  return;
220
- const lifecycle = ['task.started', 'task.progress', 'task.completed', 'task.failed', 'task.blocked', 'task.unblocked', 'task.cancelled', 'review.started', 'review.approved', 'review.changes_required', 'review.blocked'].includes(event.type);
220
+ const lifecycle = ['task.started', 'task.progress', 'task.completed', 'task.failed', 'task.blocked', 'task.unblocked', 'task.cancelled', 'review.started', 'review.approved', 'review.changes_required', 'review.blocked',
221
+ // Mobile/host interactive decisions must reach the same canonical reconciler
222
+ // as other Task lifecycle events; merely storing the NATS audit event
223
+ // must never be mistaken for resuming an AWAITING_DECISION Task.
224
+ 'task.interactive_decision'].includes(event.type);
221
225
  // GitHub transport is observational. It must never wake lifecycle execution.
222
226
  if (event.type === 'github.webhook')
223
227
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "2.0.218",
3
+ "version": "2.0.220",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "dev": "tsx src/cli.ts",
19
19
  "test:publish": "npm run build && node --import ./test/test-store-env.mjs --test --test-concurrency=1 --test-force-exit test/*.test.js",
20
20
  "test:shortcut:dags": "npm run build && node --import ./test/test-store-env.mjs --test --test-concurrency=1 test/verification/shortcut-dag-matrix.test.mjs test/agent-shortcut.test.js",
21
- "test:fast": "npm run build && node --import ./test/test-store-env.mjs --test --test-concurrency=2 test/workflow-lifecycle.test.js test/workflow-v2-lifecycle-parity.test.js test/workflow-effects.test.js test/relay-store.test.js test/local-authority.test.js test/local-jobid-routing.test.js test/local-sqlite-jobid.test.js test/no-github.test.js test/reconcile-coordinator.test.js test/service-publication.test.js test/github-webhook.test.js test/verification/shortcut-dag-matrix.test.mjs",
21
+ "test:fast": "npm run build && node --import ./test/test-store-env.mjs --test --test-concurrency=2 test/workflow-lifecycle.test.js test/workflow-v2-lifecycle-parity.test.js test/workflow-effects.test.js test/relay-store.test.js test/local-authority.test.js test/local-jobid-routing.test.js test/interactive-request.test.js test/local-sqlite-jobid.test.js test/no-github.test.js test/reconcile-coordinator.test.js test/service-publication.test.js test/github-webhook.test.js test/verification/shortcut-dag-matrix.test.mjs",
22
22
  "test:full": "npm run build && node --import ./test/test-store-env.mjs --test --test-concurrency=1 test/*.test.js test/verification/shortcut-dag-matrix.test.mjs && npm run test:verification:l3",
23
23
  "test:verification:l1": "npm run build && node --test test/verification/harness.test.mjs test/verification/contract.test.mjs test/browser-worker-pool-graph.test.js test/verification/graph-inventory.test.mjs test/verification/dashboard-drilldown.test.mjs test/verification/evidence-matrix.test.mjs test/verification/task-resolution-classification.test.mjs test/verification/planner-contract.test.mjs test/verification/force-restate-validation.test.mjs test/planner-child-recovery.test.js",
24
24
  "test:verification:l4:contracts": "npm run build && node --test test/verification/l4/prompt-evals.test.mjs",