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

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.
@@ -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) => {