instar 1.3.269 → 1.3.271

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 (109) hide show
  1. package/dashboard/index.html +73 -11
  2. package/dist/commands/server.d.ts.map +1 -1
  3. package/dist/commands/server.js +24 -3
  4. package/dist/commands/server.js.map +1 -1
  5. package/dist/coordination/MandateAudit.d.ts +48 -0
  6. package/dist/coordination/MandateAudit.d.ts.map +1 -0
  7. package/dist/coordination/MandateAudit.js +95 -0
  8. package/dist/coordination/MandateAudit.js.map +1 -0
  9. package/dist/coordination/MandateGate.d.ts +48 -0
  10. package/dist/coordination/MandateGate.d.ts.map +1 -0
  11. package/dist/coordination/MandateGate.js +104 -0
  12. package/dist/coordination/MandateGate.js.map +1 -0
  13. package/dist/coordination/MandateStore.d.ts +60 -0
  14. package/dist/coordination/MandateStore.d.ts.map +1 -0
  15. package/dist/coordination/MandateStore.js +106 -0
  16. package/dist/coordination/MandateStore.js.map +1 -0
  17. package/dist/coordination/ReviewExchange.d.ts +135 -0
  18. package/dist/coordination/ReviewExchange.d.ts.map +1 -0
  19. package/dist/coordination/ReviewExchange.js +192 -0
  20. package/dist/coordination/ReviewExchange.js.map +1 -0
  21. package/dist/coordination/conditions.d.ts +32 -0
  22. package/dist/coordination/conditions.d.ts.map +1 -0
  23. package/dist/coordination/conditions.js +54 -0
  24. package/dist/coordination/conditions.js.map +1 -0
  25. package/dist/coordination/types.d.ts +74 -0
  26. package/dist/coordination/types.d.ts.map +1 -0
  27. package/dist/coordination/types.js +17 -0
  28. package/dist/coordination/types.js.map +1 -0
  29. package/dist/core/ApprovalLedger.d.ts +132 -0
  30. package/dist/core/ApprovalLedger.d.ts.map +1 -0
  31. package/dist/core/ApprovalLedger.js +191 -0
  32. package/dist/core/ApprovalLedger.js.map +1 -0
  33. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  34. package/dist/core/PostUpdateMigrator.js +33 -1
  35. package/dist/core/PostUpdateMigrator.js.map +1 -1
  36. package/dist/core/SecretStore.d.ts.map +1 -1
  37. package/dist/core/SecretStore.js +10 -1
  38. package/dist/core/SecretStore.js.map +1 -1
  39. package/dist/core/SessionBuildContextStore.d.ts +33 -0
  40. package/dist/core/SessionBuildContextStore.d.ts.map +1 -0
  41. package/dist/core/SessionBuildContextStore.js +107 -0
  42. package/dist/core/SessionBuildContextStore.js.map +1 -0
  43. package/dist/core/SessionManager.d.ts +4 -0
  44. package/dist/core/SessionManager.d.ts.map +1 -1
  45. package/dist/core/SessionManager.js +44 -3
  46. package/dist/core/SessionManager.js.map +1 -1
  47. package/dist/core/TransferByNickname.d.ts +6 -0
  48. package/dist/core/TransferByNickname.d.ts.map +1 -1
  49. package/dist/core/TransferByNickname.js +18 -6
  50. package/dist/core/TransferByNickname.js.map +1 -1
  51. package/dist/core/seamlessnessConfig.d.ts.map +1 -1
  52. package/dist/core/seamlessnessConfig.js +12 -1
  53. package/dist/core/seamlessnessConfig.js.map +1 -1
  54. package/dist/core/types.d.ts +34 -0
  55. package/dist/core/types.d.ts.map +1 -1
  56. package/dist/core/types.js.map +1 -1
  57. package/dist/feedback-factory/migration/immutableGuard.d.ts +87 -0
  58. package/dist/feedback-factory/migration/immutableGuard.d.ts.map +1 -0
  59. package/dist/feedback-factory/migration/immutableGuard.js +163 -0
  60. package/dist/feedback-factory/migration/immutableGuard.js.map +1 -0
  61. package/dist/feedback-factory/migration/importIntegrity.d.ts +112 -0
  62. package/dist/feedback-factory/migration/importIntegrity.d.ts.map +1 -0
  63. package/dist/feedback-factory/migration/importIntegrity.js +202 -0
  64. package/dist/feedback-factory/migration/importIntegrity.js.map +1 -0
  65. package/dist/feedback-factory/monitor/parityMonitor.d.ts +75 -0
  66. package/dist/feedback-factory/monitor/parityMonitor.d.ts.map +1 -0
  67. package/dist/feedback-factory/monitor/parityMonitor.js +98 -0
  68. package/dist/feedback-factory/monitor/parityMonitor.js.map +1 -0
  69. package/dist/feedback-factory/monitor/parityMonitorStore.d.ts +44 -0
  70. package/dist/feedback-factory/monitor/parityMonitorStore.d.ts.map +1 -0
  71. package/dist/feedback-factory/monitor/parityMonitorStore.js +80 -0
  72. package/dist/feedback-factory/monitor/parityMonitorStore.js.map +1 -0
  73. package/dist/scaffold/templates.d.ts.map +1 -1
  74. package/dist/scaffold/templates.js +19 -1
  75. package/dist/scaffold/templates.js.map +1 -1
  76. package/dist/scheduler/MentorAutonomousGuardian.d.ts.map +1 -1
  77. package/dist/scheduler/MentorAutonomousGuardian.js +1 -0
  78. package/dist/scheduler/MentorAutonomousGuardian.js.map +1 -1
  79. package/dist/server/AgentServer.d.ts +11 -0
  80. package/dist/server/AgentServer.d.ts.map +1 -1
  81. package/dist/server/AgentServer.js +102 -1
  82. package/dist/server/AgentServer.js.map +1 -1
  83. package/dist/server/CapabilityIndex.d.ts.map +1 -1
  84. package/dist/server/CapabilityIndex.js +45 -0
  85. package/dist/server/CapabilityIndex.js.map +1 -1
  86. package/dist/server/routes.d.ts +19 -0
  87. package/dist/server/routes.d.ts.map +1 -1
  88. package/dist/server/routes.js +482 -4
  89. package/dist/server/routes.js.map +1 -1
  90. package/package.json +1 -1
  91. package/src/data/builtin-manifest.json +65 -65
  92. package/src/scaffold/templates.ts +19 -1
  93. package/upgrades/1.3.270.md +106 -0
  94. package/upgrades/1.3.271.md +154 -0
  95. package/upgrades/approval-ledger-phase2.eli16.md +56 -0
  96. package/upgrades/autoloop-gate-compliance.eli16.md +11 -0
  97. package/upgrades/feedback-phase3-monitor.eli16.md +51 -0
  98. package/upgrades/feedback-phase4-integrity.eli16.md +54 -0
  99. package/upgrades/respawn-build-context-reestablishment.eli16.md +5 -0
  100. package/upgrades/side-effects/approval-ledger-phase2.md +82 -0
  101. package/upgrades/side-effects/autoloop-gate-compliance.md +43 -0
  102. package/upgrades/side-effects/coordination-mandate-enforcement.md +86 -0
  103. package/upgrades/side-effects/dashboard-pool-sessions.md +103 -0
  104. package/upgrades/side-effects/feedback-phase3-monitor.md +37 -0
  105. package/upgrades/side-effects/feedback-phase4-integrity.md +35 -0
  106. package/upgrades/side-effects/respawn-build-context-reestablishment.md +81 -0
  107. package/upgrades/side-effects/review-exchange-protocol.md +60 -0
  108. package/upgrades/side-effects/secret-drop-store-first.md +117 -0
  109. package/upgrades/side-effects/transfer-idempotency-exactly-once.md +105 -0
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/server/routes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,EAAE,OAAO,IAAI,cAAc,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,SAAS,CAAC;AAMtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,kBAAkB,CAAC;AA+BlE,OAAO,EACL,mBAAmB,EAMpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAA4B,MAAM,uBAAuB,CAAC;AAkF7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA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ferByNickname.js';
17
17
  import { IntelligenceRouter } from '../core/IntelligenceRouter.js';
18
18
  import { knownComponents } from '../core/componentCategories.js';
19
+ import { SecretStore } from '../core/SecretStore.js';
19
20
  import { rateLimiter, signViewPath } from './middleware.js';
20
21
  import { writeLifelineRestartSignal } from '../core/version-skew.js';
21
22
  import { readSessionClocks } from '../core/SessionClockReader.js';
@@ -3587,15 +3588,26 @@ export function createRoutes(ctx) {
3587
3588
  const sinceMs = Number.isFinite(rawSince) && rawSince > 0 ? rawSince : undefined;
3588
3589
  res.json(ctx.sleepWakeDetector.getStats(sinceMs));
3589
3590
  });
3590
- router.get('/sessions', (req, res) => {
3591
+ router.get('/sessions', async (req, res) => {
3591
3592
  const status = req.query.status;
3592
3593
  const validStatuses = ['starting', 'running', 'completed', 'failed', 'killed'];
3593
3594
  const sessions = status && validStatuses.includes(status)
3594
3595
  ? ctx.state.listSessions({ status: status })
3595
3596
  : ctx.state.listSessions();
3597
+ // Which machine answered — so a session row can say where it runs. Absent
3598
+ // on single-machine installs (no pool wired), so the dashboard hides the badge.
3599
+ const selfMachineId = ctx.meshSelfId ?? null;
3600
+ const selfMachineNickname = selfMachineId
3601
+ ? (ctx.machinePoolRegistry?.getCapacity(selfMachineId)?.nickname ?? null)
3602
+ : null;
3596
3603
  // Enrich sessions with hook event telemetry and platform info
3597
3604
  const enriched = sessions.map(s => {
3598
3605
  const result = { ...s };
3606
+ if (selfMachineId) {
3607
+ result.machineId = selfMachineId;
3608
+ if (selfMachineNickname)
3609
+ result.machineNickname = selfMachineNickname;
3610
+ }
3599
3611
  // Add hook event telemetry
3600
3612
  if (req.query.enrich !== 'false' && ctx.hookEventReceiver) {
3601
3613
  const summary = ctx.hookEventReceiver.getSessionSummary(s.tmuxSession);
@@ -3636,6 +3648,55 @@ export function createRoutes(ctx) {
3636
3648
  }
3637
3649
  return result;
3638
3650
  });
3651
+ // scope=pool — "all my sessions, across ALL my machines" (operator ask,
3652
+ // 2026-06-05 topic 13481: every session must show on the dashboard with the
3653
+ // machine it runs on). Aggregates each ONLINE-registered peer's plain
3654
+ // GET /sessions (never scope=pool — no recursion) and tags every remote
3655
+ // session with that peer's identity. Tolerant by design: a peer that is
3656
+ // down/slow contributes a `failed` entry, never a 500 — the dashboard still
3657
+ // shows everything reachable. Response shape differs from the plain route
3658
+ // (an object, not an array) because callers opting into the pool view need
3659
+ // the per-peer health alongside the merged list.
3660
+ if (req.query.scope === 'pool') {
3661
+ const peers = ctx.resolvePeerUrls?.() ?? [];
3662
+ const failed = [];
3663
+ const remote = [];
3664
+ await Promise.all(peers.map(async (p) => {
3665
+ try {
3666
+ const r = await fetch(`${p.url}/sessions`, {
3667
+ headers: { Authorization: `Bearer ${ctx.config.authToken}` },
3668
+ signal: AbortSignal.timeout(5000),
3669
+ });
3670
+ if (!r.ok)
3671
+ throw new Error(`HTTP ${r.status}`);
3672
+ const list = (await r.json());
3673
+ const nickname = ctx.machinePoolRegistry?.getCapacity(p.machineId)?.nickname ?? null;
3674
+ for (const s of list) {
3675
+ remote.push({
3676
+ ...s,
3677
+ machineId: s.machineId ?? p.machineId,
3678
+ machineNickname: s.machineNickname ?? nickname ?? undefined,
3679
+ remote: true,
3680
+ });
3681
+ }
3682
+ }
3683
+ catch (err) {
3684
+ failed.push({ machineId: p.machineId, error: err instanceof Error ? err.message : String(err) });
3685
+ }
3686
+ }));
3687
+ res.json({
3688
+ sessions: [...enriched, ...remote],
3689
+ pool: {
3690
+ enabled: !!ctx.machinePoolRegistry,
3691
+ selfMachineId,
3692
+ selfMachineNickname,
3693
+ peersQueried: peers.length,
3694
+ peersOk: peers.length - failed.length,
3695
+ failed,
3696
+ },
3697
+ });
3698
+ return;
3699
+ }
3639
3700
  res.json(enriched);
3640
3701
  });
3641
3702
  router.post('/sessions/cleanup-stale', (_req, res) => {
@@ -4123,6 +4184,362 @@ export function createRoutes(ctx) {
4123
4184
  samples: ctx.resourceLedger.recentSamples({ sinceMs, limit, source }),
4124
4185
  });
4125
4186
  });
4187
+ // ── Approval-as-Data (docs/specs/AUTONOMOUS-OPERATION-JUDGMENT-AND-APPROVAL-AS-DATA-SPEC.md, Part B / Phase 2) ──
4188
+ // Durable, signed record of every operator approval decision, and the per-class
4189
+ // agreement ratios computed from it. Tracks approvals WHEREVER they occur (a spec
4190
+ // sign-off, a decision approved in chat, …) — operator extension 2026-06-05.
4191
+ //
4192
+ // AUTHORITY INVARIANT: `mode` + `divergences` MUST reflect an EXPLICIT operator
4193
+ // statement (the approve control, or words like "go with your picks" = as-is vs
4194
+ // "change X because Y" = with-change). The agent must NOT infer/self-classify the
4195
+ // operator's intent; an ambiguous/silent decision is NOT recorded. Any row is
4196
+ // operator-correctable (append a row with `corrects` set). Read paths never gate.
4197
+ // Record an approval decision. The caller passes operator-sourced mode+divergences.
4198
+ router.post('/approvals', (req, res) => {
4199
+ if (!ctx.approvalLedger) {
4200
+ res.status(503).json({ error: 'approval ledger unavailable (no stateDir or init failed)' });
4201
+ return;
4202
+ }
4203
+ const b = req.body ?? {};
4204
+ if (typeof b.subject !== 'string' || !b.subject.trim()) {
4205
+ res.status(400).json({ error: 'subject is required' });
4206
+ return;
4207
+ }
4208
+ if (typeof b.decisionClass !== 'string' || !b.decisionClass.trim()) {
4209
+ res.status(400).json({ error: 'decisionClass is required' });
4210
+ return;
4211
+ }
4212
+ try {
4213
+ const row = ctx.approvalLedger.recordApproval({
4214
+ subject: b.subject,
4215
+ decisionClass: b.decisionClass,
4216
+ surface: b.surface ?? 'chat',
4217
+ approver: typeof b.approver === 'string' && b.approver ? b.approver : 'justin',
4218
+ mode: b.mode,
4219
+ divergences: Array.isArray(b.divergences) ? b.divergences : undefined,
4220
+ reviewIterations: typeof b.reviewIterations === 'number' ? b.reviewIterations : undefined,
4221
+ commitSha: typeof b.commitSha === 'string' ? b.commitSha : undefined,
4222
+ evidenceRef: typeof b.evidenceRef === 'string' ? b.evidenceRef : undefined,
4223
+ corrects: typeof b.corrects === 'string' ? b.corrects : undefined,
4224
+ decidedAt: typeof b.decidedAt === 'string' ? b.decidedAt : undefined,
4225
+ });
4226
+ res.status(201).json({ recorded: true, row });
4227
+ }
4228
+ catch (err) {
4229
+ // The store throws on an internally-inconsistent row (e.g. as-is WITH a
4230
+ // divergence, or a change WITHOUT one) — that's a 400, not a 500.
4231
+ res.status(400).json({ error: err instanceof Error ? err.message : String(err) });
4232
+ }
4233
+ });
4234
+ // Per-class agreement summary + an overall surface breakdown. Read-only; never gates.
4235
+ router.get('/approvals/summary', (_req, res) => {
4236
+ if (!ctx.approvalLedger) {
4237
+ res.status(503).json({ error: 'approval ledger unavailable (no stateDir or init failed)' });
4238
+ return;
4239
+ }
4240
+ const classes = ctx.approvalLedger.summarize();
4241
+ const rows = ctx.approvalLedger.all();
4242
+ const bySurface = {};
4243
+ for (const r of rows) {
4244
+ const s = (bySurface[r.surface] ??= { total: 0, approvedAsIs: 0 });
4245
+ s.total++;
4246
+ if (r.mode === 'approved-as-is')
4247
+ s.approvedAsIs++;
4248
+ }
4249
+ res.json({
4250
+ total: rows.length,
4251
+ classes,
4252
+ bySurface,
4253
+ note: 'Read-only. The ratio is a SIGNAL; auto-approval (Phase 3) routes through a full-context authority, not the arithmetic.',
4254
+ });
4255
+ });
4256
+ // List recorded rows, newest-first (paginated; ?limit= / ?decisionClass= / ?surface=).
4257
+ router.get('/approvals', (req, res) => {
4258
+ if (!ctx.approvalLedger) {
4259
+ res.status(503).json({ error: 'approval ledger unavailable (no stateDir or init failed)' });
4260
+ return;
4261
+ }
4262
+ let limit = 100;
4263
+ if (typeof req.query.limit === 'string' && /^\d+$/.test(req.query.limit)) {
4264
+ const n = Number(req.query.limit);
4265
+ if (n > 0 && n <= 1000)
4266
+ limit = n;
4267
+ }
4268
+ const decisionClass = typeof req.query.decisionClass === 'string' ? req.query.decisionClass : undefined;
4269
+ const surface = typeof req.query.surface === 'string' ? req.query.surface : undefined;
4270
+ let rows = ctx.approvalLedger.all();
4271
+ if (decisionClass)
4272
+ rows = rows.filter((r) => r.decisionClass === decisionClass);
4273
+ if (surface)
4274
+ rows = rows.filter((r) => r.surface === surface);
4275
+ const recent = rows.slice(-limit).reverse();
4276
+ res.json({ count: recent.length, total: rows.length, rows: recent });
4277
+ });
4278
+ // ── Coordination Mandate (docs/specs/coordination-mandate.md §4) ──
4279
+ // Deny-by-default enforcement for autonomous A2A authority. The mandate (a
4280
+ // human-authored, signed policy) is the AUTHORIZER — never the agent. Justin's
4281
+ // resolved decisions (A/A/B, 2026-06-05): issuance + revocation are PIN-gated
4282
+ // (the human-authenticated dashboard surface — an agent's Bearer token CANNOT
4283
+ // issue/revoke); the first mandate carries only exchange-read-credential +
4284
+ // sign-code-review; execute-cutover is not delegated (the flip stays human).
4285
+ //
4286
+ // PIN verification mirrors /dashboard/unlock: sha256 + timingSafeEqual + a
4287
+ // per-IP attempt limit. Read paths + /mandate/evaluate are Bearer-gated.
4288
+ const mandatePinAttempts = new Map();
4289
+ const MANDATE_PIN_MAX_ATTEMPTS = 5;
4290
+ const MANDATE_PIN_WINDOW_MS = 5 * 60 * 1000;
4291
+ /** Verify the operator PIN for mandate issuance/revocation. Returns an error
4292
+ * string (already sent) or null when the PIN is valid. */
4293
+ function checkMandatePin(req, res) {
4294
+ if (!ctx.config.dashboardPin) {
4295
+ res.status(503).json({ error: 'PIN authentication not available (no dashboardPin configured)' });
4296
+ return false;
4297
+ }
4298
+ const ip = req.ip || req.socket?.remoteAddress || 'unknown';
4299
+ const now = Date.now();
4300
+ let entry = mandatePinAttempts.get(ip);
4301
+ if (entry && now > entry.resetAt) {
4302
+ mandatePinAttempts.delete(ip);
4303
+ entry = undefined;
4304
+ }
4305
+ if (entry && entry.count >= MANDATE_PIN_MAX_ATTEMPTS) {
4306
+ res.status(429).json({ error: 'Too many attempts. Try again later.' });
4307
+ return false;
4308
+ }
4309
+ const pin = (req.body ?? {}).pin;
4310
+ if (!pin || typeof pin !== 'string') {
4311
+ res.status(403).json({ error: 'Operator PIN required — mandate issuance/revocation is a human action, not an agent action' });
4312
+ return false;
4313
+ }
4314
+ const ha = createHash('sha256').update(pin).digest();
4315
+ const hb = createHash('sha256').update(ctx.config.dashboardPin).digest();
4316
+ if (ha.length !== hb.length || !timingSafeEqual(ha, hb)) {
4317
+ if (!entry) {
4318
+ entry = { count: 0, resetAt: now + MANDATE_PIN_WINDOW_MS };
4319
+ mandatePinAttempts.set(ip, entry);
4320
+ }
4321
+ entry.count++;
4322
+ res.status(403).json({ error: 'Incorrect PIN', attemptsRemaining: MANDATE_PIN_MAX_ATTEMPTS - entry.count });
4323
+ return false;
4324
+ }
4325
+ return true;
4326
+ }
4327
+ // Evaluate an action against a mandate (the enforcement consumption point).
4328
+ // Every call — allow AND deny — lands in the hash-chained audit.
4329
+ router.post('/mandate/evaluate', (req, res) => {
4330
+ if (!ctx.coordination) {
4331
+ res.status(503).json({ error: 'coordination mandate engine unavailable (no stateDir or init failed)' });
4332
+ return;
4333
+ }
4334
+ const b = req.body ?? {};
4335
+ if (typeof b.action !== 'string' || !b.action || typeof b.agentFp !== 'string' || !b.agentFp || typeof b.mandateId !== 'string' || !b.mandateId) {
4336
+ res.status(400).json({ error: 'action, agentFp, and mandateId are required' });
4337
+ return;
4338
+ }
4339
+ const result = ctx.coordination.gate.evaluate({
4340
+ action: b.action,
4341
+ params: (b.params && typeof b.params === 'object') ? b.params : {},
4342
+ agentFp: b.agentFp,
4343
+ mandateId: b.mandateId,
4344
+ });
4345
+ res.json({ decision: result.decision, reason: result.reason, conditionResult: result.conditionResult });
4346
+ });
4347
+ // Read-only audit trail + chain integrity. MUST be registered before /mandate/:id.
4348
+ router.get('/mandate/audit', (req, res) => {
4349
+ if (!ctx.coordination) {
4350
+ res.status(503).json({ error: 'coordination mandate engine unavailable (no stateDir or init failed)' });
4351
+ return;
4352
+ }
4353
+ let limit = 100;
4354
+ if (typeof req.query.limit === 'string' && /^\d+$/.test(req.query.limit)) {
4355
+ const n = Number(req.query.limit);
4356
+ if (n > 0 && n <= 1000)
4357
+ limit = n;
4358
+ }
4359
+ const all = ctx.coordination.audit.all();
4360
+ res.json({
4361
+ total: all.length,
4362
+ chain: ctx.coordination.audit.verifyChain(),
4363
+ headHash: ctx.coordination.audit.headHash(),
4364
+ entries: all.slice(-limit).reverse(),
4365
+ });
4366
+ });
4367
+ // List mandates (each with its live authorship-verification status). Read-only.
4368
+ router.get('/mandate', (_req, res) => {
4369
+ if (!ctx.coordination) {
4370
+ res.status(503).json({ error: 'coordination mandate engine unavailable (no stateDir or init failed)' });
4371
+ return;
4372
+ }
4373
+ const { store } = ctx.coordination;
4374
+ res.json({
4375
+ mandates: store.list().map((m) => ({ ...m, authorshipValid: store.verifyAuthorship(m) })),
4376
+ });
4377
+ });
4378
+ // One mandate + its verification status. Read-only.
4379
+ router.get('/mandate/:id', (req, res) => {
4380
+ if (!ctx.coordination) {
4381
+ res.status(503).json({ error: 'coordination mandate engine unavailable (no stateDir or init failed)' });
4382
+ return;
4383
+ }
4384
+ const m = ctx.coordination.store.get(req.params.id);
4385
+ if (!m) {
4386
+ res.status(404).json({ error: `mandate "${req.params.id}" not found` });
4387
+ return;
4388
+ }
4389
+ res.json({ mandate: { ...m, authorshipValid: ctx.coordination.store.verifyAuthorship(m) } });
4390
+ });
4391
+ // Issue a mandate — PIN-GATED (decision 2A: the human-authenticated surface).
4392
+ router.post('/mandate/issue', (req, res) => {
4393
+ if (!ctx.coordination) {
4394
+ res.status(503).json({ error: 'coordination mandate engine unavailable (no stateDir or init failed)' });
4395
+ return;
4396
+ }
4397
+ if (!checkMandatePin(req, res))
4398
+ return;
4399
+ const b = req.body ?? {};
4400
+ if (typeof b.scope !== 'string' || !b.scope.trim()) {
4401
+ res.status(400).json({ error: 'scope is required' });
4402
+ return;
4403
+ }
4404
+ if (!Array.isArray(b.agents) || b.agents.length !== 2 || b.agents.some((a) => typeof a !== 'string' || !a)) {
4405
+ res.status(400).json({ error: 'agents must be a pair of two agent fingerprints' });
4406
+ return;
4407
+ }
4408
+ if (!Array.isArray(b.authorities) || b.authorities.length === 0
4409
+ || b.authorities.some((a) => typeof a?.action !== 'string' || !a.action || typeof a?.bounds !== 'object' || a.bounds === null)) {
4410
+ res.status(400).json({ error: 'authorities must be a non-empty array of { action, bounds, requiresCondition? }' });
4411
+ return;
4412
+ }
4413
+ if (typeof b.expiresAt !== 'string' || isNaN(Date.parse(b.expiresAt)) || Date.parse(b.expiresAt) <= Date.now()) {
4414
+ res.status(400).json({ error: 'expiresAt must be a future ISO timestamp (mandates always expire)' });
4415
+ return;
4416
+ }
4417
+ const mandate = ctx.coordination.store.issue({
4418
+ scope: b.scope,
4419
+ agents: [b.agents[0], b.agents[1]],
4420
+ authorities: b.authorities,
4421
+ author: typeof b.author === 'string' && b.author ? b.author : 'justin',
4422
+ expiresAt: b.expiresAt,
4423
+ });
4424
+ res.status(201).json({ issued: true, mandate });
4425
+ });
4426
+ // Revoke a mandate — PIN-GATED (the operator kill switch; checked on every action).
4427
+ router.post('/mandate/:id/revoke', (req, res) => {
4428
+ if (!ctx.coordination) {
4429
+ res.status(503).json({ error: 'coordination mandate engine unavailable (no stateDir or init failed)' });
4430
+ return;
4431
+ }
4432
+ if (!checkMandatePin(req, res))
4433
+ return;
4434
+ const reason = typeof (req.body ?? {}).reason === 'string' && req.body.reason ? req.body.reason : 'operator revocation';
4435
+ const m = ctx.coordination.store.revoke(req.params.id, reason);
4436
+ if (!m) {
4437
+ res.status(404).json({ error: `mandate "${req.params.id}" not found` });
4438
+ return;
4439
+ }
4440
+ res.json({ revoked: true, mandate: m });
4441
+ });
4442
+ // ── ReviewExchange — autonomous code-review protocol (coordination-mandate spec §7 G2.3) ──
4443
+ // One mutual, MANDATE-GATED sign-off of a review artifact between the two agents named
4444
+ // in a mandate. Both sign-offs run through /the same/ MandateGate (named party, bounds,
4445
+ // expiry, revocation — every decision in the hash-chained audit). Deny-by-default is
4446
+ // inherited: with no mandate issued, every sign/verdict path refuses. Bearer-gated
4447
+ // (creating/recording an exchange delegates nothing; the GATE is what authorizes
4448
+ // sign-offs — there is no PIN path here by design).
4449
+ const reviewsUnavailable = (res) => {
4450
+ if (!ctx.coordination) {
4451
+ res.status(503).json({ error: 'coordination mandate engine unavailable (no stateDir or init failed)' });
4452
+ return true;
4453
+ }
4454
+ return false;
4455
+ };
4456
+ // Create an exchange (state: proposed).
4457
+ router.post('/review-exchange', (req, res) => {
4458
+ if (reviewsUnavailable(res))
4459
+ return;
4460
+ const b = req.body ?? {};
4461
+ if (!Array.isArray(b.parties) || b.parties.length !== 2 || b.parties.some((p) => typeof p !== 'string' || !p)) {
4462
+ res.status(400).json({ error: 'parties must be [ownerFp, peerFp] — two agent fingerprints' });
4463
+ return;
4464
+ }
4465
+ const result = ctx.coordination.reviews.create({
4466
+ mandateId: String(b.mandateId ?? ''), artifact: String(b.artifact ?? ''),
4467
+ packageRef: String(b.packageRef ?? ''), packageSha256: String(b.packageSha256 ?? ''),
4468
+ parties: [b.parties[0], b.parties[1]],
4469
+ ...(typeof b.id === 'string' && b.id ? { id: b.id } : {}),
4470
+ });
4471
+ if (!result.ok) {
4472
+ res.status(400).json({ error: result.reason });
4473
+ return;
4474
+ }
4475
+ res.status(201).json({ created: true, exchange: result.record });
4476
+ });
4477
+ // List exchanges. Read-only.
4478
+ router.get('/review-exchange', (_req, res) => {
4479
+ if (reviewsUnavailable(res))
4480
+ return;
4481
+ res.json({ exchanges: ctx.coordination.reviews.list() });
4482
+ });
4483
+ // One exchange. Read-only.
4484
+ router.get('/review-exchange/:id', (req, res) => {
4485
+ if (reviewsUnavailable(res))
4486
+ return;
4487
+ const record = ctx.coordination.reviews.get(req.params.id);
4488
+ if (!record) {
4489
+ res.status(404).json({ error: `exchange "${req.params.id}" not found` });
4490
+ return;
4491
+ }
4492
+ res.json({ exchange: record });
4493
+ });
4494
+ // proposed → delivered (record the Threadline delivery evidence).
4495
+ router.post('/review-exchange/:id/delivered', (req, res) => {
4496
+ if (reviewsUnavailable(res))
4497
+ return;
4498
+ const result = ctx.coordination.reviews.markDelivered(req.params.id, String((req.body ?? {}).evidence ?? ''));
4499
+ if (!result.ok) {
4500
+ res.status(result.reason.includes('not found') ? 404 : 409).json({ error: result.reason });
4501
+ return;
4502
+ }
4503
+ res.json({ delivered: true, exchange: result.record });
4504
+ });
4505
+ // delivered → verdict-recorded | changes-requested. An 'approve' verdict is the
4506
+ // PEER's sign-off → mandate-gated for the peer's fingerprint (deny → 403).
4507
+ router.post('/review-exchange/:id/peer-verdict', (req, res) => {
4508
+ if (reviewsUnavailable(res))
4509
+ return;
4510
+ const b = req.body ?? {};
4511
+ if (b.verdict !== 'approve' && b.verdict !== 'request-changes') {
4512
+ res.status(400).json({ error: 'verdict must be "approve" or "request-changes"' });
4513
+ return;
4514
+ }
4515
+ const result = ctx.coordination.reviews.recordPeerVerdict(req.params.id, {
4516
+ verdict: b.verdict, summary: String(b.summary ?? ''),
4517
+ evidence: String(b.evidence ?? ''), peerFp: String(b.peerFp ?? ''),
4518
+ });
4519
+ if (!result.ok) {
4520
+ // Gate denials are 403 FIRST — a deny may itself say "mandate not found"
4521
+ // (deny-by-default), which must not masquerade as an exchange 404.
4522
+ const status = result.reason.startsWith('mandate denied') ? 403
4523
+ : result.reason.includes('not found') ? 404 : 409;
4524
+ res.status(status).json({ error: result.reason });
4525
+ return;
4526
+ }
4527
+ res.json({ recorded: true, exchange: result.record });
4528
+ });
4529
+ // verdict-recorded → complete. The OWNER's countersignature → mandate-gated (deny → 403).
4530
+ router.post('/review-exchange/:id/sign', (req, res) => {
4531
+ if (reviewsUnavailable(res))
4532
+ return;
4533
+ const result = ctx.coordination.reviews.sign(req.params.id, String((req.body ?? {}).agentFp ?? ''));
4534
+ if (!result.ok) {
4535
+ // Same precedence as peer-verdict: gate deny (403) before not-found (404).
4536
+ const status = result.reason.startsWith('mandate denied') ? 403
4537
+ : result.reason.includes('not found') ? 404 : 409;
4538
+ res.status(status).json({ error: result.reason });
4539
+ return;
4540
+ }
4541
+ res.json({ signed: true, exchange: result.record });
4542
+ });
4126
4543
  // ── Parallel-Work Awareness (docs/specs/parallel-activity-coherence.md, Phase A) ──
4127
4544
  // Read-only cross-topic index: every topic with intent state + its current focus +
4128
4545
  // high-specificity tags + whether a session is live on it. Signal-only; never gates.
@@ -8788,6 +9205,33 @@ export function createRoutes(ctx) {
8788
9205
  res.status(410).json({ error: 'This link has expired or already been used' });
8789
9206
  return;
8790
9207
  }
9208
+ // ── Store-first durable persistence (2026-06-04) ──────────────────────────
9209
+ // Before we confirm or nudge the agent, persist the submission to the durable,
9210
+ // AES-256-GCM encrypted SecretStore. Previously a submission lived ONLY in the
9211
+ // in-memory `received` map, so any session restart / compaction / cross-machine
9212
+ // handoff before the agent consumed it lost the secret outright — the recurring
9213
+ // "I handed you a secret and you dropped it" failure. Persisting first makes the
9214
+ // value survive churn by construction; the retrieve route falls back to this copy
9215
+ // when the in-memory one is gone, and a successful consume deletes it.
9216
+ // Best-effort + loud on failure: the ephemeral copy still exists for immediate
9217
+ // use, so a keychain/disk hiccup must not 500 the user's submission. Opt out with
9218
+ // config.secrets.persistDrops=false. NEVER log the secret value.
9219
+ if (ctx.config.secrets?.persistDrops !== false) {
9220
+ try {
9221
+ const store = new SecretStore({ stateDir: ctx.config.stateDir, forceFileKey: ctx.config.secrets?.forceFileKey });
9222
+ store.set(`secretDrops.${req.params.token}`, {
9223
+ label: submission.label,
9224
+ topicId: submission.topicId ?? null,
9225
+ receivedAt: submission.receivedAt,
9226
+ fields: Object.keys(submission.values),
9227
+ values: submission.values,
9228
+ });
9229
+ console.log(`[secret-drop] persisted submission to durable store (token ${req.params.token.slice(0, 8)}…, ${Object.keys(submission.values).length} field(s)) — survives session churn`);
9230
+ }
9231
+ catch (err) {
9232
+ console.error(`[secret-drop] DURABLE PERSIST FAILED (token ${req.params.token.slice(0, 8)}…) — secret is in-memory only and may be lost on churn:`, err instanceof Error ? err.message : String(err));
9233
+ }
9234
+ }
8791
9235
  // Send Telegram confirmation if topic is configured
8792
9236
  if (submission.topicId && ctx.telegram) {
8793
9237
  const fieldCount = Object.keys(submission.values).length;
@@ -8955,11 +9399,45 @@ export function createRoutes(ctx) {
8955
9399
  // non-destructive default lets the caller retry. See
8956
9400
  // docs/specs/secret-drop-hardening.md for the full rationale.
8957
9401
  router.post('/secrets/retrieve/:token', (req, res) => {
9402
+ const token = req.params.token;
8958
9403
  const consumeFlag = req.query.consume;
8959
9404
  const consume = consumeFlag === 'true' || consumeFlag === '1';
8960
- const submission = consume
8961
- ? secretDrop.consumeReceived(req.params.token)
8962
- : secretDrop.peekReceived(req.params.token);
9405
+ let submission = consume
9406
+ ? secretDrop.consumeReceived(token)
9407
+ : secretDrop.peekReceived(token);
9408
+ const persistDrops = ctx.config.secrets?.persistDrops !== false;
9409
+ if (!submission && persistDrops) {
9410
+ // Durable fallback: the in-memory `received` copy is gone (server restart,
9411
+ // compaction, cross-machine handoff, or grace-window cleanup). The store-first
9412
+ // persisted copy is the recovery path — without it, churn between submit and
9413
+ // retrieve dropped the secret with no recovery.
9414
+ try {
9415
+ const store = new SecretStore({ stateDir: ctx.config.stateDir, forceFileKey: ctx.config.secrets?.forceFileKey });
9416
+ const durable = store.get(`secretDrops.${token}`);
9417
+ if (durable && durable.values) {
9418
+ submission = {
9419
+ values: durable.values,
9420
+ receivedAt: durable.receivedAt ?? new Date().toISOString(),
9421
+ label: durable.label ?? 'Secret',
9422
+ topicId: durable.topicId ?? undefined,
9423
+ };
9424
+ // A successful consume against the durable copy removes it.
9425
+ if (consume)
9426
+ store.delete(`secretDrops.${token}`);
9427
+ }
9428
+ }
9429
+ catch (err) {
9430
+ console.error(`[secret-drop] durable fallback read failed (token ${token.slice(0, 8)}…):`, err instanceof Error ? err.message : String(err));
9431
+ }
9432
+ }
9433
+ else if (submission && consume && persistDrops) {
9434
+ // In-memory consume succeeded — clean the durable copy too, so a consumed
9435
+ // secret never lingers in the encrypted store (matters for one-time codes).
9436
+ try {
9437
+ new SecretStore({ stateDir: ctx.config.stateDir, forceFileKey: ctx.config.secrets?.forceFileKey }).delete(`secretDrops.${token}`);
9438
+ }
9439
+ catch { /* @silent-fallback-ok — durable cleanup is best-effort */ }
9440
+ }
8963
9441
  if (!submission) {
8964
9442
  res.status(404).json({ error: 'No submission found for this token' });
8965
9443
  return;