@hearsay-tools/squawk 0.18.0-pr3533.6321 → 0.18.0-pr3540.6367
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-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 +5 -5
- 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/contract/health.d.ts +0 -2
- package/dist/contract/index.js +3 -10
- package/dist/contract/run-search.d.ts +18 -20
- package/dist/contract/waits.d.ts +3 -3
- package/dist/core/host-path.d.ts +5 -0
- package/dist/core/host-path.js +9 -0
- package/dist/core/host-path.js.map +1 -0
- 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/policy.d.ts +5 -0
- package/dist/delegation/policy.js +6 -1
- package/dist/delegation/policy.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 +75 -75
- package/dist/delegation/service.js +2 -2
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +82 -82
- 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/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/checkout.js +2 -1
- package/dist/server/checkout.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/live-routes.d.ts +6 -6
- 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/server.d.ts +1609 -1668
- package/dist/server/server.js +12 -41
- 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-live-routes.d.ts +6 -6
- 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.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/voice/routes.d.ts +19 -19
- package/dist/workflows/run/continuation-session.js +1 -1
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/family-reconciler.d.ts +0 -1
- package/dist/workflows/run/family-reconciler.js +0 -7
- package/dist/workflows/run/family-reconciler.js.map +1 -1
- package/dist/workflows/run/input-delivery.d.ts +2 -3
- package/dist/workflows/run/input-delivery.js +26 -34
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/input-receipts.js +1 -2
- package/dist/workflows/run/input-receipts.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/session-events.js +0 -1
- package/dist/workflows/run/session-events.js.map +1 -1
- package/dist/workflows/run/step-session.js +1 -1
- package/dist/workflows/run/step-session.js.map +1 -1
- package/dist/workflows/run/turn-markers.d.ts +0 -3
- package/dist/workflows/run/turn-markers.js +0 -11
- package/dist/workflows/run/turn-markers.js.map +1 -1
- package/dist/workflows/run/turn-settler.js +2 -2
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/types.d.ts +0 -2
- 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.d.ts +2 -2
- package/dist/workflows/run.js +1 -1
- package/dist/workflows/run.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/config.js +2 -1
- package/dist/workspace/config.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-claude.mjs +4 -4
- package/scripts/mock-codex-app-server.mjs +4 -4
- package/scripts/mock-cursor-print.mjs +5 -6
- package/scripts/mock-nudge.mjs +1 -1
- package/scripts/mock-opencode-serve.mjs +4 -5
- package/scripts/mock-scenario.mjs +9 -18
- package/scripts/mock-silent-tail.mjs +1 -9
- package/web/dist/assets/{activity-motion-DC9hC5nV.js → activity-motion-DOBTHNcx.js} +1 -1
- package/web/dist/assets/{activity-route-BJxCiEIp.js → activity-route--u0O2Qit.js} +1 -1
- package/web/dist/assets/{agent-accounts-DnFoFuBJ.js → agent-accounts-J1UT-v_B.js} +1 -1
- package/web/dist/assets/{alert-dialog-h-3h9B4l.js → alert-dialog-CPBKJTj_.js} +1 -1
- package/web/dist/assets/attention-BN-btLkR.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/{commit-diff-panel-CtUOJAqz.js → commit-diff-panel-DnLIU1yp.js} +1 -1
- package/web/dist/assets/{dialog-Dw7fMdDQ.js → dialog-CkU56ywj.js} +1 -1
- package/web/dist/assets/{diff-DJyC6ofi.js → diff-Cz0G7oGP.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-CF9j1eM4.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-DDhGPfE2.js} +1 -1
- package/web/dist/assets/{git-toolbar-Dm75uXLu.js → git-toolbar-BG9_fvhC.js} +1 -1
- package/web/dist/assets/{github-BtFBo0G5.js → github-dirO0uqp.js} +1 -1
- package/web/dist/assets/{global-activity-route-Dr3RsNfM.js → global-activity-route-CzxV5C20.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-DbTYspo2.js +17 -0
- package/web/dist/assets/{input-DIwJvCgi.js → input-Dilvz-YI.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-CMCVGtb8.js} +1 -1
- package/web/dist/assets/{project-router-BFKfAFvq.js → project-router-JAtYboML.js} +1 -1
- package/web/dist/assets/{project-scope-context-DSkcNKO7.js → project-scope-context-17NS-fWO.js} +1 -1
- package/web/dist/assets/{prompt-template-menu-B8VpFfKO.js → prompt-template-menu-nB_udBk2.js} +1 -1
- package/web/dist/assets/{queries-sEwd08S5.js → queries-Di11yAhL.js} +1 -1
- package/web/dist/assets/{reference-chip-DMgD6d01.js → reference-chip-B7pF99Z9.js} +1 -1
- package/web/dist/assets/{repo-git-uAud743a.js → repo-git-CwG2crJp.js} +1 -1
- package/web/dist/assets/{report-reader-CdSUukXf.js → report-reader-DgyTXsH8.js} +1 -1
- package/web/dist/assets/{reports-C842hFaD.js → reports-BzE9MCKV.js} +1 -1
- package/web/dist/assets/{run-header-Bj-L6zkj.js → run-header-CgejP8dT.js} +1 -1
- package/web/dist/assets/{skills-DFTYrwoH.js → skills-DRIHGafh.js} +1 -1
- package/web/dist/assets/{tab-link-DDpdYMnv.js → tab-link-CXwuint6.js} +1 -1
- package/web/dist/assets/{task-changes-Bh_7YAeI.js → task-changes-B2JdcrLR.js} +1 -1
- package/web/dist/assets/{task-commits-DfXEs6zT.js → task-commits-B_m-0n0j.js} +1 -1
- package/web/dist/assets/{task-files-BRhNrDE4.js → task-files-BI3OSxMK.js} +1 -1
- package/web/dist/assets/{task-github-item-BqZH0LVz.js → task-github-item-riZk-lax.js} +1 -1
- package/web/dist/assets/{task-thread-DvZKVSna.js → task-thread-BiPR3FM-.js} +3 -3
- package/web/dist/assets/{thread-state-FqUDnt89.js → thread-state-ypnR7wKd.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-pc8srWP9.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DeLboLqM.js → use-hand-to-agent-state-kQ7yTNnh.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-BmfExLUr.js → useInfiniteQuery-BuwywfUB.js} +1 -1
- package/web/dist/assets/useQuery-CIpxQzxu.js +1 -0
- package/web/dist/assets/{workflows-DIB7faC8.js → workflows-CBVIbG1I.js} +1 -1
- package/web/dist/assets/{ws-CEQH0TUT.js → ws-CCJxvrF3.js} +1 -1
- package/web/dist/assets/{zoomable-image-UzXCYU7Z.js → zoomable-image-D0zshpve.js} +1 -1
- package/web/dist/index.html +23 -23
- 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/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/useQuery-8pHkglP4.js +0 -1
package/dist/server/server.js
CHANGED
|
@@ -29,6 +29,7 @@ import { commitQuerySchema } from '../contract/index.js';
|
|
|
29
29
|
import { imageMimeType } from '../contract/index.js';
|
|
30
30
|
import { providerForActiveRun } from '../contract/index.js';
|
|
31
31
|
import { defined } from '../core/defined.js';
|
|
32
|
+
import { isAbsoluteHostPath } from '../core/host-path.js';
|
|
32
33
|
import { resolveArchiveOnMerge, resolveGlobalArchiveOnMerge } from '../archive-on-merge-setting.js';
|
|
33
34
|
import { permissionDecisionSchema } from '../contract/index.js';
|
|
34
35
|
import { runIdParamSchema as permissionRunIdParamSchema } from '../contract/index.js';
|
|
@@ -354,7 +355,7 @@ export function createApp(deps) {
|
|
|
354
355
|
// The host-wide services and the provider closures built on them live in `./server-deps.ts`.
|
|
355
356
|
const { modelCatalog, providerAuth, workspaceConfig, openTerminal, openFile, openApp, detectEnvironment } = resolveServerDeps(deps, bootRoot);
|
|
356
357
|
const { providerStatus, providerActionError, invalidateHostModels } = createProviderStatus({ modelCatalog, providerAuth, workspaceConfig });
|
|
357
|
-
const workspaceProjects = deps.workspaceProjects ?? createWorkspaceProjects({ bootRoot, bootProjectId,
|
|
358
|
+
const workspaceProjects = deps.workspaceProjects ?? createWorkspaceProjects({ bootRoot, bootProjectId, home: deps.home });
|
|
358
359
|
const { resolveBootProject } = workspaceProjects;
|
|
359
360
|
// Health's workspace garnish: id+name ONLY — never `root` (#431, see the
|
|
360
361
|
// health route). Reads only the registry file; no per-root status probes,
|
|
@@ -363,11 +364,10 @@ export function createApp(deps) {
|
|
|
363
364
|
try {
|
|
364
365
|
const registry = (await loadWorkspaceConfig(deps.home.workspaceConfig)).projects;
|
|
365
366
|
const bootProject = await resolveBootProject(registry);
|
|
366
|
-
const visible = await workspaceProjects.visibleProjects(registry, bootProject);
|
|
367
367
|
return {
|
|
368
368
|
// Explicit picks, not a spread: the registry schema passes unknown
|
|
369
369
|
// keys through, and `root` must never ride along onto health.
|
|
370
|
-
projects:
|
|
370
|
+
projects: registry.map((p) => ({
|
|
371
371
|
id: p.id,
|
|
372
372
|
name: p.name || basename(p.root),
|
|
373
373
|
})),
|
|
@@ -381,7 +381,6 @@ export function createApp(deps) {
|
|
|
381
381
|
// Hosted-mode gate (spec §"Deployment modes") — read per request so
|
|
382
382
|
// CEZ_REMOTE flips take effect live (and tests can toggle it).
|
|
383
383
|
const capabilities = () => resolveCapabilities(process.env, bindHost, deps.squawkPort?.(), deps.home);
|
|
384
|
-
const singleProjectRefusal = (action) => ({ error: `single-project mode is enabled; ${action} is disabled` });
|
|
385
384
|
// Inbox live updates (spec 007). Opt-in (#471): no capability, no watcher —
|
|
386
385
|
// and since step 2.3 the per-dataDir watch is created lazily by the first
|
|
387
386
|
// SSE subscription (and torn down with the last), nothing to start here.
|
|
@@ -396,7 +395,7 @@ export function createApp(deps) {
|
|
|
396
395
|
// Non-boot projects build lazily on first scoped request; their managers
|
|
397
396
|
// count against the same workspace semaphore as the boot manager (step 2.5).
|
|
398
397
|
const contexts = createWorkspaceProjectContexts(deps, taskWebhooks, {
|
|
399
|
-
listProjects: () => workspaceProjects.
|
|
398
|
+
listProjects: () => workspaceProjects.listProjects(),
|
|
400
399
|
squawkPort: deps.squawkPort,
|
|
401
400
|
});
|
|
402
401
|
// Workspace-level SSE bus (step 2.8) — the registry mutators and the
|
|
@@ -443,12 +442,10 @@ export function createApp(deps) {
|
|
|
443
442
|
};
|
|
444
443
|
/**
|
|
445
444
|
* Read-modify-write one project's webhook list (hearsay-tools/cezarion#1576), with the PATCH
|
|
446
|
-
* route's guards:
|
|
445
|
+
* route's guards: an unknown project 404s without a write, and a
|
|
447
446
|
* failed write (a read-only home) answers 500 having persisted nothing.
|
|
448
447
|
*/
|
|
449
448
|
const editProjectWebhooks = async (raw, edit) => {
|
|
450
|
-
if (capabilities().singleProject)
|
|
451
|
-
return { ...singleProjectRefusal('editing projects'), status: 409 };
|
|
452
449
|
const resolved = await workspaceProjects.resolveProjectId(raw);
|
|
453
450
|
if ('error' in resolved)
|
|
454
451
|
return { ...resolved, status: 404 };
|
|
@@ -1622,7 +1619,7 @@ export function createApp(deps) {
|
|
|
1622
1619
|
let projectsDir = defaultWorkspaceConfig().projectsDir;
|
|
1623
1620
|
try {
|
|
1624
1621
|
projectsDir = (await loadWorkspaceConfig(deps.home.workspaceConfig)).projectsDir;
|
|
1625
|
-
projects = await workspaceProjects.
|
|
1622
|
+
projects = await workspaceProjects.listProjects();
|
|
1626
1623
|
}
|
|
1627
1624
|
catch {
|
|
1628
1625
|
// unreadable workspace — degrade to the empty registry + defaults
|
|
@@ -1642,9 +1639,6 @@ export function createApp(deps) {
|
|
|
1642
1639
|
return c.json(registered.body, 200);
|
|
1643
1640
|
})
|
|
1644
1641
|
.delete('/projects/:projectId', async (c) => {
|
|
1645
|
-
if (capabilities().singleProject) {
|
|
1646
|
-
return c.json(singleProjectRefusal('removing projects'), 409);
|
|
1647
|
-
}
|
|
1648
1642
|
const raw = c.req.param('projectId');
|
|
1649
1643
|
// Same gate the scoped-route resolver applies, and the same 404 wording —
|
|
1650
1644
|
// a malformed id is an unknown project, not a validation essay.
|
|
@@ -1717,9 +1711,6 @@ export function createApp(deps) {
|
|
|
1717
1711
|
// `~/.cezar/agent-accounts.json` beside the accounts it names, so a Squawk version that has
|
|
1718
1712
|
// never heard of accounts cannot drop it (see workspace/agent-accounts.ts).
|
|
1719
1713
|
.patch('/projects/:projectId', jsonZodValidator(updateProjectInputSchema), async (c) => {
|
|
1720
|
-
if (capabilities().singleProject) {
|
|
1721
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1722
|
-
}
|
|
1723
1714
|
const raw = c.req.param('projectId');
|
|
1724
1715
|
// Same gate + 404 wording as DELETE: a malformed id is an unknown project.
|
|
1725
1716
|
const resolved = await workspaceProjects.resolveProjectId(raw);
|
|
@@ -1798,11 +1789,7 @@ export function createApp(deps) {
|
|
|
1798
1789
|
})
|
|
1799
1790
|
// "Send test" (#589): one `task.test` delivery to the STORED webhook, now, with the timeout
|
|
1800
1791
|
// the real deliveries use and no retries — the settings page wants the answer, not a queue.
|
|
1801
|
-
// Refused in single-project mode like every other registry edit route.
|
|
1802
1792
|
.post('/projects/:projectId/webhook/test', async (c) => {
|
|
1803
|
-
if (capabilities().singleProject) {
|
|
1804
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1805
|
-
}
|
|
1806
1793
|
const raw = c.req.param('projectId');
|
|
1807
1794
|
const entry = await workspaceProjects.resolveRegistryEntry(raw);
|
|
1808
1795
|
if (!entry)
|
|
@@ -1816,8 +1803,8 @@ export function createApp(deps) {
|
|
|
1816
1803
|
})
|
|
1817
1804
|
// ---- project webhooks (hearsay-tools/cezarion#1576) ----
|
|
1818
1805
|
// Several webhooks per project, each with its own task-state selection and an explicit
|
|
1819
|
-
// "Expose to agents" switch. Registry edits like the PATCH above:
|
|
1820
|
-
//
|
|
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
|
|
1821
1808
|
// rest of the entry alone. The first write stores `webhooks` and drops the old `webhook` key.
|
|
1822
1809
|
.post('/projects/:projectId/webhooks', jsonZodValidator(createProjectWebhookInputSchema), async (c) => {
|
|
1823
1810
|
const input = c.req.valid('json');
|
|
@@ -1867,9 +1854,6 @@ export function createApp(deps) {
|
|
|
1867
1854
|
})
|
|
1868
1855
|
// "Send test" for one webhook: one `task.test` delivery, now, no retries.
|
|
1869
1856
|
.post('/projects/:projectId/webhooks/:webhookId/test', paramZodValidator(projectWebhookParamsSchema), async (c) => {
|
|
1870
|
-
if (capabilities().singleProject) {
|
|
1871
|
-
return c.json(singleProjectRefusal('editing projects'), 409);
|
|
1872
|
-
}
|
|
1873
1857
|
const { projectId, webhookId } = c.req.valid('param');
|
|
1874
1858
|
const entry = await workspaceProjects.resolveRegistryEntry(projectId);
|
|
1875
1859
|
if (!entry)
|
|
@@ -1882,9 +1866,6 @@ export function createApp(deps) {
|
|
|
1882
1866
|
})
|
|
1883
1867
|
.get('/projects/checkout/:checkoutId/progress', paramZodValidator(checkoutProgressParamsSchema), c => c.json({ progress: checkoutProgress.get(c.req.valid('param').checkoutId) }))
|
|
1884
1868
|
.post('/projects/checkout', jsonZodValidator(() => checkoutSchema, { message: 'url must be a GitHub repository' }), async (c) => {
|
|
1885
|
-
if (capabilities().singleProject) {
|
|
1886
|
-
return c.json(singleProjectRefusal('adding projects'), 409);
|
|
1887
|
-
}
|
|
1888
1869
|
const parsed = { data: c.req.valid('json') };
|
|
1889
1870
|
const { url, name, checkoutId } = parsed.data;
|
|
1890
1871
|
const result = await checkoutRepo({
|
|
@@ -1933,9 +1914,6 @@ export function createApp(deps) {
|
|
|
1933
1914
|
return c.json(await listGithubOwners(deps.projectCommandRunner));
|
|
1934
1915
|
})
|
|
1935
1916
|
.post('/projects/create', jsonZodValidator(() => createProjectInputSchema, { message: 'project name must be a valid GitHub repository name — letters, digits, ".", "-" and "_" only, no spaces' }), async (c) => {
|
|
1936
|
-
if (capabilities().singleProject) {
|
|
1937
|
-
return c.json(singleProjectRefusal('adding projects'), 409);
|
|
1938
|
-
}
|
|
1939
1917
|
const { name, github, checkoutId } = c.req.valid('json');
|
|
1940
1918
|
if (github && !capabilities().localHandoff) {
|
|
1941
1919
|
return c.json({ error: HOSTED_GITHUB_CREATE_REFUSAL }, 409);
|
|
@@ -2010,14 +1988,11 @@ export function createApp(deps) {
|
|
|
2010
1988
|
* Returns the status + body for the caller to answer with.
|
|
2011
1989
|
*/
|
|
2012
1990
|
const registerFolder = async (spelled, source) => {
|
|
2013
|
-
if (capabilities().singleProject) {
|
|
2014
|
-
return { status: 409, body: singleProjectRefusal('adding projects') };
|
|
2015
|
-
}
|
|
2016
1991
|
// `~` is expanded for the same reason `/api/fs/browse` expands it: the
|
|
2017
1992
|
// dialog hands back absolute paths, but a hand-written body (curl, a
|
|
2018
1993
|
// future CLI) spells home the way a shell does.
|
|
2019
1994
|
const requested = expandTilde(spelled);
|
|
2020
|
-
if (!requested
|
|
1995
|
+
if (!isAbsoluteHostPath(requested)) {
|
|
2021
1996
|
return {
|
|
2022
1997
|
status: 400,
|
|
2023
1998
|
body: { error: `not a folder: ${spelled} is not an absolute path` },
|
|
@@ -2215,9 +2190,8 @@ export function createApp(deps) {
|
|
|
2215
2190
|
// exist; checkout roots use `mkdir -p`. Both get a real write probe.
|
|
2216
2191
|
// Any failure → 400 and NO change persisted.
|
|
2217
2192
|
const expanded = expandTilde(configuredRoot);
|
|
2218
|
-
if (!expanded
|
|
2193
|
+
if (!isAbsoluteHostPath(expanded))
|
|
2219
2194
|
return c.json({ error: `not writable: ${configuredRoot} is not an absolute path` }, 400);
|
|
2220
|
-
}
|
|
2221
2195
|
if (!create) {
|
|
2222
2196
|
try {
|
|
2223
2197
|
if (!(await stat(expanded)).isDirectory()) {
|
|
@@ -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
|
|
@@ -4368,7 +4339,7 @@ export function createApp(deps) {
|
|
|
4368
4339
|
.filter((project) => project.status !== 'missing' && project.id !== bootId && !contexts.peek(project.id))
|
|
4369
4340
|
.map((project) => project.root)));
|
|
4370
4341
|
// An unfinished migration finishes first. No folder or a fence: no runs. `not-git` still has an `.ai/cezar` worth indexing.
|
|
4371
|
-
return (await prepareProjects(projects, { ownership: deps.ownership, homes: [deps.home]
|
|
4342
|
+
return (await prepareProjects(projects, { ownership: deps.ownership, homes: [deps.home] })).filter((project) => project.status !== 'missing' && !projectAdmissionRefusal(projectPaths(project.root).write)).map((project) => {
|
|
4372
4343
|
const owned = project.id === bootId ? bootContext : contexts.peek(project.id);
|
|
4373
4344
|
// A cold project's repository identity only: asking for an owned one starts a discovery
|
|
4374
4345
|
// nothing reads.
|