@open-mercato/cezar 0.9.1 → 0.9.2
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.
- package/README.md +19 -11
- package/dist/agent-config/catalog.d.ts +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/service.d.ts +1 -1
- package/dist/agent-config/validate.d.ts +1 -1
- package/dist/automations/coordinator.d.ts +26 -0
- package/dist/automations/coordinator.js +66 -0
- package/dist/automations/coordinator.js.map +1 -0
- package/dist/automations/github-poller.d.ts +74 -0
- package/dist/automations/github-poller.js +234 -0
- package/dist/automations/github-poller.js.map +1 -0
- package/dist/automations/scheduler.d.ts +42 -0
- package/dist/automations/scheduler.js +192 -0
- package/dist/automations/scheduler.js.map +1 -0
- package/dist/automations/store.d.ts +65 -0
- package/dist/automations/store.js +298 -0
- package/dist/automations/store.js.map +1 -0
- package/dist/automations/task-template.d.ts +18 -0
- package/dist/automations/task-template.js +95 -0
- package/dist/automations/task-template.js.map +1 -0
- package/dist/automations/types.d.ts +251 -0
- package/dist/automations/types.js +158 -0
- package/dist/automations/types.js.map +1 -0
- package/dist/config.d.ts +9 -111
- package/dist/contract/agent-config.d.ts +151 -0
- package/dist/contract/automations.d.ts +911 -0
- package/dist/contract/events.d.ts +45 -0
- package/dist/contract/github.d.ts +467 -0
- package/dist/contract/health.d.ts +96 -0
- package/dist/contract/index.d.ts +15 -0
- package/dist/contract/index.js +1421 -0
- package/dist/contract/projects.d.ts +182 -0
- package/dist/contract/repo.d.ts +234 -0
- package/dist/contract/runs.d.ts +1226 -0
- package/dist/contract/skills.d.ts +225 -0
- package/dist/contract/workflows.d.ts +212 -0
- package/dist/contract/workspace.d.ts +442 -0
- package/dist/core/agent-env.d.ts +1 -1
- package/dist/core/agent-runner.d.ts +12 -1
- package/dist/core/agent-runner.js +13 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/ask.d.ts +45 -124
- package/dist/core/ask.js +103 -13
- package/dist/core/ask.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +2 -2
- package/dist/core/claude-cli-runner.js +52 -9
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/claude-ui-mapper.d.ts +1 -1
- package/dist/core/codex-app-server-runner.d.ts +1 -1
- package/dist/core/codex-app-server-runner.js +55 -3
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.d.ts +6 -1
- package/dist/core/codex-app-server-transport.js +12 -3
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/codex-model-catalog.d.ts +1 -1
- package/dist/core/codex-ui-mapper.d.ts +5 -1
- package/dist/core/codex-ui-mapper.js +74 -17
- package/dist/core/codex-ui-mapper.js.map +1 -1
- package/dist/core/model-identity.d.ts +1 -1
- package/dist/core/model-presets.d.ts +2 -2
- package/dist/core/model-presets.js +1 -1
- package/dist/core/opencode-server-runner.d.ts +2 -2
- package/dist/core/opencode-ui-mapper.d.ts +4 -1
- package/dist/core/opencode-ui-mapper.js +45 -7
- package/dist/core/opencode-ui-mapper.js.map +1 -1
- package/dist/core/provider-auth.d.ts +62 -0
- package/dist/core/provider-auth.js +290 -0
- package/dist/core/provider-auth.js.map +1 -0
- package/dist/core/provider-availability.d.ts +3 -0
- package/dist/core/provider-availability.js +13 -0
- package/dist/core/provider-availability.js.map +1 -0
- package/dist/core/runner-factory.d.ts +1 -1
- package/dist/core/runner-model-catalog.d.ts +1 -1
- package/dist/core/tool-display.d.ts +1 -1
- package/dist/core/ui-events.d.ts +1 -1
- package/dist/core/ui-events.js +1 -1
- package/dist/git-diff-base.d.ts +60 -0
- package/dist/git-diff-base.js +54 -0
- package/dist/git-diff-base.js.map +1 -0
- package/dist/git-worktree.d.ts +37 -6
- package/dist/git-worktree.js +39 -9
- package/dist/git-worktree.js.map +1 -1
- package/dist/handoff.d.ts +2 -2
- package/dist/handoff.js +1 -1
- package/dist/index.js +65 -8
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +16 -1
- package/dist/paths.js +24 -1
- package/dist/paths.js.map +1 -1
- package/dist/planner.d.ts +2 -2
- package/dist/planner.js +1 -1
- package/dist/planner.js.map +1 -1
- package/dist/release/manifests.d.ts +81 -0
- package/dist/release/manifests.js +74 -0
- package/dist/release/manifests.js.map +1 -0
- package/dist/release/snapshot.d.ts +9 -23
- package/dist/release/snapshot.js +9 -22
- package/dist/release/snapshot.js.map +1 -1
- package/dist/release/stable.d.ts +15 -29
- package/dist/release/stable.js +14 -27
- package/dist/release/stable.js.map +1 -1
- package/dist/runs/auto-name.d.ts +1 -1
- package/dist/runs/retention.d.ts +1 -1
- package/dist/runs/store.d.ts +142 -336
- package/dist/runs/store.js +136 -9
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/ui-event-sink.d.ts +1 -1
- package/dist/server/app-type.d.ts +21 -0
- package/dist/server/app-type.js +2 -0
- package/dist/server/app-type.js.map +1 -0
- package/dist/server/capabilities.d.ts +6 -5
- package/dist/server/capabilities.js +11 -0
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/forge/github.d.ts +58 -151
- package/dist/server/forge/github.js +530 -6
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/index.d.ts +10 -3
- package/dist/server/forge/index.js +14 -1
- package/dist/server/forge/index.js.map +1 -1
- package/dist/server/forge/types.d.ts +86 -1
- package/dist/server/git-changes.d.ts +8 -8
- package/dist/server/git-changes.js +14 -17
- package/dist/server/git-changes.js.map +1 -1
- package/dist/server/git.d.ts +2 -0
- package/dist/server/git.js +9 -0
- package/dist/server/git.js.map +1 -1
- package/dist/server/github.d.ts +3 -3
- package/dist/server/github.js +1 -1
- package/dist/server/github.js.map +1 -1
- package/dist/server/pr.d.ts +2 -2
- package/dist/server/project-context.d.ts +20 -3
- package/dist/server/project-context.js +30 -1
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/provider-action-gate.d.ts +8 -0
- package/dist/server/provider-action-gate.js +54 -0
- package/dist/server/provider-action-gate.js.map +1 -0
- package/dist/server/provider-auth-runtime.d.ts +21 -0
- package/dist/server/provider-auth-runtime.js +66 -0
- package/dist/server/provider-auth-runtime.js.map +1 -0
- package/dist/server/server.d.ts +11142 -47
- package/dist/server/server.js +1714 -806
- package/dist/server/server.js.map +1 -1
- package/dist/server/validators.d.ts +97 -0
- package/dist/server/validators.js +86 -0
- package/dist/server/validators.js.map +1 -0
- package/dist/server/ws.d.ts +2 -2
- package/dist/server/ws.js +2 -2
- package/dist/server/ws.js.map +1 -1
- package/dist/server-install/engine.d.ts +1 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
- package/dist/server-install/platforms/ubuntu-vps.js +83 -1
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/server-install/state.d.ts +1 -1
- package/dist/server-install/steps.d.ts +2 -2
- package/dist/server-install/strategies.d.ts +1 -1
- package/dist/server-install/types.d.ts +38 -424
- package/dist/server-install/ui.d.ts +1 -1
- package/dist/skills-banner.d.ts +7 -6
- package/dist/skills-banner.js +7 -6
- package/dist/skills-banner.js.map +1 -1
- package/dist/skills-remote.d.ts +2 -2
- package/dist/skills-update.d.ts +88 -0
- package/dist/skills-update.js +392 -0
- package/dist/skills-update.js.map +1 -0
- package/dist/skills.d.ts +2 -0
- package/dist/skills.js +3 -2
- package/dist/skills.js.map +1 -1
- package/dist/todos.d.ts +2 -28
- package/dist/todos.js +1 -1
- package/dist/ui-state.d.ts +16 -2
- package/dist/ui-state.js +14 -1
- package/dist/ui-state.js.map +1 -1
- package/dist/workflows/load.d.ts +1 -1
- package/dist/workflows/run.d.ts +53 -12
- package/dist/workflows/run.js +436 -64
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +59 -224
- package/dist/workflows/types.js +14 -0
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/config.d.ts +68 -206
- package/dist/workspace/config.js +145 -14
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/migrations.d.ts +1 -1
- package/dist/workspace/migrations.js +19 -4
- package/dist/workspace/migrations.js.map +1 -1
- package/dist/workspace/projects.d.ts +8 -2
- package/dist/workspace/projects.js +9 -3
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +6 -0
- package/dist/workspace/semaphore.js +14 -1
- package/dist/workspace/semaphore.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +13 -3
- package/dist/workspace/ui-state.js +15 -5
- package/dist/workspace/ui-state.js.map +1 -1
- package/package.json +17 -39
- package/scripts/inline-contract.mjs +112 -0
- package/scripts/mock-claude.mjs +39 -1
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-ghffK6g9.js +1 -0
- package/web/dist/assets/arrow-down-Cz8qb71e.js +1 -0
- package/web/dist/assets/arrow-left-wcYKQXI_.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/centered-state-ZtnFHA-n.js +43 -0
- package/web/dist/assets/chevron-right-G4caF2QV.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
- package/web/dist/assets/circle-check--KvBxXWp.js +1 -0
- package/web/dist/assets/circle-x-C3EFZ3xf.js +1 -0
- package/web/dist/assets/collapsible-B0JVzd0B.js +1 -0
- package/web/dist/assets/commit-list-wm6DPHNs.js +1 -0
- package/web/dist/assets/compare-variants-DbdP4Y5T.js +1 -0
- package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
- package/web/dist/assets/diff-Bizc96qe.js +3 -0
- package/web/dist/assets/diff-stat-Dyfg3ltF.js +1 -0
- package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-CG8ek6tC.js} +4 -4
- package/web/dist/assets/dropdown-menu-C1Dlf35P.js +1 -0
- package/web/dist/assets/editable-title-5rC_QRBZ.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-DpGTRqC2.js} +1 -1
- package/web/dist/assets/{file-D4GBh1ao.js → file-DlUGpUlb.js} +1 -1
- package/web/dist/assets/folder-BAY6Vddy.js +1 -0
- package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-agOG0iGM.js} +1 -1
- package/web/dist/assets/git-toolbar-DGiNMmtY.js +1 -0
- package/web/dist/assets/github-Vp7lxYGQ.js +1 -0
- package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
- package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
- package/web/dist/assets/image-preview-BWGk5fPX.js +1 -0
- package/web/dist/assets/index-DSxyJpuK.css +2 -0
- package/web/dist/assets/index-DiawI6RX.js +6 -0
- package/web/dist/assets/lib-BQXq3kEf.js +1 -0
- package/web/dist/assets/lib-BxQXEXDF.js +1 -0
- package/web/dist/assets/markdown-BGBOGCA_.js +2 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/new-task-form-BpAw_Dks.js +1 -0
- package/web/dist/assets/pill-Dvs-P0xy.js +1 -0
- package/web/dist/assets/project-router-Cx8NPoqn.js +1 -0
- package/web/dist/assets/prompt-templates-CSBYBR1I.js +15 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-BoGdAykg.js} +1 -1
- package/web/dist/assets/repo-git-PmX-BNMo.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-diff-EcOkf3ti.js +3 -0
- package/web/dist/assets/run-header-BGiv6_qX.js +1 -0
- package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-X3EpVhgs.js} +1 -1
- package/web/dist/assets/skill-empty-hint-CZLALx6l.js +1 -0
- package/web/dist/assets/skills-BiWfHmCR.js +1 -0
- package/web/dist/assets/skills-CC91ouGH.js +1 -0
- package/web/dist/assets/sparkles-Dt4q7pbG.js +1 -0
- package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-hwBL8XsC.js} +1 -1
- package/web/dist/assets/tab-link-DIlR5T07.js +1 -0
- package/web/dist/assets/task-changes-XkHDxzQA.js +1 -0
- package/web/dist/assets/task-commits-BTTA5k5T.js +1 -0
- package/web/dist/assets/task-files-Da8_4C9g.js +2 -0
- package/web/dist/assets/task-thread-DoNXUsHr.js +9 -0
- package/web/dist/assets/textarea-CUdokhkv.js +1 -0
- package/web/dist/assets/thread-loading-B8q8ukXJ.js +1 -0
- package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-DhVIdWv8.js} +1 -1
- package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-XYT0DGCI.js} +1 -1
- package/web/dist/assets/{upload-CDdyPPo_.js → upload-BKjN59-1.js} +1 -1
- package/web/dist/assets/use-desktop-Bf5LS_P4.js +1 -0
- package/web/dist/assets/use-submit-shortcut-CzVyoAMd.js +1 -0
- package/web/dist/assets/utils-DsLuRXwV.js +64 -0
- package/web/dist/assets/workflows-o2QU_pvU.js +11 -0
- package/web/dist/assets/zoomable-image-7WyUiaVD.js +1 -0
- package/web/dist/index.html +32 -13
- package/scripts/dev.mjs +0 -74
- package/scripts/release-snapshot.mjs +0 -130
- package/scripts/release.mjs +0 -119
- package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
- package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
- package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
- package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
- package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
- package/web/dist/assets/dist-B6XQOhgM.js +0 -1
- package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
- package/web/dist/assets/github-DTTSG0ht.js +0 -1
- package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
- package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
- package/web/dist/assets/index-Cijmlz7q.js +0 -30
- package/web/dist/assets/index-DzroxqBG.css +0 -2
- package/web/dist/assets/lib-DPEZDBUN.js +0 -1
- package/web/dist/assets/lib-uHpeUPzK.js +0 -1
- package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
- package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
- package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
- package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
- package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
- package/web/dist/assets/run-header-Cg5incil.js +0 -1
- package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
- package/web/dist/assets/skills-PpP2owbM.js +0 -1
- package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
- package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
- package/web/dist/assets/task-commits-COkLaUri.js +0 -1
- package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
- package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
- package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
- package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
- package/web/dist/assets/utils-B8s5qIcK.js +0 -1
- package/web/dist/assets/workflows-BFk8C0co.js +0 -11
- package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
- /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
package/dist/release/stable.js
CHANGED
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
* thing that ever moves the `latest` dist-tag (spec
|
|
7
7
|
* `.ai/specs/2026-07-18-npm-preview-publish.md`, #482).
|
|
8
8
|
*
|
|
9
|
-
* Two decisions live here so they stay unit-testable
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* opposite of the snapshot stamper's exact pin — so a stable `cezar-cli` picks
|
|
14
|
-
* up compatible patch releases of the implementation package.
|
|
9
|
+
* Two decisions live here so they stay unit-testable and side-effect-free: the next stable
|
|
10
|
+
* version for a given bump, and the pin style the release set is stamped with. Crucially,
|
|
11
|
+
* stable releases use a **caret** range — the opposite of the snapshot stamper's exact pin —
|
|
12
|
+
* so a stable `cezar-cli` picks up compatible patch releases of the implementation package.
|
|
15
13
|
*/
|
|
14
|
+
import { stampManifestSet } from './manifests.js';
|
|
16
15
|
export const RELEASE_BUMPS = ['patch', 'minor', 'major', 'existing'];
|
|
17
16
|
export function isReleaseBump(value) {
|
|
18
17
|
return RELEASE_BUMPS.includes(value);
|
|
@@ -42,27 +41,15 @@ export function computeStableVersion(bump, base) {
|
|
|
42
41
|
return null;
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
/** Stamp
|
|
44
|
+
/** Stamp the release set to a stable version.
|
|
46
45
|
*
|
|
47
|
-
* Mirror of `
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
* carries none of its own. The git URL already matches and survives any
|
|
56
|
-
* npm-name rename. */
|
|
57
|
-
export function stampStableManifests(rootPkg, aliasPkg, version) {
|
|
58
|
-
const inherited = {};
|
|
59
|
-
for (const field of ['repository', 'homepage', 'bugs']) {
|
|
60
|
-
if (rootPkg[field] !== undefined)
|
|
61
|
-
inherited[field] = rootPkg[field];
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
root: { ...rootPkg, version },
|
|
65
|
-
alias: { ...aliasPkg, ...inherited, version, dependencies: { [rootPkg.name]: `^${version}` } },
|
|
66
|
-
};
|
|
46
|
+
* Mirror of `stampSnapshotManifests`, differing in exactly one decision: intra-release
|
|
47
|
+
* dependencies get a **caret** range (`^0.1.6`), not an exact pin. A stable `cezar-cli` should
|
|
48
|
+
* follow compatible releases of the implementation package, and a stable service should follow
|
|
49
|
+
* compatible releases of the api-client; a snapshot must pin the one exact build it was cut
|
|
50
|
+
* from. Everything else — which manifests exist, which sections carry the pin, what the alias
|
|
51
|
+
* inherits — lives in `manifests.ts` so the two channels cannot drift apart. */
|
|
52
|
+
export function stampStableManifests(manifests, version) {
|
|
53
|
+
return stampManifestSet(manifests, version, (v) => `^${v}`);
|
|
67
54
|
}
|
|
68
55
|
//# sourceMappingURL=stable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stable.js","sourceRoot":"","sources":["../../src/release/stable.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stable.js","sourceRoot":"","sources":["../../src/release/stable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAA+C,MAAM,gBAAgB,CAAC;AAO/F,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAE7F,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;2DAM2D;AAC3D,MAAM,UAAU,oBAAoB,CAAC,IAAiB,EAAE,IAAY;IAClE,MAAM,CAAC,GAAG,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,UAAU;YACb,OAAO,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;QACtC,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC1C,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC;QACnC,KAAK,OAAO;YACV,OAAO,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC;QAC5B;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAID;;;;;;;iFAOiF;AACjF,MAAM,UAAU,oBAAoB,CAClC,SAA6B,EAC7B,OAAe;IAEf,OAAO,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
package/dist/runs/auto-name.d.ts
CHANGED
package/dist/runs/retention.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RunRecord } from './store.
|
|
1
|
+
import type { RunRecord } from './store.ts';
|
|
2
2
|
/** A run is reclaimable when it is finished, still has a materialized worktree
|
|
3
3
|
* directory, and has not already been reclaimed. */
|
|
4
4
|
export declare function isReclaimable(run: RunRecord): boolean;
|
package/dist/runs/store.d.ts
CHANGED
|
@@ -13,46 +13,40 @@ export type StepStatus = 'pending' | 'running' | 'waiting' | 'review' | 'done' |
|
|
|
13
13
|
declare const stepStateSchema: z.ZodObject<{
|
|
14
14
|
id: z.ZodString;
|
|
15
15
|
name: z.ZodString;
|
|
16
|
-
kind: z.ZodEnum<
|
|
17
|
-
|
|
16
|
+
kind: z.ZodEnum<{
|
|
17
|
+
agent: "agent";
|
|
18
|
+
check: "check";
|
|
19
|
+
}>;
|
|
20
|
+
status: z.ZodEnum<{
|
|
21
|
+
cancelled: "cancelled";
|
|
22
|
+
done: "done";
|
|
23
|
+
failed: "failed";
|
|
24
|
+
pending: "pending";
|
|
25
|
+
review: "review";
|
|
26
|
+
running: "running";
|
|
27
|
+
skipped: "skipped";
|
|
28
|
+
waiting: "waiting";
|
|
29
|
+
}>;
|
|
18
30
|
iterations: z.ZodNumber;
|
|
19
31
|
tokensUsed: z.ZodNumber;
|
|
32
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
|
|
20
39
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
21
40
|
finishedAt: z.ZodOptional<z.ZodString>;
|
|
22
41
|
error: z.ZodOptional<z.ZodString>;
|
|
23
|
-
/** Latest backend-owned session id, used for same-backend Continue. */
|
|
24
42
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
44
|
+
claude: "claude";
|
|
45
|
+
codex: "codex";
|
|
46
|
+
opencode: "opencode";
|
|
47
|
+
}>>;
|
|
28
48
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
29
|
-
},
|
|
30
|
-
id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
kind: "agent" | "check";
|
|
33
|
-
status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
|
|
34
|
-
iterations: number;
|
|
35
|
-
tokensUsed: number;
|
|
36
|
-
startedAt?: string | undefined;
|
|
37
|
-
finishedAt?: string | undefined;
|
|
38
|
-
error?: string | undefined;
|
|
39
|
-
sessionId?: string | undefined;
|
|
40
|
-
backend?: "claude" | "codex" | "opencode" | undefined;
|
|
41
|
-
costUsd?: number | undefined;
|
|
42
|
-
}, {
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
|
-
kind: "agent" | "check";
|
|
46
|
-
status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
|
|
47
|
-
iterations: number;
|
|
48
|
-
tokensUsed: number;
|
|
49
|
-
startedAt?: string | undefined;
|
|
50
|
-
finishedAt?: string | undefined;
|
|
51
|
-
error?: string | undefined;
|
|
52
|
-
sessionId?: string | undefined;
|
|
53
|
-
backend?: "claude" | "codex" | "opencode" | undefined;
|
|
54
|
-
costUsd?: number | undefined;
|
|
55
|
-
}>;
|
|
49
|
+
}, z.core.$strip>;
|
|
56
50
|
/** One prompt message stacked onto a run while it waits for a free agent slot
|
|
57
51
|
* (#472). Folded into `{{task}}` at dequeue by `hydrateQueuedInput`; never
|
|
58
52
|
* delivered as its own turn — a follow-up turn would reach only the first step
|
|
@@ -60,365 +54,163 @@ declare const stepStateSchema: z.ZodObject<{
|
|
|
60
54
|
declare const queuedMessageSchema: z.ZodObject<{
|
|
61
55
|
id: z.ZodString;
|
|
62
56
|
text: z.ZodString;
|
|
63
|
-
|
|
64
|
-
images: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
57
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
58
|
createdAt: z.ZodString;
|
|
66
|
-
},
|
|
67
|
-
id: string;
|
|
68
|
-
text: string;
|
|
69
|
-
images?: string[] | undefined;
|
|
70
|
-
createdAt: string;
|
|
71
|
-
}, {
|
|
72
|
-
id: string;
|
|
73
|
-
text: string;
|
|
74
|
-
images?: string[] | undefined;
|
|
75
|
-
createdAt: string;
|
|
76
|
-
}>;
|
|
59
|
+
}, z.core.$strip>;
|
|
77
60
|
declare const runRecordSchema: z.ZodObject<{
|
|
78
61
|
id: z.ZodString;
|
|
79
62
|
title: z.ZodString;
|
|
80
|
-
/** Display title (#389): the auto-derived summary of the first agent turn,
|
|
81
|
-
* or the user's inline edit (`PATCH /api/runs/:id` sets it together with
|
|
82
|
-
* `title` so edits always win). The UI shows `titleSummary ?? title`. */
|
|
83
63
|
titleSummary: z.ZodOptional<z.ZodString>;
|
|
84
|
-
/** `git diff --shortstat` of the worktree vs its base, refreshed on every
|
|
85
|
-
* turn-end (#389) — what the quick list / table shows without a git call. */
|
|
86
64
|
diffStat: z.ZodOptional<z.ZodObject<{
|
|
87
65
|
adds: z.ZodNumber;
|
|
88
66
|
dels: z.ZodNumber;
|
|
89
67
|
files: z.ZodNumber;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
dels: number;
|
|
93
|
-
files: number;
|
|
94
|
-
}, {
|
|
95
|
-
adds: number;
|
|
96
|
-
dels: number;
|
|
97
|
-
files: number;
|
|
98
|
-
}>>;
|
|
68
|
+
repointed: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
99
70
|
workflow: z.ZodString;
|
|
100
71
|
task: z.ZodString;
|
|
101
|
-
/** Prompt messages stacked onto this run while it was queued (#472). Optional:
|
|
102
|
-
* `undefined` on every pre-#472 record reads as an empty stack. Like `task`,
|
|
103
|
-
* `text` is the user's own prompt and is replayed into `{{task}}`, so it is
|
|
104
|
-
* deliberately NOT in `redactPatch`'s field list — scrubbing it would corrupt
|
|
105
|
-
* the run the same way scrubbing `task` would. */
|
|
106
72
|
queuedMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
107
73
|
id: z.ZodString;
|
|
108
74
|
text: z.ZodString;
|
|
109
|
-
|
|
110
|
-
images: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
111
76
|
createdAt: z.ZodString;
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
text: string;
|
|
115
|
-
images?: string[] | undefined;
|
|
116
|
-
createdAt: string;
|
|
117
|
-
}, {
|
|
118
|
-
id: string;
|
|
119
|
-
text: string;
|
|
120
|
-
images?: string[] | undefined;
|
|
121
|
-
createdAt: string;
|
|
122
|
-
}>, "many">>;
|
|
123
|
-
/** URLs of images attached to the initial task prompt, for the thread's first bubble
|
|
124
|
-
* (#image-display) — persisted like agent screenshots, served from `/images/`. */
|
|
125
|
-
taskImages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
77
|
+
}, z.core.$strip>>>;
|
|
78
|
+
taskImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
126
79
|
model: z.ZodOptional<z.ZodString>;
|
|
127
|
-
/** Canonical provider/model identity (#405) — the normalised `provider/model`
|
|
128
|
-
* (e.g. `anthropic/claude-opus-4-8`) the run actually used, resolved from the
|
|
129
|
-
* free-text `model` against the chosen runner. Additive and optional: pre-#405
|
|
130
|
-
* records carry only `model`, and it stays the human/hand-edit surface; this
|
|
131
|
-
* is the parseable identity cost attribution and reproducible replay key off. */
|
|
132
80
|
modelIdentity: z.ZodOptional<z.ZodString>;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
* contract are derivable from the persisted workflow and would bloat the
|
|
139
|
-
* index. Resolved at execute time (a queued run picks up config edits). */
|
|
81
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
claude: "claude";
|
|
83
|
+
codex: "codex";
|
|
84
|
+
opencode: "opencode";
|
|
85
|
+
}>>;
|
|
140
86
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
141
|
-
/** Per-task follow-up inbox contract (spec 007, #444). Missing on old runs
|
|
142
|
-
* means enabled — the historical behavior. */
|
|
143
87
|
generateFollowups: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
-
/** Autonomous mode (#489): the run was started with the "autonomous" checkbox,
|
|
145
|
-
* so it never parks at `waiting` (auto-nudge) and — once persisted here —
|
|
146
|
-
* never parks at the terminal `review` gate either (`settleSuccess` + the
|
|
147
|
-
* group-pick winner-park read it). Additive-safe: absent = falsy = not
|
|
148
|
-
* autonomous. Set at creation from `WorkflowInput.autonomous`. */
|
|
149
88
|
autonomous: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
89
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
automationId: z.ZodString;
|
|
91
|
+
automationRevision: z.ZodNumber;
|
|
92
|
+
receiptId: z.ZodString;
|
|
93
|
+
event: z.ZodString;
|
|
94
|
+
githubUrl: z.ZodString;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
status: z.ZodEnum<{
|
|
97
|
+
cancelled: "cancelled";
|
|
98
|
+
done: "done";
|
|
99
|
+
failed: "failed";
|
|
100
|
+
queued: "queued";
|
|
101
|
+
review: "review";
|
|
102
|
+
running: "running";
|
|
103
|
+
waiting: "waiting";
|
|
104
|
+
}>;
|
|
105
|
+
activity: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
monitoring: "monitoring";
|
|
107
|
+
}>>;
|
|
108
|
+
monitoringWakeAt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
109
|
+
monitoringWakeCapReached: z.ZodOptional<z.ZodBoolean>;
|
|
155
110
|
createdAt: z.ZodString;
|
|
156
111
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
157
112
|
finishedAt: z.ZodOptional<z.ZodString>;
|
|
158
113
|
tokensUsed: z.ZodNumber;
|
|
114
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
159
116
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
160
|
-
/** First GitHub PR URL spotted in the transcript (the janitor trick). */
|
|
161
117
|
pullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
162
|
-
/** The PR this task is ABOUT (#407, spec 2026-07-16-pr-autodiscovery):
|
|
163
|
-
* auto-discovered from conversation references for tasks that work on an
|
|
164
|
-
* existing PR (review/continue/merge). Display-only tier — `pullRequestUrl`
|
|
165
|
-
* (the PR this task CREATED) always wins, and action gates ignore this. */
|
|
166
118
|
referencedPullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
167
|
-
/** The PR/issue number this task is ABOUT (spec 2026-07-17-task-auto-naming):
|
|
168
|
-
* regex-extracted from the task prompt, upgradable by the namer's
|
|
169
|
-
* cross-checked output. Display tier — never gates actions. */
|
|
170
119
|
prNumber: z.ZodOptional<z.ZodNumber>;
|
|
171
120
|
issueNumber: z.ZodOptional<z.ZodNumber>;
|
|
172
|
-
/** Provenance for an `issueNumber` seeded by referenced-issue discovery.
|
|
173
|
-
* Persisted so ambiguity can revoke only the janitor's own value, including
|
|
174
|
-
* after a restart. Any prompt, namer, or marker write clears this flag. */
|
|
175
121
|
referencedIssueNumberSeeded: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
titleOrigin: z.ZodOptional<z.ZodEnum<["user", "auto", "marker"]>>;
|
|
182
|
-
/** References the agent itself declared via `CEZ:PR=` / `CEZ:ISSUE=` markers
|
|
183
|
-
* (spec 2026-07-18-task-ref-markers). Presence of a kind makes it
|
|
184
|
-
* authoritative: the namer may no longer write that kind, and a declared PR
|
|
185
|
-
* owns the referenced tier's resolution. */
|
|
122
|
+
titleOrigin: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
auto: "auto";
|
|
124
|
+
marker: "marker";
|
|
125
|
+
user: "user";
|
|
126
|
+
}>>;
|
|
186
127
|
markerRefs: z.ZodOptional<z.ZodObject<{
|
|
187
128
|
pr: z.ZodOptional<z.ZodNumber>;
|
|
188
129
|
issue: z.ZodOptional<z.ZodNumber>;
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
issue?: number | undefined;
|
|
192
|
-
}, {
|
|
193
|
-
pr?: number | undefined;
|
|
194
|
-
issue?: number | undefined;
|
|
195
|
-
}>>;
|
|
196
|
-
/** Distinct PR URLs spotted so far — the referenced tier's working set,
|
|
197
|
-
* persisted so a resumed run keeps disambiguating against the full history
|
|
198
|
-
* instead of re-adopting the next URL as "the only one". Capped. */
|
|
199
|
-
referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
200
|
-
/** The issue this task is ABOUT (spec 2026-07-21-report-ref-discovery):
|
|
201
|
-
* auto-discovered from `github.com/…/issues/N` links in the conversation,
|
|
202
|
-
* mirroring the referenced-PR tier. Display-only; never gates actions. */
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
referencedPrCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
203
132
|
referencedIssueUrl: z.ZodOptional<z.ZodString>;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
207
|
-
/** Task worktree (spec 006) — absent when the run executed in the repo root. */
|
|
133
|
+
referencedIssueCandidates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
134
|
+
worktree: z.ZodOptional<z.ZodLiteral<false>>;
|
|
208
135
|
worktreePath: z.ZodOptional<z.ZodString>;
|
|
209
|
-
/** The task's own branch (`cez/<id8>`), created off `baseBranch`. */
|
|
210
136
|
branch: z.ZodOptional<z.ZodString>;
|
|
211
|
-
/** Branch (or commit, when HEAD was detached) the worktree was forked from. */
|
|
212
137
|
baseBranch: z.ZodOptional<z.ZodString>;
|
|
213
|
-
/** Set when count-based retention (#483) reclaimed this run's worktree
|
|
214
|
-
* *directory* (the `cez/<id8>` branch is kept). Presence means "materialized
|
|
215
|
-
* dir gone, recoverable via `git worktree add`"; it excludes the run from the
|
|
216
|
-
* retention budget until the dir is re-materialized (resume clears it). */
|
|
217
138
|
worktreeReclaimedAt: z.ZodOptional<z.ZodString>;
|
|
218
|
-
/** Parallel variants (spec 010): tasks sharing a groupId are one group. */
|
|
219
139
|
groupId: z.ZodOptional<z.ZodString>;
|
|
220
|
-
/** Variant letter within the group — 'A' | 'B' | 'C' (kept as a string). */
|
|
221
140
|
variant: z.ZodOptional<z.ZodString>;
|
|
222
|
-
/** Peak resident memory (bytes) / process count observed across the run's
|
|
223
|
-
* agent process trees (#348) — written when a session's telemetry ends.
|
|
224
|
-
* Optional: old runs.json files and `ps`-less platforms have neither. */
|
|
225
141
|
peakRssBytes: z.ZodOptional<z.ZodNumber>;
|
|
226
142
|
peakProcCount: z.ZodOptional<z.ZodNumber>;
|
|
227
143
|
archived: z.ZodDefault<z.ZodBoolean>;
|
|
228
144
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
145
|
+
seenAt: z.ZodOptional<z.ZodString>;
|
|
229
146
|
currentStepId: z.ZodOptional<z.ZodString>;
|
|
230
147
|
error: z.ZodOptional<z.ZodString>;
|
|
231
148
|
steps: z.ZodArray<z.ZodObject<{
|
|
232
149
|
id: z.ZodString;
|
|
233
150
|
name: z.ZodString;
|
|
234
|
-
kind: z.ZodEnum<
|
|
235
|
-
|
|
151
|
+
kind: z.ZodEnum<{
|
|
152
|
+
agent: "agent";
|
|
153
|
+
check: "check";
|
|
154
|
+
}>;
|
|
155
|
+
status: z.ZodEnum<{
|
|
156
|
+
cancelled: "cancelled";
|
|
157
|
+
done: "done";
|
|
158
|
+
failed: "failed";
|
|
159
|
+
pending: "pending";
|
|
160
|
+
review: "review";
|
|
161
|
+
running: "running";
|
|
162
|
+
skipped: "skipped";
|
|
163
|
+
waiting: "waiting";
|
|
164
|
+
}>;
|
|
236
165
|
iterations: z.ZodNumber;
|
|
237
166
|
tokensUsed: z.ZodNumber;
|
|
167
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
usageInvocationsStarted: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
usageInvocationsObserved: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
usageTurnsStarted: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
usageTurnsRecorded: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
usageInvocationEpoch: z.ZodOptional<z.ZodNumber>;
|
|
238
174
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
239
175
|
finishedAt: z.ZodOptional<z.ZodString>;
|
|
240
176
|
error: z.ZodOptional<z.ZodString>;
|
|
241
|
-
/** Latest backend-owned session id, used for same-backend Continue. */
|
|
242
177
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
178
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
179
|
+
claude: "claude";
|
|
180
|
+
codex: "codex";
|
|
181
|
+
opencode: "opencode";
|
|
182
|
+
}>>;
|
|
246
183
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
name:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
* validates the shape before reviving it. */
|
|
278
|
-
workflowDef: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
279
|
-
}, "strip", z.ZodTypeAny, {
|
|
280
|
-
id: string;
|
|
281
|
-
title: string;
|
|
282
|
-
titleSummary?: string | undefined;
|
|
283
|
-
diffStat?: {
|
|
284
|
-
adds: number;
|
|
285
|
-
dels: number;
|
|
286
|
-
files: number;
|
|
287
|
-
} | undefined;
|
|
288
|
-
workflow: string;
|
|
289
|
-
task: string;
|
|
290
|
-
queuedMessages?: {
|
|
291
|
-
id: string;
|
|
292
|
-
text: string;
|
|
293
|
-
images?: string[] | undefined;
|
|
294
|
-
createdAt: string;
|
|
295
|
-
}[] | undefined;
|
|
296
|
-
taskImages?: string[] | undefined;
|
|
297
|
-
model?: string | undefined;
|
|
298
|
-
modelIdentity?: string | undefined;
|
|
299
|
-
runner?: "claude" | "codex" | "opencode" | undefined;
|
|
300
|
-
systemPrompt?: string | undefined;
|
|
301
|
-
generateFollowups?: boolean | undefined;
|
|
302
|
-
autonomous?: boolean | undefined;
|
|
303
|
-
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
304
|
-
activity?: "monitoring" | undefined;
|
|
305
|
-
createdAt: string;
|
|
306
|
-
startedAt?: string | undefined;
|
|
307
|
-
finishedAt?: string | undefined;
|
|
308
|
-
tokensUsed: number;
|
|
309
|
-
costUsd?: number | undefined;
|
|
310
|
-
pullRequestUrl?: string | undefined;
|
|
311
|
-
referencedPullRequestUrl?: string | undefined;
|
|
312
|
-
prNumber?: number | undefined;
|
|
313
|
-
issueNumber?: number | undefined;
|
|
314
|
-
referencedIssueNumberSeeded?: boolean | undefined;
|
|
315
|
-
titleOrigin?: "auto" | "marker" | "user" | undefined;
|
|
316
|
-
markerRefs?: {
|
|
317
|
-
pr?: number | undefined;
|
|
318
|
-
issue?: number | undefined;
|
|
319
|
-
} | undefined;
|
|
320
|
-
referencedPrCandidates?: string[] | undefined;
|
|
321
|
-
referencedIssueUrl?: string | undefined;
|
|
322
|
-
referencedIssueCandidates?: string[] | undefined;
|
|
323
|
-
worktreePath?: string | undefined;
|
|
324
|
-
branch?: string | undefined;
|
|
325
|
-
baseBranch?: string | undefined;
|
|
326
|
-
worktreeReclaimedAt?: string | undefined;
|
|
327
|
-
groupId?: string | undefined;
|
|
328
|
-
variant?: string | undefined;
|
|
329
|
-
peakRssBytes?: number | undefined;
|
|
330
|
-
peakProcCount?: number | undefined;
|
|
331
|
-
archived: boolean;
|
|
332
|
-
archivedAt?: string | undefined;
|
|
333
|
-
currentStepId?: string | undefined;
|
|
334
|
-
error?: string | undefined;
|
|
335
|
-
steps: {
|
|
336
|
-
id: string;
|
|
337
|
-
name: string;
|
|
338
|
-
kind: "agent" | "check";
|
|
339
|
-
status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
|
|
340
|
-
iterations: number;
|
|
341
|
-
tokensUsed: number;
|
|
342
|
-
startedAt?: string | undefined;
|
|
343
|
-
finishedAt?: string | undefined;
|
|
344
|
-
error?: string | undefined;
|
|
345
|
-
sessionId?: string | undefined;
|
|
346
|
-
backend?: "claude" | "codex" | "opencode" | undefined;
|
|
347
|
-
costUsd?: number | undefined;
|
|
348
|
-
}[];
|
|
349
|
-
workflowDef?: Record<string, unknown> | undefined;
|
|
350
|
-
}, {
|
|
351
|
-
id: string;
|
|
352
|
-
title: string;
|
|
353
|
-
titleSummary?: string | undefined;
|
|
354
|
-
diffStat?: {
|
|
355
|
-
adds: number;
|
|
356
|
-
dels: number;
|
|
357
|
-
files: number;
|
|
358
|
-
} | undefined;
|
|
359
|
-
workflow: string;
|
|
360
|
-
task: string;
|
|
361
|
-
queuedMessages?: {
|
|
362
|
-
id: string;
|
|
363
|
-
text: string;
|
|
364
|
-
images?: string[] | undefined;
|
|
365
|
-
createdAt: string;
|
|
366
|
-
}[] | undefined;
|
|
367
|
-
taskImages?: string[] | undefined;
|
|
368
|
-
model?: string | undefined;
|
|
369
|
-
modelIdentity?: string | undefined;
|
|
370
|
-
runner?: "claude" | "codex" | "opencode" | undefined;
|
|
371
|
-
systemPrompt?: string | undefined;
|
|
372
|
-
generateFollowups?: boolean | undefined;
|
|
373
|
-
autonomous?: boolean | undefined;
|
|
374
|
-
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
375
|
-
activity?: "monitoring" | undefined;
|
|
376
|
-
createdAt: string;
|
|
377
|
-
startedAt?: string | undefined;
|
|
378
|
-
finishedAt?: string | undefined;
|
|
379
|
-
tokensUsed: number;
|
|
380
|
-
costUsd?: number | undefined;
|
|
381
|
-
pullRequestUrl?: string | undefined;
|
|
382
|
-
referencedPullRequestUrl?: string | undefined;
|
|
383
|
-
prNumber?: number | undefined;
|
|
384
|
-
issueNumber?: number | undefined;
|
|
385
|
-
referencedIssueNumberSeeded?: boolean | undefined;
|
|
386
|
-
titleOrigin?: "auto" | "marker" | "user" | undefined;
|
|
387
|
-
markerRefs?: {
|
|
388
|
-
pr?: number | undefined;
|
|
389
|
-
issue?: number | undefined;
|
|
390
|
-
} | undefined;
|
|
391
|
-
referencedPrCandidates?: string[] | undefined;
|
|
392
|
-
referencedIssueUrl?: string | undefined;
|
|
393
|
-
referencedIssueCandidates?: string[] | undefined;
|
|
394
|
-
worktreePath?: string | undefined;
|
|
395
|
-
branch?: string | undefined;
|
|
396
|
-
baseBranch?: string | undefined;
|
|
397
|
-
worktreeReclaimedAt?: string | undefined;
|
|
398
|
-
groupId?: string | undefined;
|
|
399
|
-
variant?: string | undefined;
|
|
400
|
-
peakRssBytes?: number | undefined;
|
|
401
|
-
peakProcCount?: number | undefined;
|
|
402
|
-
archived?: boolean | undefined;
|
|
403
|
-
archivedAt?: string | undefined;
|
|
404
|
-
currentStepId?: string | undefined;
|
|
405
|
-
error?: string | undefined;
|
|
406
|
-
steps: {
|
|
407
|
-
id: string;
|
|
408
|
-
name: string;
|
|
409
|
-
kind: "agent" | "check";
|
|
410
|
-
status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
|
|
411
|
-
iterations: number;
|
|
412
|
-
tokensUsed: number;
|
|
413
|
-
startedAt?: string | undefined;
|
|
414
|
-
finishedAt?: string | undefined;
|
|
415
|
-
error?: string | undefined;
|
|
416
|
-
sessionId?: string | undefined;
|
|
417
|
-
backend?: "claude" | "codex" | "opencode" | undefined;
|
|
418
|
-
costUsd?: number | undefined;
|
|
419
|
-
}[];
|
|
420
|
-
workflowDef?: Record<string, unknown> | undefined;
|
|
421
|
-
}>;
|
|
184
|
+
}, z.core.$strip>>;
|
|
185
|
+
workflowDef: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
186
|
+
name: z.ZodString;
|
|
187
|
+
description: z.ZodOptional<z.ZodString>;
|
|
188
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
189
|
+
id: z.ZodString;
|
|
190
|
+
name: z.ZodOptional<z.ZodString>;
|
|
191
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
192
|
+
skill: z.ZodOptional<z.ZodString>;
|
|
193
|
+
model: z.ZodOptional<z.ZodString>;
|
|
194
|
+
runner: z.ZodOptional<z.ZodEnum<{
|
|
195
|
+
claude: "claude";
|
|
196
|
+
codex: "codex";
|
|
197
|
+
opencode: "opencode";
|
|
198
|
+
}>>;
|
|
199
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
200
|
+
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
201
|
+
command: z.ZodOptional<z.ZodString>;
|
|
202
|
+
onFail: z.ZodOptional<z.ZodObject<{
|
|
203
|
+
retry: z.ZodString;
|
|
204
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
205
|
+
}, z.core.$strip>>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
source: z.ZodEnum<{
|
|
208
|
+
"built-in": "built-in";
|
|
209
|
+
file: "file";
|
|
210
|
+
}>;
|
|
211
|
+
path: z.ZodOptional<z.ZodString>;
|
|
212
|
+
}, z.core.$strip>>>;
|
|
213
|
+
}, z.core.$strip>;
|
|
422
214
|
export type StepState = z.infer<typeof stepStateSchema>;
|
|
423
215
|
export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
|
|
424
216
|
export type RunRecord = z.infer<typeof runRecordSchema>;
|
|
@@ -460,6 +252,7 @@ export declare class RunStore extends EventEmitter {
|
|
|
460
252
|
runner?: 'claude' | 'codex' | 'opencode';
|
|
461
253
|
generateFollowups?: boolean;
|
|
462
254
|
autonomous?: boolean;
|
|
255
|
+
worktree?: false;
|
|
463
256
|
groupId?: string;
|
|
464
257
|
variant?: string;
|
|
465
258
|
steps: Array<Pick<StepState, 'id' | 'name' | 'kind'>>;
|
|
@@ -494,6 +287,19 @@ export declare class RunStore extends EventEmitter {
|
|
|
494
287
|
setArchived(id: string, archived: boolean): RunRecord | undefined;
|
|
495
288
|
/** Bulk-archive every finished run; returns how many were archived. */
|
|
496
289
|
archiveFinished(): number;
|
|
290
|
+
/** Mark one run as read (#unread-done-items): stamp the read receipt now. Mirrors
|
|
291
|
+
* `setArchived` — sets the field then persists + broadcasts via `touch`, so the
|
|
292
|
+
* updated record rides the existing `run` SSE with no new event. Idempotent by
|
|
293
|
+
* design: opening an already-read thread just re-stamps a later `seenAt`. */
|
|
294
|
+
setRead(id: string): RunRecord | undefined;
|
|
295
|
+
/** Bulk mark-read: stamp every currently-unread finished run; returns the count.
|
|
296
|
+
* "Unread" here is the same rule the cockpit paints (`isUnread` in read-state.ts),
|
|
297
|
+
* clause for clause: a `done` or `failed` run that finished and has not been seen
|
|
298
|
+
* since. Cancelled runs are never unread — you stopped them yourself — and archived
|
|
299
|
+
* ones never are either, since archiving is a stronger "done with this" than reading;
|
|
300
|
+
* both are skipped, as are runs already read. Keeping the two rules identical is what
|
|
301
|
+
* makes the returned count the number the cockpit's unread badge was showing. */
|
|
302
|
+
markAllRead(): number;
|
|
497
303
|
appendEvent(runId: string, event: {
|
|
498
304
|
type: string;
|
|
499
305
|
stepId?: string;
|