@hearsay-tools/squawk 0.18.0-dev.7501 → 0.18.0-dev.7516

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 (228) hide show
  1. package/dist/agent-config/service.d.ts +2 -1
  2. package/dist/agent-config/service.js +1 -1
  3. package/dist/agent-config/service.js.map +1 -1
  4. package/dist/automations/service.d.ts +14 -14
  5. package/dist/automations/service.js +2 -2
  6. package/dist/automations/service.js.map +1 -1
  7. package/dist/automations/store.js +6 -1
  8. package/dist/automations/store.js.map +1 -1
  9. package/dist/automations/task-template.js +2 -1
  10. package/dist/automations/task-template.js.map +1 -1
  11. package/dist/automations/tool-adapter.js +17 -8
  12. package/dist/automations/tool-adapter.js.map +1 -1
  13. package/dist/ci-wait/controller.d.ts +8 -8
  14. package/dist/ci-wait/controller.js +1 -1
  15. package/dist/ci-wait/controller.js.map +1 -1
  16. package/dist/ci-wait/tools.d.ts +2 -2
  17. package/dist/contract/activity.d.ts +7 -49
  18. package/dist/contract/agent-config.d.ts +2 -14
  19. package/dist/contract/agent-profiles.d.ts +13 -91
  20. package/dist/contract/automation-requests.d.ts +6 -42
  21. package/dist/contract/automation-storage.d.ts +6 -42
  22. package/dist/contract/automation-tool.d.ts +6 -42
  23. package/dist/contract/automations.d.ts +18 -126
  24. package/dist/contract/config-requests.d.ts +2 -14
  25. package/dist/contract/delegation.d.ts +8 -56
  26. package/dist/contract/discovery.d.ts +8 -56
  27. package/dist/contract/health.d.ts +3 -25
  28. package/dist/contract/index.d.ts +1 -1
  29. package/dist/contract/index.js +1937 -1985
  30. package/dist/contract/per-runner-optional-strings.d.ts +3 -8
  31. package/dist/contract/provider-requests.d.ts +5 -35
  32. package/dist/contract/query-requests.d.ts +4 -7
  33. package/dist/contract/run-requests.d.ts +1 -7
  34. package/dist/contract/runner-skills.d.ts +2 -14
  35. package/dist/contract/runner.d.ts +5 -9
  36. package/dist/contract/runners.d.ts +39 -0
  37. package/dist/contract/runs.d.ts +22 -154
  38. package/dist/contract/workflow-file.d.ts +1 -7
  39. package/dist/contract/workflows.d.ts +9 -44
  40. package/dist/contract/workspace-events.d.ts +4 -28
  41. package/dist/contract/workspace.d.ts +23 -151
  42. package/dist/core/backend-detect.d.ts +2 -1
  43. package/dist/core/backend-detect.js.map +1 -1
  44. package/dist/core/provider-availability.d.ts +3 -1
  45. package/dist/core/provider-availability.js +1 -0
  46. package/dist/core/provider-availability.js.map +1 -1
  47. package/dist/core/runner-definition.d.ts +40 -0
  48. package/dist/core/runner-definition.js.map +1 -1
  49. package/dist/core/runner-fields.d.ts +26 -0
  50. package/dist/core/runner-fields.js +49 -0
  51. package/dist/core/runner-fields.js.map +1 -0
  52. package/dist/core/runner-model-catalog.d.ts +2 -1
  53. package/dist/core/runner-model-catalog.js +2 -2
  54. package/dist/core/runner-model-catalog.js.map +1 -1
  55. package/dist/core/runner-registry.d.ts +22 -1
  56. package/dist/core/runner-registry.js +32 -1
  57. package/dist/core/runner-registry.js.map +1 -1
  58. package/dist/core/skill-probe.js +2 -5
  59. package/dist/core/skill-probe.js.map +1 -1
  60. package/dist/core/ui-events.d.ts +3 -4
  61. package/dist/core/ui-events.js.map +1 -1
  62. package/dist/delegation/cli.js +6 -0
  63. package/dist/delegation/cli.js.map +1 -1
  64. package/dist/delegation/routes.d.ts +19 -19
  65. package/dist/delegation/routes.js +2 -2
  66. package/dist/delegation/routes.js.map +1 -1
  67. package/dist/delegation/service.js +3 -2
  68. package/dist/delegation/service.js.map +1 -1
  69. package/dist/delegation/transport.d.ts +21 -21
  70. package/dist/discovery/choices.d.ts +3 -2
  71. package/dist/discovery/choices.js +2 -2
  72. package/dist/discovery/choices.js.map +1 -1
  73. package/dist/discovery/cli.js +4 -1
  74. package/dist/discovery/cli.js.map +1 -1
  75. package/dist/runners/claude/definition.js +4 -0
  76. package/dist/runners/claude/definition.js.map +1 -1
  77. package/dist/runners/claude/display.d.ts +6 -0
  78. package/dist/runners/claude/display.js +7 -0
  79. package/dist/runners/claude/display.js.map +1 -0
  80. package/dist/runners/claude/mock.d.ts +57 -0
  81. package/dist/runners/claude/mock.js +23 -0
  82. package/dist/runners/claude/mock.js.map +1 -0
  83. package/dist/runners/codex/definition.js +4 -0
  84. package/dist/runners/codex/definition.js.map +1 -1
  85. package/dist/runners/codex/display.d.ts +6 -0
  86. package/dist/runners/codex/display.js +7 -0
  87. package/dist/runners/codex/display.js.map +1 -0
  88. package/dist/runners/codex/mock.d.ts +71 -0
  89. package/dist/runners/codex/mock.js +29 -0
  90. package/dist/runners/codex/mock.js.map +1 -0
  91. package/dist/runners/mock-prompts.d.ts +63 -0
  92. package/dist/runners/mock-prompts.js +64 -0
  93. package/dist/runners/mock-prompts.js.map +1 -0
  94. package/dist/runners/omp/definition.js +4 -0
  95. package/dist/runners/omp/definition.js.map +1 -1
  96. package/dist/runners/omp/display.d.ts +6 -0
  97. package/dist/runners/omp/display.js +7 -0
  98. package/dist/runners/omp/display.js.map +1 -0
  99. package/dist/runners/omp/mock.d.ts +57 -0
  100. package/dist/runners/omp/mock.js +18 -0
  101. package/dist/runners/omp/mock.js.map +1 -0
  102. package/dist/runners/opencode/definition.js +4 -0
  103. package/dist/runners/opencode/definition.js.map +1 -1
  104. package/dist/runners/opencode/display.d.ts +6 -0
  105. package/dist/runners/opencode/display.js +7 -0
  106. package/dist/runners/opencode/display.js.map +1 -0
  107. package/dist/runners/opencode/mock.d.ts +75 -0
  108. package/dist/runners/opencode/mock.js +33 -0
  109. package/dist/runners/opencode/mock.js.map +1 -0
  110. package/dist/runners/pi/definition.js +4 -0
  111. package/dist/runners/pi/definition.js.map +1 -1
  112. package/dist/runners/pi/display.d.ts +6 -0
  113. package/dist/runners/pi/display.js +7 -0
  114. package/dist/runners/pi/display.js.map +1 -0
  115. package/dist/runners/pi/mock.d.ts +53 -0
  116. package/dist/runners/pi/mock.js +15 -0
  117. package/dist/runners/pi/mock.js.map +1 -0
  118. package/dist/runs/legacy-run-rows.d.ts +24 -4
  119. package/dist/runs/legacy-run-rows.js +104 -29
  120. package/dist/runs/legacy-run-rows.js.map +1 -1
  121. package/dist/runs/run-exits.d.ts +16 -16
  122. package/dist/runs/store.d.ts +8 -35
  123. package/dist/runs/store.js +20 -21
  124. package/dist/runs/store.js.map +1 -1
  125. package/dist/server/activity-routes.d.ts +2 -2
  126. package/dist/server/open-in-targets.js +2 -2
  127. package/dist/server/open-in-targets.js.map +1 -1
  128. package/dist/server/provider-action-gate.d.ts +5 -2
  129. package/dist/server/provider-action-gate.js +9 -6
  130. package/dist/server/provider-action-gate.js.map +1 -1
  131. package/dist/server/provider-auth-runtime.js +2 -2
  132. package/dist/server/provider-auth-runtime.js.map +1 -1
  133. package/dist/server/reports-api.d.ts +2 -2
  134. package/dist/server/runner-skills.js +3 -1
  135. package/dist/server/runner-skills.js.map +1 -1
  136. package/dist/server/runners-routes.d.ts +25 -0
  137. package/dist/server/runners-routes.js +15 -0
  138. package/dist/server/runners-routes.js.map +1 -0
  139. package/dist/server/server-deps.d.ts +2 -1
  140. package/dist/server/server-deps.js +1 -3
  141. package/dist/server/server-deps.js.map +1 -1
  142. package/dist/server/server.d.ts +352 -463
  143. package/dist/server/server.js +34 -31
  144. package/dist/server/server.js.map +1 -1
  145. package/dist/server/start-run-options.d.ts +3 -1
  146. package/dist/server/start-run-options.js +2 -1
  147. package/dist/server/start-run-options.js.map +1 -1
  148. package/dist/server/validators.d.ts +6 -3
  149. package/dist/server/validators.js +21 -12
  150. package/dist/server/validators.js.map +1 -1
  151. package/dist/server/workspace-config-patch.js +2 -1
  152. package/dist/server/workspace-config-patch.js.map +1 -1
  153. package/dist/server/workspace-live-routes.d.ts +6 -6
  154. package/dist/workflows/continuation-admission.d.ts +3 -3
  155. package/dist/workflows/continuation-admission.js +2 -2
  156. package/dist/workflows/continuation-admission.js.map +1 -1
  157. package/dist/workflows/load.js +8 -0
  158. package/dist/workflows/load.js.map +1 -1
  159. package/dist/workflows/run/launch-read-resolver.d.ts +8 -8
  160. package/dist/workflows/run/launch-read-resolver.js +6 -6
  161. package/dist/workflows/run/launch-read-resolver.js.map +1 -1
  162. package/dist/workflows/run/queued-revival.d.ts +1 -1
  163. package/dist/workflows/run/queued-revival.js +5 -0
  164. package/dist/workflows/run/queued-revival.js.map +1 -1
  165. package/dist/workflows/run/run-line.d.ts +3 -0
  166. package/dist/workflows/run/run-line.js +11 -7
  167. package/dist/workflows/run/run-line.js.map +1 -1
  168. package/dist/workflows/run/usage-accounting.js +2 -2
  169. package/dist/workflows/run/usage-accounting.js.map +1 -1
  170. package/dist/workflows/run/wait-engine.d.ts +3 -3
  171. package/dist/workflows/run-scheduling.js +3 -3
  172. package/dist/workflows/run-scheduling.js.map +1 -1
  173. package/dist/workflows/run.d.ts +1 -1
  174. package/package.json +4 -4
  175. package/web/dist/assets/activity-motion-DQwtapOI.js +2 -0
  176. package/web/dist/assets/{activity-route-CYetaRaf.js → activity-route-BwZiMGfK.js} +1 -1
  177. package/web/dist/assets/agent-accounts-C_UK6pPU.js +1 -0
  178. package/web/dist/assets/attention-BOjuMCaW.js +1 -0
  179. package/web/dist/assets/{commit-diff-panel-D5MXcWp1.js → commit-diff-panel-BVWKMptW.js} +1 -1
  180. package/web/dist/assets/{diff-CbzFxE4W.js → diff-CXCoZr3w.js} +2 -2
  181. package/web/dist/assets/{diff-view-De-FaJNL.js → diff-view-y7x-a5xQ.js} +1 -1
  182. package/web/dist/assets/{file-preview-XuT7ByQJ.js → file-preview-CEaNT3ht.js} +1 -1
  183. package/web/dist/assets/{git-toolbar-Cnxtcw27.js → git-toolbar-BvvAgmDO.js} +1 -1
  184. package/web/dist/assets/{github-4ugOBSSl.js → github-B3WekFy2.js} +1 -1
  185. package/web/dist/assets/{global-activity-route-B0RZF0VZ.js → global-activity-route-D3lMjvxF.js} +1 -1
  186. package/web/dist/assets/index-BvMEJ3Ux.js +14 -0
  187. package/web/dist/assets/{markdown-D9-0R3BD.js → markdown-BojHOSHX.js} +1 -1
  188. package/web/dist/assets/{picker-pill-CFcrs68V.js → picker-pill-ToL4uifX.js} +1 -1
  189. package/web/dist/assets/{preview-pane-connected-B1Eo_Q-v.js → preview-pane-connected-BmBOIaSo.js} +1 -1
  190. package/web/dist/assets/{project-router-D7rZ5E-b.js → project-router-lPPUPPDI.js} +1 -1
  191. package/web/dist/assets/project-scope-context-Xjbxntpg.js +4 -0
  192. package/web/dist/assets/{prompt-template-menu-DYoBkQJP.js → prompt-template-menu-D8RsDr0w.js} +1 -1
  193. package/web/dist/assets/queries-BpsLvjtu.js +1 -0
  194. package/web/dist/assets/{reference-chip-BEkQoiWt.js → reference-chip-HnvJLwQV.js} +1 -1
  195. package/web/dist/assets/{repo-git-CPKuF-zu.js → repo-git-jRvRtMVC.js} +1 -1
  196. package/web/dist/assets/{report-reader-Buf2_ONr.js → report-reader-B9tuKd1M.js} +1 -1
  197. package/web/dist/assets/{reports-bWP2ZBOP.js → reports-DX1Hw80D.js} +1 -1
  198. package/web/dist/assets/run-header-ClrfkoK4.js +2 -0
  199. package/web/dist/assets/runners-CIHj9D-C.js +1 -0
  200. package/web/dist/assets/skills-Y60pkNkG.js +1 -0
  201. package/web/dist/assets/{tab-link-C_n2wSwD.js → tab-link-rmg3phtM.js} +1 -1
  202. package/web/dist/assets/{task-changes-rmp95PMX.js → task-changes-D-No9noD.js} +1 -1
  203. package/web/dist/assets/{task-commits-4ClywWZW.js → task-commits-BtU9bGk7.js} +1 -1
  204. package/web/dist/assets/{task-files-DIQ_8hh_.js → task-files-B0n2qyBi.js} +1 -1
  205. package/web/dist/assets/{task-github-item-D4zs5cvm.js → task-github-item-Xr08h42p.js} +1 -1
  206. package/web/dist/assets/task-thread-B7lUY_dn.js +9 -0
  207. package/web/dist/assets/thread-state-DoSqzctg.js +4 -0
  208. package/web/dist/assets/{use-desktop-Dq3Z-pSO.js → use-desktop-Coqw26IL.js} +1 -1
  209. package/web/dist/assets/use-hand-to-agent-state-PL74uvoL.js +1 -0
  210. package/web/dist/assets/{useInfiniteQuery-BiIzSoTr.js → useInfiniteQuery-C05yR_S9.js} +1 -1
  211. package/web/dist/assets/useQuery-7jNqNIJb.js +1 -0
  212. package/web/dist/assets/{workflows-DX9Mpt9Q.js → workflows-BEniI_am.js} +1 -1
  213. package/web/dist/assets/{ws-B3I-G6Q4.js → ws-wEXmfalm.js} +1 -1
  214. package/web/dist/index.html +14 -14
  215. package/dist/contract/runner-facts.d.ts +0 -51
  216. package/web/dist/assets/activity-motion-mnPv6Dpn.js +0 -2
  217. package/web/dist/assets/agent-accounts-9EM12D_s.js +0 -1
  218. package/web/dist/assets/attention-DjHSGsbe.js +0 -1
  219. package/web/dist/assets/index-S6DMaCB8.js +0 -14
  220. package/web/dist/assets/project-scope-context-DYV7r53s.js +0 -4
  221. package/web/dist/assets/queries-Bp7cia4e.js +0 -1
  222. package/web/dist/assets/run-header-masTwuK9.js +0 -2
  223. package/web/dist/assets/runner-facts-BpvNgJqf.js +0 -1
  224. package/web/dist/assets/skills-BUL45j_L.js +0 -1
  225. package/web/dist/assets/task-thread-CdBfevnO.js +0 -9
  226. package/web/dist/assets/thread-state-3Um_4g0a.js +0 -4
  227. package/web/dist/assets/use-hand-to-agent-state-BxJSA8sR.js +0 -1
  228. package/web/dist/assets/useQuery-BfBOHv1O.js +0 -1
@@ -1,4 +1,4 @@
1
- import { legacyIndexRows, upgradeLegacyRunRow, upgradeRemovedRunnerResult } from './legacy-run-rows.js';
1
+ import { legacyIndexRows, readableSavedRunner, upgradeLegacyRunRow, upgradeRemovedRunnerResult, withKeptFields } from './legacy-run-rows.js';
2
2
  import { dataReadDirs, runDataDir } from '../project-paths.js';
3
3
  import { addRunSource, copyFallbackFamily, fallbackRunSource, bindWorkerResultPath, fallbackRunDeleteError, workerResultsDirectory } from './project-run-sources.js';
4
4
  import { productEnv } from '../core/product-env.js';
@@ -50,8 +50,7 @@ import { ISSUE_URL_RE, namesForeignReference, originatingIssue, refUrlNumber, re
50
50
  import { applyExit, doneCommits, exitDurability, RUN_EXITS } from './run-exits.js';
51
51
  import { assertConversationIdFree } from './conversation-identity.js';
52
52
  export { ConversationIdInUseError } from './conversation-identity.js';
53
- import { RUNNER_IDS } from '../core/agent-runner.js';
54
- import { runnerIdOf } from '../core/runner-registry.js';
53
+ import { LEGACY_RUNNER_IDS } from '../core/runner-registry.js';
55
54
  import { ARCHIVED_ROOT, RUNS_DB_FILE, RUNS_IMPORT_COMPLETE_KEY, RunConflictError, RunDatabase, RunDatabaseBusyError, } from './run-database.js';
56
55
  import { listBranchOwners } from './branch-owners.js';
57
56
  import { guardedJsonSql } from './guarded-json-sql.js';
@@ -73,26 +72,26 @@ import { supervisedWorkers } from './supervised.js';
73
72
  import { claimOwnerLive, closeClaimSession, familyKey, foreignClaimedRunIds, liveForeignClaimedRunIds, openClaimSession, rowFamily } from './run-claims.js';
74
73
  import { assertProjectWritable, projectWriteRefused } from '../server/cockpit-ownership.js';
75
74
  /**
76
- * A runner id as it may appear in a PERSISTED record, normalized to the three
77
- * ids the rest of Squawk speaks (#547).
75
+ * A runner id as it may appear in a PERSISTED record (#547), spec 2026-11-18-runner-definitions.
78
76
  *
79
- * `claude-cli` is the legacy spelling of `claude` — still a member of
80
- * `AgentBackend` and still accepted by `createRunner`, and accepted in `runs.json`. The enum
81
- * here once failed to accept it: the loader `safeParse`s the
82
- * WHOLE array, so one record carrying it would have dropped every run in the
83
- * file.
77
+ * `claude-cli` is the legacy spelling of `claude`: it is accepted and folded to `claude`
78
+ * (`LEGACY_RUNNER_IDS`), and its step keeps its session. The loader `safeParse`s the WHOLE array
79
+ * of a legacy `runs.json`, so one record the schema refused would drop every run in the file.
84
80
  *
85
- * Parse-and-fold rather than widen: the legacy id is accepted on the way in and
86
- * collapsed to `claude`, so no consumer, wire type or contract schema ever sees
87
- * a fourth runner. The narrowing is one-way and permanent (the index is
88
- * re-serialized from the parsed records), which is what "old run records
89
- * normalise identically to `claude`" in `core/model-identity.ts` has always
90
- * claimed. Use ONLY for read-back of stored state — request bodies, settings and
91
- * workflow step defs stay the three selectable ids (`RunnerId`), because nothing
92
- * should be able to ASK for the legacy spelling.
81
+ * An id is readable when `readableSavedRunner` says so: a registered id, or, in a process that
82
+ * registered no runner, a built-in id. Before the parse, `upgradeRemovedRunner`
83
+ * (legacy-run-rows.ts) reads a retired or unregistered id as a removed-runner run, so this
84
+ * schema never sees one. An unknown id in a process with no registered runner makes the row
85
+ * unreadable, as before runner ids were open.
86
+ *
87
+ * The legacy fold is one-way and permanent: the next write stores `claude`. Use ONLY for
88
+ * read-back of stored state. Request bodies, settings and workflow step defs take the ids that
89
+ * the server's runner registry holds, because nothing should be able to ASK for the legacy
90
+ * spelling. The output is an open string: a runner that this process registered keeps its own
91
+ * id.
93
92
  */
94
- const storedRunnerSchema = z.enum([...RUNNER_IDS, 'claude-cli'])
95
- .transform(runnerIdOf);
93
+ const storedRunnerSchema = z.string().refine(readableSavedRunner)
94
+ .transform(id => LEGACY_RUNNER_IDS.get(id) ?? id);
96
95
  const stepStateSchema = contractStepStateSchema.extend({ backend: storedRunnerSchema.optional() });
97
96
  /** Exported for `./run-index.ts`, the read-only reader of the same records. Nothing else should
98
97
  * parse a stored run — see `reconcileLoadedRun` for why a second parser is a correctness risk. */
@@ -170,7 +169,7 @@ function decodeStoredRecord(raw) {
170
169
  if (!parsed.success)
171
170
  return undefined;
172
171
  const run = parsed.data[0];
173
- return { run, extras: collectRawExtras(raw, run), ...(upgraded ? { upgraded: true } : {}) };
172
+ return { run, extras: collectRawExtras(withKeptFields(raw), run), ...(upgraded ? { upgraded: true } : {}) };
174
173
  }
175
174
  /** One database row's `data` back into a record and its extras. Undefined when it does not parse:
176
175
  * one unreadable row costs that row only. */