@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/ui-state.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UiState } from './contract/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* `.ai/cezar/ui-state.json` — small GUI preferences the cockpit persists (files, not a DB).
|
|
3
4
|
* The server owns the schema and the writes (`PUT /api/ui-state` in `src/server/server.ts`);
|
|
@@ -8,5 +9,18 @@
|
|
|
8
9
|
* `{}` — an absent preference, never a throw, never a blocked startup.
|
|
9
10
|
*/
|
|
10
11
|
export declare function uiStatePath(repoRoot: string): string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Read `ui-state.json` on demand — never cached, never throws.
|
|
14
|
+
*
|
|
15
|
+
* Typed by the CONTRACT (`UiState`), not by a loose record: `GET /api/v1/ui-state` answers this
|
|
16
|
+
* value verbatim, so a `Record<string, unknown>` here made the route name no key at all and the
|
|
17
|
+
* per-route parity guard vacuous — the same defect `healthSnapshot` had. `UiState` is a
|
|
18
|
+
* `z.looseObject`, so the index signature (and with it the round-trip promise of
|
|
19
|
+
* BACKWARD_COMPATIBILITY.md §3) survives; what it adds is the NAMES of the keys the server knows.
|
|
20
|
+
*
|
|
21
|
+
* The cast is unchanged in kind — the file is user-editable JSON and is deliberately NOT parsed
|
|
22
|
+
* through the schema, because a single malformed pref must not discard the whole bag (§3). What
|
|
23
|
+
* the type asserts is the wire shape the route promises; the write side (`PUT /ui-state`, validated
|
|
24
|
+
* by `uiStateBody`) is what actually enforces it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function readUiState(repoRoot: string): Promise<UiState>;
|
package/dist/ui-state.js
CHANGED
|
@@ -12,7 +12,20 @@ import { join } from 'node:path';
|
|
|
12
12
|
export function uiStatePath(repoRoot) {
|
|
13
13
|
return join(repoRoot, '.ai/cezar', 'ui-state.json');
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Read `ui-state.json` on demand — never cached, never throws.
|
|
17
|
+
*
|
|
18
|
+
* Typed by the CONTRACT (`UiState`), not by a loose record: `GET /api/v1/ui-state` answers this
|
|
19
|
+
* value verbatim, so a `Record<string, unknown>` here made the route name no key at all and the
|
|
20
|
+
* per-route parity guard vacuous — the same defect `healthSnapshot` had. `UiState` is a
|
|
21
|
+
* `z.looseObject`, so the index signature (and with it the round-trip promise of
|
|
22
|
+
* BACKWARD_COMPATIBILITY.md §3) survives; what it adds is the NAMES of the keys the server knows.
|
|
23
|
+
*
|
|
24
|
+
* The cast is unchanged in kind — the file is user-editable JSON and is deliberately NOT parsed
|
|
25
|
+
* through the schema, because a single malformed pref must not discard the whole bag (§3). What
|
|
26
|
+
* the type asserts is the wire shape the route promises; the write side (`PUT /ui-state`, validated
|
|
27
|
+
* by `uiStateBody`) is what actually enforces it.
|
|
28
|
+
*/
|
|
16
29
|
export async function readUiState(repoRoot) {
|
|
17
30
|
try {
|
|
18
31
|
const parsed = JSON.parse(await readFile(uiStatePath(repoRoot), 'utf8'));
|
package/dist/ui-state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-state.js","sourceRoot":"","sources":["../src/ui-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-state.js","sourceRoot":"","sources":["../src/ui-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,OAAO,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAgB;IAChD,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QAClF,OAAO,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;IACzE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/workflows/load.d.ts
CHANGED
package/dist/workflows/run.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { RunnerId } from '../core/agent-runner.
|
|
2
|
-
import type { ContentBlock } from '../core/agent-runner.
|
|
3
|
-
import { type Skill } from '../skills.
|
|
4
|
-
import type { QueuedMessage, RunRecord, RunStore } from '../runs/store.
|
|
5
|
-
import { WorkspaceSemaphore } from '../workspace/semaphore.
|
|
6
|
-
import { type WorkflowDef } from './types.
|
|
1
|
+
import type { RunnerId } from '../core/agent-runner.ts';
|
|
2
|
+
import type { ContentBlock } from '../core/agent-runner.ts';
|
|
3
|
+
import { type Skill } from '../skills.ts';
|
|
4
|
+
import type { QueuedMessage, RunRecord, RunStore } from '../runs/store.ts';
|
|
5
|
+
import { WorkspaceSemaphore } from '../workspace/semaphore.ts';
|
|
6
|
+
import { type WorkflowDef } from './types.ts';
|
|
7
7
|
/** An interactive session that hears nothing from the user closes itself. */
|
|
8
8
|
export declare const IDLE_TIMEOUT_MS: number;
|
|
9
9
|
/**
|
|
@@ -33,9 +33,8 @@ export interface StartRunInput {
|
|
|
33
33
|
* `resolveExtraSystemPrompt` for the precedence contract. */
|
|
34
34
|
systemPrompt?: string;
|
|
35
35
|
/** Composer opt-out (#worktree-toggle): `false` runs the task in the repo
|
|
36
|
-
* working tree instead of an isolated worktree
|
|
37
|
-
*
|
|
38
|
-
* Ignored for variants (they always isolate). */
|
|
36
|
+
* working tree instead of an isolated worktree. Undefined/`true` keeps the
|
|
37
|
+
* default per-task worktree. Ignored for variants (they always isolate). */
|
|
39
38
|
worktree?: boolean;
|
|
40
39
|
/** Autonomous mode (#autonomous): the run never parks at `waiting` for the
|
|
41
40
|
* user — turn-ends auto-continue until the agent signals done or the safety
|
|
@@ -123,7 +122,13 @@ export declare class RunManager {
|
|
|
123
122
|
private readonly queue;
|
|
124
123
|
private readonly starting;
|
|
125
124
|
private readonly waiting;
|
|
125
|
+
/** Durable monitoring subset. Only the configured number receives the waiting-slot exemption. */
|
|
126
|
+
private readonly monitoring;
|
|
126
127
|
private readonly pendingJobs;
|
|
128
|
+
/** Interrupted agent turns recovered after a process restart. Unlike an
|
|
129
|
+
* explicit user Continue, these are bulk scheduler work and must re-enter
|
|
130
|
+
* through `pump()` so both workspace and per-project caps are honored. */
|
|
131
|
+
private readonly pendingContinuations;
|
|
127
132
|
/** Per-run image counter behind `pasted-<n>` / `screenshot-<n>` (#472). Lives on
|
|
128
133
|
* the manager rather than the `ActiveRun` so a *queued* run — which has no
|
|
129
134
|
* `ActiveRun` at all — can persist attachments. Seeded lazily from disk. */
|
|
@@ -295,12 +300,18 @@ export declare class RunManager {
|
|
|
295
300
|
* bound — asserted directly by a test.
|
|
296
301
|
*/
|
|
297
302
|
private hydrateQueuedInput;
|
|
303
|
+
/** Apply edits and messages made while a restart continuation waits for
|
|
304
|
+
* capacity. The durable record remains the source of truth, just as it is for
|
|
305
|
+
* an ordinary queued workflow (#472), so a second restart reconstructs and
|
|
306
|
+
* hydrates the same amendments instead of dropping them. */
|
|
307
|
+
private hydrateQueuedContinuation;
|
|
308
|
+
private readPersistedImages;
|
|
298
309
|
/**
|
|
299
310
|
* Still waiting for a slot? Checked against the engine's own queue rather than
|
|
300
311
|
* the record's `status` (#472): the record is written by `execute()` a tick
|
|
301
312
|
* after `pump()` dequeues, so a status read can see `queued` for a run that has
|
|
302
|
-
* already started.
|
|
303
|
-
* the authoritative answer for "can this prompt still be amended".
|
|
313
|
+
* already started. The pending maps are deleted synchronously at dequeue, so
|
|
314
|
+
* they are the authoritative answer for "can this prompt still be amended".
|
|
304
315
|
*/
|
|
305
316
|
private isQueued;
|
|
306
317
|
/** Split `ContentBlock[]` into the persisted shape a stacked message holds. */
|
|
@@ -351,6 +362,9 @@ export declare class RunManager {
|
|
|
351
362
|
* then offers "Continue" instead.
|
|
352
363
|
*/
|
|
353
364
|
sendMessage(runId: string, content: ContentBlock[]): boolean;
|
|
365
|
+
/** Shared live-session delivery. Synthetic scheduler prompts reuse lifecycle
|
|
366
|
+
* bookkeeping without masquerading as user-authored transcript messages. */
|
|
367
|
+
private deliverMessage;
|
|
354
368
|
/** Close the open session gracefully — the run then completes as `done`
|
|
355
369
|
* (or rests at `review` when the worktree holds changes, spec 009).
|
|
356
370
|
* On a run already resting at `review` (no session — the engine loop is
|
|
@@ -368,7 +382,10 @@ export declare class RunManager {
|
|
|
368
382
|
images?: ContentBlock[];
|
|
369
383
|
runner?: RunnerId;
|
|
370
384
|
model?: string;
|
|
371
|
-
}
|
|
385
|
+
},
|
|
386
|
+
/** Restart recovery may discover several interrupted tasks at once. Those
|
|
387
|
+
* continuations are queued; an explicit user Continue remains immediate. */
|
|
388
|
+
deferForCapacity?: boolean): {
|
|
372
389
|
ok: boolean;
|
|
373
390
|
error?: string;
|
|
374
391
|
};
|
|
@@ -389,6 +406,17 @@ export declare class RunManager {
|
|
|
389
406
|
/** Native backend asks arrive before turn-end. Persist and park immediately
|
|
390
407
|
* so the cockpit shows attention and the run releases its workspace slot. */
|
|
391
408
|
private handleRunnerUiEvent;
|
|
409
|
+
/** Persist the invocation checkpoint before launching a runner. A throw or
|
|
410
|
+
* process exit before `turn.started` therefore leaves a durable mismatch. */
|
|
411
|
+
private beginUsageInvocation;
|
|
412
|
+
/** Fold backend-neutral completed-turn usage into the current step exactly
|
|
413
|
+
* once. Invocation/turn counters are written before the event reaches the
|
|
414
|
+
* NDJSON sink so crashes cannot preserve a falsely complete subtotal. */
|
|
415
|
+
private recordUsageUiEvent;
|
|
416
|
+
/** Usage completeness is a crash boundary, unlike high-frequency token
|
|
417
|
+
* snapshots: the checkpoint must reach `runs.json` before the runner starts
|
|
418
|
+
* or the matching UI event is persisted and forwarded. */
|
|
419
|
+
private persistUsageCheckpoint;
|
|
392
420
|
/**
|
|
393
421
|
* Turn-end bookkeeping (#389), shared by `runAgentStep` and
|
|
394
422
|
* `runContinuation` — called (fire-and-forget) from every `turn-end` event:
|
|
@@ -464,6 +492,9 @@ export declare class RunManager {
|
|
|
464
492
|
private persistImage;
|
|
465
493
|
private armIdleTimer;
|
|
466
494
|
private clearIdleTimer;
|
|
495
|
+
private reconcileMonitoringWakeTimers;
|
|
496
|
+
private armMonitoringWakeTimer;
|
|
497
|
+
private clearMonitoringWakeTimer;
|
|
467
498
|
/** Autosave-commit the worktree every 90 s while the run lives (spec 006).
|
|
468
499
|
* Opt-in via CEZ_AUTOSAVE=1 (#471) — see periodicAutosaveEnabled. */
|
|
469
500
|
private armAutosave;
|
|
@@ -492,3 +523,13 @@ export declare function makeRunTitle(task: string, workflow: WorkflowDef): strin
|
|
|
492
523
|
* they are materialized into the worktree separately (see the call site).
|
|
493
524
|
*/
|
|
494
525
|
export declare function skillSystemPrompt(skill: Pick<Skill, 'name' | 'description' | 'body'> & Partial<Pick<Skill, 'path' | 'source'>>): string;
|
|
526
|
+
/**
|
|
527
|
+
* Expand a registry-backed slash skill in a live chat message before it reaches
|
|
528
|
+
* a backend. Claude otherwise intercepts an unknown leading slash command, and
|
|
529
|
+
* Codex/OpenCode have no native slash-skill lookup at all (#676).
|
|
530
|
+
*
|
|
531
|
+
* Only the first text block is eligible, only at character zero, and unknown
|
|
532
|
+
* commands pass through byte-for-byte. The caller persists the original user
|
|
533
|
+
* content before applying this delivery-only rewrite.
|
|
534
|
+
*/
|
|
535
|
+
export declare function expandRegistrySlashSkill(content: ContentBlock[], skills: readonly Skill[]): ContentBlock[];
|