pi-daddy 0.62.1 → 0.63.0
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/CHANGELOG.md +6 -0
- package/README.md +14 -0
- package/contracts/task-history/v1/README.md +76 -0
- package/contracts/task-history/v1/dispatch.ts +38 -0
- package/contracts/task-history/v1/observation.schema.json +73 -0
- package/contracts/task-history/v1/producer.ts +48 -0
- package/dist/governance/runtime-settlement.d.ts +8 -1
- package/dist/governance/runtime-settlement.d.ts.map +1 -1
- package/dist/governance/runtime-settlement.js +42 -4
- package/dist/governance/runtime-settlement.js.map +1 -1
- package/dist/governance/task-dispatch.d.ts +85 -0
- package/dist/governance/task-dispatch.d.ts.map +1 -0
- package/dist/governance/task-dispatch.js +342 -0
- package/dist/governance/task-dispatch.js.map +1 -0
- package/dist/kernel/dashboard-choice.d.ts +5 -0
- package/dist/kernel/dashboard-choice.d.ts.map +1 -1
- package/dist/kernel/dashboard-choice.js.map +1 -1
- package/dist/kernel/dashboard-observation.d.ts +31 -0
- package/dist/kernel/dashboard-observation.d.ts.map +1 -1
- package/dist/kernel/dashboard-observation.js +33 -1
- package/dist/kernel/dashboard-observation.js.map +1 -1
- package/dist/kernel/dashboard-request.d.ts +4 -0
- package/dist/kernel/dashboard-request.d.ts.map +1 -0
- package/dist/kernel/dashboard-request.js +8 -0
- package/dist/kernel/dashboard-request.js.map +1 -0
- package/dist/products/dashboard-choice-picker.d.ts +2 -0
- package/dist/products/dashboard-choice-picker.d.ts.map +1 -1
- package/dist/products/dashboard-choice-picker.js +46 -18
- package/dist/products/dashboard-choice-picker.js.map +1 -1
- package/dist/products/dashboard-cli.d.ts.map +1 -1
- package/dist/products/dashboard-cli.js +31 -4
- package/dist/products/dashboard-cli.js.map +1 -1
- package/dist/products/dashboard-components.d.ts +2 -0
- package/dist/products/dashboard-components.d.ts.map +1 -1
- package/dist/products/dashboard-components.js +81 -0
- package/dist/products/dashboard-components.js.map +1 -1
- package/dist/products/dashboard-panels.d.ts.map +1 -1
- package/dist/products/dashboard-panels.js +7 -2
- package/dist/products/dashboard-panels.js.map +1 -1
- package/dist/products/dashboard-screen.d.ts +2 -0
- package/dist/products/dashboard-screen.d.ts.map +1 -1
- package/dist/products/dashboard-screen.js +12 -3
- package/dist/products/dashboard-screen.js.map +1 -1
- package/dist/products/dashboard-session-client.d.ts +8 -0
- package/dist/products/dashboard-session-client.d.ts.map +1 -1
- package/dist/products/dashboard-session-client.js +54 -26
- package/dist/products/dashboard-session-client.js.map +1 -1
- package/dist/products/dashboard-task-controls.d.ts +6 -0
- package/dist/products/dashboard-task-controls.d.ts.map +1 -0
- package/dist/products/dashboard-task-controls.js +27 -0
- package/dist/products/dashboard-task-controls.js.map +1 -0
- package/extensions/dashboard-choice-controls.ts +33 -1
- package/extensions/dashboard-session-server.ts +67 -4
- package/extensions/dashboard-sources.ts +21 -2
- package/extensions/delegate-chain.ts +6 -0
- package/extensions/delegation-artifacts.ts +34 -0
- package/extensions/delegation-operations.ts +5 -0
- package/extensions/delegation.ts +26 -2
- package/extensions/execute-child.ts +4 -0
- package/extensions/grants.ts +3 -0
- package/extensions/run-delegation.ts +58 -6
- package/extensions/runtime-snapshot.ts +23 -17
- package/extensions/session.ts +4 -0
- package/extensions/task-dispatch-controller.ts +384 -0
- package/extensions/task-inline-control.ts +21 -0
- package/extensions/task-worktree-writer.ts +55 -0
- package/package.json +1 -1
- package/src/governance/runtime-settlement.ts +44 -2
- package/src/governance/task-dispatch.ts +427 -0
- package/src/kernel/dashboard-choice.ts +7 -1
- package/src/kernel/dashboard-observation.ts +67 -2
- package/src/kernel/dashboard-request.ts +8 -0
- package/src/products/dashboard-choice-picker.ts +51 -16
- package/src/products/dashboard-cli.ts +33 -4
- package/src/products/dashboard-components.ts +84 -0
- package/src/products/dashboard-panels.ts +6 -1
- package/src/products/dashboard-screen.ts +14 -3
- package/src/products/dashboard-session-client.ts +79 -28
- package/src/products/dashboard-task-controls.ts +34 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { DispatchEdit, DispatchOwner } from "../governance/task-dispatch.ts";
|
|
2
|
+
import type { DashboardSessionAction, DashboardSessionSnapshot } from "./dashboard-session-client.ts";
|
|
3
|
+
|
|
4
|
+
/** Use the selection captured when the user opened the command. */
|
|
5
|
+
export function taskControlRequest(
|
|
6
|
+
target: DashboardSessionSnapshot | undefined,
|
|
7
|
+
text: string,
|
|
8
|
+
): Extract<DashboardSessionAction, { action: "task-dispatch" }> | string {
|
|
9
|
+
const task = target?.taskDispatch,
|
|
10
|
+
owner = target?.observation;
|
|
11
|
+
if (!task || !owner) return "Select a task in Bookie to control its operations.";
|
|
12
|
+
if (task.inherited) return "Select the parent task to change shared controls.";
|
|
13
|
+
const match = /^task (pause|cancel|resume|budget)(?: (task|pi-daddy|scout|harness|jev))?(?: (off|[0-9]+))?$/.exec(
|
|
14
|
+
text,
|
|
15
|
+
);
|
|
16
|
+
if (!match || (match[1] === "budget" ? !match[3] : match[2] || match[3]))
|
|
17
|
+
return "Use task pause, task cancel, task resume, or task budget [owner] <attempts|off>.";
|
|
18
|
+
const { projectId, taskId, revision, selectionRevision } = task;
|
|
19
|
+
const expected = { projectId, taskId, revision, selectionRevision };
|
|
20
|
+
const edit: DispatchEdit =
|
|
21
|
+
match[1] === "budget"
|
|
22
|
+
? {
|
|
23
|
+
action: "budget",
|
|
24
|
+
limit: match[3] === "off" ? null : Number(match[3]),
|
|
25
|
+
owner: (match[2] ?? "task") as DispatchOwner | "task",
|
|
26
|
+
expected,
|
|
27
|
+
}
|
|
28
|
+
: { action: match[1] as "pause" | "cancel" | "resume", expected };
|
|
29
|
+
return {
|
|
30
|
+
action: "task-dispatch",
|
|
31
|
+
edit,
|
|
32
|
+
expectedOwner: { cwd: owner.cwd, sessionId: owner.sessionId, generation: owner.generation },
|
|
33
|
+
};
|
|
34
|
+
}
|