@hearsay-tools/squawk 0.18.0-pr3544.6400 → 0.18.0-pr3545.6411
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 +0 -1
- package/dist/autosave-cleanup.d.ts +2 -1
- package/dist/autosave-cleanup.js +22 -3
- package/dist/autosave-cleanup.js.map +1 -1
- package/dist/autosave-commit.js +4 -4
- package/dist/autosave-commit.js.map +1 -1
- package/dist/autosave-git.d.ts +15 -8
- package/dist/autosave-git.js +141 -45
- package/dist/autosave-git.js.map +1 -1
- package/dist/autosave-holders.d.ts +2 -0
- package/dist/autosave-holders.js +5 -3
- package/dist/autosave-holders.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +41 -41
- 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/service.js +1 -1
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +9 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runs/run-exits.d.ts +290 -290
- package/dist/runs/run-index.d.ts +0 -10
- package/dist/runs/run-index.js +0 -24
- package/dist/runs/run-index.js.map +1 -1
- package/dist/runs/store.d.ts +1 -1
- package/dist/runs/store.js +13 -8
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/worker-execution.d.ts +0 -17
- package/dist/runs/worker-execution.js +0 -32
- package/dist/runs/worker-execution.js.map +1 -1
- package/dist/server/activity-routes.d.ts +23 -23
- 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/live-routes.d.ts +6 -6
- package/dist/server/server.d.ts +2 -59
- 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-live-routes.d.ts +6 -6
- 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/workflows/continuation-admission.d.ts +0 -7
- package/dist/workflows/continuation-admission.js +3 -5
- package/dist/workflows/continuation-admission.js.map +1 -1
- package/dist/workflows/input-acknowledgement.d.ts +24 -24
- package/dist/workflows/run/compose.js +4 -1
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/continuation-acceptance.d.ts +5 -1
- package/dist/workflows/run/continuation-acceptance.js +4 -8
- package/dist/workflows/run/continuation-acceptance.js.map +1 -1
- package/dist/workflows/run/run-line.d.ts +1 -0
- package/dist/workflows/run/run-line.js +1 -2
- package/dist/workflows/run/run-line.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +72 -72
- package/dist/workflows/run/worker-executions.d.ts +1 -0
- package/dist/workflows/run/worker-executions.js +3 -4
- package/dist/workflows/run/worker-executions.js.map +1 -1
- package/dist/workflows/run/worker-orphans.d.ts +6 -3
- package/dist/workflows/run/worker-orphans.js +10 -8
- package/dist/workflows/run/worker-orphans.js.map +1 -1
- package/dist/workflows/run.d.ts +5 -2
- 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/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
|
@@ -22,20 +22,3 @@ export type WorkerExecution = z.infer<typeof workerExecutionSchema>;
|
|
|
22
22
|
* project move left in `.ai/cezar/` keeps its evidence there; only such a task's own evidence
|
|
23
23
|
* files reserve it, so a kept task that never was a worker stays deletable. */
|
|
24
24
|
export declare function workerEvidenceRunIds(dataDir: string): string[] | undefined;
|
|
25
|
-
/** Why a worker execution may not start, and the command that gets past it (hearsay-tools/squawk#867). */
|
|
26
|
-
export declare class WorkerAdmissionRefusal extends Error {
|
|
27
|
-
readonly next: string;
|
|
28
|
-
constructor(cause: string, next: string);
|
|
29
|
-
}
|
|
30
|
-
export declare const SPAWN_NEXT = "spawn a new worker with the instruction";
|
|
31
|
-
/** The previous execution when it lets a new one start: complete, or queued and never started. */
|
|
32
|
-
export declare function admissibleExecution(prior: WorkerExecution | undefined): WorkerExecution;
|
|
33
|
-
/** The refusal for live holders of the worker's paths; no PID means the holder proof was unreadable. */
|
|
34
|
-
export declare function holderRefusal(holders: readonly number[]): WorkerAdmissionRefusal;
|
|
35
|
-
/** The refusal a failed admission returns: its own cause and next step. Only an error without
|
|
36
|
-
* a message falls back to `fallback`. */
|
|
37
|
-
export declare function admissionRefusal(error: unknown, fallback: string): {
|
|
38
|
-
ok: false;
|
|
39
|
-
error: string;
|
|
40
|
-
next?: string;
|
|
41
|
-
};
|
|
@@ -2,7 +2,6 @@ import { legacyRunsBeside, runDataDir } from '../legacy-runs.js';
|
|
|
2
2
|
import { lstatSync, readdirSync, realpathSync } from 'node:fs';
|
|
3
3
|
import { isAbsolute, join, resolve } from 'node:path';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { describeProcesses } from '../delegation/process-liveness.js';
|
|
6
5
|
/** Terminal task intent survives loss/quarantine of the public run index. Starting a new
|
|
7
6
|
* generation replaces this entire checkpoint, so an old cleanup cannot authorize reuse. */
|
|
8
7
|
export const workerExecutionSchema = z.object({
|
|
@@ -45,35 +44,4 @@ function evidenceIdsIn(dir) {
|
|
|
45
44
|
return error.code === 'ENOENT' ? [] : undefined;
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
/** Why a worker execution may not start, and the command that gets past it (hearsay-tools/squawk#867). */
|
|
49
|
-
export class WorkerAdmissionRefusal extends Error {
|
|
50
|
-
next;
|
|
51
|
-
constructor(cause, next) {
|
|
52
|
-
super(cause);
|
|
53
|
-
this.next = next;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
export const SPAWN_NEXT = 'spawn a new worker with the instruction';
|
|
57
|
-
/** The previous execution when it lets a new one start: complete, or queued and never started. */
|
|
58
|
-
export function admissibleExecution(prior) {
|
|
59
|
-
if (prior?.abandoned)
|
|
60
|
-
throw new WorkerAdmissionRefusal('the worker execution was abandoned', SPAWN_NEXT);
|
|
61
|
-
if (!prior || (prior.phase !== 'queued' && prior.phase !== 'complete')) {
|
|
62
|
-
throw new WorkerAdmissionRefusal(`the previous execution is not proven finished (checkpoint ${prior?.phase ?? 'missing'})`, `retry the same command after it ends; if this repeats, ${SPAWN_NEXT}`);
|
|
63
|
-
}
|
|
64
|
-
return prior;
|
|
65
|
-
}
|
|
66
|
-
/** The refusal for live holders of the worker's paths; no PID means the holder proof was unreadable. */
|
|
67
|
-
export function holderRefusal(holders) {
|
|
68
|
-
return holders.length
|
|
69
|
-
? new WorkerAdmissionRefusal(`processes ${describeProcesses(holders)} still hold the worker's worktree or scratch`, 'end them, then retry the same command')
|
|
70
|
-
: new WorkerAdmissionRefusal("the worker's worktree or scratch is not proven free of processes", `retry the same command; if this repeats, ${SPAWN_NEXT}`);
|
|
71
|
-
}
|
|
72
|
-
/** The refusal a failed admission returns: its own cause and next step. Only an error without
|
|
73
|
-
* a message falls back to `fallback`. */
|
|
74
|
-
export function admissionRefusal(error, fallback) {
|
|
75
|
-
if (error instanceof WorkerAdmissionRefusal)
|
|
76
|
-
return { ok: false, error: error.message, next: error.next };
|
|
77
|
-
return { ok: false, error: error instanceof Error && error.message ? error.message : fallback };
|
|
78
|
-
}
|
|
79
47
|
//# sourceMappingURL=worker-execution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-execution.js","sourceRoot":"","sources":["../../src/runs/worker-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACtD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C,IAAI,CAAC,IAAI,CAAC,CAAC;YACpG,OAAO,KAAK,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACnF,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAAC,OAAQ,KAA+B,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAAC,CAAC;AACjG,CAAC"}
|
|
@@ -59,29 +59,6 @@ export declare function ciProgressPlugs(demand: ActivityDemand): {
|
|
|
59
59
|
export declare function createActivityRoutes(routeDeps: ActivityRouteDeps): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
|
|
60
60
|
"/workspace/activity": {
|
|
61
61
|
$get: {
|
|
62
|
-
output: {
|
|
63
|
-
error: string;
|
|
64
|
-
code?: "invalid_input" | undefined;
|
|
65
|
-
};
|
|
66
|
-
outputFormat: "json";
|
|
67
|
-
status: 400;
|
|
68
|
-
input: {
|
|
69
|
-
query: {
|
|
70
|
-
project?: string | undefined;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
} | {
|
|
74
|
-
output: {
|
|
75
|
-
error: string;
|
|
76
|
-
};
|
|
77
|
-
outputFormat: "json";
|
|
78
|
-
status: 404 | 409 | 503;
|
|
79
|
-
input: {
|
|
80
|
-
query: {
|
|
81
|
-
project?: string | undefined;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
} | {
|
|
85
62
|
output: {
|
|
86
63
|
generatedAt: string;
|
|
87
64
|
projects: {
|
|
@@ -312,6 +289,29 @@ export declare function createActivityRoutes(routeDeps: ActivityRouteDeps): impo
|
|
|
312
289
|
project?: string | undefined;
|
|
313
290
|
};
|
|
314
291
|
};
|
|
292
|
+
} | {
|
|
293
|
+
output: {
|
|
294
|
+
error: string;
|
|
295
|
+
code?: "invalid_input" | undefined;
|
|
296
|
+
};
|
|
297
|
+
outputFormat: "json";
|
|
298
|
+
status: 400;
|
|
299
|
+
input: {
|
|
300
|
+
query: {
|
|
301
|
+
project?: string | undefined;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
} | {
|
|
305
|
+
output: {
|
|
306
|
+
error: string;
|
|
307
|
+
};
|
|
308
|
+
outputFormat: "json";
|
|
309
|
+
status: 404 | 409 | 503;
|
|
310
|
+
input: {
|
|
311
|
+
query: {
|
|
312
|
+
project?: string | undefined;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
317
|
}, "/", "/workspace/activity">;
|
|
@@ -8,7 +8,7 @@ export interface ActivitySourceDeps {
|
|
|
8
8
|
contexts: {
|
|
9
9
|
peek(projectId: string): LoadedProject | undefined;
|
|
10
10
|
};
|
|
11
|
-
workspaceProjects: Pick<WorkspaceProjects, '
|
|
11
|
+
workspaceProjects: Pick<WorkspaceProjects, 'listProjects' | 'resolveBootProject' | 'projectFailure'>;
|
|
12
12
|
/** The check progress of a loaded project's own CI watchers. */
|
|
13
13
|
ciOf?: (project: LoadedProject) => CiProgressSource | undefined;
|
|
14
14
|
}
|
|
@@ -21,6 +21,6 @@ export declare function createActivitySources({ bootContext, contexts, workspace
|
|
|
21
21
|
loadedSource: (project: LoadedProject, name: string) => LiveActivitySource;
|
|
22
22
|
/** One loaded project, named from the registry. */
|
|
23
23
|
project: (project: LoadedProject) => Promise<LiveActivitySource>;
|
|
24
|
-
/** Every
|
|
24
|
+
/** Every registered project; the ones this process has not loaded answer `loaded: false`. */
|
|
25
25
|
workspace: () => Promise<LiveActivitySource[]>;
|
|
26
26
|
};
|
|
@@ -20,15 +20,15 @@ export function createActivitySources({ bootContext, contexts, workspaceProjects
|
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
/** The registry, or undefined when it cannot be read. */
|
|
23
|
-
const
|
|
23
|
+
const registeredProjects = () => workspaceProjects.listProjects().catch(() => undefined);
|
|
24
24
|
const projectName = (projects, id, root) => projects?.find((project) => project.id === id)?.name ?? basename(root);
|
|
25
25
|
return {
|
|
26
26
|
loadedSource,
|
|
27
27
|
/** One loaded project, named from the registry. */
|
|
28
|
-
project: async (project) => loadedSource(project, projectName(await
|
|
29
|
-
/** Every
|
|
28
|
+
project: async (project) => loadedSource(project, projectName(await registeredProjects(), project.id, project.root)),
|
|
29
|
+
/** Every registered project; the ones this process has not loaded answer `loaded: false`. */
|
|
30
30
|
workspace: async () => {
|
|
31
|
-
const projects = await
|
|
31
|
+
const projects = await registeredProjects();
|
|
32
32
|
const bootId = await workspaceProjects.resolveBootProject(projects);
|
|
33
33
|
const sources = (projects ?? []).map((entry) => {
|
|
34
34
|
const owned = entry.id === bootId ? { ...bootContext, id: bootId } : contexts.peek(entry.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-sources.js","sourceRoot":"","sources":["../../src/server/activity-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAcjE;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAsB;IAC1G;8DAC0D;IAC1D,MAAM,YAAY,GAAG,CAAC,OAAsB,EAAE,IAAY,EAAsB,EAAE;QAChF,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,IAAI,uBAAuB,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;QACvG,OAAO;YACL,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,IAAI;YACJ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AK,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC7F,OAAO,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;YAC7F,CAAC,CAAC,CAAC;YACH,4FAA4F;YAC5F,kFAAkF;YAClF,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,MAAM,CAAC;gBAAE,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,GAAG,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACrK,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -9,11 +9,6 @@
|
|
|
9
9
|
* hosted mode — the UI hides every local-machine affordance and the open-in-*
|
|
10
10
|
* endpoints 409.
|
|
11
11
|
*
|
|
12
|
-
* `singleProject` (spec 2026-07-21-cez-single-project): the workspace is
|
|
13
|
-
* deliberately constrained to the launch project when `CEZ_SINGLE_PROJECT=1`.
|
|
14
|
-
* Like the other opt-in capabilities, activation is strict: no other spelling
|
|
15
|
-
* enables it.
|
|
16
|
-
*
|
|
17
12
|
* `automations` (spec 2026-07-25-github-automations, #801): GitHub automations
|
|
18
13
|
* are on by default; only `CEZ_AUTOMATIONS=0` disables them. Off, the
|
|
19
14
|
* `Automations` nav item is gone everywhere it is rendered, the
|
|
@@ -98,7 +98,6 @@ export function resolveCapabilities(env = process.env, bindHost, port, home) {
|
|
|
98
98
|
localHandoff,
|
|
99
99
|
settingsAdmin: localHandoff || remoteSettingsAdmin,
|
|
100
100
|
remoteSettingsAdmin,
|
|
101
|
-
singleProject: productEnv('SINGLE_PROJECT', env) === '1',
|
|
102
101
|
automations: automationsEnabled(env),
|
|
103
102
|
preview: productEnv('PREVIEW', env) === '1',
|
|
104
103
|
// Boot-time flag, like `automations`. The key is read here only as present or absent; the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/server/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/server/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAqC/D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;0CAG0C;AAC1C,MAAM,WAAW,GAAG,4CAA4C,CAAC;AAEjE,kEAAkE;AAClE,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAEtC;;;;;;YAMY;AACZ,SAAS,UAAU,CAAC,CAAS;IAC3B,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,MAAgB,CAAC;IACrB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC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,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC;IAC5D,sFAAsF;IACtF,MAAM,mBAAmB,GAAG,CAAC,YAAY,IAAI,YAAY,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,IAAI,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACxI,MAAM,YAAY,GAAG,UAAU,CAAC,oBAAoB,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;IACnE,MAAM,iBAAiB,GAAG,CAAC,YAAY,IAAI,UAAU,CAAC,kBAAkB,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;IACvF,MAAM,WAAW,GAAG,CAAC,YAAY,IAAI,UAAU,CAAC,WAAW,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;IAC1E,OAAO;QACL,YAAY;QACZ,aAAa,EAAE,YAAY,IAAI,mBAAmB;QAClD,mBAAmB;QACnB,WAAW,EAAE,kBAAkB,CAAC,GAAG,CAAC;QACpC,OAAO,EAAE,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,GAAG;QAC3C,0FAA0F;QAC1F,4CAA4C;QAC5C,KAAK,EAAE,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,gBAAgB,IAAI,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;QACzG,YAAY,EAAE,iBAAiB,IAAI,WAAW;QAC9C,iBAAiB;QACjB,WAAW;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -16,12 +16,6 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
16
16
|
output: {
|
|
17
17
|
generation: string;
|
|
18
18
|
results: ({
|
|
19
|
-
projectId: string;
|
|
20
|
-
runId: string;
|
|
21
|
-
type: "error" | "reset";
|
|
22
|
-
status: 400 | 404 | 409 | 413 | 503;
|
|
23
|
-
error: string;
|
|
24
|
-
} | {
|
|
25
19
|
projectId: string;
|
|
26
20
|
runId: string;
|
|
27
21
|
type: "batch";
|
|
@@ -35,6 +29,12 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
35
29
|
cursor: string;
|
|
36
30
|
afterSeq: number;
|
|
37
31
|
hasMore: boolean;
|
|
32
|
+
} | {
|
|
33
|
+
projectId: string;
|
|
34
|
+
runId: string;
|
|
35
|
+
type: "error" | "reset";
|
|
36
|
+
status: 400 | 404 | 409 | 413 | 503;
|
|
37
|
+
error: string;
|
|
38
38
|
})[];
|
|
39
39
|
};
|
|
40
40
|
outputFormat: "json";
|
package/dist/server/server.d.ts
CHANGED
|
@@ -208,7 +208,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
208
208
|
localHandoff: boolean;
|
|
209
209
|
settingsAdmin: boolean;
|
|
210
210
|
remoteSettingsAdmin: boolean;
|
|
211
|
-
singleProject: boolean;
|
|
212
211
|
automations: boolean;
|
|
213
212
|
preview: boolean;
|
|
214
213
|
voice: boolean;
|
|
@@ -278,18 +277,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
278
277
|
showHidden?: string | undefined;
|
|
279
278
|
};
|
|
280
279
|
};
|
|
281
|
-
} | {
|
|
282
|
-
output: {
|
|
283
|
-
error: string;
|
|
284
|
-
};
|
|
285
|
-
outputFormat: "json";
|
|
286
|
-
status: 409;
|
|
287
|
-
input: {
|
|
288
|
-
query: {
|
|
289
|
-
path?: string | undefined;
|
|
290
|
-
showHidden?: string | undefined;
|
|
291
|
-
};
|
|
292
|
-
};
|
|
293
280
|
} | {
|
|
294
281
|
output: {
|
|
295
282
|
error: string;
|
|
@@ -2319,7 +2306,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
2319
2306
|
error: string;
|
|
2320
2307
|
};
|
|
2321
2308
|
outputFormat: "json";
|
|
2322
|
-
status:
|
|
2309
|
+
status: 404;
|
|
2323
2310
|
input: {
|
|
2324
2311
|
param: {
|
|
2325
2312
|
projectId: string;
|
|
@@ -2330,7 +2317,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
2330
2317
|
error: string;
|
|
2331
2318
|
};
|
|
2332
2319
|
outputFormat: "json";
|
|
2333
|
-
status:
|
|
2320
|
+
status: 409;
|
|
2334
2321
|
input: {
|
|
2335
2322
|
param: {
|
|
2336
2323
|
projectId: string;
|
|
@@ -2364,27 +2351,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
2364
2351
|
} & {
|
|
2365
2352
|
"/projects/:projectId": {
|
|
2366
2353
|
$patch: {
|
|
2367
|
-
output: {
|
|
2368
|
-
error: string;
|
|
2369
|
-
};
|
|
2370
|
-
outputFormat: "json";
|
|
2371
|
-
status: 409;
|
|
2372
|
-
input: {
|
|
2373
|
-
json: {
|
|
2374
|
-
maxParallel?: number | null | undefined;
|
|
2375
|
-
tags?: string[] | null | undefined;
|
|
2376
|
-
webhook?: {
|
|
2377
|
-
url: string;
|
|
2378
|
-
token?: string | undefined;
|
|
2379
|
-
triggers?: ("cancelled" | "done" | "failed" | "needs-you" | "running" | "waiting-ci" | "waiting-other" | "waiting-timer" | "waiting-workers")[] | undefined;
|
|
2380
|
-
} | null | undefined;
|
|
2381
|
-
};
|
|
2382
|
-
} & {
|
|
2383
|
-
param: {
|
|
2384
|
-
projectId: string;
|
|
2385
|
-
};
|
|
2386
|
-
};
|
|
2387
|
-
} | {
|
|
2388
2354
|
output: {
|
|
2389
2355
|
error: string;
|
|
2390
2356
|
};
|
|
@@ -2480,17 +2446,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
2480
2446
|
} & {
|
|
2481
2447
|
"/projects/:projectId/webhook/test": {
|
|
2482
2448
|
$post: {
|
|
2483
|
-
output: {
|
|
2484
|
-
error: string;
|
|
2485
|
-
};
|
|
2486
|
-
outputFormat: "json";
|
|
2487
|
-
status: 409;
|
|
2488
|
-
input: {
|
|
2489
|
-
param: {
|
|
2490
|
-
projectId: string;
|
|
2491
|
-
};
|
|
2492
|
-
};
|
|
2493
|
-
} | {
|
|
2494
2449
|
output: {
|
|
2495
2450
|
error: string;
|
|
2496
2451
|
};
|
|
@@ -2805,18 +2760,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
2805
2760
|
webhookId: string;
|
|
2806
2761
|
};
|
|
2807
2762
|
};
|
|
2808
|
-
} | {
|
|
2809
|
-
output: {
|
|
2810
|
-
error: string;
|
|
2811
|
-
};
|
|
2812
|
-
outputFormat: "json";
|
|
2813
|
-
status: 409;
|
|
2814
|
-
input: {
|
|
2815
|
-
param: {
|
|
2816
|
-
projectId: string;
|
|
2817
|
-
webhookId: string;
|
|
2818
|
-
};
|
|
2819
|
-
};
|
|
2820
2763
|
} | {
|
|
2821
2764
|
output: {
|
|
2822
2765
|
ok: boolean;
|
package/dist/server/server.js
CHANGED
|
@@ -355,7 +355,7 @@ export function createApp(deps) {
|
|
|
355
355
|
// The host-wide services and the provider closures built on them live in `./server-deps.ts`.
|
|
356
356
|
const { modelCatalog, providerAuth, workspaceConfig, openTerminal, openFile, openApp, detectEnvironment } = resolveServerDeps(deps, bootRoot);
|
|
357
357
|
const { providerStatus, providerActionError, invalidateHostModels } = createProviderStatus({ modelCatalog, providerAuth, workspaceConfig });
|
|
358
|
-
const workspaceProjects = deps.workspaceProjects ?? createWorkspaceProjects({ bootRoot, bootProjectId,
|
|
358
|
+
const workspaceProjects = deps.workspaceProjects ?? createWorkspaceProjects({ bootRoot, bootProjectId, home: deps.home });
|
|
359
359
|
const { resolveBootProject } = workspaceProjects;
|
|
360
360
|
// Health's workspace garnish: id+name ONLY — never `root` (#431, see the
|
|
361
361
|
// health route). Reads only the registry file; no per-root status probes,
|
|
@@ -364,11 +364,10 @@ export function createApp(deps) {
|
|
|
364
364
|
try {
|
|
365
365
|
const registry = (await loadWorkspaceConfig(deps.home.workspaceConfig)).projects;
|
|
366
366
|
const bootProject = await resolveBootProject(registry);
|
|
367
|
-
const visible = await workspaceProjects.visibleProjects(registry, bootProject);
|
|
368
367
|
return {
|
|
369
368
|
// Explicit picks, not a spread: the registry schema passes unknown
|
|
370
369
|
// keys through, and `root` must never ride along onto health.
|
|
371
|
-
projects:
|
|
370
|
+
projects: registry.map((p) => ({
|
|
372
371
|
id: p.id,
|
|
373
372
|
name: p.name || basename(p.root),
|
|
374
373
|
})),
|
|
@@ -382,7 +381,6 @@ export function createApp(deps) {
|
|
|
382
381
|
// Hosted-mode gate (spec §"Deployment modes") — read per request so
|
|
383
382
|
// CEZ_REMOTE flips take effect live (and tests can toggle it).
|
|
384
383
|
const capabilities = () => resolveCapabilities(process.env, bindHost, deps.squawkPort?.(), deps.home);
|
|
385
|
-
const singleProjectRefusal = (action) => ({ error: `single-project mode is enabled; ${action} is disabled` });
|
|
386
384
|
// Inbox live updates (spec 007). Opt-in (#471): no capability, no watcher —
|
|
387
385
|
// and since step 2.3 the per-dataDir watch is created lazily by the first
|
|
388
386
|
// SSE subscription (and torn down with the last), nothing to start here.
|
|
@@ -397,7 +395,7 @@ export function createApp(deps) {
|
|
|
397
395
|
// Non-boot projects build lazily on first scoped request; their managers
|
|
398
396
|
// count against the same workspace semaphore as the boot manager (step 2.5).
|
|
399
397
|
const contexts = createWorkspaceProjectContexts(deps, taskWebhooks, {
|
|
400
|
-
listProjects: () => workspaceProjects.
|
|
398
|
+
listProjects: () => workspaceProjects.listProjects(),
|
|
401
399
|
squawkPort: deps.squawkPort,
|
|
402
400
|
});
|
|
403
401
|
// Workspace-level SSE bus (step 2.8) — the registry mutators and the
|
|
@@ -444,12 +442,10 @@ export function createApp(deps) {
|
|
|
444
442
|
};
|
|
445
443
|
/**
|
|
446
444
|
* Read-modify-write one project's webhook list (hearsay-tools/cezarion#1576), with the PATCH
|
|
447
|
-
* route's guards:
|
|
445
|
+
* route's guards: an unknown project 404s without a write, and a
|
|
448
446
|
* failed write (a read-only home) answers 500 having persisted nothing.
|
|
449
447
|
*/
|
|
450
448
|
const editProjectWebhooks = async (raw, edit) => {
|
|
451
|
-
if (capabilities().singleProject)
|
|
452
|
-
return { ...singleProjectRefusal('editing projects'), status: 409 };
|
|
453
449
|
const resolved = await workspaceProjects.resolveProjectId(raw);
|
|
454
450
|
if ('error' in resolved)
|
|
455
451
|
return { ...resolved, status: 404 };
|
|
@@ -1623,7 +1619,7 @@ export function createApp(deps) {
|
|
|
1623
1619
|
let projectsDir = defaultWorkspaceConfig().projectsDir;
|
|
1624
1620
|
try {
|
|
1625
1621
|
projectsDir = (await loadWorkspaceConfig(deps.home.workspaceConfig)).projectsDir;
|
|
1626
|
-
projects = await workspaceProjects.
|
|
1622
|
+
projects = await workspaceProjects.listProjects();
|
|
1627
1623
|
}
|
|
1628
1624
|
catch {
|
|
1629
1625
|
// unreadable workspace — degrade to the empty registry + defaults
|
|
@@ -1643,9 +1639,6 @@ export function createApp(deps) {
|
|
|
1643
1639
|
return c.json(registered.body, 200);
|
|
1644
1640
|
})
|
|
1645
1641
|
.delete('/projects/:projectId', async (c) => {
|
|
1646
|
-
if (capabilities().singleProject) {
|
|
1647
|
-
return c.json(singleProjectRefusal('removing projects'), 409);
|
|
1648
|
-
}
|
|
1649
1642
|
const raw = c.req.param('projectId');
|
|
1650
1643
|
// Same gate the scoped-route resolver applies, and the same 404 wording —
|
|
1651
1644
|
// a malformed id is an unknown project, not a validation essay.
|
|
@@ -1718,9 +1711,6 @@ export function createApp(deps) {
|
|
|
1718
1711
|
// `~/.cezar/agent-accounts.json` beside the accounts it names, so a Squawk version that has
|
|
1719
1712
|
// never heard of accounts cannot drop it (see workspace/agent-accounts.ts).
|
|
1720
1713
|
.patch('/projects/:projectId', jsonZodValidator(updateProjectInputSchema), async (c) => {
|
|
1721
|
-
if (capabilities().singleProject) {
|
|
1722
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1723
|
-
}
|
|
1724
1714
|
const raw = c.req.param('projectId');
|
|
1725
1715
|
// Same gate + 404 wording as DELETE: a malformed id is an unknown project.
|
|
1726
1716
|
const resolved = await workspaceProjects.resolveProjectId(raw);
|
|
@@ -1799,11 +1789,7 @@ export function createApp(deps) {
|
|
|
1799
1789
|
})
|
|
1800
1790
|
// "Send test" (#589): one `task.test` delivery to the STORED webhook, now, with the timeout
|
|
1801
1791
|
// the real deliveries use and no retries — the settings page wants the answer, not a queue.
|
|
1802
|
-
// Refused in single-project mode like every other registry edit route.
|
|
1803
1792
|
.post('/projects/:projectId/webhook/test', async (c) => {
|
|
1804
|
-
if (capabilities().singleProject) {
|
|
1805
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1806
|
-
}
|
|
1807
1793
|
const raw = c.req.param('projectId');
|
|
1808
1794
|
const entry = await workspaceProjects.resolveRegistryEntry(raw);
|
|
1809
1795
|
if (!entry)
|
|
@@ -1817,8 +1803,8 @@ export function createApp(deps) {
|
|
|
1817
1803
|
})
|
|
1818
1804
|
// ---- project webhooks (hearsay-tools/cezarion#1576) ----
|
|
1819
1805
|
// Several webhooks per project, each with its own task-state selection and an explicit
|
|
1820
|
-
// "Expose to agents" switch. Registry edits like the PATCH above:
|
|
1821
|
-
//
|
|
1806
|
+
// "Expose to agents" switch. Registry edits like the PATCH above:
|
|
1807
|
+
// 404 on an unknown project or webhook, and a write that names nothing else leaves the
|
|
1822
1808
|
// rest of the entry alone. The first write stores `webhooks` and drops the old `webhook` key.
|
|
1823
1809
|
.post('/projects/:projectId/webhooks', jsonZodValidator(createProjectWebhookInputSchema), async (c) => {
|
|
1824
1810
|
const input = c.req.valid('json');
|
|
@@ -1868,9 +1854,6 @@ export function createApp(deps) {
|
|
|
1868
1854
|
})
|
|
1869
1855
|
// "Send test" for one webhook: one `task.test` delivery, now, no retries.
|
|
1870
1856
|
.post('/projects/:projectId/webhooks/:webhookId/test', paramZodValidator(projectWebhookParamsSchema), async (c) => {
|
|
1871
|
-
if (capabilities().singleProject) {
|
|
1872
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1873
|
-
}
|
|
1874
1857
|
const { projectId, webhookId } = c.req.valid('param');
|
|
1875
1858
|
const entry = await workspaceProjects.resolveRegistryEntry(projectId);
|
|
1876
1859
|
if (!entry)
|
|
@@ -1883,9 +1866,6 @@ export function createApp(deps) {
|
|
|
1883
1866
|
})
|
|
1884
1867
|
.get('/projects/checkout/:checkoutId/progress', paramZodValidator(checkoutProgressParamsSchema), c => c.json({ progress: checkoutProgress.get(c.req.valid('param').checkoutId) }))
|
|
1885
1868
|
.post('/projects/checkout', jsonZodValidator(() => checkoutSchema, { message: 'url must be a GitHub repository' }), async (c) => {
|
|
1886
|
-
if (capabilities().singleProject) {
|
|
1887
|
-
return c.json(singleProjectRefusal('adding projects'), 409);
|
|
1888
|
-
}
|
|
1889
1869
|
const parsed = { data: c.req.valid('json') };
|
|
1890
1870
|
const { url, name, checkoutId } = parsed.data;
|
|
1891
1871
|
const result = await checkoutRepo({
|
|
@@ -1934,9 +1914,6 @@ export function createApp(deps) {
|
|
|
1934
1914
|
return c.json(await listGithubOwners(deps.projectCommandRunner));
|
|
1935
1915
|
})
|
|
1936
1916
|
.post('/projects/create', jsonZodValidator(() => createProjectInputSchema, { message: 'project name must be a valid GitHub repository name — letters, digits, ".", "-" and "_" only, no spaces' }), async (c) => {
|
|
1937
|
-
if (capabilities().singleProject) {
|
|
1938
|
-
return c.json(singleProjectRefusal('adding projects'), 409);
|
|
1939
|
-
}
|
|
1940
1917
|
const { name, github, checkoutId } = c.req.valid('json');
|
|
1941
1918
|
if (github && !capabilities().localHandoff) {
|
|
1942
1919
|
return c.json({ error: HOSTED_GITHUB_CREATE_REFUSAL }, 409);
|
|
@@ -2011,9 +1988,6 @@ export function createApp(deps) {
|
|
|
2011
1988
|
* Returns the status + body for the caller to answer with.
|
|
2012
1989
|
*/
|
|
2013
1990
|
const registerFolder = async (spelled, source) => {
|
|
2014
|
-
if (capabilities().singleProject) {
|
|
2015
|
-
return { status: 409, body: singleProjectRefusal('adding projects') };
|
|
2016
|
-
}
|
|
2017
1991
|
// `~` is expanded for the same reason `/api/fs/browse` expands it: the
|
|
2018
1992
|
// dialog hands back absolute paths, but a hand-written body (curl, a
|
|
2019
1993
|
// future CLI) spells home the way a shell does.
|
|
@@ -2282,9 +2256,6 @@ export function createApp(deps) {
|
|
|
2282
2256
|
// ---- chained family: filesystem browse (workspace-level) ----
|
|
2283
2257
|
const fsBrowseRoutes = new Hono()
|
|
2284
2258
|
.get('/fs/browse', queryZodValidator(browseQuerySchema), async (c) => {
|
|
2285
|
-
if (capabilities().singleProject) {
|
|
2286
|
-
return c.json(singleProjectRefusal('folder browsing'), 409);
|
|
2287
|
-
}
|
|
2288
2259
|
const query = c.req.valid('query');
|
|
2289
2260
|
const root = resolveBrowseRoot(await workspaceBrowseRoot());
|
|
2290
2261
|
const result = await browseDirectory({
|
|
@@ -4357,7 +4328,7 @@ export function createApp(deps) {
|
|
|
4357
4328
|
const projectRunSources = async () => {
|
|
4358
4329
|
let projects = [];
|
|
4359
4330
|
try {
|
|
4360
|
-
projects = await workspaceProjects.
|
|
4331
|
+
projects = await workspaceProjects.listProjects();
|
|
4361
4332
|
}
|
|
4362
4333
|
catch {
|
|
4363
4334
|
// unreadable workspace — no rows, never a 500. The palette degrades to the active
|