@hearsay-tools/squawk 0.18.0-pr3543.6393 → 0.18.0-pr3547.6404
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 +1 -2
- package/dist/autosave-commit.d.ts +2 -2
- package/dist/ci-wait/tools.d.ts +4 -4
- package/dist/cli-dispatch.d.ts +0 -3
- package/dist/cli-dispatch.js +6 -17
- package/dist/cli-dispatch.js.map +1 -1
- package/dist/contract/health.d.ts +0 -2
- package/dist/contract/index.js +0 -1
- package/dist/delegation/routes.d.ts +71 -71
- package/dist/delegation/transport.d.ts +21 -21
- package/dist/delegation/workspace-removal.js +8 -21
- package/dist/delegation/workspace-removal.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runs/run-index.d.ts +0 -10
- package/dist/runs/run-index.js +16 -70
- package/dist/runs/run-index.js.map +1 -1
- package/dist/runs/run-references.d.ts +3 -0
- package/dist/runs/run-references.js +8 -1
- package/dist/runs/run-references.js.map +1 -1
- package/dist/runs/store.d.ts +10 -0
- package/dist/runs/store.js +18 -21
- package/dist/runs/store.js.map +1 -1
- package/dist/server/activity-sources.d.ts +2 -2
- package/dist/server/activity-sources.js +4 -4
- package/dist/server/activity-sources.js.map +1 -1
- package/dist/server/capabilities.d.ts +0 -5
- package/dist/server/capabilities.js +0 -1
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/forge/draft-pr.js +15 -25
- package/dist/server/forge/draft-pr.js.map +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/server.d.ts +1304 -1361
- package/dist/server/server.js +8 -37
- package/dist/server/server.js.map +1 -1
- package/dist/server/start-server.js +7 -10
- package/dist/server/start-server.js.map +1 -1
- package/dist/server/workspace-projects.d.ts +1 -6
- package/dist/server/workspace-projects.js +3 -14
- package/dist/server/workspace-projects.js.map +1 -1
- package/dist/voice/routes.d.ts +19 -19
- package/dist/workflows/continuation-admission.d.ts +72 -72
- package/dist/workflows/run/wait-engine.d.ts +72 -72
- package/dist/workspace/projects-cli.d.ts +0 -2
- package/dist/workspace/projects-cli.js +4 -27
- package/dist/workspace/projects-cli.js.map +1 -1
- package/dist/workspace/projects.d.ts +1 -5
- package/dist/workspace/projects.js +8 -5
- package/dist/workspace/projects.js.map +1 -1
- package/package.json +4 -4
- package/scripts/benchmark-project-probes.mjs +1 -1
- package/scripts/benchmark-workspace-events.ts +1 -1
- package/web/dist/assets/{activity-motion-DdE0kJi3.js → activity-motion-u7cCOvIh.js} +1 -1
- package/web/dist/assets/{activity-route-DLSJeSnu.js → activity-route-BthlzLJS.js} +1 -1
- package/web/dist/assets/{agent-accounts-CH91aYcr.js → agent-accounts-CbqP0u9A.js} +1 -1
- package/web/dist/assets/attention-CCx8Iagl.js +1 -0
- package/web/dist/assets/{commit-diff-panel-1KsqfPQm.js → commit-diff-panel-B1FnfuXx.js} +1 -1
- package/web/dist/assets/{diff-BcgZstvZ.js → diff-DwhVa59f.js} +2 -2
- package/web/dist/assets/{diff-view-Bf81mon2.js → diff-view-C4JhxweA.js} +1 -1
- package/web/dist/assets/{file-preview-CWH2pPkO.js → file-preview-xqxo9aYs.js} +1 -1
- package/web/dist/assets/{git-toolbar-BDazbdBO.js → git-toolbar-B5EhJG95.js} +1 -1
- package/web/dist/assets/{github-DYA-wBvz.js → github-CGvl-B9Z.js} +1 -1
- package/web/dist/assets/{global-activity-route-CalieTgD.js → global-activity-route-n_BdJZWx.js} +1 -1
- package/web/dist/assets/index-O1VoICYw.js +17 -0
- package/web/dist/assets/{preview-pane-connected-BUPElme2.js → preview-pane-connected-OWg6VXKi.js} +1 -1
- package/web/dist/assets/{project-router-DZfQkmEw.js → project-router-Coo_s3l-.js} +1 -1
- package/web/dist/assets/{project-scope-context-DHDNqsXD.js → project-scope-context-WiGQMFsB.js} +1 -1
- package/web/dist/assets/{prompt-template-menu-Dyu7XblO.js → prompt-template-menu-Ch7UoIKH.js} +1 -1
- package/web/dist/assets/{queries-BvZol9tf.js → queries-BLvbAnL8.js} +1 -1
- package/web/dist/assets/{reference-chip-BD5-b_CU.js → reference-chip-P6ytqWNt.js} +1 -1
- package/web/dist/assets/{repo-git-B-pzLLjM.js → repo-git-ZeZnpwuR.js} +1 -1
- package/web/dist/assets/{report-reader-BKo8xIqy.js → report-reader-D_uzPRmR.js} +1 -1
- package/web/dist/assets/{reports-CHoco8IF.js → reports-C49_pROg.js} +1 -1
- package/web/dist/assets/{run-header-Co7v26sT.js → run-header-BR1PGTJB.js} +1 -1
- package/web/dist/assets/{skills-BVSRZ4Fr.js → skills-BHpdpRR-.js} +1 -1
- package/web/dist/assets/{tab-link-CXiNVJ5a.js → tab-link-CONf2d_z.js} +1 -1
- package/web/dist/assets/{task-changes-CItEr9td.js → task-changes-DqcCJDTC.js} +1 -1
- package/web/dist/assets/{task-commits-BYAybF0L.js → task-commits-Jmpz5NtV.js} +1 -1
- package/web/dist/assets/{task-files-CW8lh-Jp.js → task-files-BFSteFDh.js} +1 -1
- package/web/dist/assets/{task-github-item-FWzM8NKC.js → task-github-item-CIno99eX.js} +1 -1
- package/web/dist/assets/{task-thread-CCUIMhcV.js → task-thread-BKkxwKd_.js} +1 -1
- package/web/dist/assets/{thread-state-CFLv_VQJ.js → thread-state-Bwt_th_-.js} +1 -1
- package/web/dist/assets/{use-desktop-DhAwfRfO.js → use-desktop-CW-Femww.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-CqFlsg5z.js → use-hand-to-agent-state-XV1UwyxH.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-BmndP0ve.js → useInfiniteQuery-BgLdxmcZ.js} +1 -1
- package/web/dist/assets/useQuery-CY8bJTYi.js +1 -0
- package/web/dist/assets/{workflows-DJgvKk6C.js → workflows-DUCROjgb.js} +1 -1
- package/web/dist/assets/{ws-DBsqEdPb.js → ws-8bmD25V4.js} +1 -1
- package/web/dist/index.html +12 -12
- package/dist/task-branch-head.d.ts +0 -7
- package/dist/task-branch-head.js +0 -34
- package/dist/task-branch-head.js.map +0 -1
- package/web/dist/assets/attention-BQflw45i.js +0 -1
- package/web/dist/assets/index-B7K7I3e9.js +0 -17
- package/web/dist/assets/useQuery-CsEdg2zt.js +0 -1
package/README.md
CHANGED
|
@@ -1200,7 +1200,7 @@ Useful environment variables:
|
|
|
1200
1200
|
| `HSQ_VOICE=1`, `CEZ_VOICE=1` | Turn on **voice mode** (experimental): the ⌘K palette understands a sentence such as “open the next finished task” or “answer yes”, and the server asks Jev (TypeSafe) to turn it into one action that the cockpit shows and runs. Needs `TYPESAFE_API_KEY` (read by the server only; `HSQ_DRY_RUN=1`, `CEZ_DRY_RUN=1` uses a fake engine instead). Off by default, and only the exact value `1` enables it — without it the voice endpoints answer `409` and the palette is unchanged. Read at boot, so restart after changing it. |
|
|
1201
1201
|
| `HSQ_PREVIEW=1`, `CEZ_PREVIEW=1` | Turn on **live preview** (experimental): agents register a dev server with the `cezar_preview_serve` tool, and the cockpit opens it in a headless Chromium on the host, docked next to the task. Squawk first runs a registered command after you press Run and open. Agents can then use `cezar_preview_stop({ port, restart?: boolean })` to stop or restart their own Squawk-started server with that unchanged approval; changed command, cwd or path needs Run and open again. Adopted servers cannot be stopped by this tool. Each agent session also gets `HSQ_PREVIEW_CDP_URL`, `CEZ_PREVIEW_CDP_URL`, a cockpit address through which it drives the same browser (`agent-browser --cdp "$CEZ_PREVIEW_CDP_URL" --pin-tab …`) while you watch; Chromium itself opens no debug port. Off by default, and only the exact value `1` enables it — without it the tool is not listed, its route and the preview WebSocket refuse, and `capabilities.preview` is `false`. Read at boot, so restart after changing it. |
|
|
1202
1202
|
| `HSQ_PREVIEW_NO_SANDBOX=1`, `CEZ_PREVIEW_NO_SANDBOX=1` | Launch the preview's Chromium with `--no-sandbox`. Off by default and never added automatically, not even for root or in a container; use it only where Chromium's sandbox cannot start, and only for pages you trust. Only the exact value `1` applies. Read at boot. |
|
|
1203
|
-
| `HSQ_AUTOSAVE=1`, `CEZ_AUTOSAVE=1` | Re-enable the periodic (90 s) autosave commit in task worktrees. Off by default (open-mercato/cezar#471) — turn-end and pre-PR flushes always run, so branches still end complete. Every autosave names its trigger in the commit subject (`cezar autosave (periodic)` vs `(turn end)` / `(run finalize)` / `(pre-PR)`), so the flushes you keep are distinguishable from the timer you disabled. The turn-end / run-finalize flushes and the timer commit only while HEAD is the task's own `cez/<id8>` branch; on a branch the agent checked out they leave the work uncommitted, and the closing flush says so in the handoff's Squawk records block, not its Progress log (hearsay-tools/cezarion#1004, hearsay-tools/cezarion#1809). A turn-end / run-finalize commit is reported there too, with its `git reset --soft` fold-back command, and the timer's commits share one line per run of consecutive periodic commits (count, first and latest sha), with no cockpit note.
|
|
1203
|
+
| `HSQ_AUTOSAVE=1`, `CEZ_AUTOSAVE=1` | Re-enable the periodic (90 s) autosave commit in task worktrees. Off by default (open-mercato/cezar#471) — turn-end and pre-PR flushes always run, so branches still end complete. Every autosave names its trigger in the commit subject (`cezar autosave (periodic)` vs `(turn end)` / `(run finalize)` / `(pre-PR)`), so the flushes you keep are distinguishable from the timer you disabled. The turn-end / run-finalize flushes and the timer commit only while HEAD is the task's own `cez/<id8>` branch; on a branch the agent checked out they leave the work uncommitted, and the closing flush says so in the handoff's Squawk records block, not its Progress log (hearsay-tools/cezarion#1004, hearsay-tools/cezarion#1809). A turn-end / run-finalize commit is reported there too, with its `git reset --soft` fold-back command, and the timer's commits share one line per run of consecutive periodic commits (count, first and latest sha), with no cockpit note. The pre-PR flush is unchanged. |
|
|
1204
1204
|
| `HSQ_CLAUDE_BIN=/path/to/claude`, `CEZ_CLAUDE_BIN=/path/to/claude` | Override the Claude executable for model discovery and execution. A set `HSQ_CLAUDE_BIN` wins over `CEZ_CLAUDE_BIN`; an explicit binary argument wins over both. |
|
|
1205
1205
|
| `HSQ_CODEX_BIN=/path/to/codex`, `CEZ_CODEX_BIN=/path/to/codex` | Override which `codex` binary is used. |
|
|
1206
1206
|
| `HSQ_OPENCODE_BIN=/path/to/opencode`, `CEZ_OPENCODE_BIN=/path/to/opencode` | Override which `opencode` binary is used. |
|
|
@@ -1214,7 +1214,6 @@ Useful environment variables:
|
|
|
1214
1214
|
| `HSQ_AUTONOMOUS_DEFAULT=0`, `CEZ_AUTONOMOUS_DEFAULT=0` | Seed the New Task Autonomous default (`0` or `1`). Without a seed, skills default on and workflows off; a saved global Resources setting overrides it. |
|
|
1215
1215
|
| `HSQ_WORKTREE_DEFAULT=1`, `CEZ_WORKTREE_DEFAULT=1` | Seed the New Task Worktree default (`0` or `1`). Without a seed, eligible runs default on; a saved global Resources setting overrides it. |
|
|
1216
1216
|
| `HSQ_DISABLE_REPO_LOCK=1`, `CEZ_DISABLE_REPO_LOCK=1` | **Dangerous escape hatch:** allow any run executing in the repository root — an explicit `worktree=false` run, non-Git degradation, or a continuation whose worktree cannot be restored — to proceed without Squawk’s repository-root lease. Agents can overwrite each other’s files or Git state; isolated worktree runs are unaffected. Off by default; only the exact value `1` enables it. |
|
|
1217
|
-
| `HSQ_SINGLE_PROJECT=1`, `CEZ_SINGLE_PROJECT=1` | Opt into a launch-project-only cockpit: only the exact value `1` enables it. Project add, edit, checkout, folder browsing, and removal are refused and only the launch project is shown. Off by default; stored registry rows are retained, so unsetting it and restarting restores the full multi-project workspace without migration or data loss. |
|
|
1218
1217
|
| `HSQ_HIDE_TOKEN_USAGE=1`, `CEZ_HIDE_TOKEN_USAGE=1` | Hide raw input/output token counts throughout the browser cockpit while leaving backend-reported cost visible. Only the exact value `1` enables it; telemetry and API payloads are unchanged, and a restart is required after changing it. |
|
|
1219
1218
|
| `HSQ_HIDE_COST=1`, `CEZ_HIDE_COST=1` | Hide backend-reported monetary cost throughout the browser cockpit while leaving raw input/output token counts visible. Only the exact value `1` enables it; telemetry and API payloads are unchanged, and a restart is required after changing it. |
|
|
1220
1219
|
| `HSQ_HIDE_TOKEN_METRICS=1`, `CEZ_HIDE_TOKEN_METRICS=1` | Legacy master switch that hides both token usage and cost. It takes precedence over the two independent flags; only the exact value `1` enables it, payloads are unchanged, and a restart is required. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AutosaveOptions } from './autosave-git.ts';
|
|
2
2
|
/**
|
|
3
|
-
* Autosave reason. Only periodic saves are opt-in.
|
|
4
|
-
*
|
|
3
|
+
* Autosave reason. Only periodic saves are opt-in. Turn-end, finalization and timer saves
|
|
4
|
+
* require the task branch; pre-PR saves follow current HEAD.
|
|
5
5
|
*/
|
|
6
6
|
export type AutosaveReason = 'periodic' | 'turn end' | 'run finalize' | 'pre-PR';
|
|
7
7
|
/**
|
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -248,6 +248,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
248
248
|
}[];
|
|
249
249
|
isError: boolean;
|
|
250
250
|
details: {
|
|
251
|
+
ok: false;
|
|
252
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
253
|
+
message: string;
|
|
254
|
+
} | {
|
|
251
255
|
ok: true;
|
|
252
256
|
task: {
|
|
253
257
|
id: string;
|
|
@@ -259,10 +263,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
259
263
|
url?: string | undefined;
|
|
260
264
|
};
|
|
261
265
|
note: string;
|
|
262
|
-
} | {
|
|
263
|
-
ok: false;
|
|
264
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
265
|
-
message: string;
|
|
266
266
|
};
|
|
267
267
|
}>;
|
|
268
268
|
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
package/dist/cli-dispatch.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { parseArgs } from 'node:util';
|
|
2
|
-
import { productEnv } from './core/product-env.ts';
|
|
3
2
|
import { operatorHomeEntry, prepareOperatorHome } from './home/entry.ts';
|
|
4
3
|
import type { Home } from './home/home.ts';
|
|
5
4
|
import { runSubcommand } from './subcommands.ts';
|
|
@@ -9,7 +8,6 @@ import type { serverCommand } from './server-command.ts';
|
|
|
9
8
|
import type { TaskAccess } from './headless-run.ts';
|
|
10
9
|
export declare const defaultCliDeps: {
|
|
11
10
|
parseArgs: typeof parseArgs;
|
|
12
|
-
productEnv: typeof productEnv;
|
|
13
11
|
operatorHomeEntry: typeof operatorHomeEntry;
|
|
14
12
|
prepareOperatorHome: typeof prepareOperatorHome;
|
|
15
13
|
runSubcommand: typeof runSubcommand;
|
|
@@ -25,6 +23,5 @@ export type CliDeps = typeof defaultCliDeps & {
|
|
|
25
23
|
serverCommand: typeof serverCommand;
|
|
26
24
|
runCommand: (home: Home, root: string, task: string, workflow: string | undefined, model: string | undefined, access: TaskAccess) => Promise<void>;
|
|
27
25
|
initCommand: (root: string) => void | Promise<void>;
|
|
28
|
-
initWorkspace: (root: string, home: Home) => Promise<string | undefined>;
|
|
29
26
|
};
|
|
30
27
|
export declare function main(deps: CliDeps): Promise<void>;
|
package/dist/cli-dispatch.js
CHANGED
|
@@ -2,7 +2,6 @@ import { productName } from './home/display.js';
|
|
|
2
2
|
import { commandText, oldCommandNotice } from './home/command.js';
|
|
3
3
|
import { parseArgs } from 'node:util';
|
|
4
4
|
import { resolve } from 'node:path';
|
|
5
|
-
import { productEnv } from './core/product-env.js';
|
|
6
5
|
import { operatorHomeEntry, prepareOperatorHome } from './home/entry.js';
|
|
7
6
|
import { runSubcommand } from './subcommands.js';
|
|
8
7
|
import { getRepoInfo } from './server/git.js';
|
|
@@ -10,7 +9,7 @@ import { runProjectsCommand } from './workspace/projects-cli.js';
|
|
|
10
9
|
import { projectPaths } from './project-paths.js';
|
|
11
10
|
import { assertProjectAdmitted, projectAdmissionRefusal } from './server/cockpit-ownership.js';
|
|
12
11
|
export const defaultCliDeps = {
|
|
13
|
-
parseArgs,
|
|
12
|
+
parseArgs, operatorHomeEntry, prepareOperatorHome,
|
|
14
13
|
runSubcommand, getRepoInfo, runProjectsCommand, process, console,
|
|
15
14
|
};
|
|
16
15
|
function cliHelp() {
|
|
@@ -77,9 +76,8 @@ workflows in .ai/squawk/workflows/. A project also reads .ai/cezar/, the old fol
|
|
|
77
76
|
* migration fence before they touch it; each re-checks right before its first project write.
|
|
78
77
|
* `serve` recovers and checks in its ownership claim. The recovery module loads only when a
|
|
79
78
|
* journal exists. */
|
|
80
|
-
async function admitProjectCommand(command,
|
|
81
|
-
|
|
82
|
-
if (command !== 'run' && command !== 'init' && !projectList)
|
|
79
|
+
async function admitProjectCommand(command, repoRoot) {
|
|
80
|
+
if (command !== 'run' && command !== 'init')
|
|
83
81
|
return;
|
|
84
82
|
const dataDir = projectPaths(repoRoot).write;
|
|
85
83
|
if (projectAdmissionRefusal(dataDir)?.reason === 'journal')
|
|
@@ -160,7 +158,7 @@ async function dispatch(deps) {
|
|
|
160
158
|
const cwd = resolve(values.repo ?? deps.process.cwd());
|
|
161
159
|
const repoInfo = await deps.getRepoInfo(cwd);
|
|
162
160
|
const repoRoot = repoInfo?.root ?? cwd;
|
|
163
|
-
await admitProjectCommand(command,
|
|
161
|
+
await admitProjectCommand(command, repoRoot);
|
|
164
162
|
switch (command) {
|
|
165
163
|
case 'serve':
|
|
166
164
|
await deps.serveCommand(home(), repoRoot, Number(values.port), !values['no-open'], values['bind-host'], Boolean(values['restart-exact']));
|
|
@@ -172,19 +170,10 @@ async function dispatch(deps) {
|
|
|
172
170
|
home();
|
|
173
171
|
await deps.initCommand(repoRoot);
|
|
174
172
|
return;
|
|
175
|
-
case 'projects':
|
|
173
|
+
case 'projects':
|
|
176
174
|
// Registry-only (no server, no HTTP) — see workspace/projects-cli.ts.
|
|
177
|
-
|
|
178
|
-
// the boot repo through the normal self-healing path and pin the output
|
|
179
|
-
// to that explicit identity. Mutations are left to their own guards.
|
|
180
|
-
const projectArgs = positionals.slice(1);
|
|
181
|
-
const isList = projectArgs.length === 0 || projectArgs[0] === 'list';
|
|
182
|
-
const bootProjectId = deps.productEnv('SINGLE_PROJECT') === '1' && isList
|
|
183
|
-
? await deps.initWorkspace(repoRoot, home())
|
|
184
|
-
: undefined;
|
|
185
|
-
deps.process.exitCode = await deps.runProjectsCommand(projectArgs, { defaultRoot: repoRoot, bootProjectId, home: home() });
|
|
175
|
+
deps.process.exitCode = await deps.runProjectsCommand(positionals.slice(1), { defaultRoot: repoRoot, home: home() });
|
|
186
176
|
return;
|
|
187
|
-
}
|
|
188
177
|
case 'server-install':
|
|
189
178
|
await deps.serverCommand('install', home(), repoRoot, values.platform, {
|
|
190
179
|
yes: Boolean(values.yes),
|
package/dist/cli-dispatch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-dispatch.js","sourceRoot":"","sources":["../src/cli-dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cli-dispatch.js","sourceRoot":"","sources":["../src/cli-dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE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,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;gBACpD,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;gBAChD,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC;aAC9B,CAAC,CAAC;YACH,OAAO;QACT,KAAK,eAAe;YAClB,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;gBACpE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;gBACxB,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC,CAAC;YACH,OAAO;QACT,KAAK,kBAAkB;YACrB,MAAM,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;gBACvE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;gBACxB,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC,CAAC;YACH,OAAO;QACT;YACE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,IAAI,CAAC,CAAC;YACpD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;YACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
|
@@ -29,7 +29,6 @@ export declare const capabilitiesSchema: z.ZodObject<{
|
|
|
29
29
|
localHandoff: z.ZodBoolean;
|
|
30
30
|
settingsAdmin: z.ZodBoolean;
|
|
31
31
|
remoteSettingsAdmin: z.ZodBoolean;
|
|
32
|
-
singleProject: z.ZodBoolean;
|
|
33
32
|
automations: z.ZodBoolean;
|
|
34
33
|
preview: z.ZodBoolean;
|
|
35
34
|
voice: z.ZodBoolean;
|
|
@@ -84,7 +83,6 @@ export declare const healthResponseSchema: z.ZodObject<{
|
|
|
84
83
|
localHandoff: z.ZodBoolean;
|
|
85
84
|
settingsAdmin: z.ZodBoolean;
|
|
86
85
|
remoteSettingsAdmin: z.ZodBoolean;
|
|
87
|
-
singleProject: z.ZodBoolean;
|
|
88
86
|
automations: z.ZodBoolean;
|
|
89
87
|
preview: z.ZodBoolean;
|
|
90
88
|
voice: z.ZodBoolean;
|
package/dist/contract/index.js
CHANGED
|
@@ -1064,7 +1064,6 @@ var capabilitiesSchema = z12.object({
|
|
|
1064
1064
|
settingsAdmin: z12.boolean(),
|
|
1065
1065
|
/** `true` when `settingsAdmin` comes from the host switch on a remote cockpit, not from a local one. */
|
|
1066
1066
|
remoteSettingsAdmin: z12.boolean(),
|
|
1067
|
-
singleProject: z12.boolean(),
|
|
1068
1067
|
/**
|
|
1069
1068
|
* `true` by default; only `CEZ_AUTOMATIONS=0` disables automations. When disabled,
|
|
1070
1069
|
* the whole feature is absent: no `Automations` nav item anywhere it is rendered, the
|
|
@@ -27,18 +27,6 @@ export declare function delegationFailure(error: unknown): {
|
|
|
27
27
|
export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
|
|
28
28
|
"/list": {
|
|
29
29
|
$get: {
|
|
30
|
-
output: {
|
|
31
|
-
error: string;
|
|
32
|
-
code?: "invalid_input" | undefined;
|
|
33
|
-
};
|
|
34
|
-
outputFormat: "json";
|
|
35
|
-
status: 400;
|
|
36
|
-
input: {
|
|
37
|
-
query: {
|
|
38
|
-
offset?: string | undefined;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
30
|
output: {
|
|
43
31
|
workers: {
|
|
44
32
|
workerId: string;
|
|
@@ -76,12 +64,33 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
76
64
|
offset?: string | undefined;
|
|
77
65
|
};
|
|
78
66
|
};
|
|
67
|
+
} | {
|
|
68
|
+
output: {
|
|
69
|
+
error: string;
|
|
70
|
+
code?: "invalid_input" | undefined;
|
|
71
|
+
};
|
|
72
|
+
outputFormat: "json";
|
|
73
|
+
status: 400;
|
|
74
|
+
input: {
|
|
75
|
+
query: {
|
|
76
|
+
offset?: string | undefined;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
} & {
|
|
82
82
|
"/discover": {
|
|
83
83
|
$post: {
|
|
84
84
|
output: {
|
|
85
|
+
scope: "host-default-account";
|
|
86
|
+
runners: {
|
|
87
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
88
|
+
enabled?: boolean | undefined;
|
|
89
|
+
hint?: string | undefined;
|
|
90
|
+
authFailureId?: string | undefined;
|
|
91
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
92
|
+
}[];
|
|
93
|
+
} | {
|
|
85
94
|
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
86
95
|
models: {
|
|
87
96
|
id: string;
|
|
@@ -92,15 +101,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
92
101
|
source: "cache" | "live" | "unavailable";
|
|
93
102
|
stale: boolean;
|
|
94
103
|
reason?: string | undefined;
|
|
95
|
-
} | {
|
|
96
|
-
scope: "host-default-account";
|
|
97
|
-
runners: {
|
|
98
|
-
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
99
|
-
enabled?: boolean | undefined;
|
|
100
|
-
hint?: string | undefined;
|
|
101
|
-
authFailureId?: string | undefined;
|
|
102
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
103
|
-
}[];
|
|
104
104
|
} | {
|
|
105
105
|
tasks: {
|
|
106
106
|
id: string;
|
|
@@ -613,18 +613,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
613
613
|
} & {
|
|
614
614
|
"/:workerId": {
|
|
615
615
|
$get: {
|
|
616
|
-
output: {
|
|
617
|
-
error: string;
|
|
618
|
-
code?: "invalid_input" | undefined;
|
|
619
|
-
};
|
|
620
|
-
outputFormat: "json";
|
|
621
|
-
status: 400;
|
|
622
|
-
input: {
|
|
623
|
-
param: {
|
|
624
|
-
workerId: string;
|
|
625
|
-
};
|
|
626
|
-
};
|
|
627
|
-
} | {
|
|
628
616
|
output: {
|
|
629
617
|
workerId: string;
|
|
630
618
|
parentRunId: string;
|
|
@@ -728,11 +716,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
728
716
|
workerId: string;
|
|
729
717
|
};
|
|
730
718
|
};
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
} & {
|
|
734
|
-
"/:workerId/collect": {
|
|
735
|
-
$post: {
|
|
719
|
+
} | {
|
|
736
720
|
output: {
|
|
737
721
|
error: string;
|
|
738
722
|
code?: "invalid_input" | undefined;
|
|
@@ -743,10 +727,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
743
727
|
param: {
|
|
744
728
|
workerId: string;
|
|
745
729
|
};
|
|
746
|
-
} & {
|
|
747
|
-
json: Record<string, never>;
|
|
748
730
|
};
|
|
749
|
-
}
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
} & {
|
|
734
|
+
"/:workerId/collect": {
|
|
735
|
+
$post: {
|
|
750
736
|
output: {
|
|
751
737
|
workerId: string;
|
|
752
738
|
parentRunId: string;
|
|
@@ -848,11 +834,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
848
834
|
} & {
|
|
849
835
|
json: Record<string, never>;
|
|
850
836
|
};
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
} & {
|
|
854
|
-
"/:workerId/steer": {
|
|
855
|
-
$post: {
|
|
837
|
+
} | {
|
|
856
838
|
output: {
|
|
857
839
|
error: string;
|
|
858
840
|
code?: "invalid_input" | undefined;
|
|
@@ -864,11 +846,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
864
846
|
workerId: string;
|
|
865
847
|
};
|
|
866
848
|
} & {
|
|
867
|
-
json:
|
|
868
|
-
text: string;
|
|
869
|
-
};
|
|
849
|
+
json: Record<string, never>;
|
|
870
850
|
};
|
|
871
|
-
}
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
} & {
|
|
854
|
+
"/:workerId/steer": {
|
|
855
|
+
$post: {
|
|
872
856
|
output: {
|
|
873
857
|
workerId: string;
|
|
874
858
|
state: "delivered" | "queued";
|
|
@@ -884,11 +868,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
884
868
|
text: string;
|
|
885
869
|
};
|
|
886
870
|
};
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
} & {
|
|
890
|
-
"/:workerId/stop": {
|
|
891
|
-
$post: {
|
|
871
|
+
} | {
|
|
892
872
|
output: {
|
|
893
873
|
error: string;
|
|
894
874
|
code?: "invalid_input" | undefined;
|
|
@@ -900,9 +880,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
900
880
|
workerId: string;
|
|
901
881
|
};
|
|
902
882
|
} & {
|
|
903
|
-
json:
|
|
883
|
+
json: {
|
|
884
|
+
text: string;
|
|
885
|
+
};
|
|
904
886
|
};
|
|
905
|
-
}
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
} & {
|
|
890
|
+
"/:workerId/stop": {
|
|
891
|
+
$post: {
|
|
906
892
|
output: {
|
|
907
893
|
workerId: string;
|
|
908
894
|
state: "stopping" | "terminated";
|
|
@@ -916,11 +902,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
916
902
|
} & {
|
|
917
903
|
json: Record<string, never>;
|
|
918
904
|
};
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
} & {
|
|
922
|
-
"/:workerId/destroy": {
|
|
923
|
-
$post: {
|
|
905
|
+
} | {
|
|
924
906
|
output: {
|
|
925
907
|
error: string;
|
|
926
908
|
code?: "invalid_input" | undefined;
|
|
@@ -934,7 +916,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
934
916
|
} & {
|
|
935
917
|
json: Record<string, never>;
|
|
936
918
|
};
|
|
937
|
-
}
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
} & {
|
|
922
|
+
"/:workerId/destroy": {
|
|
923
|
+
$post: {
|
|
938
924
|
output: {
|
|
939
925
|
workerId: string;
|
|
940
926
|
state: "complete" | "incomplete";
|
|
@@ -957,6 +943,20 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
957
943
|
} & {
|
|
958
944
|
json: Record<string, never>;
|
|
959
945
|
};
|
|
946
|
+
} | {
|
|
947
|
+
output: {
|
|
948
|
+
error: string;
|
|
949
|
+
code?: "invalid_input" | undefined;
|
|
950
|
+
};
|
|
951
|
+
outputFormat: "json";
|
|
952
|
+
status: 400;
|
|
953
|
+
input: {
|
|
954
|
+
param: {
|
|
955
|
+
workerId: string;
|
|
956
|
+
};
|
|
957
|
+
} & {
|
|
958
|
+
json: Record<string, never>;
|
|
959
|
+
};
|
|
960
960
|
} | {
|
|
961
961
|
output: {
|
|
962
962
|
workerId: string;
|
|
@@ -986,11 +986,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
986
986
|
"/:workerId/diff": {
|
|
987
987
|
$get: {
|
|
988
988
|
output: {
|
|
989
|
-
|
|
990
|
-
|
|
989
|
+
workerId: string;
|
|
990
|
+
baselineSha: string;
|
|
991
|
+
diff: string;
|
|
992
|
+
truncated: boolean;
|
|
991
993
|
};
|
|
992
994
|
outputFormat: "json";
|
|
993
|
-
status:
|
|
995
|
+
status: 200;
|
|
994
996
|
input: {
|
|
995
997
|
param: {
|
|
996
998
|
workerId: string;
|
|
@@ -998,13 +1000,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
998
1000
|
};
|
|
999
1001
|
} | {
|
|
1000
1002
|
output: {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
diff: string;
|
|
1004
|
-
truncated: boolean;
|
|
1003
|
+
error: string;
|
|
1004
|
+
code?: "invalid_input" | undefined;
|
|
1005
1005
|
};
|
|
1006
1006
|
outputFormat: "json";
|
|
1007
|
-
status:
|
|
1007
|
+
status: 400;
|
|
1008
1008
|
input: {
|
|
1009
1009
|
param: {
|
|
1010
1010
|
workerId: string;
|
|
@@ -57,17 +57,16 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
57
57
|
"/discover": {
|
|
58
58
|
$post: {
|
|
59
59
|
output: {
|
|
60
|
-
|
|
60
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
61
|
+
models: {
|
|
61
62
|
id: string;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
66
|
-
attentionLabel: string;
|
|
67
|
-
accepts: boolean;
|
|
68
|
-
reason?: string | undefined;
|
|
63
|
+
label: string;
|
|
64
|
+
description: string;
|
|
65
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
69
66
|
}[];
|
|
70
|
-
|
|
67
|
+
source: "cache" | "live" | "unavailable";
|
|
68
|
+
stale: boolean;
|
|
69
|
+
reason?: string | undefined;
|
|
71
70
|
} | {
|
|
72
71
|
scope: "host-default-account";
|
|
73
72
|
runners: {
|
|
@@ -78,16 +77,17 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
78
77
|
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
79
78
|
}[];
|
|
80
79
|
} | {
|
|
81
|
-
|
|
82
|
-
models: {
|
|
80
|
+
tasks: {
|
|
83
81
|
id: string;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
title: string;
|
|
83
|
+
runner?: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi" | undefined;
|
|
84
|
+
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
85
|
+
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
86
|
+
attentionLabel: string;
|
|
87
|
+
accepts: boolean;
|
|
88
|
+
reason?: string | undefined;
|
|
87
89
|
}[];
|
|
88
|
-
|
|
89
|
-
stale: boolean;
|
|
90
|
-
reason?: string | undefined;
|
|
90
|
+
nextOffset?: number | undefined;
|
|
91
91
|
};
|
|
92
92
|
outputFormat: "json";
|
|
93
93
|
status: 200;
|
|
@@ -196,13 +196,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
196
196
|
status: 200;
|
|
197
197
|
input: {
|
|
198
198
|
json: {
|
|
199
|
-
workerIds: string[];
|
|
200
|
-
timeoutSeconds?: number | undefined;
|
|
201
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
202
|
-
} | {
|
|
203
199
|
requestIds: string[];
|
|
204
200
|
mode?: "all" | "any" | "one" | undefined;
|
|
205
201
|
timeoutSeconds?: number | undefined;
|
|
202
|
+
} | {
|
|
203
|
+
workerIds: string[];
|
|
204
|
+
timeoutSeconds?: number | undefined;
|
|
205
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
206
206
|
} | {
|
|
207
207
|
peerIds: string[];
|
|
208
208
|
timeoutSeconds?: number | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** Checked removal of an owned worker workspace, on top of the record and Git layers. */
|
|
2
2
|
import { fallbackProjectWriteError } from '../project-paths.js';
|
|
3
|
-
import { headLeftTaskBranch } from '../task-branch-head.js';
|
|
4
3
|
import { describeProcesses, inspectGeneration } from './process-liveness.js';
|
|
5
4
|
import { entryExists as exists } from './entry-exists.js';
|
|
6
5
|
import { readdir } from 'node:fs/promises';
|
|
@@ -68,12 +67,12 @@ export async function removeOwnedWorkspace(repoRoot, value, assertCurrent, befor
|
|
|
68
67
|
let lockBusy = false;
|
|
69
68
|
let heldBy = [];
|
|
70
69
|
const held = (pids) => { heldBy = pids; report?.held?.(pids); };
|
|
71
|
-
|
|
72
|
-
let named;
|
|
70
|
+
let stranded;
|
|
73
71
|
const result = () => ({ workerId: value.ownerRunId, state: remaining.length ? 'incomplete' : 'complete', remaining,
|
|
74
72
|
...(remaining.length ? { error: lockBusy ? WORKTREE_LOCK_BUSY_ERROR
|
|
75
73
|
: heldBy.length ? `Owned resources retained: processes ${describeProcesses(heldBy)} may still hold the worker worktree or scratch; retry destroy after they exit`
|
|
76
|
-
:
|
|
74
|
+
: stranded ? `Owned branch ${value.branch} ${stranded}; keep what you need, delete the branch, then retry destroy`
|
|
75
|
+
: 'Owned resources remain: resource identity or Git cleanup could not be verified. Check the worker worktree, Git lock and ownership receipt, then retry destroy after correcting the blocker' } : {}),
|
|
77
76
|
...(provisioned ? { deleted: [
|
|
78
77
|
...(!remaining.includes('worktree') ? [{ kind: 'worktree', path: value.path }] : []),
|
|
79
78
|
...(!remaining.includes('branch') ? [{ kind: 'branch', ref: `refs/heads/${value.branch}` }] : []),
|
|
@@ -114,13 +113,6 @@ export async function removeOwnedWorkspace(repoRoot, value, assertCurrent, befor
|
|
|
114
113
|
}
|
|
115
114
|
await removeBranch(receipt, checkpoint);
|
|
116
115
|
return result();
|
|
117
|
-
function keepBranch(state) {
|
|
118
|
-
return `Owned branch ${workspace.branch} ${state}; keep what you need, delete the branch, then retry destroy`;
|
|
119
|
-
}
|
|
120
|
-
async function movedBranch(from, to, what) {
|
|
121
|
-
const commits = Number(await checkedGit(repoRoot, ['rev-list', '--count', `${from}..${to}`]));
|
|
122
|
-
return keepBranch(commits ? `holds ${commits} commit${commits === 1 ? '' : 's'} beyond ${what}` : `no longer points at ${what}`);
|
|
123
|
-
}
|
|
124
116
|
// Each phase shares this attempt's partial result while the mutation fence stays held.
|
|
125
117
|
async function completeWithoutReceipt() {
|
|
126
118
|
// #878: without a receipt, the identity marker in a Git admin directory is the
|
|
@@ -155,8 +147,7 @@ export async function removeOwnedWorkspace(repoRoot, value, assertCurrent, befor
|
|
|
155
147
|
return undefined;
|
|
156
148
|
// HEAD files (this worktree's, another's) are not in a retrying caller's observation: these
|
|
157
149
|
// refusals report unexplained, so a retry never skips them (hearsay-tools/cezarion#879).
|
|
158
|
-
|
|
159
|
-
if (named) {
|
|
150
|
+
if (await checkedGit(workspace.path, ['symbolic-ref', '-q', 'HEAD']) !== `refs/heads/${workspace.branch}`) {
|
|
160
151
|
report?.unexplained?.();
|
|
161
152
|
return undefined;
|
|
162
153
|
}
|
|
@@ -229,12 +220,13 @@ export async function removeOwnedWorkspace(repoRoot, value, assertCurrent, befor
|
|
|
229
220
|
}
|
|
230
221
|
const current = await verifyBranch(repoRoot, workspace, receipt);
|
|
231
222
|
if (current.sha !== workspace.baselineSha) {
|
|
232
|
-
|
|
223
|
+
const commits = Number(await checkedGit(repoRoot, ['rev-list', '--count', `${workspace.baselineSha}..${current.sha}`]));
|
|
224
|
+
stranded = commits ? `holds ${commits} commit${commits === 1 ? '' : 's'} beyond its worker baseline` : 'no longer points at its worker baseline';
|
|
233
225
|
return undefined;
|
|
234
226
|
}
|
|
235
227
|
const tips = current.log.content.toString('utf8').split('\n').filter(Boolean).map(entry => entry.split(' ')[1]);
|
|
236
228
|
if (tips.some(tip => tip !== workspace.baselineSha)) {
|
|
237
|
-
|
|
229
|
+
stranded = 'returned to its worker baseline after holding other commits';
|
|
238
230
|
return undefined;
|
|
239
231
|
}
|
|
240
232
|
assertCurrent?.();
|
|
@@ -254,12 +246,7 @@ export async function removeOwnedWorkspace(repoRoot, value, assertCurrent, befor
|
|
|
254
246
|
return;
|
|
255
247
|
}
|
|
256
248
|
const current = await verifyBranch(repoRoot, workspace, receipt);
|
|
257
|
-
|
|
258
|
-
if (current.sha !== checkpoint.sha) {
|
|
259
|
-
named = await movedBranch(checkpoint.sha, current.sha, 'the tip destroy recorded');
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
if (hash(current.log.content) !== checkpoint.logHash)
|
|
249
|
+
if (current.sha !== checkpoint.sha || hash(current.log.content) !== checkpoint.logHash)
|
|
263
250
|
return;
|
|
264
251
|
// Ref CAS: never delete a branch advanced after our verified snapshot.
|
|
265
252
|
assertCurrent?.();
|