@hearsay-tools/squawk 0.18.0-dev.7812 → 0.18.0-dev.7820

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/dist/activity/publisher.js +2 -2
  2. package/dist/activity/publisher.js.map +1 -1
  3. package/dist/activity/read-model.js +1 -1
  4. package/dist/activity/read-model.js.map +1 -1
  5. package/dist/activity/requests.d.ts +4 -2
  6. package/dist/activity/requests.js +1 -1
  7. package/dist/activity/requests.js.map +1 -1
  8. package/dist/artifacts/reports-index.d.ts +2 -1
  9. package/dist/artifacts/reports-index.js +1 -1
  10. package/dist/artifacts/reports-index.js.map +1 -1
  11. package/dist/ci-wait/controller.d.ts +4 -4
  12. package/dist/delegation/conversations.d.ts +6 -2
  13. package/dist/delegation/conversations.js +3 -2
  14. package/dist/delegation/conversations.js.map +1 -1
  15. package/dist/delegation/family-end.d.ts +4 -2
  16. package/dist/delegation/results.js +2 -2
  17. package/dist/delegation/results.js.map +1 -1
  18. package/dist/delegation/routes.d.ts +11 -11
  19. package/dist/delegation/routes.js +1 -1
  20. package/dist/delegation/routes.js.map +1 -1
  21. package/dist/delegation/scratch-cleanup.js +2 -2
  22. package/dist/delegation/scratch-cleanup.js.map +1 -1
  23. package/dist/delegation/service.js +2 -2
  24. package/dist/delegation/service.js.map +1 -1
  25. package/dist/delegation/transport.d.ts +10 -10
  26. package/dist/delegation/worker-cleanup.js +1 -1
  27. package/dist/delegation/worker-cleanup.js.map +1 -1
  28. package/dist/preview/host.d.ts +2 -1
  29. package/dist/preview/host.js +1 -1
  30. package/dist/preview/host.js.map +1 -1
  31. package/dist/project-migration/live.js +3 -3
  32. package/dist/project-migration/live.js.map +1 -1
  33. package/dist/runs/claim-families.d.ts +1 -1
  34. package/dist/runs/claim-families.js +1 -1
  35. package/dist/runs/live-tasks.js +1 -1
  36. package/dist/runs/live-tasks.js.map +1 -1
  37. package/dist/runs/loaded-run-exits.d.ts +23 -0
  38. package/dist/runs/loaded-run-exits.js +46 -1
  39. package/dist/runs/loaded-run-exits.js.map +1 -1
  40. package/dist/runs/ports.d.ts +67 -26
  41. package/dist/runs/retention.d.ts +3 -1
  42. package/dist/runs/retention.js +5 -5
  43. package/dist/runs/retention.js.map +1 -1
  44. package/dist/runs/run-archive.d.ts +1217 -0
  45. package/dist/runs/run-archive.js +332 -0
  46. package/dist/runs/run-archive.js.map +1 -0
  47. package/dist/runs/run-claims-topic.d.ts +130 -0
  48. package/dist/runs/run-claims-topic.js +258 -0
  49. package/dist/runs/run-claims-topic.js.map +1 -0
  50. package/dist/runs/run-claims.d.ts +1 -1
  51. package/dist/runs/run-claims.js +1 -1
  52. package/dist/runs/run-claims.js.map +1 -1
  53. package/dist/runs/run-database.d.ts +1 -1
  54. package/dist/runs/run-index.js +3 -1
  55. package/dist/runs/run-index.js.map +1 -1
  56. package/dist/runs/run-pins.d.ts +38 -0
  57. package/dist/runs/run-pins.js +45 -0
  58. package/dist/runs/run-pins.js.map +1 -0
  59. package/dist/runs/run-read-flags.d.ts +58 -0
  60. package/dist/runs/run-read-flags.js +87 -0
  61. package/dist/runs/run-read-flags.js.map +1 -0
  62. package/dist/runs/run-references.d.ts +1 -1
  63. package/dist/runs/run-references.js +1 -1
  64. package/dist/runs/run-references.js.map +1 -1
  65. package/dist/runs/store-open.d.ts +45 -0
  66. package/dist/runs/store-open.js +89 -0
  67. package/dist/runs/store-open.js.map +1 -0
  68. package/dist/runs/store.d.ts +13 -237
  69. package/dist/runs/store.js +78 -816
  70. package/dist/runs/store.js.map +1 -1
  71. package/dist/runs/webhook.d.ts +3 -1
  72. package/dist/runs/webhook.js +2 -2
  73. package/dist/runs/webhook.js.map +1 -1
  74. package/dist/serve-boot.d.ts +2 -2
  75. package/dist/serve-boot.js +1 -1
  76. package/dist/serve-boot.js.map +1 -1
  77. package/dist/server/archive-on-merge.js +10 -10
  78. package/dist/server/archive-on-merge.js.map +1 -1
  79. package/dist/server/completion-actions.js +8 -8
  80. package/dist/server/completion-actions.js.map +1 -1
  81. package/dist/server/project-context.js +2 -2
  82. package/dist/server/project-context.js.map +1 -1
  83. package/dist/server/project-run-files.d.ts +3 -1
  84. package/dist/server/project-run-files.js +3 -3
  85. package/dist/server/project-run-files.js.map +1 -1
  86. package/dist/server/run-checkout.d.ts +3 -1
  87. package/dist/server/run-checkout.js +3 -3
  88. package/dist/server/run-checkout.js.map +1 -1
  89. package/dist/server/run-event-feed.js +2 -2
  90. package/dist/server/run-event-feed.js.map +1 -1
  91. package/dist/server/server.d.ts +8619 -8619
  92. package/dist/server/server.js +15 -15
  93. package/dist/server/server.js.map +1 -1
  94. package/dist/workflows/run/continuation-acceptance.js +1 -1
  95. package/dist/workflows/run/continuation-acceptance.js.map +1 -1
  96. package/dist/workflows/run/family-reconciler.js +2 -2
  97. package/dist/workflows/run/family-reconciler.js.map +1 -1
  98. package/dist/workflows/run/maintenance-claims.js +6 -6
  99. package/dist/workflows/run/maintenance-claims.js.map +1 -1
  100. package/dist/workflows/run/run-cancel.js +1 -1
  101. package/dist/workflows/run/run-cancel.js.map +1 -1
  102. package/dist/workflows/run/run-recovery.js +3 -3
  103. package/dist/workflows/run/run-recovery.js.map +1 -1
  104. package/dist/workflows/run/run-settlement.js +1 -1
  105. package/dist/workflows/run/run-settlement.js.map +1 -1
  106. package/dist/workflows/run.js +7 -7
  107. package/dist/workflows/run.js.map +1 -1
  108. package/package.json +4 -4
  109. package/scripts/benchmark-run-store.ts +2 -2
@@ -2358,12 +2358,12 @@ export function createApp(deps) {
2358
2358
  if (c.req.method === 'GET' || c.req.method === 'HEAD' || id === undefined)
2359
2359
  return next();
2360
2360
  const { store, manager } = c.get('project');
2361
- if (store.runOwnership(id) === 'orphaned') {
2361
+ if (store.claims.runOwnership(id) === 'orphaned') {
2362
2362
  const stop = c.req.method === 'POST' && c.req.path.endsWith('/cancel');
2363
2363
  if (await manager.adoptOrphanedRun(id, { stop }) && stop && store.getRun(id)?.status === 'cancelled')
2364
2364
  c.set('stoppedOnAdoption', true);
2365
2365
  }
2366
- const refusal = store.writeRefusal(id);
2366
+ const refusal = store.claims.writeRefusal(id);
2367
2367
  if (!refusal)
2368
2368
  return next();
2369
2369
  // The delegation route in this family answers in the delegation error shape it always uses.
@@ -2427,10 +2427,10 @@ export function createApp(deps) {
2427
2427
  })
2428
2428
  // Registered before the `/:id/...` routes so "archive-finished" and "read-all"
2429
2429
  // never match as a run id.
2430
- .post('/runs/archive-finished', jsonZodValidator(archiveFinishedRequestSchema, { absent: {}, malformed: null }), (c) => c.json(c.get('project').store.archiveFinished(c.req.valid('json').scope, c.req.valid('json').automation)))
2430
+ .post('/runs/archive-finished', jsonZodValidator(archiveFinishedRequestSchema, { absent: {}, malformed: null }), (c) => c.json(c.get('project').store.archive.archiveFinished(c.req.valid('json').scope, c.req.valid('json').automation)))
2431
2431
  // The read-receipt sweep (#unread-done-items) — the mark-read twin of the archive
2432
2432
  // sweep above, and under the same registration-order guard.
2433
- .post('/runs/read-all', jsonZodValidator(markAllReadRequestSchema, { absent: {}, malformed: null }), (c) => c.json({ read: c.get('project').store.markAllRead(c.req.valid('json').automation) }))
2433
+ .post('/runs/read-all', jsonZodValidator(markAllReadRequestSchema, { absent: {}, malformed: null }), (c) => c.json({ read: c.get('project').store.readFlags.markAllRead(c.req.valid('json').automation) }))
2434
2434
  .post('/runs/:id/archive', jsonZodValidator(archiveSchema, { absent: ({}) }), async (c) => {
2435
2435
  const { store } = c.get('project');
2436
2436
  const id = c.req.param('id');
@@ -2440,7 +2440,7 @@ export function createApp(deps) {
2440
2440
  // `setArchived` itself — the bulk sweep must obey it too (spec
2441
2441
  // 2026-08-03-auto-resume-after-usage-limit).
2442
2442
  const parsed = { data: c.req.valid('json') };
2443
- const run = store.setArchived(id, parsed.data.archived !== false);
2443
+ const run = store.archive.setArchived(id, parsed.data.archived !== false);
2444
2444
  return run ? c.json(run) : c.json({ error: 'not found' }, 404);
2445
2445
  })
2446
2446
  // Pin one task to the top of this project's list, or unpin it (#935). The archive route's
@@ -2449,7 +2449,7 @@ export function createApp(deps) {
2449
2449
  // event and no new response shape.
2450
2450
  .post('/runs/:id/pin', paramZodValidator(runIdParamSchema), jsonZodValidator(pinRunInputSchema, { absent: {}, malformed: null }), (c) => {
2451
2451
  const { store } = c.get('project');
2452
- const run = store.setPinned(c.req.valid('param').id, c.req.valid('json').pinned !== false);
2452
+ const run = store.readFlags.setPinned(c.req.valid('param').id, c.req.valid('json').pinned !== false);
2453
2453
  return run ? c.json(run) : c.json({ error: 'not found' }, 404);
2454
2454
  })
2455
2455
  // Task webhook opt-in for one run (#589), valid in every state — handing a finished task to a
@@ -2494,14 +2494,14 @@ export function createApp(deps) {
2494
2494
  .post('/runs/:id/read', (c) => {
2495
2495
  // No body: opening a thread marks it read, full stop. Stamps `seenAt = now` and
2496
2496
  // returns the updated record (which also rides the `run` SSE via `touch`).
2497
- const run = c.get('project').store.setRead(c.req.param('id'));
2497
+ const run = c.get('project').store.readFlags.setRead(c.req.param('id'));
2498
2498
  return run ? c.json(run) : c.json({ error: 'not found' }, 404);
2499
2499
  })
2500
2500
  .post('/runs/:id/unread', (c) => {
2501
2501
  // The mark-unread twin (#775) — bodyless like its read counterpart: clearing the
2502
2502
  // receipt is the whole action, so there is nothing to say about it. Sits under
2503
2503
  // `/runs/:id/`, so the `read-all` registration-order caveat above does not apply.
2504
- const run = c.get('project').store.setUnread(c.req.param('id'));
2504
+ const run = c.get('project').store.readFlags.setUnread(c.req.param('id'));
2505
2505
  return run ? c.json(run) : c.json({ error: 'not found' }, 404);
2506
2506
  })
2507
2507
  .post('/runs', jsonZodValidator(createRunInputSchema, { runners: { ids: ['runner', 'steps.*.runner'] } }), async (c) => {
@@ -2552,7 +2552,7 @@ export function createApp(deps) {
2552
2552
  if (!store.getRun(id))
2553
2553
  return c.json({ error: 'not found' }, 404);
2554
2554
  try {
2555
- return c.json(await readRunHistoryPage(store.sourceDataDir(id), id, c.req.valid('query').cursor));
2555
+ return c.json(await readRunHistoryPage(store.claims.sourceDataDir(id), id, c.req.valid('query').cursor));
2556
2556
  }
2557
2557
  catch (error) {
2558
2558
  if (error instanceof HistoryCursorError)
@@ -2565,7 +2565,7 @@ export function createApp(deps) {
2565
2565
  const { id } = c.req.valid('param');
2566
2566
  if (!store.getRun(id))
2567
2567
  return c.json({ error: 'not found' }, 404);
2568
- return c.json(await deriveRunContextEvents(store.sourceDataDir(id), id));
2568
+ return c.json(await deriveRunContextEvents(store.claims.sourceDataDir(id), id));
2569
2569
  })
2570
2570
  // Editable titles (#389). The UI displays `titleSummary ?? title`, so a
2571
2571
  // user edit sets BOTH: `title` (the record's own name — the raw task stops
@@ -2868,7 +2868,7 @@ export function createApp(deps) {
2868
2868
  const run = store.getRun(c.req.param('id'));
2869
2869
  if (!run)
2870
2870
  return c.json({ error: 'not found' }, 404);
2871
- return c.text(renderHandoffRecords(readHandoff(store.sourceDataDir(run.id), run.id), run.handoffRecords), 200, {
2871
+ return c.text(renderHandoffRecords(readHandoff(store.claims.sourceDataDir(run.id), run.id), run.handoffRecords), 200, {
2872
2872
  'content-type': 'text/markdown; charset=utf-8',
2873
2873
  });
2874
2874
  })
@@ -2878,7 +2878,7 @@ export function createApp(deps) {
2878
2878
  if (!run)
2879
2879
  return c.json({ error: 'not found' }, 404);
2880
2880
  const file = c.req.valid('param').file;
2881
- const path = resolveAttachmentPath(store.sourceDataDir(run.id), run.id, file);
2881
+ const path = resolveAttachmentPath(store.claims.sourceDataDir(run.id), run.id, file);
2882
2882
  if (!path)
2883
2883
  return c.json({ error: 'not found' }, 404);
2884
2884
  const ext = file.split('.').pop() ?? '';
@@ -2960,7 +2960,7 @@ export function createApp(deps) {
2960
2960
  return c.json(checkout.body, checkout.status);
2961
2961
  const { run, directory: workingDirectory } = checkout;
2962
2962
  const query = c.req.valid('query');
2963
- const loaded = await loadFileLink({ dataDir: store.sourceDataDir(run.id), runId: run.id, projectRoot: root, workingDirectory, path: query.path });
2963
+ const loaded = await loadFileLink({ dataDir: store.claims.sourceDataDir(run.id), runId: run.id, projectRoot: root, workingDirectory, path: query.path });
2964
2964
  if (query.raw === '1') {
2965
2965
  if (!loaded.imageBytes || loaded.preview.type !== 'file')
2966
2966
  return c.json({ error: 'Only bounded raster images can be served inline.' }, 409);
@@ -3141,7 +3141,7 @@ export function createApp(deps) {
3141
3141
  const outcome = await resolveForgeRoot(repoRoot, deps.forgeFactory).createPR({
3142
3142
  repoRoot,
3143
3143
  run,
3144
- handoffText: readHandoff(store.sourceDataDir(id), id),
3144
+ handoffText: readHandoff(store.claims.sourceDataDir(id), id),
3145
3145
  });
3146
3146
  if (!outcome.ok) {
3147
3147
  return c.json({ error: outcome.error, manual: `git merge ${run.branch}` }, 409);
@@ -3319,7 +3319,7 @@ export function createApp(deps) {
3319
3319
  const query = c.req.valid('query');
3320
3320
  if (query.cursor) {
3321
3321
  try {
3322
- await validateLiveCursor(store.sourceDataDir(id), id, query.cursor);
3322
+ await validateLiveCursor(store.claims.sourceDataDir(id), id, query.cursor);
3323
3323
  }
3324
3324
  catch (error) {
3325
3325
  if (error instanceof HistoryCursorError)