@qodeca/xezar 0.10.1

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 (481) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +810 -0
  3. package/dist/agent-config/account-identity.d.ts +44 -0
  4. package/dist/agent-config/account-identity.js +128 -0
  5. package/dist/agent-config/account-identity.js.map +1 -0
  6. package/dist/agent-config/catalog.d.ts +71 -0
  7. package/dist/agent-config/catalog.js +223 -0
  8. package/dist/agent-config/catalog.js.map +1 -0
  9. package/dist/agent-config/files.d.ts +46 -0
  10. package/dist/agent-config/files.js +119 -0
  11. package/dist/agent-config/files.js.map +1 -0
  12. package/dist/agent-config/model-settings/claude.d.ts +2 -0
  13. package/dist/agent-config/model-settings/claude.js +11 -0
  14. package/dist/agent-config/model-settings/claude.js.map +1 -0
  15. package/dist/agent-config/model-settings/codex.d.ts +2 -0
  16. package/dist/agent-config/model-settings/codex.js +16 -0
  17. package/dist/agent-config/model-settings/codex.js.map +1 -0
  18. package/dist/agent-config/model-settings/opencode.d.ts +2 -0
  19. package/dist/agent-config/model-settings/opencode.js +8 -0
  20. package/dist/agent-config/model-settings/opencode.js.map +1 -0
  21. package/dist/agent-config/model-settings/pi.d.ts +12 -0
  22. package/dist/agent-config/model-settings/pi.js +18 -0
  23. package/dist/agent-config/model-settings/pi.js.map +1 -0
  24. package/dist/agent-config/model-settings/shared.d.ts +9 -0
  25. package/dist/agent-config/model-settings/shared.js +93 -0
  26. package/dist/agent-config/model-settings/shared.js.map +1 -0
  27. package/dist/agent-config/model-settings/types.d.ts +9 -0
  28. package/dist/agent-config/model-settings/types.js +2 -0
  29. package/dist/agent-config/model-settings/types.js.map +1 -0
  30. package/dist/agent-config/models.d.ts +9 -0
  31. package/dist/agent-config/models.js +32 -0
  32. package/dist/agent-config/models.js.map +1 -0
  33. package/dist/agent-config/seed.d.ts +7 -0
  34. package/dist/agent-config/seed.js +90 -0
  35. package/dist/agent-config/seed.js.map +1 -0
  36. package/dist/agent-config/service.d.ts +44 -0
  37. package/dist/agent-config/service.js +71 -0
  38. package/dist/agent-config/service.js.map +1 -0
  39. package/dist/agent-config/validate.d.ts +21 -0
  40. package/dist/agent-config/validate.js +76 -0
  41. package/dist/agent-config/validate.js.map +1 -0
  42. package/dist/automations/coordinator.d.ts +26 -0
  43. package/dist/automations/coordinator.js +66 -0
  44. package/dist/automations/coordinator.js.map +1 -0
  45. package/dist/automations/github-poller.d.ts +74 -0
  46. package/dist/automations/github-poller.js +234 -0
  47. package/dist/automations/github-poller.js.map +1 -0
  48. package/dist/automations/scheduler.d.ts +42 -0
  49. package/dist/automations/scheduler.js +192 -0
  50. package/dist/automations/scheduler.js.map +1 -0
  51. package/dist/automations/store.d.ts +65 -0
  52. package/dist/automations/store.js +298 -0
  53. package/dist/automations/store.js.map +1 -0
  54. package/dist/automations/task-template.d.ts +18 -0
  55. package/dist/automations/task-template.js +95 -0
  56. package/dist/automations/task-template.js.map +1 -0
  57. package/dist/automations/types.d.ts +255 -0
  58. package/dist/automations/types.js +159 -0
  59. package/dist/automations/types.js.map +1 -0
  60. package/dist/config.d.ts +77 -0
  61. package/dist/config.js +242 -0
  62. package/dist/config.js.map +1 -0
  63. package/dist/contract/agent-config.d.ts +153 -0
  64. package/dist/contract/agent-profiles.d.ts +347 -0
  65. package/dist/contract/automations.d.ts +935 -0
  66. package/dist/contract/events.d.ts +104 -0
  67. package/dist/contract/github.d.ts +597 -0
  68. package/dist/contract/health.d.ts +102 -0
  69. package/dist/contract/index.d.ts +16 -0
  70. package/dist/contract/index.js +1953 -0
  71. package/dist/contract/projects.d.ts +210 -0
  72. package/dist/contract/repo.d.ts +234 -0
  73. package/dist/contract/runs.d.ts +1527 -0
  74. package/dist/contract/skills.d.ts +234 -0
  75. package/dist/contract/workflows.d.ts +218 -0
  76. package/dist/contract/workspace.d.ts +579 -0
  77. package/dist/core/agent-env.d.ts +31 -0
  78. package/dist/core/agent-env.js +371 -0
  79. package/dist/core/agent-env.js.map +1 -0
  80. package/dist/core/agent-model-policy.d.ts +10 -0
  81. package/dist/core/agent-model-policy.js +36 -0
  82. package/dist/core/agent-model-policy.js.map +1 -0
  83. package/dist/core/agent-profiles.d.ts +62 -0
  84. package/dist/core/agent-profiles.js +90 -0
  85. package/dist/core/agent-profiles.js.map +1 -0
  86. package/dist/core/agent-runner.d.ts +211 -0
  87. package/dist/core/agent-runner.js +68 -0
  88. package/dist/core/agent-runner.js.map +1 -0
  89. package/dist/core/ask.d.ts +115 -0
  90. package/dist/core/ask.js +256 -0
  91. package/dist/core/ask.js.map +1 -0
  92. package/dist/core/backend-detect.d.ts +16 -0
  93. package/dist/core/backend-detect.js +155 -0
  94. package/dist/core/backend-detect.js.map +1 -0
  95. package/dist/core/claude-cli-runner.d.ts +65 -0
  96. package/dist/core/claude-cli-runner.js +479 -0
  97. package/dist/core/claude-cli-runner.js.map +1 -0
  98. package/dist/core/claude-model-catalog.d.ts +24 -0
  99. package/dist/core/claude-model-catalog.js +208 -0
  100. package/dist/core/claude-model-catalog.js.map +1 -0
  101. package/dist/core/claude-ui-mapper.d.ts +79 -0
  102. package/dist/core/claude-ui-mapper.js +597 -0
  103. package/dist/core/claude-ui-mapper.js.map +1 -0
  104. package/dist/core/codex-app-server-runner.d.ts +41 -0
  105. package/dist/core/codex-app-server-runner.js +584 -0
  106. package/dist/core/codex-app-server-runner.js.map +1 -0
  107. package/dist/core/codex-app-server-transport.d.ts +35 -0
  108. package/dist/core/codex-app-server-transport.js +150 -0
  109. package/dist/core/codex-app-server-transport.js.map +1 -0
  110. package/dist/core/codex-model-catalog.d.ts +10 -0
  111. package/dist/core/codex-model-catalog.js +110 -0
  112. package/dist/core/codex-model-catalog.js.map +1 -0
  113. package/dist/core/codex-ui-mapper.d.ts +109 -0
  114. package/dist/core/codex-ui-mapper.js +764 -0
  115. package/dist/core/codex-ui-mapper.js.map +1 -0
  116. package/dist/core/model-identity.d.ts +125 -0
  117. package/dist/core/model-identity.js +132 -0
  118. package/dist/core/model-identity.js.map +1 -0
  119. package/dist/core/model-presets.d.ts +21 -0
  120. package/dist/core/model-presets.js +91 -0
  121. package/dist/core/model-presets.js.map +1 -0
  122. package/dist/core/ndjson.d.ts +6 -0
  123. package/dist/core/ndjson.js +23 -0
  124. package/dist/core/ndjson.js.map +1 -0
  125. package/dist/core/opencode-model-catalog.d.ts +32 -0
  126. package/dist/core/opencode-model-catalog.js +153 -0
  127. package/dist/core/opencode-model-catalog.js.map +1 -0
  128. package/dist/core/opencode-server-runner.d.ts +32 -0
  129. package/dist/core/opencode-server-runner.js +535 -0
  130. package/dist/core/opencode-server-runner.js.map +1 -0
  131. package/dist/core/opencode-ui-mapper.d.ts +111 -0
  132. package/dist/core/opencode-ui-mapper.js +668 -0
  133. package/dist/core/opencode-ui-mapper.js.map +1 -0
  134. package/dist/core/pi-runner.d.ts +24 -0
  135. package/dist/core/pi-runner.js +349 -0
  136. package/dist/core/pi-runner.js.map +1 -0
  137. package/dist/core/pi-ui-mapper.d.ts +34 -0
  138. package/dist/core/pi-ui-mapper.js +270 -0
  139. package/dist/core/pi-ui-mapper.js.map +1 -0
  140. package/dist/core/process-usage.d.ts +66 -0
  141. package/dist/core/process-usage.js +193 -0
  142. package/dist/core/process-usage.js.map +1 -0
  143. package/dist/core/provider-auth.d.ts +154 -0
  144. package/dist/core/provider-auth.js +509 -0
  145. package/dist/core/provider-auth.js.map +1 -0
  146. package/dist/core/provider-availability.d.ts +3 -0
  147. package/dist/core/provider-availability.js +14 -0
  148. package/dist/core/provider-availability.js.map +1 -0
  149. package/dist/core/runner-factory.d.ts +8 -0
  150. package/dist/core/runner-factory.js +25 -0
  151. package/dist/core/runner-factory.js.map +1 -0
  152. package/dist/core/runner-model-catalog.d.ts +28 -0
  153. package/dist/core/runner-model-catalog.js +62 -0
  154. package/dist/core/runner-model-catalog.js.map +1 -0
  155. package/dist/core/secret-redaction.d.ts +37 -0
  156. package/dist/core/secret-redaction.js +115 -0
  157. package/dist/core/secret-redaction.js.map +1 -0
  158. package/dist/core/shell-env.d.ts +28 -0
  159. package/dist/core/shell-env.js +56 -0
  160. package/dist/core/shell-env.js.map +1 -0
  161. package/dist/core/tool-display.d.ts +31 -0
  162. package/dist/core/tool-display.js +179 -0
  163. package/dist/core/tool-display.js.map +1 -0
  164. package/dist/core/ui-events.d.ts +332 -0
  165. package/dist/core/ui-events.js +22 -0
  166. package/dist/core/ui-events.js.map +1 -0
  167. package/dist/core/usage-limit.d.ts +42 -0
  168. package/dist/core/usage-limit.js +209 -0
  169. package/dist/core/usage-limit.js.map +1 -0
  170. package/dist/core/usage.d.ts +11 -0
  171. package/dist/core/usage.js +15 -0
  172. package/dist/core/usage.js.map +1 -0
  173. package/dist/core/v1-text-coalescer.d.ts +36 -0
  174. package/dist/core/v1-text-coalescer.js +72 -0
  175. package/dist/core/v1-text-coalescer.js.map +1 -0
  176. package/dist/git-diff-base.d.ts +85 -0
  177. package/dist/git-diff-base.js +180 -0
  178. package/dist/git-diff-base.js.map +1 -0
  179. package/dist/git-refs.d.ts +11 -0
  180. package/dist/git-refs.js +14 -0
  181. package/dist/git-refs.js.map +1 -0
  182. package/dist/git-worktree.d.ts +161 -0
  183. package/dist/git-worktree.js +508 -0
  184. package/dist/git-worktree.js.map +1 -0
  185. package/dist/handoff.d.ts +62 -0
  186. package/dist/handoff.js +154 -0
  187. package/dist/handoff.js.map +1 -0
  188. package/dist/index.d.ts +2 -0
  189. package/dist/index.js +684 -0
  190. package/dist/index.js.map +1 -0
  191. package/dist/install-as-command.d.ts +40 -0
  192. package/dist/install-as-command.js +52 -0
  193. package/dist/install-as-command.js.map +1 -0
  194. package/dist/pack-check.d.ts +17 -0
  195. package/dist/pack-check.js +27 -0
  196. package/dist/pack-check.js.map +1 -0
  197. package/dist/paths.d.ts +140 -0
  198. package/dist/paths.js +192 -0
  199. package/dist/paths.js.map +1 -0
  200. package/dist/planner.d.ts +27 -0
  201. package/dist/planner.js +268 -0
  202. package/dist/planner.js.map +1 -0
  203. package/dist/release/manifests.d.ts +78 -0
  204. package/dist/release/manifests.js +57 -0
  205. package/dist/release/manifests.js.map +1 -0
  206. package/dist/release/snapshot.d.ts +67 -0
  207. package/dist/release/snapshot.js +97 -0
  208. package/dist/release/snapshot.js.map +1 -0
  209. package/dist/release/stable.d.ts +33 -0
  210. package/dist/release/stable.js +50 -0
  211. package/dist/release/stable.js.map +1 -0
  212. package/dist/runs/agent-tmpdir.d.ts +41 -0
  213. package/dist/runs/agent-tmpdir.js +183 -0
  214. package/dist/runs/agent-tmpdir.js.map +1 -0
  215. package/dist/runs/arm-repo-handle.d.ts +17 -0
  216. package/dist/runs/arm-repo-handle.js +24 -0
  217. package/dist/runs/arm-repo-handle.js.map +1 -0
  218. package/dist/runs/auto-name.d.ts +75 -0
  219. package/dist/runs/auto-name.js +179 -0
  220. package/dist/runs/auto-name.js.map +1 -0
  221. package/dist/runs/event-history.d.ts +50 -0
  222. package/dist/runs/event-history.js +613 -0
  223. package/dist/runs/event-history.js.map +1 -0
  224. package/dist/runs/retention.d.ts +60 -0
  225. package/dist/runs/retention.js +86 -0
  226. package/dist/runs/retention.js.map +1 -0
  227. package/dist/runs/review-gate.d.ts +18 -0
  228. package/dist/runs/review-gate.js +21 -0
  229. package/dist/runs/review-gate.js.map +1 -0
  230. package/dist/runs/run-index.d.ts +19 -0
  231. package/dist/runs/run-index.js +43 -0
  232. package/dist/runs/run-index.js.map +1 -0
  233. package/dist/runs/store.d.ts +490 -0
  234. package/dist/runs/store.js +1283 -0
  235. package/dist/runs/store.js.map +1 -0
  236. package/dist/runs/task-markers.d.ts +28 -0
  237. package/dist/runs/task-markers.js +74 -0
  238. package/dist/runs/task-markers.js.map +1 -0
  239. package/dist/runs/task-refs.d.ts +25 -0
  240. package/dist/runs/task-refs.js +74 -0
  241. package/dist/runs/task-refs.js.map +1 -0
  242. package/dist/runs/ui-event-sink.d.ts +80 -0
  243. package/dist/runs/ui-event-sink.js +209 -0
  244. package/dist/runs/ui-event-sink.js.map +1 -0
  245. package/dist/server/app-type.d.ts +21 -0
  246. package/dist/server/app-type.js +2 -0
  247. package/dist/server/app-type.js.map +1 -0
  248. package/dist/server/capabilities.d.ts +70 -0
  249. package/dist/server/capabilities.js +152 -0
  250. package/dist/server/capabilities.js.map +1 -0
  251. package/dist/server/checkout.d.ts +128 -0
  252. package/dist/server/checkout.js +296 -0
  253. package/dist/server/checkout.js.map +1 -0
  254. package/dist/server/forge/github.d.ts +535 -0
  255. package/dist/server/forge/github.js +2544 -0
  256. package/dist/server/forge/github.js.map +1 -0
  257. package/dist/server/forge/index.d.ts +40 -0
  258. package/dist/server/forge/index.js +72 -0
  259. package/dist/server/forge/index.js.map +1 -0
  260. package/dist/server/forge/types.d.ts +267 -0
  261. package/dist/server/forge/types.js +2 -0
  262. package/dist/server/forge/types.js.map +1 -0
  263. package/dist/server/fs-browse.d.ts +105 -0
  264. package/dist/server/fs-browse.js +182 -0
  265. package/dist/server/fs-browse.js.map +1 -0
  266. package/dist/server/git-changes.d.ts +213 -0
  267. package/dist/server/git-changes.js +555 -0
  268. package/dist/server/git-changes.js.map +1 -0
  269. package/dist/server/git.d.ts +28 -0
  270. package/dist/server/git.js +112 -0
  271. package/dist/server/git.js.map +1 -0
  272. package/dist/server/github.d.ts +9 -0
  273. package/dist/server/github.js +8 -0
  274. package/dist/server/github.js.map +1 -0
  275. package/dist/server/launch-key.d.ts +7 -0
  276. package/dist/server/launch-key.js +33 -0
  277. package/dist/server/launch-key.js.map +1 -0
  278. package/dist/server/open-in-app.d.ts +66 -0
  279. package/dist/server/open-in-app.js +211 -0
  280. package/dist/server/open-in-app.js.map +1 -0
  281. package/dist/server/open-in-terminal.d.ts +70 -0
  282. package/dist/server/open-in-terminal.js +179 -0
  283. package/dist/server/open-in-terminal.js.map +1 -0
  284. package/dist/server/pr.d.ts +7 -0
  285. package/dist/server/pr.js +7 -0
  286. package/dist/server/pr.js.map +1 -0
  287. package/dist/server/project-context.d.ts +120 -0
  288. package/dist/server/project-context.js +192 -0
  289. package/dist/server/project-context.js.map +1 -0
  290. package/dist/server/provider-action-gate.d.ts +8 -0
  291. package/dist/server/provider-action-gate.js +56 -0
  292. package/dist/server/provider-action-gate.js.map +1 -0
  293. package/dist/server/provider-auth-runtime.d.ts +21 -0
  294. package/dist/server/provider-auth-runtime.js +66 -0
  295. package/dist/server/provider-auth-runtime.js.map +1 -0
  296. package/dist/server/server.d.ts +13578 -0
  297. package/dist/server/server.js +5284 -0
  298. package/dist/server/server.js.map +1 -0
  299. package/dist/server/static-ui.d.ts +49 -0
  300. package/dist/server/static-ui.js +92 -0
  301. package/dist/server/static-ui.js.map +1 -0
  302. package/dist/server/validators.d.ts +97 -0
  303. package/dist/server/validators.js +86 -0
  304. package/dist/server/validators.js.map +1 -0
  305. package/dist/server/ws.d.ts +83 -0
  306. package/dist/server/ws.js +216 -0
  307. package/dist/server/ws.js.map +1 -0
  308. package/dist/server/wsl.d.ts +25 -0
  309. package/dist/server/wsl.js +92 -0
  310. package/dist/server/wsl.js.map +1 -0
  311. package/dist/server-install/engine.d.ts +50 -0
  312. package/dist/server-install/engine.js +324 -0
  313. package/dist/server-install/engine.js.map +1 -0
  314. package/dist/server-install/platforms/macosx-ngrok.d.ts +6 -0
  315. package/dist/server-install/platforms/macosx-ngrok.js +348 -0
  316. package/dist/server-install/platforms/macosx-ngrok.js.map +1 -0
  317. package/dist/server-install/platforms/ubuntu-vps.d.ts +63 -0
  318. package/dist/server-install/platforms/ubuntu-vps.js +997 -0
  319. package/dist/server-install/platforms/ubuntu-vps.js.map +1 -0
  320. package/dist/server-install/state.d.ts +52 -0
  321. package/dist/server-install/state.js +182 -0
  322. package/dist/server-install/state.js.map +1 -0
  323. package/dist/server-install/steps.d.ts +109 -0
  324. package/dist/server-install/steps.js +334 -0
  325. package/dist/server-install/steps.js.map +1 -0
  326. package/dist/server-install/strategies.d.ts +4 -0
  327. package/dist/server-install/strategies.js +20 -0
  328. package/dist/server-install/strategies.js.map +1 -0
  329. package/dist/server-install/types.d.ts +287 -0
  330. package/dist/server-install/types.js +121 -0
  331. package/dist/server-install/types.js.map +1 -0
  332. package/dist/server-install/ui.d.ts +42 -0
  333. package/dist/server-install/ui.js +130 -0
  334. package/dist/server-install/ui.js.map +1 -0
  335. package/dist/skills-banner.d.ts +22 -0
  336. package/dist/skills-banner.js +41 -0
  337. package/dist/skills-banner.js.map +1 -0
  338. package/dist/skills-remote.d.ts +84 -0
  339. package/dist/skills-remote.js +468 -0
  340. package/dist/skills-remote.js.map +1 -0
  341. package/dist/skills-update.d.ts +88 -0
  342. package/dist/skills-update.js +392 -0
  343. package/dist/skills-update.js.map +1 -0
  344. package/dist/skills.d.ts +82 -0
  345. package/dist/skills.js +251 -0
  346. package/dist/skills.js.map +1 -0
  347. package/dist/todos.d.ts +48 -0
  348. package/dist/todos.js +201 -0
  349. package/dist/todos.js.map +1 -0
  350. package/dist/ui-state.d.ts +26 -0
  351. package/dist/ui-state.js +38 -0
  352. package/dist/ui-state.js.map +1 -0
  353. package/dist/update-check.d.ts +12 -0
  354. package/dist/update-check.js +41 -0
  355. package/dist/update-check.js.map +1 -0
  356. package/dist/workflows/load.d.ts +15 -0
  357. package/dist/workflows/load.js +56 -0
  358. package/dist/workflows/load.js.map +1 -0
  359. package/dist/workflows/run.d.ts +803 -0
  360. package/dist/workflows/run.js +3483 -0
  361. package/dist/workflows/run.js.map +1 -0
  362. package/dist/workflows/types.d.ts +145 -0
  363. package/dist/workflows/types.js +194 -0
  364. package/dist/workflows/types.js.map +1 -0
  365. package/dist/workspace/agent-accounts.d.ts +153 -0
  366. package/dist/workspace/agent-accounts.js +304 -0
  367. package/dist/workspace/agent-accounts.js.map +1 -0
  368. package/dist/workspace/agent-profiles.d.ts +78 -0
  369. package/dist/workspace/agent-profiles.js +115 -0
  370. package/dist/workspace/agent-profiles.js.map +1 -0
  371. package/dist/workspace/config.d.ts +169 -0
  372. package/dist/workspace/config.js +379 -0
  373. package/dist/workspace/config.js.map +1 -0
  374. package/dist/workspace/migrations.d.ts +45 -0
  375. package/dist/workspace/migrations.js +147 -0
  376. package/dist/workspace/migrations.js.map +1 -0
  377. package/dist/workspace/projects-cli.d.ts +25 -0
  378. package/dist/workspace/projects-cli.js +172 -0
  379. package/dist/workspace/projects-cli.js.map +1 -0
  380. package/dist/workspace/projects.d.ts +109 -0
  381. package/dist/workspace/projects.js +250 -0
  382. package/dist/workspace/projects.js.map +1 -0
  383. package/dist/workspace/semaphore.d.ts +179 -0
  384. package/dist/workspace/semaphore.js +195 -0
  385. package/dist/workspace/semaphore.js.map +1 -0
  386. package/dist/workspace/ui-state.d.ts +34 -0
  387. package/dist/workspace/ui-state.js +53 -0
  388. package/dist/workspace/ui-state.js.map +1 -0
  389. package/package.json +85 -0
  390. package/scripts/check-pack.mjs +46 -0
  391. package/scripts/inline-contract.mjs +112 -0
  392. package/scripts/install-as-command.mjs +120 -0
  393. package/scripts/mock-claude.mjs +524 -0
  394. package/scripts/mock-pi-rpc.mjs +83 -0
  395. package/scripts/sync-readme.mjs +20 -0
  396. package/scripts/test-process-usage.mjs +47 -0
  397. package/web/dist/assets/alert-dialog-CGskMvgc.js +1 -0
  398. package/web/dist/assets/arrow-down-G8adPhbu.js +1 -0
  399. package/web/dist/assets/arrow-left-BJsIW6A0.js +1 -0
  400. package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
  401. package/web/dist/assets/centered-state-B_V_Ai2h.js +43 -0
  402. package/web/dist/assets/chevron-right-CFzn-von.js +1 -0
  403. package/web/dist/assets/chunk-BO2N2NFS-DE6qKn3r.js +131 -0
  404. package/web/dist/assets/collapsible-B_8uYwHb.js +1 -0
  405. package/web/dist/assets/commit-list-C4Dv6vUL.js +1 -0
  406. package/web/dist/assets/compare-variants-SR2zZfZq.js +1 -0
  407. package/web/dist/assets/core-BCsw8oQw.js +12 -0
  408. package/web/dist/assets/css-BsVw1vtW.js +1 -0
  409. package/web/dist/assets/diff-CbozNUJq.js +3 -0
  410. package/web/dist/assets/diff-stat-btAmKFJr.js +1 -0
  411. package/web/dist/assets/diff-view-BpFTcG3R.js +6 -0
  412. package/web/dist/assets/diff-woXpYk--.js +1 -0
  413. package/web/dist/assets/dropdown-menu-Z80KMInL.js +1 -0
  414. package/web/dist/assets/editable-title-wS5NWwob.js +1 -0
  415. package/web/dist/assets/ellipsis-vertical-Bmi2u2TG.js +1 -0
  416. package/web/dist/assets/engine-javascript-FQvzRocB.js +141 -0
  417. package/web/dist/assets/file-DKoYWRsv.js +1 -0
  418. package/web/dist/assets/folder-u01HScRT.js +1 -0
  419. package/web/dist/assets/git-toolbar-DZlZjTGz.js +1 -0
  420. package/web/dist/assets/github-CFURo9kf.js +1 -0
  421. package/web/dist/assets/go-rLFTqkRN.js +1 -0
  422. package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
  423. package/web/dist/assets/highlighter-C8DK1_sG.js +3 -0
  424. package/web/dist/assets/html-BY76lXLH.js +1 -0
  425. package/web/dist/assets/image-preview-BR3iIIhf.js +1 -0
  426. package/web/dist/assets/index-BcI5hug3.css +2 -0
  427. package/web/dist/assets/index-DlC81_GI.js +7 -0
  428. package/web/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  429. package/web/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  430. package/web/dist/assets/javascript-BgS3c2Ky.js +1 -0
  431. package/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  432. package/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  433. package/web/dist/assets/json-qhed-kSA.js +1 -0
  434. package/web/dist/assets/jsonc-CYpm1nAK.js +1 -0
  435. package/web/dist/assets/jsx-Bz0zcwM4.js +1 -0
  436. package/web/dist/assets/lib-BQXq3kEf.js +1 -0
  437. package/web/dist/assets/lib-BxQXEXDF.js +1 -0
  438. package/web/dist/assets/markdown-5FuCZDA4.js +2 -0
  439. package/web/dist/assets/markdown-BYOwaDjH.js +1 -0
  440. package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
  441. package/web/dist/assets/new-task-form-BydHBbef.js +1 -0
  442. package/web/dist/assets/pill-vNzaaYxj.js +1 -0
  443. package/web/dist/assets/project-router-BbCzrHKs.js +1 -0
  444. package/web/dist/assets/prompt-templates-B7Fs2b1S.js +15 -0
  445. package/web/dist/assets/python-gzcpVVnB.js +1 -0
  446. package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
  447. package/web/dist/assets/refresh-cw-DGliez3E.js +1 -0
  448. package/web/dist/assets/repo-git-CJFDMauC.js +1 -0
  449. package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  450. package/web/dist/assets/run-diff-Bq9vkSNK.js +3 -0
  451. package/web/dist/assets/run-header-Cd8mSKBG.js +1 -0
  452. package/web/dist/assets/rust-Cfkwpbl8.js +1 -0
  453. package/web/dist/assets/search-x-69n_672Y.js +1 -0
  454. package/web/dist/assets/shellscript-CLZ0U2zV.js +1 -0
  455. package/web/dist/assets/skill-empty-hint-DTu0LzaJ.js +1 -0
  456. package/web/dist/assets/skills-Cs-auniL.js +1 -0
  457. package/web/dist/assets/skills-D4P-Hgey.js +1 -0
  458. package/web/dist/assets/sparkles-B8agSxBZ.js +1 -0
  459. package/web/dist/assets/sql-BsFa4tDR.js +1 -0
  460. package/web/dist/assets/square-terminal-Cf4Og6ct.js +1 -0
  461. package/web/dist/assets/tab-link-Cp2-CJS8.js +1 -0
  462. package/web/dist/assets/task-changes-DYgNXOyY.js +1 -0
  463. package/web/dist/assets/task-commits-BRpZSz1G.js +1 -0
  464. package/web/dist/assets/task-files-pKOwSyLh.js +2 -0
  465. package/web/dist/assets/task-thread-Bfyqqy-t.js +9 -0
  466. package/web/dist/assets/textarea--cpYshee.js +1 -0
  467. package/web/dist/assets/thread-loading-GyH2Atwo.js +1 -0
  468. package/web/dist/assets/toml-CcmNWLt0.js +1 -0
  469. package/web/dist/assets/trash-2--ZtrzUx3.js +1 -0
  470. package/web/dist/assets/triangle-alert-D5tJwRD2.js +1 -0
  471. package/web/dist/assets/tsx-udAQXfEw.js +1 -0
  472. package/web/dist/assets/typescript-bsJCZSQ-.js +1 -0
  473. package/web/dist/assets/upload-SnwVxKOA.js +1 -0
  474. package/web/dist/assets/use-desktop-C31lOFUD.js +1 -0
  475. package/web/dist/assets/use-submit-shortcut-JY8M_MPL.js +1 -0
  476. package/web/dist/assets/utils-Bb8ohcr3.js +64 -0
  477. package/web/dist/assets/workflows-BmOehP-A.js +11 -0
  478. package/web/dist/assets/yaml-rwi0_p6S.js +1 -0
  479. package/web/dist/assets/zoomable-image-0G3IBXWC.js +1 -0
  480. package/web/dist/index.html +80 -0
  481. package/web/dist/xezar.svg +14 -0
@@ -0,0 +1,490 @@
1
+ import { EventEmitter } from 'node:events';
2
+ import { z } from 'zod';
3
+ import type { RunnerId } from '../core/agent-runner.ts';
4
+ export type RunStatus = 'queued' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled';
5
+ /**
6
+ * A sub-state of `running` (spec 2026-07-18-subagent-monitoring-status, #490):
7
+ * the agent ended its turn still working on its own downstream work (a sub-agent
8
+ * or a monitored command) and declared it with the `XEZ:MONITORING` marker — so
9
+ * the cockpit shows a non-attention "monitoring" label instead of "needs you".
10
+ * Only ever set while `status === 'running'`; cleared on resume/terminal.
11
+ */
12
+ export type RunActivity = 'monitoring';
13
+ export type StepStatus = 'pending' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled' | 'skipped';
14
+ declare const stepStateSchema: z.ZodObject<{
15
+ id: z.ZodString;
16
+ name: z.ZodString;
17
+ kind: z.ZodEnum<{
18
+ agent: "agent";
19
+ check: "check";
20
+ }>;
21
+ status: z.ZodEnum<{
22
+ cancelled: "cancelled";
23
+ done: "done";
24
+ failed: "failed";
25
+ pending: "pending";
26
+ review: "review";
27
+ running: "running";
28
+ skipped: "skipped";
29
+ waiting: "waiting";
30
+ }>;
31
+ iterations: z.ZodNumber;
32
+ tokensUsed: z.ZodNumber;
33
+ inputTokens: z.ZodOptional<z.ZodNumber>;
34
+ outputTokens: z.ZodOptional<z.ZodNumber>;
35
+ usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
36
+ usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
37
+ usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
38
+ usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
39
+ usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
40
+ startedAt: z.ZodOptional<z.ZodString>;
41
+ finishedAt: z.ZodOptional<z.ZodString>;
42
+ error: z.ZodOptional<z.ZodString>;
43
+ sessionId: z.ZodOptional<z.ZodString>;
44
+ backend: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
45
+ claude: "claude";
46
+ "claude-cli": "claude-cli";
47
+ codex: "codex";
48
+ opencode: "opencode";
49
+ pi: "pi";
50
+ }>, z.ZodTransform<"claude" | "codex" | "opencode" | "pi", "claude" | "claude-cli" | "codex" | "opencode" | "pi">>>;
51
+ profileId: z.ZodOptional<z.ZodString>;
52
+ costUsd: z.ZodOptional<z.ZodNumber>;
53
+ }, z.core.$strip>;
54
+ /** One prompt message stacked onto a run while it waits for a free agent slot
55
+ * (#472). Folded into `{{task}}` at dequeue by `hydrateQueuedInput`; never
56
+ * delivered as its own turn — a follow-up turn would reach only the first step
57
+ * of a chain and would race the opening turn. */
58
+ declare const queuedMessageSchema: z.ZodObject<{
59
+ id: z.ZodString;
60
+ text: z.ZodString;
61
+ images: z.ZodOptional<z.ZodArray<z.ZodString>>;
62
+ createdAt: z.ZodString;
63
+ }, z.core.$strip>;
64
+ /** Exported for `./run-index.ts`, the read-only reader of the same file. Nothing else should
65
+ * parse `runs.json` — see `reconcileLoadedRun` for why a second parser is a correctness risk. */
66
+ export declare const runRecordSchema: z.ZodObject<{
67
+ id: z.ZodString;
68
+ title: z.ZodString;
69
+ titleSummary: z.ZodOptional<z.ZodString>;
70
+ diffStat: z.ZodOptional<z.ZodObject<{
71
+ adds: z.ZodNumber;
72
+ dels: z.ZodNumber;
73
+ files: z.ZodNumber;
74
+ repointed: z.ZodOptional<z.ZodBoolean>;
75
+ }, z.core.$strip>>;
76
+ workflow: z.ZodString;
77
+ task: z.ZodString;
78
+ queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
79
+ id: z.ZodString;
80
+ text: z.ZodString;
81
+ images: z.ZodOptional<z.ZodArray<z.ZodString>>;
82
+ createdAt: z.ZodString;
83
+ }, z.core.$strip>>>;
84
+ taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
+ model: z.ZodOptional<z.ZodString>;
86
+ modelIdentity: z.ZodOptional<z.ZodString>;
87
+ runner: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
88
+ claude: "claude";
89
+ "claude-cli": "claude-cli";
90
+ codex: "codex";
91
+ opencode: "opencode";
92
+ pi: "pi";
93
+ }>, z.ZodTransform<"claude" | "codex" | "opencode" | "pi", "claude" | "claude-cli" | "codex" | "opencode" | "pi">>>;
94
+ agentProfile: z.ZodOptional<z.ZodString>;
95
+ systemPrompt: z.ZodOptional<z.ZodString>;
96
+ generateFollowups: z.ZodOptional<z.ZodBoolean>;
97
+ autonomous: z.ZodOptional<z.ZodBoolean>;
98
+ automation: z.ZodOptional<z.ZodObject<{
99
+ automationId: z.ZodString;
100
+ automationRevision: z.ZodNumber;
101
+ receiptId: z.ZodString;
102
+ event: z.ZodString;
103
+ githubUrl: z.ZodString;
104
+ }, z.core.$strip>>;
105
+ status: z.ZodEnum<{
106
+ cancelled: "cancelled";
107
+ done: "done";
108
+ failed: "failed";
109
+ queued: "queued";
110
+ review: "review";
111
+ running: "running";
112
+ waiting: "waiting";
113
+ }>;
114
+ activity: z.ZodOptional<z.ZodEnum<{
115
+ monitoring: "monitoring";
116
+ }>>;
117
+ monitoringWakeAt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
118
+ monitoringWakeCapReached: z.ZodOptional<z.ZodBoolean>;
119
+ autoResumeAt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
120
+ autoResumeAttempts: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
121
+ createdAt: z.ZodString;
122
+ startedAt: z.ZodOptional<z.ZodString>;
123
+ finishedAt: z.ZodOptional<z.ZodString>;
124
+ tokensUsed: z.ZodNumber;
125
+ inputTokens: z.ZodOptional<z.ZodNumber>;
126
+ outputTokens: z.ZodOptional<z.ZodNumber>;
127
+ costUsd: z.ZodOptional<z.ZodNumber>;
128
+ pullRequestUrl: z.ZodOptional<z.ZodString>;
129
+ referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
130
+ prNumber: z.ZodOptional<z.ZodNumber>;
131
+ issueNumber: z.ZodOptional<z.ZodNumber>;
132
+ referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
133
+ titleOrigin: z.ZodOptional<z.ZodEnum<{
134
+ auto: "auto";
135
+ marker: "marker";
136
+ user: "user";
137
+ }>>;
138
+ markerRefs: z.ZodOptional<z.ZodObject<{
139
+ pr: z.ZodOptional<z.ZodNumber>;
140
+ issue: z.ZodOptional<z.ZodNumber>;
141
+ }, z.core.$strip>>;
142
+ referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
+ referencedIssueUrl: z.ZodOptional<z.ZodString>;
144
+ referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
145
+ worktree: z.ZodOptional<z.ZodLiteral<false>>;
146
+ worktreePath: z.ZodOptional<z.ZodString>;
147
+ branch: z.ZodOptional<z.ZodString>;
148
+ baseBranch: z.ZodOptional<z.ZodString>;
149
+ worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
150
+ groupId: z.ZodOptional<z.ZodString>;
151
+ variant: z.ZodOptional<z.ZodString>;
152
+ peakRssBytes: z.ZodOptional<z.ZodNumber>;
153
+ peakProcCount: z.ZodOptional<z.ZodNumber>;
154
+ archived: z.ZodDefault<z.ZodBoolean>;
155
+ archivedAt: z.ZodOptional<z.ZodString>;
156
+ pinned: z.ZodOptional<z.ZodBoolean>;
157
+ pinnedAt: z.ZodOptional<z.ZodString>;
158
+ seenAt: z.ZodOptional<z.ZodString>;
159
+ currentStepId: z.ZodOptional<z.ZodString>;
160
+ error: z.ZodOptional<z.ZodString>;
161
+ steps: z.ZodArray<z.ZodObject<{
162
+ id: z.ZodString;
163
+ name: z.ZodString;
164
+ kind: z.ZodEnum<{
165
+ agent: "agent";
166
+ check: "check";
167
+ }>;
168
+ status: z.ZodEnum<{
169
+ cancelled: "cancelled";
170
+ done: "done";
171
+ failed: "failed";
172
+ pending: "pending";
173
+ review: "review";
174
+ running: "running";
175
+ skipped: "skipped";
176
+ waiting: "waiting";
177
+ }>;
178
+ iterations: z.ZodNumber;
179
+ tokensUsed: z.ZodNumber;
180
+ inputTokens: z.ZodOptional<z.ZodNumber>;
181
+ outputTokens: z.ZodOptional<z.ZodNumber>;
182
+ usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
183
+ usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
184
+ usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
185
+ usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
186
+ usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
187
+ startedAt: z.ZodOptional<z.ZodString>;
188
+ finishedAt: z.ZodOptional<z.ZodString>;
189
+ error: z.ZodOptional<z.ZodString>;
190
+ sessionId: z.ZodOptional<z.ZodString>;
191
+ backend: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
192
+ claude: "claude";
193
+ "claude-cli": "claude-cli";
194
+ codex: "codex";
195
+ opencode: "opencode";
196
+ pi: "pi";
197
+ }>, z.ZodTransform<"claude" | "codex" | "opencode" | "pi", "claude" | "claude-cli" | "codex" | "opencode" | "pi">>>;
198
+ profileId: z.ZodOptional<z.ZodString>;
199
+ costUsd: z.ZodOptional<z.ZodNumber>;
200
+ }, z.core.$strip>>;
201
+ workflowDef: z.ZodCatch<z.ZodOptional<z.ZodObject<{
202
+ name: z.ZodString;
203
+ description: z.ZodOptional<z.ZodString>;
204
+ steps: z.ZodArray<z.ZodObject<{
205
+ id: z.ZodString;
206
+ name: z.ZodOptional<z.ZodString>;
207
+ prompt: z.ZodOptional<z.ZodString>;
208
+ skill: z.ZodOptional<z.ZodString>;
209
+ model: z.ZodOptional<z.ZodString>;
210
+ runner: z.ZodOptional<z.ZodEnum<{
211
+ claude: "claude";
212
+ codex: "codex";
213
+ opencode: "opencode";
214
+ pi: "pi";
215
+ }>>;
216
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
217
+ bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
218
+ command: z.ZodOptional<z.ZodString>;
219
+ onFail: z.ZodOptional<z.ZodObject<{
220
+ retry: z.ZodString;
221
+ max: z.ZodDefault<z.ZodNumber>;
222
+ }, z.core.$strip>>;
223
+ }, z.core.$strip>>;
224
+ source: z.ZodEnum<{
225
+ "built-in": "built-in";
226
+ file: "file";
227
+ }>;
228
+ path: z.ZodOptional<z.ZodString>;
229
+ }, z.core.$strip>>>;
230
+ }, z.core.$strip>;
231
+ export type StepState = z.infer<typeof stepStateSchema>;
232
+ export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
233
+ export type RunRecord = z.infer<typeof runRecordSchema>;
234
+ /** One persisted event line; `type` mirrors AgentEvent plus engine lifecycle. */
235
+ export interface RunEvent {
236
+ seq: number;
237
+ ts: string;
238
+ stepId?: string;
239
+ type: string;
240
+ [key: string]: unknown;
241
+ }
242
+ /** The repository a project IS, as `resolveRepoHandle` reports it. `null`/absent means "unknown",
243
+ * which is a real and common state (no `gh`, no remote, a non-git root) — never an error. */
244
+ export type RepoHandle = {
245
+ owner: string;
246
+ name: string;
247
+ };
248
+ /**
249
+ * Reconcile one record just read off disk with the fact that whichever process wrote it is gone.
250
+ *
251
+ * Mutates and returns `run`. Extracted from `RunStore.open` so the read-only index reader
252
+ * (`./run-index.ts`) answers the SAME question about a `running` row on disk. Two parsers that
253
+ * disagree here is a visible bug, not an internal one: the cockpit would show a task as running
254
+ * in the ⌘K index and failed the moment you opened it.
255
+ *
256
+ * `keepLive` (#367): leave `queued`/`running`/`waiting` untouched so the caller can recover them
257
+ * (RunManager.recover re-queues queued runs, resumes interrupted ones). Without it — one-shot CLI
258
+ * paths that never recover, and the index reader, which has no manager at all — live-looking runs
259
+ * are marked failed so no ghost stays behind.
260
+ */
261
+ export declare function reconcileLoadedRun(run: RunRecord, opts?: {
262
+ keepLive?: boolean;
263
+ }): RunRecord;
264
+ /**
265
+ * File-backed run store: `runs.json` index (atomic tmp+rename writes, the
266
+ * pattern from @xezar/core's IssueStore) plus one append-only NDJSON event
267
+ * file per run. Also the in-process event bus the SSE endpoints subscribe to:
268
+ * emits `('run', RunRecord)` and `('event', { runId, event: RunEvent })`.
269
+ */
270
+ export declare class RunStore extends EventEmitter {
271
+ private readonly dataDir;
272
+ private runs;
273
+ private saveTimer;
274
+ /** The repository this project IS (#945), armed after `open()` by `setRepoHandle`. Undefined
275
+ * until it arrives and `null` when it cannot be known — both mean "unscoped", which is
276
+ * exactly the pre-#945 behavior. */
277
+ private repoHandle;
278
+ private constructor();
279
+ /** See `reconcileLoadedRun` for what `keepLive` (#367) decides about live-looking rows. */
280
+ static open(dataDir: string, opts?: {
281
+ keepLive?: boolean;
282
+ }): RunStore;
283
+ /**
284
+ * Tell the store which repository this project IS (#945), so the referenced tier stops adopting
285
+ * another repo's PR/issue as the task's subject. See `isRepoScopedRef` for the rule.
286
+ *
287
+ * A setter rather than an `open()` option because `open()` is synchronous and the handle costs a
288
+ * `gh` spawn: callers arm this in the background so boot never waits on the network. `null` is a
289
+ * first-class answer meaning "cannot be known" (no `gh`, no remote, a non-git root) and leaves
290
+ * the store in exactly its pre-#945 behavior.
291
+ *
292
+ * Arming also HEALS records already poisoned by the un-scoped rule, on the `reconcileLoadedRun`
293
+ * precedent: the evidence is all still on the record (`referenced*Candidates`), only the
294
+ * conclusion drawn from it was wrong, so re-deciding beats asking for a migration. It rewrites
295
+ * values, never the format, and is one-directional by construction — see `rescopeRun`.
296
+ */
297
+ setRepoHandle(handle: RepoHandle | null): void;
298
+ /**
299
+ * Drop this run's referenced PR/issue if the project's handle proves it foreign and the prompt
300
+ * does not corroborate it (#945). Returns whether anything changed.
301
+ *
302
+ * One-directional by construction: it only ever clears fields, so a record written by an older
303
+ * xezar — or read by one after this ran — is never worse off, and a downgrade sees a record whose
304
+ * format is untouched and whose cleared fields were already optional.
305
+ */
306
+ private rescopeRun;
307
+ listRuns(): RunRecord[];
308
+ getRun(id: string): RunRecord | undefined;
309
+ createRun(input: {
310
+ title: string;
311
+ workflow: string;
312
+ task: string;
313
+ model?: string;
314
+ runner?: RunnerId;
315
+ /** Composer's per-task agent account (spec 2026-07-29-agent-profiles). */
316
+ agentProfile?: string;
317
+ generateFollowups?: boolean;
318
+ autonomous?: boolean;
319
+ worktree?: false;
320
+ groupId?: string;
321
+ variant?: string;
322
+ steps: Array<Pick<StepState, 'id' | 'name' | 'kind'>>;
323
+ }): RunRecord;
324
+ updateRun(id: string, patch: Partial<Omit<RunRecord, 'id' | 'steps'>>): RunRecord | undefined;
325
+ /**
326
+ * Scrub the free-text fields of a record patch (#427 review). Redacting only
327
+ * events left a hole: `titleSummary` is derived from the RAW first agent turn
328
+ * and `error` from raw process output, so a token the agent echoed was
329
+ * `[REDACTED]` in the NDJSON yet verbatim in `runs.json` — the file the "no
330
+ * secrets in state files" rule names explicitly. These three are the only
331
+ * patch fields carrying agent/process text; the rest are ids, enums, counters
332
+ * and URLs, and running the scrubber over them would only risk mangling them.
333
+ *
334
+ * `StepState.error` is the step-level counterpart and is scrubbed the same
335
+ * way in `updateStep` — `run.ts` feeds the SAME `err.message` string to both
336
+ * calls, so redacting only the run-level copy left the token verbatim one
337
+ * field away (#456 review).
338
+ */
339
+ private redactPatch;
340
+ /**
341
+ * Step-level counterpart of `redactPatch` (#456 review). `error` is the only
342
+ * free-text `StepState` field — it is set from raw `err.message` /process
343
+ * output (`run.ts` `finishStep`), and `touch()` fans the whole record out
344
+ * over SSE, so an unscrubbed copy leaked to `runs.json` AND to the browser.
345
+ * The remaining fields are ids, enums, counters and timestamps.
346
+ */
347
+ private redactStepPatch;
348
+ /** Append a step to an existing run (used by "Continue" — spec 003). */
349
+ addStep(runId: string, step: Pick<StepState, 'id' | 'name' | 'kind'>): void;
350
+ updateStep(runId: string, stepId: string, patch: Partial<Omit<StepState, 'id'>>): void;
351
+ setArchived(id: string, archived: boolean): RunRecord | undefined;
352
+ /** Pin one run to the top of this project's task list, or unpin it (#935). Mirrors
353
+ * `setArchived`: sets the fields, then persists + broadcasts via `touch`, so the updated
354
+ * record rides the existing `run` SSE with no new event. Idempotent — re-pinning a pinned
355
+ * run just re-stamps `pinnedAt`.
356
+ *
357
+ * Unconditional by design, like `setUnread`: pinning is legal for every status, and WHICH
358
+ * runs are worth offering the action on is UI policy (`runActionFlags` in the cockpit). */
359
+ setPinned(id: string, pinned: boolean): RunRecord | undefined;
360
+ /** Bulk-archive every finished run; returns how many were archived. */
361
+ archiveFinished(): number;
362
+ /** Mark one run as read (#unread-done-items): stamp the read receipt now. Mirrors
363
+ * `setArchived` — sets the field then persists + broadcasts via `touch`, so the
364
+ * updated record rides the existing `run` SSE with no new event. Idempotent by
365
+ * design: opening an already-read thread just re-stamps a later `seenAt`. */
366
+ setRead(id: string): RunRecord | undefined;
367
+ /** Mark one run as UNread (#775): drop the read receipt so the run rejoins the unread
368
+ * list. The inverse of `setRead` and, like it, `touch`es so the updated record rides the
369
+ * existing `run` SSE.
370
+ *
371
+ * Deleting the field rather than adding a "manually unread" flag is the whole point:
372
+ * absent `seenAt` is ALREADY what every reader treats as unread (`isUnread` in the
373
+ * cockpit's read-state.ts, and `markAllRead`'s clause-for-clause copy of it below), so
374
+ * clearing needs no new state and writes a shape any older xezar already parses.
375
+ *
376
+ * Deliberately unconditional: clearing a receipt is always a legal write, so this
377
+ * succeeds for an already-unread run (idempotent) and for statuses that can never wear
378
+ * the marker. WHETHER the action means anything for a given run is UI policy, and lives
379
+ * in the cockpit's `runActionFlags` — the same split the rest of the store keeps. */
380
+ setUnread(id: string): RunRecord | undefined;
381
+ /** Bulk mark-read: stamp every currently-unread finished run; returns the count.
382
+ * "Unread" here is the same rule the cockpit paints (`isUnread` in read-state.ts),
383
+ * clause for clause:
384
+ * - a `done` or `failed` run that finished and has not been seen since;
385
+ * - cancelled runs are never unread — you stopped them yourself;
386
+ * - archived ones never are either, since archiving is a stronger "done with this"
387
+ * than reading;
388
+ * - and a `failed` run with a pending `autoResumeAt` is not a done item AT ALL
389
+ * (`isScheduledResume`, spec 2026-08-03-auto-resume-after-usage-limit): it has an
390
+ * appointment to pick the work back up, so there is no outcome to have missed.
391
+ *
392
+ * Keeping the two rules identical is what makes the returned count the number the
393
+ * cockpit's unread badge was showing. The `autoResumeAt` clause is the one that drifted
394
+ * (#803): `isUnread` gained it with auto-resume and this sweep did not, so a task waiting
395
+ * out a usage limit was uncounted by the badge but stamped read by the sweep — and this
396
+ * comment asserted an invariant the code no longer held.
397
+ *
398
+ * This rule lives in two languages of the same repo, which is why it has now drifted
399
+ * once. The cockpit cannot import it (`packages/web` does not depend on the service, and
400
+ * should not), so a single definition would have to move to `packages/contract` — the one
401
+ * package both sides already import. Worth doing; deliberately not done here, because
402
+ * widening the contract package's remit from "shapes" to "behavior" is a design change
403
+ * that deserves its own review rather than riding along in a bug fix. Until then: EDIT
404
+ * BOTH, and the case-table tests on either side are what catch you if you don't. */
405
+ markAllRead(): number;
406
+ appendEvent(runId: string, event: {
407
+ type: string;
408
+ stepId?: string;
409
+ [key: string]: unknown;
410
+ }): RunEvent;
411
+ /**
412
+ * Fold every PR URL in `haystack` into the run's referenced-tier working
413
+ * set and re-resolve `referencedPullRequestUrl` (spec
414
+ * 2026-07-16-pr-autodiscovery). Mutates the record in place — the caller
415
+ * owns persistence/fan-out — and reports whether anything changed.
416
+ */
417
+ private trackReferencedPrs;
418
+ /**
419
+ * The issue-side mirror of `trackReferencedPrs` (spec
420
+ * 2026-07-21-report-ref-discovery): fold every issue URL in `haystack` into
421
+ * the working set and re-resolve `referencedIssueUrl`. An unambiguous
422
+ * resolution also seeds `issueNumber` when nothing owns that field yet —
423
+ * marker and namer both outrank this janitor and overwrite it freely.
424
+ */
425
+ private trackReferencedIssues;
426
+ /**
427
+ * Apply agent-declared reference markers (spec 2026-07-18-task-ref-markers).
428
+ * Marker values are authoritative for the display tier: they overwrite the
429
+ * regex/namer numbers, and a declared PR re-resolves the referenced URL
430
+ * against the candidate working set — including down to `undefined` when no
431
+ * candidate matches (a wrong chip is worse than no chip). The created tier
432
+ * (`pullRequestUrl`) is deliberately untouched.
433
+ *
434
+ * One declaration is NOT a statement about the referenced tier: the number of the PR this run
435
+ * itself created. See `referencedPrDeclaration` — the marker contract asks the agent to
436
+ * re-declare after it opens a PR, and taking that literally cost the task the PR it was about.
437
+ */
438
+ applyMarkerRefs(runId: string, refs: {
439
+ pr?: number;
440
+ issue?: number;
441
+ }): RunRecord | undefined;
442
+ /**
443
+ * Fan an event out to live subscribers WITHOUT writing it to the NDJSON
444
+ * file — the channel for coalesced `item.delta` flushes (protocol-v2
445
+ * performance guardrail: raw deltas never hit disk; replay = the persisted
446
+ * snapshots). Stamped with `seq`/`ts` like persisted lines so the live
447
+ * wire keeps one ordering axis; the seq simply never appears in a replay
448
+ * (gaps are fine — dedup compares with `>`).
449
+ */
450
+ emitEphemeral(runId: string, event: {
451
+ type: string;
452
+ stepId?: string;
453
+ [key: string]: unknown;
454
+ }): RunEvent;
455
+ /** Lazily-collected concrete secret values from the host env (#427). */
456
+ private secretValues;
457
+ /**
458
+ * Scrub known credential values / token shapes from an event before it is
459
+ * persisted or fanned out. On by default; `XEZ_REDACT_SECRETS=0` opts out.
460
+ */
461
+ private redact;
462
+ /** Best-effort scrub of one free-text string bound for `runs.json`. Honors
463
+ * the `XEZ_REDACT_SECRETS=0` opt-out itself so every caller inherits it. */
464
+ private redactText;
465
+ private hostSecrets;
466
+ readEvents(runId: string): RunEvent[];
467
+ deleteRun(id: string): boolean;
468
+ /** Write the index out now (used on shutdown). */
469
+ flush(): void;
470
+ private seqs;
471
+ private nextSeq;
472
+ /** After a restart the in-memory counter is empty while the run's NDJSON file
473
+ * keeps the history. Restarting from 1 would collide with the seqs a client
474
+ * already replayed — its `seq > maxSeq` dedup then silently drops every
475
+ * resumed event, even across a reload (the frozen-transcript symptom class
476
+ * of #424). One file read on the first post-restart append per run. */
477
+ private rehydrateSeq;
478
+ private eventsPath;
479
+ /** Same location `handoffPath()` in handoff.ts produces — inlined to keep
480
+ * the store free of upward imports. */
481
+ private handoffPath;
482
+ /** Agent screenshots persisted by the run manager (see persistImage). */
483
+ private imagesDir;
484
+ private touch;
485
+ private pruneOldRuns;
486
+ /** Debounced so token-usage updates don't rewrite the index per event. */
487
+ private scheduleSave;
488
+ private saveNow;
489
+ }
490
+ export {};