@hearsay-tools/squawk 0.18.0-pr3531.6331 → 0.18.0-pr3531.6405
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 +26 -4
- package/dist/autosave-git.d.ts +1 -1
- package/dist/autosave-git.js +2 -2
- package/dist/autosave-git.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +1 -1
- package/dist/ci-wait/controller.js +2 -2
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +4 -4
- package/dist/cli-dispatch.d.ts +1 -4
- package/dist/cli-dispatch.js +24 -37
- package/dist/cli-dispatch.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.js +5 -0
- package/dist/config.js.map +1 -1
- package/dist/contract/health.d.ts +0 -2
- package/dist/contract/index.js +494 -501
- package/dist/contract/run-search.d.ts +18 -20
- package/dist/contract/waits.d.ts +3 -3
- package/dist/core/claude-cli-runner.js +10 -8
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/omp-runner.js +6 -5
- package/dist/core/omp-runner.js.map +1 -1
- package/dist/core/product-env.d.ts +2 -2
- package/dist/core/product-env.js +3 -4
- package/dist/core/product-env.js.map +1 -1
- package/dist/delegation/destroy-observation.d.ts +4 -2
- package/dist/delegation/destroy-observation.js +4 -3
- package/dist/delegation/destroy-observation.js.map +1 -1
- package/dist/delegation/policy.d.ts +5 -0
- package/dist/delegation/policy.js +6 -1
- package/dist/delegation/policy.js.map +1 -1
- package/dist/delegation/process-liveness.d.ts +3 -0
- package/dist/delegation/process-liveness.js +33 -2
- package/dist/delegation/process-liveness.js.map +1 -1
- package/dist/delegation/provision.d.ts +0 -1
- package/dist/delegation/provision.js +2 -2
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/routes.d.ts +9 -9
- package/dist/delegation/service.js +2 -2
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +15 -15
- package/dist/delegation/worker-cleanup.d.ts +2 -0
- package/dist/delegation/worker-cleanup.js +23 -5
- package/dist/delegation/worker-cleanup.js.map +1 -1
- package/dist/delegation/workspace-git.d.ts +2 -5
- package/dist/delegation/workspace-git.js +5 -11
- package/dist/delegation/workspace-git.js.map +1 -1
- package/dist/delegation/workspace-removal.d.ts +3 -0
- package/dist/delegation/workspace-removal.js +30 -39
- package/dist/delegation/workspace-removal.js.map +1 -1
- package/dist/delegation/workspace.js +3 -3
- package/dist/delegation/workspace.js.map +1 -1
- package/dist/delegation/worktree-teardown.d.ts +8 -0
- package/dist/delegation/worktree-teardown.js +36 -0
- package/dist/delegation/worktree-teardown.js.map +1 -0
- package/dist/detached-process.d.ts +0 -18
- package/dist/detached-process.js +1 -148
- package/dist/detached-process.js.map +1 -1
- package/dist/git-command.d.ts +14 -2
- package/dist/git-command.js +30 -3
- package/dist/git-command.js.map +1 -1
- package/dist/git-private-index.js +1 -2
- package/dist/git-private-index.js.map +1 -1
- package/dist/git-worktree-lock.js +5 -3
- package/dist/git-worktree-lock.js.map +1 -1
- package/dist/home/command.d.ts +4 -4
- package/dist/home/command.js +9 -15
- package/dist/home/command.js.map +1 -1
- package/dist/home/deprecation.d.ts +2 -4
- package/dist/home/deprecation.js +2 -3
- package/dist/home/deprecation.js.map +1 -1
- package/dist/home/display.d.ts +5 -4
- package/dist/home/display.js +7 -7
- package/dist/home/display.js.map +1 -1
- package/dist/home/entry.d.ts +1 -3
- package/dist/home/entry.js +3 -4
- package/dist/home/entry.js.map +1 -1
- package/dist/home/home.js +1 -2
- package/dist/home/home.js.map +1 -1
- package/dist/home/identity.d.ts +4 -3
- package/dist/home/identity.js +3 -5
- package/dist/home/identity.js.map +1 -1
- package/dist/home/legacy-recovery.d.ts +2 -2
- package/dist/home/legacy-recovery.js +4 -9
- package/dist/home/legacy-recovery.js.map +1 -1
- package/dist/home/legacy-source.d.ts +2 -3
- package/dist/home/legacy-source.js +3 -6
- package/dist/home/legacy-source.js.map +1 -1
- package/dist/home/migrate.d.ts +1 -1
- package/dist/home/migrate.js +1 -1
- package/dist/home/migrate.js.map +1 -1
- package/dist/home/migration-boot.d.ts +1 -2
- package/dist/home/migration-boot.js +2 -5
- package/dist/home/migration-boot.js.map +1 -1
- package/dist/home/migration-cli.js +4 -3
- package/dist/home/migration-cli.js.map +1 -1
- package/dist/home/private-files.js +2 -3
- package/dist/home/private-files.js.map +1 -1
- package/dist/home/recovery-watch.d.ts +1 -1
- package/dist/home/recovery-watch.js +3 -4
- package/dist/home/recovery-watch.js.map +1 -1
- package/dist/home/recovery.d.ts +3 -3
- package/dist/home/recovery.js +7 -8
- package/dist/home/recovery.js.map +1 -1
- package/dist/home/resolve.js +1 -2
- package/dist/home/resolve.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/install-as-command.d.ts +1 -1
- package/dist/managed-install/launcher.d.ts +3 -3
- package/dist/managed-install/launcher.js +15 -17
- package/dist/managed-install/launcher.js.map +1 -1
- package/dist/preview/agent-address.d.ts +1 -1
- package/dist/preview/agent-address.js +2 -2
- package/dist/preview/agent-address.js.map +1 -1
- package/dist/preview/browser-launch.d.ts +2 -1
- package/dist/preview/browser-launch.js +12 -9
- package/dist/preview/browser-launch.js.map +1 -1
- package/dist/preview/chromium.d.ts +4 -0
- package/dist/preview/chromium.js +34 -7
- package/dist/preview/chromium.js.map +1 -1
- package/dist/process-wait/exit-file.d.ts +5 -3
- package/dist/process-wait/exit-file.js +7 -3
- package/dist/process-wait/exit-file.js.map +1 -1
- package/dist/process-wait/supervisor.d.ts +1 -1
- package/dist/process-wait/supervisor.js +10 -7
- package/dist/process-wait/supervisor.js.map +1 -1
- package/dist/project-migration/auto.d.ts +2 -5
- package/dist/project-migration/auto.js +5 -8
- package/dist/project-migration/auto.js.map +1 -1
- package/dist/project-migration/fresh.d.ts +1 -1
- package/dist/project-migration/fresh.js +2 -3
- package/dist/project-migration/fresh.js.map +1 -1
- package/dist/project-paths.d.ts +5 -8
- package/dist/project-paths.js +9 -12
- package/dist/project-paths.js.map +1 -1
- package/dist/release/compatibility.d.ts +2 -2
- package/dist/release/compatibility.js +4 -4
- package/dist/release/compatibility.js.map +1 -1
- package/dist/release/manifests.d.ts +7 -17
- package/dist/release/manifests.js +14 -42
- package/dist/release/manifests.js.map +1 -1
- package/dist/release/snapshot.d.ts +3 -3
- package/dist/release/snapshot.js +3 -3
- package/dist/release/stable.d.ts +1 -2
- package/dist/release/stable.js +1 -2
- package/dist/release/stable.js.map +1 -1
- package/dist/runs/run-exits.d.ts +301 -301
- package/dist/runs/run-exits.js +2 -0
- package/dist/runs/run-exits.js.map +1 -1
- package/dist/runs/run-index.js +16 -46
- 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/serve-command.js +1 -1
- package/dist/serve-command.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/create-project.js +2 -1
- package/dist/server/create-project.js.map +1 -1
- package/dist/server/forge/draft-pr.js +2 -1
- package/dist/server/forge/draft-pr.js.map +1 -1
- package/dist/server/git-changes.d.ts +18 -0
- package/dist/server/git-changes.js +22 -17
- package/dist/server/git-changes.js.map +1 -1
- package/dist/server/home-recovery-routes.d.ts +2 -3
- package/dist/server/home-recovery-routes.js +10 -11
- package/dist/server/home-recovery-routes.js.map +1 -1
- package/dist/server/project-context.d.ts +0 -2
- package/dist/server/project-context.js +1 -1
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/repo-branches.js +2 -4
- package/dist/server/repo-branches.js.map +1 -1
- package/dist/server/repo-pull.js +2 -1
- package/dist/server/repo-pull.js.map +1 -1
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/server.d.ts +2 -61
- package/dist/server/server.js +9 -38
- package/dist/server/server.js.map +1 -1
- package/dist/server/start-server.js +10 -13
- package/dist/server/start-server.js.map +1 -1
- package/dist/server/workspace-projects.d.ts +2 -7
- package/dist/server/workspace-projects.js +3 -15
- package/dist/server/workspace-projects.js.map +1 -1
- package/dist/server-install/npx-cache.d.ts +1 -1
- package/dist/server-install/npx-cache.js +4 -5
- package/dist/server-install/npx-cache.js.map +1 -1
- package/dist/server-install/platforms/macosx-migration.d.ts +2 -2
- package/dist/server-install/platforms/macosx-migration.js +2 -6
- package/dist/server-install/platforms/macosx-migration.js.map +1 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +4 -6
- package/dist/server-install/platforms/macosx-ngrok.js +55 -57
- package/dist/server-install/platforms/macosx-ngrok.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps-migration.d.ts +4 -4
- package/dist/server-install/platforms/ubuntu-vps-migration.js +17 -21
- package/dist/server-install/platforms/ubuntu-vps-migration.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps-names.d.ts +13 -11
- package/dist/server-install/platforms/ubuntu-vps-names.js +15 -17
- package/dist/server-install/platforms/ubuntu-vps-names.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +7 -11
- package/dist/server-install/platforms/ubuntu-vps.js +59 -62
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/skills-remote.js +2 -1
- package/dist/skills-remote.js.map +1 -1
- package/dist/skills.js +1 -4
- package/dist/skills.js.map +1 -1
- package/dist/subcommands.d.ts +2 -2
- package/dist/subcommands.js +8 -12
- package/dist/subcommands.js.map +1 -1
- package/dist/update-check.d.ts +1 -1
- package/dist/update-check.js +2 -3
- package/dist/update-check.js.map +1 -1
- package/dist/workflows/run/launch-context.d.ts +1 -1
- package/dist/workflows/run/launch-context.js +6 -6
- package/dist/workflows/run/launch-context.js.map +1 -1
- package/dist/workflows/run/run-cancel.js +10 -4
- package/dist/workflows/run/run-cancel.js.map +1 -1
- package/dist/workflows/run/usage-accounting.d.ts +3 -2
- package/dist/workflows/run/usage-accounting.js +8 -7
- package/dist/workflows/run/usage-accounting.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +72 -72
- package/dist/workflows/run-states.js +4 -3
- package/dist/workflows/run-states.js.map +1 -1
- package/dist/workflows/wait-scope.js +2 -2
- package/dist/workflows/wait-scope.js.map +1 -1
- package/dist/workspace/backup-cli.d.ts +1 -1
- package/dist/workspace/backup-cli.js +9 -14
- package/dist/workspace/backup-cli.js.map +1 -1
- 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/dist/worktree-setup.d.ts +0 -1
- package/dist/worktree-setup.js +1 -1
- package/dist/worktree-setup.js.map +1 -1
- package/package.json +4 -4
- package/scripts/benchmark-home.ts +3 -3
- package/scripts/benchmark-project-probes.mjs +1 -1
- package/scripts/benchmark-workspace-events.ts +1 -1
- package/scripts/mock-omp-rpc.mjs +3 -3
- package/web/dist/assets/activity-motion-u7cCOvIh.js +2 -0
- package/web/dist/assets/{activity-route-BJxCiEIp.js → activity-route-BthlzLJS.js} +1 -1
- package/web/dist/assets/agent-accounts-CbqP0u9A.js +18 -0
- package/web/dist/assets/{alert-dialog-h-3h9B4l.js → alert-dialog-CPBKJTj_.js} +1 -1
- package/web/dist/assets/attention-CCx8Iagl.js +1 -0
- package/web/dist/assets/{button-CS5tOblf.js → button-Czdi8NqC.js} +1 -1
- package/web/dist/assets/{centered-state-BmsqxbI8.js → centered-state-8l6wvu0C.js} +1 -1
- package/web/dist/assets/{cez-idle-NomdGTfa.js → cez-idle-xv7f96fc.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-CtUOJAqz.js → commit-diff-panel-B1FnfuXx.js} +1 -1
- package/web/dist/assets/{dialog-Dw7fMdDQ.js → dialog-CkU56ywj.js} +1 -1
- package/web/dist/assets/{diff-DJyC6ofi.js → diff-DwhVa59f.js} +2 -2
- package/web/dist/assets/{diff-controls-BHF0Pvdc.js → diff-controls-DzcrZF8L.js} +1 -1
- package/web/dist/assets/{diff-view-20SWzhxR.js → diff-view-C4JhxweA.js} +1 -1
- package/web/dist/assets/{dist-DvNdR7gM.js → dist-D4TujV9O.js} +1 -1
- package/web/dist/assets/{dropdown-menu-D7f0O7xR.js → dropdown-menu-BN2BI4R1.js} +1 -1
- package/web/dist/assets/{es2015-CX0rgbM5.js → es2015-DnySZnV4.js} +1 -1
- package/web/dist/assets/{file-preview-C_c-tyCm.js → file-preview-xqxo9aYs.js} +1 -1
- package/web/dist/assets/{git-toolbar-Dm75uXLu.js → git-toolbar-B5EhJG95.js} +1 -1
- package/web/dist/assets/{github-BtFBo0G5.js → github-CGvl-B9Z.js} +1 -1
- package/web/dist/assets/{global-activity-route-Dr3RsNfM.js → global-activity-route-n_BdJZWx.js} +1 -1
- package/web/dist/assets/{image-preview-Dy3o8upo.js → image-preview-DpaJAUA9.js} +1 -1
- package/web/dist/assets/index-DS1HIBHa.css +1 -0
- package/web/dist/assets/index-O1VoICYw.js +17 -0
- package/web/dist/assets/{input-DIwJvCgi.js → input-Dilvz-YI.js} +1 -1
- package/web/dist/assets/{live-protocol-DBPXI6ks.js → live-protocol-DjH6ZQwI.js} +1 -1
- package/web/dist/assets/{nav-row-styles-CEA9c88Q.js → nav-row-styles-DoZBu-jT.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-NLUpfhGa.js → preview-pane-connected-OWg6VXKi.js} +2 -2
- package/web/dist/assets/{project-router-BFKfAFvq.js → project-router-Coo_s3l-.js} +1 -1
- package/web/dist/assets/project-scope-context-WiGQMFsB.js +4 -0
- package/web/dist/assets/{prompt-template-menu-B8VpFfKO.js → prompt-template-menu-Ch7UoIKH.js} +1 -1
- package/web/dist/assets/queries-BLvbAnL8.js +1 -0
- package/web/dist/assets/{reference-chip-DMgD6d01.js → reference-chip-P6ytqWNt.js} +1 -1
- package/web/dist/assets/{repo-git-uAud743a.js → repo-git-ZeZnpwuR.js} +1 -1
- package/web/dist/assets/{report-reader-CdSUukXf.js → report-reader-D_uzPRmR.js} +1 -1
- package/web/dist/assets/reports-C49_pROg.js +1 -0
- package/web/dist/assets/run-header-BR1PGTJB.js +2 -0
- package/web/dist/assets/skills-BHpdpRR-.js +1 -0
- package/web/dist/assets/{tab-link-DDpdYMnv.js → tab-link-CONf2d_z.js} +1 -1
- package/web/dist/assets/{task-changes-Bh_7YAeI.js → task-changes-DqcCJDTC.js} +1 -1
- package/web/dist/assets/{task-commits-DfXEs6zT.js → task-commits-Jmpz5NtV.js} +1 -1
- package/web/dist/assets/{task-files-BRhNrDE4.js → task-files-BFSteFDh.js} +1 -1
- package/web/dist/assets/{task-github-item-BqZH0LVz.js → task-github-item-CIno99eX.js} +1 -1
- package/web/dist/assets/{task-thread-DvZKVSna.js → task-thread-BKkxwKd_.js} +5 -5
- package/web/dist/assets/{thread-state-FqUDnt89.js → thread-state-Bwt_th_-.js} +1 -1
- package/web/dist/assets/{toaster-CRVRHlMR.js → toaster-2NK3PogQ.js} +1 -1
- package/web/dist/assets/{use-desktop-DeG3Ha7y.js → use-desktop-CW-Femww.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DeLboLqM.js → use-hand-to-agent-state-XV1UwyxH.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-BmfExLUr.js → useInfiniteQuery-BgLdxmcZ.js} +1 -1
- package/web/dist/assets/useQuery-CY8bJTYi.js +1 -0
- package/web/dist/assets/{workflows-DIB7faC8.js → workflows-DUCROjgb.js} +1 -1
- package/web/dist/assets/ws-8bmD25V4.js +1 -0
- package/web/dist/assets/{zoomable-image-UzXCYU7Z.js → zoomable-image-D0zshpve.js} +1 -1
- package/web/dist/index.html +25 -25
- package/web/dist/live-worker.js +1 -1
- package/dist/delegation/idle-test-app.d.ts +0 -4
- package/dist/delegation/idle-test-app.js +0 -186
- package/dist/delegation/idle-test-app.js.map +0 -1
- package/dist/delegation/windows-test-app.d.ts +0 -5
- package/dist/delegation/windows-test-app.js +0 -64
- package/dist/delegation/windows-test-app.js.map +0 -1
- package/dist/home/switch.d.ts +0 -2
- package/dist/home/switch.js +0 -3
- package/dist/home/switch.js.map +0 -1
- package/web/dist/assets/activity-motion-DC9hC5nV.js +0 -2
- package/web/dist/assets/agent-accounts-DnFoFuBJ.js +0 -18
- package/web/dist/assets/attention-VmnPpwJx.js +0 -1
- package/web/dist/assets/index-CrlovI4F.css +0 -1
- package/web/dist/assets/index-jbljrsnC.js +0 -17
- package/web/dist/assets/project-scope-context-DSkcNKO7.js +0 -4
- package/web/dist/assets/queries-sEwd08S5.js +0 -1
- package/web/dist/assets/reports-C842hFaD.js +0 -1
- package/web/dist/assets/run-header-Bj-L6zkj.js +0 -2
- package/web/dist/assets/skills-DFTYrwoH.js +0 -1
- package/web/dist/assets/useQuery-8pHkglP4.js +0 -1
- package/web/dist/assets/ws-CEQH0TUT.js +0 -1
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 };
|
|
@@ -1618,7 +1614,7 @@ export function createApp(deps) {
|
|
|
1618
1614
|
let projectsDir = defaultWorkspaceConfig().projectsDir;
|
|
1619
1615
|
try {
|
|
1620
1616
|
projectsDir = (await loadWorkspaceConfig(deps.home.workspaceConfig)).projectsDir;
|
|
1621
|
-
projects = await workspaceProjects.
|
|
1617
|
+
projects = await workspaceProjects.listProjects();
|
|
1622
1618
|
}
|
|
1623
1619
|
catch {
|
|
1624
1620
|
// unreadable workspace — degrade to the empty registry + defaults
|
|
@@ -1638,9 +1634,6 @@ export function createApp(deps) {
|
|
|
1638
1634
|
return c.json(registered.body, 200);
|
|
1639
1635
|
})
|
|
1640
1636
|
.delete('/projects/:projectId', async (c) => {
|
|
1641
|
-
if (capabilities().singleProject) {
|
|
1642
|
-
return c.json(singleProjectRefusal('removing projects'), 409);
|
|
1643
|
-
}
|
|
1644
1637
|
const raw = c.req.param('projectId');
|
|
1645
1638
|
// Same gate the scoped-route resolver applies, and the same 404 wording —
|
|
1646
1639
|
// a malformed id is an unknown project, not a validation essay.
|
|
@@ -1713,9 +1706,6 @@ export function createApp(deps) {
|
|
|
1713
1706
|
// `~/.cezar/agent-accounts.json` beside the accounts it names, so a Squawk version that has
|
|
1714
1707
|
// never heard of accounts cannot drop it (see workspace/agent-accounts.ts).
|
|
1715
1708
|
.patch('/projects/:projectId', jsonZodValidator(updateProjectInputSchema), async (c) => {
|
|
1716
|
-
if (capabilities().singleProject) {
|
|
1717
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1718
|
-
}
|
|
1719
1709
|
const raw = c.req.param('projectId');
|
|
1720
1710
|
// Same gate + 404 wording as DELETE: a malformed id is an unknown project.
|
|
1721
1711
|
const resolved = await workspaceProjects.resolveProjectId(raw);
|
|
@@ -1794,11 +1784,7 @@ export function createApp(deps) {
|
|
|
1794
1784
|
})
|
|
1795
1785
|
// "Send test" (#589): one `task.test` delivery to the STORED webhook, now, with the timeout
|
|
1796
1786
|
// the real deliveries use and no retries — the settings page wants the answer, not a queue.
|
|
1797
|
-
// Refused in single-project mode like every other registry edit route.
|
|
1798
1787
|
.post('/projects/:projectId/webhook/test', async (c) => {
|
|
1799
|
-
if (capabilities().singleProject) {
|
|
1800
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1801
|
-
}
|
|
1802
1788
|
const raw = c.req.param('projectId');
|
|
1803
1789
|
const entry = await workspaceProjects.resolveRegistryEntry(raw);
|
|
1804
1790
|
if (!entry)
|
|
@@ -1812,8 +1798,8 @@ export function createApp(deps) {
|
|
|
1812
1798
|
})
|
|
1813
1799
|
// ---- project webhooks (hearsay-tools/cezarion#1576) ----
|
|
1814
1800
|
// Several webhooks per project, each with its own task-state selection and an explicit
|
|
1815
|
-
// "Expose to agents" switch. Registry edits like the PATCH above:
|
|
1816
|
-
//
|
|
1801
|
+
// "Expose to agents" switch. Registry edits like the PATCH above:
|
|
1802
|
+
// 404 on an unknown project or webhook, and a write that names nothing else leaves the
|
|
1817
1803
|
// rest of the entry alone. The first write stores `webhooks` and drops the old `webhook` key.
|
|
1818
1804
|
.post('/projects/:projectId/webhooks', jsonZodValidator(createProjectWebhookInputSchema), async (c) => {
|
|
1819
1805
|
const input = c.req.valid('json');
|
|
@@ -1863,9 +1849,6 @@ export function createApp(deps) {
|
|
|
1863
1849
|
})
|
|
1864
1850
|
// "Send test" for one webhook: one `task.test` delivery, now, no retries.
|
|
1865
1851
|
.post('/projects/:projectId/webhooks/:webhookId/test', paramZodValidator(projectWebhookParamsSchema), async (c) => {
|
|
1866
|
-
if (capabilities().singleProject) {
|
|
1867
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1868
|
-
}
|
|
1869
1852
|
const { projectId, webhookId } = c.req.valid('param');
|
|
1870
1853
|
const entry = await workspaceProjects.resolveRegistryEntry(projectId);
|
|
1871
1854
|
if (!entry)
|
|
@@ -1878,9 +1861,6 @@ export function createApp(deps) {
|
|
|
1878
1861
|
})
|
|
1879
1862
|
.get('/projects/checkout/:checkoutId/progress', paramZodValidator(checkoutProgressParamsSchema), c => c.json({ progress: checkoutProgress.get(c.req.valid('param').checkoutId) }))
|
|
1880
1863
|
.post('/projects/checkout', jsonZodValidator(() => checkoutSchema, { message: 'url must be a GitHub repository' }), async (c) => {
|
|
1881
|
-
if (capabilities().singleProject) {
|
|
1882
|
-
return c.json(singleProjectRefusal('adding projects'), 409);
|
|
1883
|
-
}
|
|
1884
1864
|
const parsed = { data: c.req.valid('json') };
|
|
1885
1865
|
const { url, name, checkoutId } = parsed.data;
|
|
1886
1866
|
const result = await checkoutRepo({
|
|
@@ -1929,9 +1909,6 @@ export function createApp(deps) {
|
|
|
1929
1909
|
return c.json(await listGithubOwners(deps.projectCommandRunner));
|
|
1930
1910
|
})
|
|
1931
1911
|
.post('/projects/create', jsonZodValidator(() => createProjectInputSchema, { message: 'project name must be a valid GitHub repository name — letters, digits, ".", "-" and "_" only, no spaces' }), async (c) => {
|
|
1932
|
-
if (capabilities().singleProject) {
|
|
1933
|
-
return c.json(singleProjectRefusal('adding projects'), 409);
|
|
1934
|
-
}
|
|
1935
1912
|
const { name, github, checkoutId } = c.req.valid('json');
|
|
1936
1913
|
if (github && !capabilities().localHandoff) {
|
|
1937
1914
|
return c.json({ error: HOSTED_GITHUB_CREATE_REFUSAL }, 409);
|
|
@@ -2006,9 +1983,6 @@ export function createApp(deps) {
|
|
|
2006
1983
|
* Returns the status + body for the caller to answer with.
|
|
2007
1984
|
*/
|
|
2008
1985
|
const registerFolder = async (spelled, source) => {
|
|
2009
|
-
if (capabilities().singleProject) {
|
|
2010
|
-
return { status: 409, body: singleProjectRefusal('adding projects') };
|
|
2011
|
-
}
|
|
2012
1986
|
// `~` is expanded for the same reason `/api/fs/browse` expands it: the
|
|
2013
1987
|
// dialog hands back absolute paths, but a hand-written body (curl, a
|
|
2014
1988
|
// future CLI) spells home the way a shell does.
|
|
@@ -2277,9 +2251,6 @@ export function createApp(deps) {
|
|
|
2277
2251
|
// ---- chained family: filesystem browse (workspace-level) ----
|
|
2278
2252
|
const fsBrowseRoutes = new Hono()
|
|
2279
2253
|
.get('/fs/browse', queryZodValidator(browseQuerySchema), async (c) => {
|
|
2280
|
-
if (capabilities().singleProject) {
|
|
2281
|
-
return c.json(singleProjectRefusal('folder browsing'), 409);
|
|
2282
|
-
}
|
|
2283
2254
|
const query = c.req.valid('query');
|
|
2284
2255
|
const root = resolveBrowseRoot(await workspaceBrowseRoot());
|
|
2285
2256
|
const result = await browseDirectory({
|
|
@@ -4352,7 +4323,7 @@ export function createApp(deps) {
|
|
|
4352
4323
|
const projectRunSources = async () => {
|
|
4353
4324
|
let projects = [];
|
|
4354
4325
|
try {
|
|
4355
|
-
projects = await workspaceProjects.
|
|
4326
|
+
projects = await workspaceProjects.listProjects();
|
|
4356
4327
|
}
|
|
4357
4328
|
catch {
|
|
4358
4329
|
// unreadable workspace — no rows, never a 500. The palette degrades to the active
|
|
@@ -4363,7 +4334,7 @@ export function createApp(deps) {
|
|
|
4363
4334
|
.filter((project) => project.status !== 'missing' && project.id !== bootId && !contexts.peek(project.id))
|
|
4364
4335
|
.map((project) => project.root)));
|
|
4365
4336
|
// An unfinished migration finishes first. No folder or a fence: no runs. `not-git` still has an `.ai/cezar` worth indexing.
|
|
4366
|
-
return (await prepareProjects(projects, { ownership: deps.ownership, homes: [deps.home]
|
|
4337
|
+
return (await prepareProjects(projects, { ownership: deps.ownership, homes: [deps.home] })).filter((project) => project.status !== 'missing' && !projectAdmissionRefusal(projectPaths(project.root).write)).map((project) => {
|
|
4367
4338
|
const owned = project.id === bootId ? bootContext : contexts.peek(project.id);
|
|
4368
4339
|
// A cold project's repository identity only: asking for an owned one starts a discovery
|
|
4369
4340
|
// nothing reads.
|