@hearsay-tools/squawk 0.18.0-pr3927.7421 → 0.18.0-pr3928.7425
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/dist/ci-wait/controller.d.ts +1 -1
- package/dist/ci-wait/errors.js +0 -2
- package/dist/ci-wait/errors.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +5 -5
- package/dist/contract/delegation.d.ts +27 -14
- package/dist/contract/index.js +23 -31
- package/dist/contract/runs.d.ts +3 -10
- package/dist/contract/waits.d.ts +0 -2
- package/dist/contract/workspace-events.d.ts +0 -2
- package/dist/delegation/capacity.d.ts +3 -12
- package/dist/delegation/capacity.js +8 -23
- package/dist/delegation/capacity.js.map +1 -1
- package/dist/delegation/cli.js +15 -10
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/conversations.d.ts +0 -3
- package/dist/delegation/conversations.js +1 -4
- package/dist/delegation/conversations.js.map +1 -1
- package/dist/delegation/owned-workspace-release.d.ts +2 -3
- package/dist/delegation/owned-workspace-release.js +2 -2
- package/dist/delegation/owned-workspace-release.js.map +1 -1
- package/dist/delegation/policy.d.ts +3 -13
- package/dist/delegation/policy.js +14 -30
- package/dist/delegation/policy.js.map +1 -1
- package/dist/delegation/provision.js +4 -5
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/readiness.d.ts +2 -4
- package/dist/delegation/readiness.js +8 -9
- package/dist/delegation/readiness.js.map +1 -1
- package/dist/delegation/routes.d.ts +19 -5
- package/dist/delegation/routes.js +3 -3
- package/dist/delegation/routes.js.map +1 -1
- package/dist/delegation/service.d.ts +16 -4
- package/dist/delegation/service.js +39 -60
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +19 -5
- package/dist/delegation/worker-cleanup.d.ts +6 -14
- package/dist/delegation/worker-cleanup.js +27 -61
- package/dist/delegation/worker-cleanup.js.map +1 -1
- package/dist/delegation/workspace-kinds.d.ts +11 -2
- package/dist/delegation/workspace-kinds.js +13 -6
- package/dist/delegation/workspace-kinds.js.map +1 -1
- package/dist/delegation/workspace-record.js +3 -2
- package/dist/delegation/workspace-record.js.map +1 -1
- package/dist/delegation/workspace-removal.d.ts +9 -4
- package/dist/delegation/workspace-removal.js +36 -37
- package/dist/delegation/workspace-removal.js.map +1 -1
- package/dist/delegation/workspace-work.d.ts +35 -0
- package/dist/delegation/workspace-work.js +75 -0
- package/dist/delegation/workspace-work.js.map +1 -0
- package/dist/runs/delegation-state.d.ts +1 -2
- package/dist/runs/owned-run-create.js +9 -33
- package/dist/runs/owned-run-create.js.map +1 -1
- package/dist/runs/run-exits.d.ts +6 -12
- package/dist/runs/shared-hosts.d.ts +0 -4
- package/dist/runs/shared-hosts.js +0 -6
- package/dist/runs/shared-hosts.js.map +1 -1
- package/dist/runs/store.d.ts +5 -6
- package/dist/runs/store.js +6 -5
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/task-rights.d.ts +3 -22
- package/dist/runs/task-rights.js +13 -58
- package/dist/runs/task-rights.js.map +1 -1
- package/dist/server/run-checkout.js +0 -4
- package/dist/server/run-checkout.js.map +1 -1
- package/dist/server/server.d.ts +430 -424
- package/dist/server/server.js +35 -5
- package/dist/server/server.js.map +1 -1
- package/dist/workflows/completion-policy.d.ts +1 -7
- package/dist/workflows/completion-policy.js +3 -13
- package/dist/workflows/completion-policy.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +1 -2
- package/dist/workflows/continuation-admission.js +0 -6
- package/dist/workflows/continuation-admission.js.map +1 -1
- package/dist/workflows/question-routing.d.ts +0 -2
- package/dist/workflows/question-routing.js +0 -7
- package/dist/workflows/question-routing.js.map +1 -1
- package/dist/workflows/run/completion-gate.d.ts +0 -3
- package/dist/workflows/run/completion-gate.js +7 -12
- package/dist/workflows/run/completion-gate.js.map +1 -1
- package/dist/workflows/run/family-reconciler.d.ts +8 -13
- package/dist/workflows/run/family-reconciler.js +17 -26
- package/dist/workflows/run/family-reconciler.js.map +1 -1
- package/dist/workflows/run/run-cancel.d.ts +1 -2
- package/dist/workflows/run/run-cancel.js +3 -5
- package/dist/workflows/run/run-cancel.js.map +1 -1
- package/dist/workflows/run/run-finish.js +6 -4
- package/dist/workflows/run/run-finish.js.map +1 -1
- package/dist/workflows/run/run-recovery.js +0 -10
- package/dist/workflows/run/run-recovery.js.map +1 -1
- package/dist/workflows/run/run-workspace.js +2 -3
- package/dist/workflows/run/run-workspace.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +1 -2
- package/dist/workflows/run/wait-engine.js +1 -2
- package/dist/workflows/run/wait-engine.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +1 -4
- package/dist/workflows/run/wait-registry.js +3 -12
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/run/worker-questions.d.ts +3 -11
- package/dist/workflows/run/worker-questions.js +18 -38
- package/dist/workflows/run/worker-questions.js.map +1 -1
- package/dist/workflows/wait-scope.d.ts +2 -2
- package/dist/workflows/wait-scope.js +4 -4
- package/dist/workflows/wait-scope.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-BjRSOxuh.js → activity-motion-CP1uMAhc.js} +1 -1
- package/web/dist/assets/{activity-route-CG_suLmL.js → activity-route-DeU2Kbwd.js} +1 -1
- package/web/dist/assets/{agent-accounts-DaF-ybaB.js → agent-accounts-B5mlyHu6.js} +1 -1
- package/web/dist/assets/attention-KWONtkLe.js +1 -0
- package/web/dist/assets/{commit-diff-panel-DvSOi3Dk.js → commit-diff-panel-BZUB5Z1f.js} +1 -1
- package/web/dist/assets/{diff-DhcQus9M.js → diff-BrHuVh8o.js} +2 -2
- package/web/dist/assets/{diff-view-DiuMMFWa.js → diff-view-CedKSSPs.js} +1 -1
- package/web/dist/assets/{file-preview-CZoDjpW4.js → file-preview-Be5LTCAp.js} +1 -1
- package/web/dist/assets/{git-toolbar-CA-ZwUuj.js → git-toolbar-DVuQmXZy.js} +1 -1
- package/web/dist/assets/{github-Dita6Kp5.js → github-DN_dnIH-.js} +1 -1
- package/web/dist/assets/{global-activity-route-DksHUiPz.js → global-activity-route-LJCoq_eu.js} +1 -1
- package/web/dist/assets/{index-D59vfFuq.js → index-BSkJHRdF.js} +9 -9
- package/web/dist/assets/{markdown-B66DXw4l.js → markdown-D2-rnRmg.js} +1 -1
- package/web/dist/assets/{picker-pill-bwLTIbHM.js → picker-pill-DeXs_3wA.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-B7-FZ5DE.js → preview-pane-connected-DnLLyOv7.js} +1 -1
- package/web/dist/assets/{project-router-ewovT3Kf.js → project-router-Ca-Yys9p.js} +1 -1
- package/web/dist/assets/project-scope-context-Bq74vnQ8.js +4 -0
- package/web/dist/assets/{prompt-template-menu-BJEe-Kv2.js → prompt-template-menu-Ba29Yvb4.js} +1 -1
- package/web/dist/assets/queries-CteMqpzA.js +1 -0
- package/web/dist/assets/{reference-chip-Tj9CYsE2.js → reference-chip-CLBt6hDk.js} +1 -1
- package/web/dist/assets/{repo-git-C0MVr1i5.js → repo-git-CctMXHJm.js} +1 -1
- package/web/dist/assets/{report-reader-BW21aq_k.js → report-reader-D4rRCdx8.js} +1 -1
- package/web/dist/assets/{reports-DWXaed-t.js → reports-CYFYZ4j8.js} +1 -1
- package/web/dist/assets/run-header-y5q0tNyC.js +2 -0
- package/web/dist/assets/{skills-CZq8WNx7.js → skills-C_fXdjTf.js} +1 -1
- package/web/dist/assets/{tab-link-D4l87fgz.js → tab-link-CEKTsBqM.js} +1 -1
- package/web/dist/assets/{task-changes-FumjZsw6.js → task-changes-_iq_dPMh.js} +1 -1
- package/web/dist/assets/{task-commits-75nPVeL3.js → task-commits-ttgZYzlA.js} +1 -1
- package/web/dist/assets/{task-files-CdhoQGlN.js → task-files-BB2K7_8M.js} +1 -1
- package/web/dist/assets/{task-github-item-1IbcFtr-.js → task-github-item-BAR2_YLS.js} +1 -1
- package/web/dist/assets/task-thread-CWv3VJj0.js +9 -0
- package/web/dist/assets/{thread-state-Bfb8orUP.js → thread-state-DMd4D69h.js} +1 -1
- package/web/dist/assets/{use-desktop-DJrxV0gM.js → use-desktop-BjYpWIqI.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-bZUXClR3.js → use-hand-to-agent-state-CALyzrgv.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-Bbi75-bb.js → useInfiniteQuery-GJoCV7zM.js} +1 -1
- package/web/dist/assets/useQuery-B9tMLxA1.js +1 -0
- package/web/dist/assets/{workflows-gbQKlO53.js → workflows-DnIdj5zW.js} +2 -2
- package/web/dist/assets/{ws-BRHd49V3.js → ws-D7DpYPkk.js} +1 -1
- package/web/dist/index.html +13 -13
- package/dist/runs/supervised.d.ts +0 -21
- package/dist/runs/supervised.js +0 -28
- package/dist/runs/supervised.js.map +0 -1
- package/dist/server/run-relationships.d.ts +0 -14
- package/dist/server/run-relationships.js +0 -47
- package/dist/server/run-relationships.js.map +0 -1
- package/web/dist/assets/attention-DtccMSEl.js +0 -1
- package/web/dist/assets/project-scope-context-CdJF4Chv.js +0 -4
- package/web/dist/assets/queries-DEhoSzZx.js +0 -1
- package/web/dist/assets/run-header-LMdC07au.js +0 -2
- package/web/dist/assets/task-thread-9Q-PLOFf.js +0 -9
- package/web/dist/assets/useQuery-is45BI1J.js +0 -1
package/dist/server/server.js
CHANGED
|
@@ -48,10 +48,10 @@ import { workspaceEventsQuerySchema } from '../contract/index.js';
|
|
|
48
48
|
import { automationListQuerySchema } from '../contract/index.js';
|
|
49
49
|
import { localTimeZone } from '../contract/index.js';
|
|
50
50
|
import { DelegationService } from '../delegation/service.js';
|
|
51
|
-
import {
|
|
51
|
+
import { workerCapacity } from '../delegation/capacity.js';
|
|
52
52
|
import { delegationFailure } from '../delegation/routes.js';
|
|
53
53
|
import { githubItemParamsSchema } from '../contract/index.js';
|
|
54
|
-
import { workerEmptyRequestSchema, runRelationshipsSchema } from '../contract/index.js';
|
|
54
|
+
import { workerDestroyRequestSchema, workerEmptyRequestSchema, runRelationshipsSchema } from '../contract/index.js';
|
|
55
55
|
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
56
56
|
import { randomUUID } from 'node:crypto';
|
|
57
57
|
import { createAutomationService, onceCreateAnswer } from '../automations/service.js';
|
|
@@ -94,6 +94,7 @@ import { readHandoff, renderHandoffRecords } from '../handoff.js';
|
|
|
94
94
|
import { ARCHIVED_WINDOW } from '../runs/store.js';
|
|
95
95
|
import { HistoryCursorError, deriveRunContextEvents, readRunHistoryPage, validateLiveCursor, } from '../runs/event-history.js';
|
|
96
96
|
import { readRunIndexFromDisk, searchRunIndexFromDisk } from '../runs/run-index.js';
|
|
97
|
+
import { workerDestroyView, workerObservation } from '../runs/delegation-state.js';
|
|
97
98
|
import { searchTokens } from '../contract/index.js';
|
|
98
99
|
import { ownPullRequestNumbers } from '../runs/pull-requests.js';
|
|
99
100
|
import { ColdRepoHandles } from './cold-repo-handles.js';
|
|
@@ -2442,13 +2443,42 @@ export function createApp(deps) {
|
|
|
2442
2443
|
const run = store.getRun(c.req.valid('param').id);
|
|
2443
2444
|
if (!run)
|
|
2444
2445
|
return c.json({ error: 'not found' }, 404);
|
|
2445
|
-
|
|
2446
|
+
// Read the parent's receipts, not the project index (#659), including archived workers.
|
|
2447
|
+
// The cockpit asks on every run event: cost stays O(workers), whatever the store holds.
|
|
2448
|
+
// An ordinary run that owns none reads none, delegation on or off.
|
|
2449
|
+
// Human reads use the bound project, never agent credentials.
|
|
2450
|
+
const ownedWorkers = store.listOwnedWorkers(run.id);
|
|
2451
|
+
const workers = ownedWorkers.flatMap(worker => {
|
|
2452
|
+
const owned = worker.delegation;
|
|
2453
|
+
if (owned?.role !== 'worker')
|
|
2454
|
+
return [];
|
|
2455
|
+
return [{ workerId: worker.id, parentRunId: run.id, status: worker.status, workspace: owned.workspace,
|
|
2456
|
+
settled: workerObservation(worker, store.readWorkerExecution(worker.id)).settled,
|
|
2457
|
+
...(worker.currentStepId === undefined ? {} : { currentStepId: worker.currentStepId }),
|
|
2458
|
+
...(owned.destroy ? { destroy: workerDestroyView(worker) } : {}),
|
|
2459
|
+
}];
|
|
2460
|
+
});
|
|
2461
|
+
// #864: the titles of the runs this answer names, since the cockpit's run list no longer
|
|
2462
|
+
// carries archived workers (or a parent past its archived window).
|
|
2463
|
+
const parent = run.delegation?.role === 'worker' ? store.getRun(run.delegation.parentRunId) : undefined;
|
|
2464
|
+
const titles = [...(parent ? [parent] : []), ...ownedWorkers].map((related) => ({
|
|
2465
|
+
id: related.id, title: related.title,
|
|
2466
|
+
...(related.titleSummary === undefined ? {} : { titleSummary: related.titleSummary }),
|
|
2467
|
+
...(related.titleOrigin === undefined ? {} : { titleOrigin: related.titleOrigin }),
|
|
2468
|
+
}));
|
|
2469
|
+
// #816: every owned worker, bounded by the 1,024 creation ceiling rather than sliced, and
|
|
2470
|
+
// the root's capacity from the same derivation the spawn policy enforces.
|
|
2471
|
+
return c.json(runRelationshipsSchema.parse({
|
|
2472
|
+
...(run.delegation?.role === 'worker' ? { parentRunId: run.delegation.parentRunId } : {}), workers,
|
|
2473
|
+
...(titles.length > 0 ? { titles } : {}),
|
|
2474
|
+
...(run.delegation?.role === 'root' ? { capacity: workerCapacity(run, id => store.getRun(id)) } : {}),
|
|
2475
|
+
}));
|
|
2446
2476
|
})
|
|
2447
|
-
.post('/runs/:id/worker-destroy', queryZodValidator(workerEmptyRequestSchema, { code: 'invalid_input', message: 'Invalid cleanup query' }), paramZodValidator(runIdParamSchema, { code: 'invalid_input', message: 'Invalid worker ID' }), jsonZodValidator(
|
|
2477
|
+
.post('/runs/:id/worker-destroy', queryZodValidator(workerEmptyRequestSchema, { code: 'invalid_input', message: 'Invalid cleanup query' }), paramZodValidator(runIdParamSchema, { code: 'invalid_input', message: 'Invalid worker ID' }), jsonZodValidator(workerDestroyRequestSchema, { absent: {}, malformed: null, code: 'invalid_input', message: 'Invalid cleanup input' }), async (c) => {
|
|
2448
2478
|
const project = c.get('project');
|
|
2449
2479
|
delegationService.registerProject(project);
|
|
2450
2480
|
try {
|
|
2451
|
-
const result = await delegationService.destroyForHuman(project.id, c.req.valid('param').id);
|
|
2481
|
+
const result = await delegationService.destroyForHuman(project.id, c.req.valid('param').id, c.req.valid('json'));
|
|
2452
2482
|
return result.state === 'incomplete' ? c.json(result, 409) : c.json(result, 200);
|
|
2453
2483
|
}
|
|
2454
2484
|
catch (error) {
|