@xzzpig/pi-subagents 0.14.0 → 0.15.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 +233 -0
- package/README.md +6 -5
- package/agents/evidence-auditor.md +34 -0
- package/agents/researcher.md +23 -13
- package/agents/reviewer.md +3 -2
- package/docs/agents.md +56 -15
- package/docs/configuration.md +92 -14
- package/docs/extension-api.md +132 -19
- package/docs/missions.md +10 -2
- package/docs/models.md +11 -22
- package/docs/observability.md +63 -11
- package/docs/standalone-background.md +59 -0
- package/docs/tool-reference.md +42 -23
- package/docs/watchdog.md +39 -10
- package/docs/workflows.md +58 -19
- package/index.ts +5 -2
- package/inspector-runner.mjs +2 -2
- package/node_modules/@xzzpig/pi-components/dist/src/transcript.d.ts +13 -3
- package/node_modules/@xzzpig/pi-components/dist/src/transcript.js +18 -6
- package/node_modules/@xzzpig/pi-components/src/transcript.ts +26 -6
- package/package.json +9 -4
- package/prompts/parallel-review.md +1 -1
- package/runner-peer-loader.mjs +24 -0
- package/runner-peer-preload.mjs +36 -0
- package/skills/pi-subagents/SKILL.md +34 -22
- package/skills/pi-subagents/references/constraints-and-recipes.md +3 -2
- package/skills/pi-subagents/references/execution-controls.md +27 -8
- package/skills/pi-subagents/references/management-authoring-rpc.md +2 -2
- package/skills/pi-subagents/references/multi-lane-orchestration.md +3 -1
- package/skills/pi-subagents/references/prompting-and-roles.md +17 -13
- package/skills/pi-subagents/references/review-and-validation.md +3 -3
- package/src/agents/advertised-agent-prompt.ts +94 -0
- package/src/agents/agent-management.ts +71 -59
- package/src/agents/agent-serializer.ts +6 -3
- package/src/agents/agents.ts +198 -72
- package/src/agents/builtin-names.ts +1 -0
- package/src/agents/chain-serializer.ts +5 -0
- package/src/agents/runtime-agent-registry.ts +7 -6
- package/src/api/delegation.ts +4 -0
- package/src/api/preflight.ts +110 -71
- package/src/api/required-child-extensions.ts +6 -0
- package/src/api/shared-types.ts +3 -1
- package/src/api/workflow-resources.ts +6 -0
- package/src/extension/config.ts +14 -37
- package/src/extension/fanout-child.ts +68 -5
- package/src/extension/herdr-pi-bridge.ts +164 -0
- package/src/extension/index.ts +141 -51
- package/src/extension/public-execution.ts +7 -6
- package/src/extension/rpc.ts +8 -21
- package/src/extension/schemas.ts +86 -84
- package/src/extension/tool-description.ts +32 -79
- package/src/inspectors/actions.ts +148 -0
- package/src/inspectors/ghostty/actions.ts +74 -0
- package/src/inspectors/ghostty/plugin.ts +17 -0
- package/src/inspectors/herdr/actions.ts +99 -179
- package/src/inspectors/herdr/plugin.ts +20 -0
- package/src/inspectors/herdr/project-panes.ts +4 -1
- package/src/inspectors/{herdr/inspector-runner.ts → inspector-runner.ts} +12 -12
- package/src/inspectors/plugins.ts +8 -0
- package/src/inspectors/{herdr/session-roots-codec.ts → session-roots-codec.ts} +3 -14
- package/src/inspectors/types.ts +51 -0
- package/src/integrations/pi-web-session-liveness.ts +73 -0
- package/src/intercom/intercom-bridge.ts +50 -8
- package/src/intercom/native-supervisor-channel.ts +142 -115
- package/src/intercom/supervisor-ui.ts +3 -2
- package/src/missions/workflow-state.ts +37 -16
- package/src/policy/authority.ts +4 -0
- package/src/profiles/profiles.ts +12 -6
- package/src/runs/background/active-async-capacity.ts +22 -18
- package/src/runs/background/active-run-index.ts +17 -1
- package/src/runs/background/async-execution.ts +359 -176
- package/src/runs/background/async-job-tracker.ts +41 -7
- package/src/runs/background/async-resume.ts +19 -12
- package/src/runs/background/async-retention.ts +20 -0
- package/src/runs/background/async-status-snapshot.ts +10 -12
- package/src/runs/background/async-status.ts +32 -13
- package/src/runs/background/auto-drain.ts +59 -35
- package/src/runs/background/binary-bootstrap.ts +38 -0
- package/src/runs/background/chain-append.ts +1 -1
- package/src/runs/background/chain-root-attachment.ts +22 -33
- package/src/runs/background/control-channel.ts +78 -44
- package/src/runs/background/fleet-view.ts +30 -2
- package/src/runs/background/notify.ts +193 -19
- package/src/runs/background/owned-process-tree.ts +35 -8
- package/src/runs/background/process-terminal.ts +23 -23
- package/src/runs/background/result-files.ts +8 -4
- package/src/runs/background/result-watcher.ts +19 -2
- package/src/runs/background/retained-nested-route-tracker.ts +96 -0
- package/src/runs/background/run-child-session.ts +118 -41
- package/src/runs/background/run-status.ts +78 -5
- package/src/runs/background/runner-aliases.ts +22 -5
- package/src/runs/background/runner-child-launch.ts +93 -0
- package/src/runs/background/runner-child-sessions.ts +5 -4
- package/src/runs/background/runner-http-dispatcher.ts +119 -0
- package/src/runs/background/scheduled-runs.ts +51 -18
- package/src/runs/background/stale-run-reconciler.ts +38 -12
- package/src/runs/background/steering.ts +20 -2
- package/src/runs/background/subagent-runner.ts +766 -432
- package/src/runs/background/subagent-wait.ts +179 -28
- package/src/runs/background/wait-completions.ts +79 -27
- package/src/runs/background/wait-subscriptions.ts +9 -3
- package/src/runs/background/wait-tool.ts +5 -3
- package/src/runs/foreground/async-steering-action.ts +37 -7
- package/src/runs/foreground/async-stop-action.ts +93 -3
- package/src/runs/foreground/execution.ts +174 -194
- package/src/runs/foreground/foreground-history.ts +5 -2
- package/src/runs/foreground/prompt-audit.ts +12 -6
- package/src/runs/foreground/subagent-executor.ts +896 -397
- package/src/runs/foreground/workflow-detach-reconcile.ts +10 -5
- package/src/runs/foreground/workflow-foreground-steering.ts +57 -2
- package/src/runs/shared/acceptance.ts +54 -14
- package/src/runs/shared/agent-contract.ts +1 -1
- package/src/runs/shared/async-status-projection.ts +172 -78
- package/src/runs/shared/capability-ceiling.ts +2 -0
- package/src/runs/shared/child-hooks.ts +167 -3
- package/src/runs/shared/child-launch-plan.ts +15 -3
- package/src/runs/shared/child-launch.ts +44 -16
- package/src/runs/shared/child-lifecycle.ts +6 -3
- package/src/runs/shared/child-runtime-config.ts +8 -1
- package/src/runs/shared/child-session.ts +130 -24
- package/src/runs/shared/child-tool-plan.ts +145 -14
- package/src/runs/shared/completion-evidence.ts +2 -2
- package/src/runs/shared/completion-guard.ts +6 -3
- package/src/runs/shared/dynamic-fanout.ts +2 -2
- package/src/runs/shared/effective-system-prompt.ts +33 -0
- package/src/runs/shared/external-cli-contract.ts +11 -1
- package/src/runs/shared/external-cli-preflight.ts +6 -2
- package/src/runs/shared/external-cli-runner.ts +9 -7
- package/src/runs/shared/herdr-connection.ts +134 -0
- package/src/runs/shared/herdr-external-adapters.ts +169 -0
- package/src/runs/shared/herdr-machine.ts +279 -0
- package/src/runs/shared/herdr-pi-protocol.ts +59 -0
- package/src/runs/shared/herdr-placed-run.ts +263 -0
- package/src/runs/shared/host-step-status.ts +11 -11
- package/src/runs/shared/llm-intent-arbiter.ts +40 -21
- package/src/runs/shared/model-resolution-diagnostic.ts +76 -0
- package/src/runs/shared/{model-fallback.ts → model-resolution.ts} +34 -218
- package/src/runs/shared/model-scope.ts +1 -1
- package/src/runs/shared/nested-events.ts +19 -10
- package/src/runs/shared/orca-progress-tabs.ts +7 -1
- package/src/runs/shared/parallel-handoff.ts +57 -12
- package/src/runs/shared/parallel-utils.ts +10 -4
- package/src/runs/shared/pi-spawn.ts +10 -0
- package/src/runs/shared/readonly-drain-observation.ts +42 -0
- package/src/runs/shared/run-fanout-budget.ts +8 -8
- package/src/runs/shared/runtime-acknowledged-extensions.ts +3 -3
- package/src/runs/shared/subagent-prompt-runtime.ts +23 -5
- package/src/runs/shared/task-intent.ts +46 -13
- package/src/runs/shared/workflow-async-child-guidance.ts +18 -0
- package/src/runs/shared/worktree-cleanup-plan.ts +6 -3
- package/src/runs/shared/worktree-setup-command.ts +213 -0
- package/src/runs/shared/worktree.ts +437 -214
- package/src/shared/child-cache-retention.ts +43 -0
- package/src/shared/fork-context.ts +15 -72
- package/src/shared/launch-contract.ts +70 -8
- package/src/shared/model-response-aliases.ts +13 -0
- package/src/shared/opencode-session-headers.ts +30 -0
- package/src/shared/pruned-fork.ts +1 -1
- package/src/shared/required-child-extensions.ts +81 -0
- package/src/shared/settings.ts +5 -2
- package/src/shared/shortcuts.ts +0 -4
- package/src/shared/types.ts +163 -90
- package/src/shared/utils.ts +10 -2
- package/src/shared/watch-strategy.ts +2 -0
- package/src/shared/workflow-child-permit.ts +18 -13
- package/src/slash/delegation-adapters.ts +3 -1
- package/src/slash/delegation-request.ts +14 -0
- package/src/slash/slash-commands.ts +2 -7
- package/src/slash/subagents-admin.ts +31 -14
- package/src/tui/fleet-status.ts +165 -20
- package/src/tui/fleet.ts +30 -19
- package/src/tui/render.ts +210 -50
- package/src/watchdog/child-status.ts +28 -28
- package/src/watchdog/lsp-diagnostics.ts +1 -1
- package/src/watchdog/model-selection.ts +21 -1
- package/src/watchdog/permission-arbiter.ts +5 -2
- package/src/watchdog/register-child.ts +10 -2
- package/src/watchdog/register-main.ts +39 -35
- package/src/watchdog/render.ts +1 -1
- package/src/watchdog/review.ts +122 -74
- package/src/watchdog/rules.ts +1 -1
- package/src/watchdog/runtime.ts +100 -27
- package/src/watchdog/scope.ts +1 -1
- package/src/watchdog/settings.ts +3 -0
- package/src/watchdog/tool-actions.ts +13 -12
- package/src/watchdog/turn-delta.ts +23 -0
- package/src/watchdog/types.ts +5 -3
- package/src/watchdog/warning-format.ts +1 -1
- package/src/workflows/chat-progress.ts +3 -3
- package/src/workflows/scripted-workflow.ts +349 -26
- package/src/workflows/workflow-checklist.ts +17 -20
- package/src/workflows/workflow-child-summary.ts +57 -8
- package/src/workflows/workflow-preflight.ts +19 -19
- package/src/workflows/workflow-receipt.ts +24 -6
- package/src/workflows/workflow-resources.ts +108 -22
- package/src/workflows/workflow-settlement.ts +3 -0
- package/src/runs/shared/model-exclusions.ts +0 -373
- /package/src/inspectors/{herdr/shell-command.ts → shell-command.ts} +0 -0
package/src/shared/types.ts
CHANGED
|
@@ -16,6 +16,7 @@ import type { GlobalMissionIndexRecord, MissionRecord, MissionStoreConfig } from
|
|
|
16
16
|
import type { ExtensionBindings } from "../runs/shared/extension-bindings.ts";
|
|
17
17
|
import type { WorkflowChildPermitContext } from "./workflow-child-permit.ts";
|
|
18
18
|
import type { WatchdogWarningDetails } from "../watchdog/types.ts";
|
|
19
|
+
import type { RequiredChildExtensionSnapshot } from "./required-child-extensions.ts";
|
|
19
20
|
|
|
20
21
|
// ============================================================================
|
|
21
22
|
// Basic Types
|
|
@@ -47,14 +48,14 @@ export type HostStepMonitorKind = "command" | "ci" | "gate";
|
|
|
47
48
|
export type HostStepState = "pending" | "running" | "done" | "cancelled" | "error";
|
|
48
49
|
export type HostStepVerdict = "pass" | "fail" | "inconclusive";
|
|
49
50
|
|
|
50
|
-
export interface
|
|
51
|
+
export interface HostStepFreshness {
|
|
51
52
|
expectedRef: string;
|
|
52
53
|
observedRef?: string;
|
|
53
54
|
stale?: boolean;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
/** Bounded, provider-agnostic status for a host-owned workflow monitor. */
|
|
57
|
-
export interface
|
|
58
|
+
export interface HostStepNode {
|
|
58
59
|
version: 1;
|
|
59
60
|
kind: "host-step";
|
|
60
61
|
/** Explicit monitor category; never inferred from labels or commands. */
|
|
@@ -68,7 +69,7 @@ export interface HostStepNodeV1 {
|
|
|
68
69
|
reasonCode?: string;
|
|
69
70
|
detail?: string;
|
|
70
71
|
target?: string;
|
|
71
|
-
freshness?:
|
|
72
|
+
freshness?: HostStepFreshness;
|
|
72
73
|
reportPath?: string;
|
|
73
74
|
exitCode?: number | null;
|
|
74
75
|
updatedAt: number;
|
|
@@ -97,7 +98,7 @@ export interface WorkflowGraphNode {
|
|
|
97
98
|
structured?: boolean;
|
|
98
99
|
acceptanceStatus?: AcceptanceLedgerStatus;
|
|
99
100
|
error?: string;
|
|
100
|
-
hostStep?:
|
|
101
|
+
hostStep?: HostStepNode;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
export interface WorkflowGraphSnapshot {
|
|
@@ -112,7 +113,7 @@ export type WorkflowPreflightCoverage = "complete" | "partial";
|
|
|
112
113
|
export type WorkflowPreflightMode = "mutation" | "review" | "scout" | "gate";
|
|
113
114
|
|
|
114
115
|
/** Bounded, display-only lane hints supplied alongside a workflowScript launch. */
|
|
115
|
-
export interface
|
|
116
|
+
export interface WorkflowPreflightLane {
|
|
116
117
|
key: string;
|
|
117
118
|
mode?: WorkflowPreflightMode;
|
|
118
119
|
decision?: string;
|
|
@@ -122,10 +123,10 @@ export interface WorkflowPreflightLaneV1 {
|
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
/** Versioned, display-only workflow launch plan; it never grants launch authority. */
|
|
125
|
-
export interface
|
|
126
|
+
export interface WorkflowPreflight {
|
|
126
127
|
version: 1;
|
|
127
128
|
coverage: WorkflowPreflightCoverage;
|
|
128
|
-
lanes:
|
|
129
|
+
lanes: WorkflowPreflightLane[];
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
export type WorkflowReceiptState = "complete" | "failed" | "paused" | "stopped";
|
|
@@ -149,7 +150,7 @@ export interface WorkflowRecoveryAction {
|
|
|
149
150
|
* Permission/policy extensions can use it to distinguish resolved content from
|
|
150
151
|
* raw workflow scripts. This audit projection never grants execution authority.
|
|
151
152
|
*/
|
|
152
|
-
export interface
|
|
153
|
+
export interface WorkflowResourceProvenance {
|
|
153
154
|
kind: "workflow";
|
|
154
155
|
name: string;
|
|
155
156
|
version: number;
|
|
@@ -174,7 +175,20 @@ export interface WorkflowLaneMetadata {
|
|
|
174
175
|
outputPaths?: string[];
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
|
|
178
|
+
/** Bounded foreground activity; excludes tool arguments and transcript content. */
|
|
179
|
+
export interface WorkflowChildActivity {
|
|
180
|
+
currentTool?: string;
|
|
181
|
+
currentToolStartedAt?: number;
|
|
182
|
+
lastActivityAt?: number;
|
|
183
|
+
durationMs?: number;
|
|
184
|
+
toolCount?: number;
|
|
185
|
+
turnCount?: number;
|
|
186
|
+
tokens?: number;
|
|
187
|
+
inputTokens?: number;
|
|
188
|
+
outputTokens?: number;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface WorkflowChildSummary {
|
|
178
192
|
version: 1;
|
|
179
193
|
parentToolCallId: string;
|
|
180
194
|
workflowRunId: string;
|
|
@@ -188,6 +202,8 @@ export interface WorkflowChildSummaryV1 {
|
|
|
188
202
|
sessionName?: string;
|
|
189
203
|
model?: string;
|
|
190
204
|
thinking?: string;
|
|
205
|
+
/** Present only while a synchronous foreground child is running. */
|
|
206
|
+
activity?: WorkflowChildActivity;
|
|
191
207
|
state: "pending" | "running" | "completed" | "failed" | "paused" | "stopped" | "rejected" | "detached";
|
|
192
208
|
}>;
|
|
193
209
|
}
|
|
@@ -215,9 +231,10 @@ export interface WorkflowReceipt {
|
|
|
215
231
|
state: WorkflowReceiptState;
|
|
216
232
|
createdAt: number;
|
|
217
233
|
entries: Record<string, WorkflowReceiptEntry>;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
234
|
+
argsDigest?: string;
|
|
235
|
+
resource?: WorkflowResourceProvenance;
|
|
236
|
+
hostSteps?: HostStepNode[];
|
|
237
|
+
workflowChildren?: WorkflowChildSummary;
|
|
221
238
|
workflowResolution?: WorkflowTerminalResolution;
|
|
222
239
|
terminalOutcome?: WorkflowTerminalOutcome;
|
|
223
240
|
recovery?: WorkflowRecoveryAction[];
|
|
@@ -625,7 +642,7 @@ export type ProcessTerminalReason =
|
|
|
625
642
|
| "proof-write-failed"
|
|
626
643
|
| "stale-repair";
|
|
627
644
|
|
|
628
|
-
export interface
|
|
645
|
+
export interface RunnerProcessInstanceExit {
|
|
629
646
|
processInstanceId: string;
|
|
630
647
|
kind: "runner";
|
|
631
648
|
closeObservedAt: number;
|
|
@@ -633,39 +650,45 @@ export interface RunnerProcessInstanceExitV1 {
|
|
|
633
650
|
signal: string | null;
|
|
634
651
|
}
|
|
635
652
|
|
|
636
|
-
export type
|
|
653
|
+
export type ProcessTreeTerminal =
|
|
637
654
|
| {
|
|
638
655
|
state: "observed";
|
|
639
656
|
mechanism: "posix-process-group";
|
|
640
657
|
processGroupId: number;
|
|
641
658
|
verifiedAt: number;
|
|
642
659
|
}
|
|
660
|
+
| {
|
|
661
|
+
state: "observed";
|
|
662
|
+
mechanism: "windows-taskkill";
|
|
663
|
+
pid: number;
|
|
664
|
+
verifiedAt: number;
|
|
665
|
+
}
|
|
643
666
|
| {
|
|
644
667
|
state: "unknown";
|
|
645
668
|
reason: "unsupported-platform" | "signal-failed" | "verification-failed";
|
|
646
669
|
diagnostic?: string;
|
|
647
670
|
};
|
|
648
671
|
|
|
649
|
-
export interface
|
|
672
|
+
export interface PiWriterProcessInstanceExit {
|
|
650
673
|
processInstanceId: string;
|
|
651
674
|
kind: "pi-writer";
|
|
652
675
|
attempt: number;
|
|
653
676
|
closeObservedAt: number;
|
|
654
677
|
exitCode: number | null;
|
|
655
678
|
signal: string | null;
|
|
656
|
-
processTree:
|
|
679
|
+
processTree: ProcessTreeTerminal;
|
|
657
680
|
}
|
|
658
681
|
|
|
659
|
-
export type
|
|
682
|
+
export type ProcessInstanceExit = RunnerProcessInstanceExit | PiWriterProcessInstanceExit;
|
|
660
683
|
|
|
661
|
-
export interface
|
|
684
|
+
export interface CanonicalSessionTerminal {
|
|
662
685
|
canonicalSessionId: string;
|
|
663
686
|
leaseDisposition: "released" | "not-held";
|
|
664
687
|
freeAtObservation: true;
|
|
665
688
|
canonicalSessionLeaseReleased?: true;
|
|
666
689
|
}
|
|
667
690
|
|
|
668
|
-
interface
|
|
691
|
+
interface ProcessTerminalBase {
|
|
669
692
|
version: 1;
|
|
670
693
|
runId: string;
|
|
671
694
|
childIndex?: number;
|
|
@@ -675,15 +698,15 @@ interface ProcessTerminalBaseV1 {
|
|
|
675
698
|
resumeDisposition?: "resumable" | "non-resumable" | "unavailable";
|
|
676
699
|
}
|
|
677
700
|
|
|
678
|
-
export type
|
|
679
|
-
| (
|
|
680
|
-
| (
|
|
701
|
+
export type ProcessTerminal =
|
|
702
|
+
| (ProcessTerminalBase & { state: "pending" | "not-started" })
|
|
703
|
+
| (ProcessTerminalBase & {
|
|
681
704
|
state: "observed";
|
|
682
705
|
observedAt: number;
|
|
683
|
-
instances:
|
|
684
|
-
canonicalSession?:
|
|
706
|
+
instances: ProcessInstanceExit[];
|
|
707
|
+
canonicalSession?: CanonicalSessionTerminal;
|
|
685
708
|
})
|
|
686
|
-
| (
|
|
709
|
+
| (ProcessTerminalBase & {
|
|
687
710
|
state: "unknown";
|
|
688
711
|
reason: ProcessTerminalReason;
|
|
689
712
|
diagnostic?: string;
|
|
@@ -693,6 +716,7 @@ export type ProcessTerminalV1 =
|
|
|
693
716
|
export interface ScheduleOrigin {
|
|
694
717
|
id: string;
|
|
695
718
|
name?: string;
|
|
719
|
+
quiet?: boolean;
|
|
696
720
|
}
|
|
697
721
|
|
|
698
722
|
export type SteeringActionState = "delivered" | "scheduled" | "pending" | "partial" | "recovered" | "failed";
|
|
@@ -779,9 +803,12 @@ export interface RunFanoutRejection extends RunFanoutBudgetSnapshot {
|
|
|
779
803
|
}
|
|
780
804
|
|
|
781
805
|
export interface SteeringRecoveryDescriptor {
|
|
806
|
+
/** Captured response identity authority; absence means no declared aliases on revival. */
|
|
807
|
+
modelResponseAliases?: Record<string, string[]>;
|
|
782
808
|
version: 1;
|
|
783
809
|
launchContractDigest?: string;
|
|
784
810
|
extensionBindings?: ExtensionBindings;
|
|
811
|
+
requiredExtensions?: RequiredChildExtensionSnapshot;
|
|
785
812
|
runFanoutBudget: RunFanoutBudgetDescriptor;
|
|
786
813
|
sourceRunId: string;
|
|
787
814
|
agentContract?: AgentContract;
|
|
@@ -796,7 +823,6 @@ export interface SteeringRecoveryDescriptor {
|
|
|
796
823
|
modelProvider?: string;
|
|
797
824
|
modelOverrideFromParent?: boolean;
|
|
798
825
|
modelOrigin?: "explicit" | "inherited" | "configured";
|
|
799
|
-
fallbackModels?: string[];
|
|
800
826
|
fast?: boolean;
|
|
801
827
|
thinking?: string;
|
|
802
828
|
thinkingCeiling?: ThinkingLevel;
|
|
@@ -832,7 +858,7 @@ export interface SteeringRecoveryDescriptor {
|
|
|
832
858
|
maxSubagentDepth: number;
|
|
833
859
|
maxOutput?: MaxOutputConfig;
|
|
834
860
|
capabilityCeiling?: ResolvedSubagentCapabilityCeiling;
|
|
835
|
-
launchResolvedExtensions?:
|
|
861
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
836
862
|
share: boolean;
|
|
837
863
|
sessionDir?: string;
|
|
838
864
|
artifactsDir?: string;
|
|
@@ -900,7 +926,7 @@ export interface SubagentResultIntercomPayload {
|
|
|
900
926
|
// Progress Tracking
|
|
901
927
|
// ============================================================================
|
|
902
928
|
|
|
903
|
-
export interface ChildWatchdogWarningSummary extends Pick<WatchdogWarningDetails, "severity" | "category" | "summary" | "evidence" | "recommendedAction" | "displayedAt"> {
|
|
929
|
+
export interface ChildWatchdogWarningSummary extends Pick<WatchdogWarningDetails, "severity" | "importance" | "category" | "summary" | "evidence" | "recommendedAction" | "displayedAt"> {
|
|
904
930
|
/** True when a later assistant turn in the child followed the warning. */
|
|
905
931
|
addressed: boolean;
|
|
906
932
|
stalemate: boolean;
|
|
@@ -977,14 +1003,6 @@ interface ProgressSummary {
|
|
|
977
1003
|
// Results
|
|
978
1004
|
// ============================================================================
|
|
979
1005
|
|
|
980
|
-
export interface ModelAttempt {
|
|
981
|
-
model: string;
|
|
982
|
-
success: boolean;
|
|
983
|
-
exitCode?: number | null;
|
|
984
|
-
error?: string;
|
|
985
|
-
usage?: Usage;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
1006
|
export type AcceptanceLevel = "auto" | "none" | "attested" | "checked" | "verified";
|
|
989
1007
|
|
|
990
1008
|
export type AcceptanceEvidenceKind =
|
|
@@ -1164,22 +1182,25 @@ export interface AcceptanceLedger {
|
|
|
1164
1182
|
};
|
|
1165
1183
|
}
|
|
1166
1184
|
|
|
1167
|
-
export interface
|
|
1185
|
+
export interface LaunchResolvedChildExtensions {
|
|
1168
1186
|
version: 1;
|
|
1169
1187
|
/** This is parent-resolved launch intent, not child-runtime acknowledgement that extensions loaded. */
|
|
1170
1188
|
source: "launch-resolved";
|
|
1171
1189
|
disableAmbientExtensions: boolean;
|
|
1172
1190
|
runtime: string[];
|
|
1173
1191
|
configured: string[];
|
|
1192
|
+
/** Bounded host-supplied identities; paths are intentionally not exposed. */
|
|
1193
|
+
required: string[];
|
|
1174
1194
|
effective: string[];
|
|
1175
1195
|
omitted: {
|
|
1176
1196
|
runtime: number;
|
|
1177
1197
|
configured: number;
|
|
1198
|
+
required: number;
|
|
1178
1199
|
effective: number;
|
|
1179
1200
|
};
|
|
1180
1201
|
}
|
|
1181
1202
|
|
|
1182
|
-
export interface
|
|
1203
|
+
export interface RuntimeAcknowledgedChildExtensions {
|
|
1183
1204
|
version: 1;
|
|
1184
1205
|
/** Best-effort child-runtime registration acknowledgement, not extension health. */
|
|
1185
1206
|
source: "child-runtime";
|
|
@@ -1247,16 +1268,16 @@ export interface SingleResult {
|
|
|
1247
1268
|
messages?: Message[];
|
|
1248
1269
|
usage: Usage;
|
|
1249
1270
|
model?: string;
|
|
1271
|
+
/** Authoritative before/after Git evidence captured by a pane-native remote machine. */
|
|
1272
|
+
nativeMachine?: { provider: "herdr"; machineId: string; initialGit?: HerdrRemoteGitStatus; finalGit?: HerdrRemoteGitStatus };
|
|
1250
1273
|
/** Effective thinking level used by this foreground child, when known. */
|
|
1251
1274
|
thinking?: string;
|
|
1252
|
-
|
|
1253
|
-
modelAttempts?: ModelAttempt[];
|
|
1275
|
+
requestedModel?: string;
|
|
1254
1276
|
controlEvents?: ControlEvent[];
|
|
1255
1277
|
error?: string;
|
|
1256
1278
|
/**
|
|
1257
1279
|
* True when the dispatch failed because the input exceeded the model's
|
|
1258
|
-
* context window.
|
|
1259
|
-
* same input on another model cannot succeed). Callers should treat this as
|
|
1280
|
+
* context window. Callers should treat this as
|
|
1260
1281
|
* a signal to reduce input size or re-decompose the task.
|
|
1261
1282
|
*/
|
|
1262
1283
|
contextOverflow?: boolean;
|
|
@@ -1291,8 +1312,8 @@ export interface SingleResult {
|
|
|
1291
1312
|
acceptance?: AcceptanceLedger;
|
|
1292
1313
|
agentContract?: AgentContract;
|
|
1293
1314
|
launchContractDigest?: string;
|
|
1294
|
-
launchResolvedExtensions?:
|
|
1295
|
-
runtimeAcknowledgedExtensions?:
|
|
1315
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
1316
|
+
runtimeAcknowledgedExtensions?: RuntimeAcknowledgedChildExtensions;
|
|
1296
1317
|
execution?: ExecutionProjection;
|
|
1297
1318
|
review?: ReviewProjection;
|
|
1298
1319
|
effects?: EffectsProjection;
|
|
@@ -1350,6 +1371,7 @@ export interface WaitCompletionChild {
|
|
|
1350
1371
|
*/
|
|
1351
1372
|
export interface WaitCompletion {
|
|
1352
1373
|
runId: string;
|
|
1374
|
+
workflowReceiptPath?: string;
|
|
1353
1375
|
agent?: string;
|
|
1354
1376
|
mode?: string;
|
|
1355
1377
|
state?: string;
|
|
@@ -1357,7 +1379,7 @@ export interface WaitCompletion {
|
|
|
1357
1379
|
/** Versioned bounded output archive retained with the durable completion replay. */
|
|
1358
1380
|
archivePath?: string;
|
|
1359
1381
|
results?: WaitCompletionChild[];
|
|
1360
|
-
workflowChildren?:
|
|
1382
|
+
workflowChildren?: WorkflowChildSummary;
|
|
1361
1383
|
}
|
|
1362
1384
|
|
|
1363
1385
|
export interface AgentCapabilitiesSnapshot {
|
|
@@ -1373,23 +1395,25 @@ export interface AgentCapabilityRow {
|
|
|
1373
1395
|
executable: boolean;
|
|
1374
1396
|
restrictionSources?: string[];
|
|
1375
1397
|
aliases?: string[];
|
|
1376
|
-
runner: { type: "pi" } | { type: "external-cli"; adapter?: string; command: string; available: boolean; unavailableReason?: string; capabilities: ExternalCliCapabilities } | { type: "external-job"; provider: string; available?: boolean; capabilities: ExternalJobRunnerStatus["capabilities"] };
|
|
1398
|
+
runner: { type: "pi" } | { type: "external-cli"; adapter?: string; command: string; machine?: string; available: boolean; unavailableReason?: string; capabilities: ExternalCliCapabilities } | { type: "external-job"; provider: string; available?: boolean; capabilities: ExternalJobRunnerStatus["capabilities"] };
|
|
1377
1399
|
tools: { ambient: boolean; names: string[]; excludeTools?: string[]; mcpDirectTools: string[]; mutationTools?: string[] };
|
|
1378
|
-
model?: { value?: string;
|
|
1400
|
+
model?: { value?: string; thinking?: string | false };
|
|
1379
1401
|
execution?: { defaultAsync?: boolean; timeoutMs?: number };
|
|
1402
|
+
acceptance?: { policy?: AcceptanceInput; role?: AcceptanceRole };
|
|
1380
1403
|
output?: { path?: string; mode?: OutputMode };
|
|
1381
1404
|
extensions?: { names?: string[]; subagentOnly?: string[]; skills?: string[] };
|
|
1382
1405
|
}
|
|
1383
1406
|
|
|
1384
1407
|
export interface Details {
|
|
1385
1408
|
mode: SubagentResultMode | "management";
|
|
1409
|
+
workflowReceiptPath?: string;
|
|
1386
1410
|
runId?: string;
|
|
1387
1411
|
/** Host tool-call id retained when it differs from the internal run id. */
|
|
1388
1412
|
toolCallId?: string;
|
|
1389
1413
|
/** Run-level context summary. "mixed" when children resolved to different modes. */
|
|
1390
1414
|
context?: "fresh" | "fork" | "mixed";
|
|
1391
1415
|
results: SingleResult[];
|
|
1392
|
-
workflowChildren?:
|
|
1416
|
+
workflowChildren?: WorkflowChildSummary;
|
|
1393
1417
|
/**
|
|
1394
1418
|
* Terminal completion payloads for runs this bg_wait call observed
|
|
1395
1419
|
* finishing. Async completions travel as result files that are consumed and
|
|
@@ -1402,6 +1426,12 @@ export interface Details {
|
|
|
1402
1426
|
timedOut: true;
|
|
1403
1427
|
activeRunIds: string[];
|
|
1404
1428
|
activeProviderItems: Array<{ provider: string; id: string }>;
|
|
1429
|
+
} | {
|
|
1430
|
+
/** Non-terminal internal auto-drain yield; tracked work remains active. */
|
|
1431
|
+
reason: "supervisor_request";
|
|
1432
|
+
timedOut: false;
|
|
1433
|
+
activeRunIds: string[];
|
|
1434
|
+
activeProviderItems: Array<{ provider: string; id: string }>;
|
|
1405
1435
|
};
|
|
1406
1436
|
controlEvents?: ControlEvent[];
|
|
1407
1437
|
steering?: SteerActionResult;
|
|
@@ -1432,7 +1462,7 @@ export interface Details {
|
|
|
1432
1462
|
currentStepIndex?: number; // 0-indexed current step (for running chains)
|
|
1433
1463
|
workflowGraph?: WorkflowGraphSnapshot;
|
|
1434
1464
|
/** Validated, display-only fanout plan supplied with a workflow launch. */
|
|
1435
|
-
preflight?:
|
|
1465
|
+
preflight?: WorkflowPreflight;
|
|
1436
1466
|
preflightWarnings?: string[];
|
|
1437
1467
|
outputs?: ChainOutputMap;
|
|
1438
1468
|
// Aggregated child usage across all agents in the run
|
|
@@ -1448,11 +1478,11 @@ export interface Details {
|
|
|
1448
1478
|
capabilityAudit?: SubagentCapabilityAudit;
|
|
1449
1479
|
parallelHandoff?: ParallelHandoffReference;
|
|
1450
1480
|
lifecycleStatus?: {
|
|
1451
|
-
processTerminal?:
|
|
1481
|
+
processTerminal?: ProcessTerminal;
|
|
1452
1482
|
};
|
|
1453
1483
|
launchContractDigest?: string;
|
|
1454
|
-
launchResolvedExtensions?:
|
|
1455
|
-
runtimeAcknowledgedExtensions?:
|
|
1484
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
1485
|
+
runtimeAcknowledgedExtensions?: RuntimeAcknowledgedChildExtensions;
|
|
1456
1486
|
/** Original launch contract whose persisted session is being revived. */
|
|
1457
1487
|
sourceLaunchContractDigest?: string;
|
|
1458
1488
|
/** Durable mission attached to this run, when mission mode was explicitly used. */
|
|
@@ -1463,7 +1493,9 @@ export interface Details {
|
|
|
1463
1493
|
mission?: MissionRecord;
|
|
1464
1494
|
workflow?: {
|
|
1465
1495
|
value?: unknown;
|
|
1466
|
-
|
|
1496
|
+
args?: Record<string, unknown>;
|
|
1497
|
+
argsDigest?: string;
|
|
1498
|
+
resource?: WorkflowResourceProvenance;
|
|
1467
1499
|
preflightWarnings?: string[];
|
|
1468
1500
|
trace: Array<{
|
|
1469
1501
|
operation: "run" | "status" | "steer" | "host";
|
|
@@ -1578,9 +1610,9 @@ export interface NestedStepSummary {
|
|
|
1578
1610
|
toolBudgetBlocked?: boolean;
|
|
1579
1611
|
sandbox?: string;
|
|
1580
1612
|
permissionProfile?: string;
|
|
1581
|
-
processTerminal?:
|
|
1582
|
-
launchResolvedExtensions?:
|
|
1583
|
-
runtimeAcknowledgedExtensions?:
|
|
1613
|
+
processTerminal?: ProcessTerminal;
|
|
1614
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
1615
|
+
runtimeAcknowledgedExtensions?: RuntimeAcknowledgedChildExtensions;
|
|
1584
1616
|
capabilityCeiling?: ResolvedSubagentCapabilityCeiling;
|
|
1585
1617
|
capabilityAudit?: SubagentCapabilityAudit;
|
|
1586
1618
|
children?: NestedRunSummary[];
|
|
@@ -1598,9 +1630,9 @@ export interface NestedRunSummary extends NestedRunAddress {
|
|
|
1598
1630
|
controlInbox?: string;
|
|
1599
1631
|
capabilityToken?: string;
|
|
1600
1632
|
mode?: SubagentRunMode;
|
|
1601
|
-
processTerminal?:
|
|
1602
|
-
launchResolvedExtensions?:
|
|
1603
|
-
runtimeAcknowledgedExtensions?:
|
|
1633
|
+
processTerminal?: ProcessTerminal;
|
|
1634
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
1635
|
+
runtimeAcknowledgedExtensions?: RuntimeAcknowledgedChildExtensions;
|
|
1604
1636
|
capabilityCeiling?: ResolvedSubagentCapabilityCeiling;
|
|
1605
1637
|
capabilityAudit?: SubagentCapabilityAudit;
|
|
1606
1638
|
state: NestedRunState;
|
|
@@ -1670,12 +1702,12 @@ export interface AsyncStartedEvent {
|
|
|
1670
1702
|
chainStepCount?: number;
|
|
1671
1703
|
parallelGroups?: AsyncParallelGroupStatus[];
|
|
1672
1704
|
workflowGraph?: WorkflowGraphSnapshot;
|
|
1673
|
-
preflight?:
|
|
1705
|
+
preflight?: WorkflowPreflight;
|
|
1674
1706
|
launchContractDigest?: string;
|
|
1675
1707
|
sandbox?: string;
|
|
1676
1708
|
permissionProfile?: string;
|
|
1677
|
-
launchResolvedExtensions?:
|
|
1678
|
-
runtimeAcknowledgedExtensions?:
|
|
1709
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
1710
|
+
runtimeAcknowledgedExtensions?: RuntimeAcknowledgedChildExtensions;
|
|
1679
1711
|
usageBudget?: UsageBudgetState;
|
|
1680
1712
|
timeoutMs?: number;
|
|
1681
1713
|
deadlineAt?: number;
|
|
@@ -1704,6 +1736,26 @@ export type AgentRunnerConfig =
|
|
|
1704
1736
|
|
|
1705
1737
|
export type ExternalCliCapabilityNarrowing = Partial<Record<"steer" | "resume" | "structuredOutput" | "toolEvents" | "supervisor" | "forkContext" | "extensionBindings", false>>;
|
|
1706
1738
|
|
|
1739
|
+
export interface HerdrRemoteGitStatus {
|
|
1740
|
+
head?: string;
|
|
1741
|
+
branch?: string;
|
|
1742
|
+
dirty?: boolean;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
/** A Herdr saved SSH machine resolved for one launch. `cwd` is the directory on that machine. */
|
|
1746
|
+
export interface HerdrMachineReference {
|
|
1747
|
+
provider: "herdr";
|
|
1748
|
+
id: string;
|
|
1749
|
+
label?: string;
|
|
1750
|
+
target: string;
|
|
1751
|
+
session?: string;
|
|
1752
|
+
cwd: string;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
export interface ExternalCliMachineStatus extends HerdrMachineReference {
|
|
1756
|
+
remoteGit?: HerdrRemoteGitStatus;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1707
1759
|
export interface ExternalCliCapabilities {
|
|
1708
1760
|
stop: true;
|
|
1709
1761
|
steer: false;
|
|
@@ -1718,6 +1770,7 @@ export interface ExternalCliCapabilities {
|
|
|
1718
1770
|
export interface ExternalCliReceiptMetadata {
|
|
1719
1771
|
adapter: { id: "external-cli" | "codex-exec" | "codex-exec-writer" | "claude-code" | "claude-code-writer" | "cursor-agent" | "cursor-agent-writer" | "grok-build"; version: 1; executionMode: "one-shot-stdin" | "one-shot-prompt-file" };
|
|
1720
1772
|
capabilities: ExternalCliCapabilities;
|
|
1773
|
+
machine?: ExternalCliMachineStatus;
|
|
1721
1774
|
safety?:
|
|
1722
1775
|
| { sandbox: "read-only"; approvalPolicy: "never"; ephemeral: true }
|
|
1723
1776
|
| { access: "workspace-write"; sandbox: "workspace-write"; approvalPolicy: "never"; ephemeral: true }
|
|
@@ -1742,6 +1795,7 @@ export interface ExternalCliRunnerStatus {
|
|
|
1742
1795
|
capabilities: ExternalCliCapabilities;
|
|
1743
1796
|
unsupportedReasons: Record<Exclude<keyof ExternalCliCapabilities, "stop">, string>;
|
|
1744
1797
|
nonResumableReason: string;
|
|
1798
|
+
machine?: HerdrMachineReference;
|
|
1745
1799
|
}
|
|
1746
1800
|
|
|
1747
1801
|
export interface ExternalJobRunnerStatus {
|
|
@@ -1793,9 +1847,12 @@ export interface ExternalProcessStatus {
|
|
|
1793
1847
|
stderrBytes?: number;
|
|
1794
1848
|
stdoutTruncated?: boolean;
|
|
1795
1849
|
stderrTruncated?: boolean;
|
|
1850
|
+
machine?: ExternalCliMachineStatus;
|
|
1796
1851
|
}
|
|
1797
1852
|
|
|
1798
1853
|
export interface AsyncStatus {
|
|
1854
|
+
/** Exact reference returned by successful current workflow receipt publication. */
|
|
1855
|
+
workflowReceiptPath?: string;
|
|
1799
1856
|
lifecycleArtifactVersion?: SubagentLifecycleArtifactVersion;
|
|
1800
1857
|
runId: string;
|
|
1801
1858
|
/** Parent Pi process/window that owns local completion delivery. */
|
|
@@ -1840,19 +1897,19 @@ export interface AsyncStatus {
|
|
|
1840
1897
|
pendingAppends?: number;
|
|
1841
1898
|
parallelGroups?: AsyncParallelGroupStatus[];
|
|
1842
1899
|
workflowGraph?: WorkflowGraphSnapshot;
|
|
1843
|
-
preflight?:
|
|
1844
|
-
processTerminal?:
|
|
1900
|
+
preflight?: WorkflowPreflight;
|
|
1901
|
+
processTerminal?: ProcessTerminal;
|
|
1845
1902
|
runFanoutBudget?: RunFanoutBudgetSnapshot;
|
|
1846
1903
|
runFanoutBudgetDescriptor?: RunFanoutBudgetDescriptor;
|
|
1847
1904
|
launchContractDigest?: string;
|
|
1848
1905
|
sandbox?: string;
|
|
1849
1906
|
permissionProfile?: string;
|
|
1850
|
-
launchResolvedExtensions?:
|
|
1851
|
-
runtimeAcknowledgedExtensions?:
|
|
1907
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
1908
|
+
runtimeAcknowledgedExtensions?: RuntimeAcknowledgedChildExtensions;
|
|
1852
1909
|
capabilityCeiling?: ResolvedSubagentCapabilityCeiling;
|
|
1853
1910
|
capabilityAudit?: SubagentCapabilityAudit;
|
|
1854
1911
|
workflow?: Details["workflow"];
|
|
1855
|
-
workflowChildren?:
|
|
1912
|
+
workflowChildren?: WorkflowChildSummary;
|
|
1856
1913
|
parentWorkflowRunId?: string;
|
|
1857
1914
|
workflowKey?: string;
|
|
1858
1915
|
lane?: WorkflowLaneMetadata;
|
|
@@ -1925,8 +1982,7 @@ export interface AsyncStatus {
|
|
|
1925
1982
|
thinking?: string;
|
|
1926
1983
|
contextLimit?: number;
|
|
1927
1984
|
thinkingCeiling?: ThinkingLevel;
|
|
1928
|
-
|
|
1929
|
-
modelAttempts?: ModelAttempt[];
|
|
1985
|
+
requestedModel?: string;
|
|
1930
1986
|
/** True when the child input exceeded the model context window. */
|
|
1931
1987
|
contextOverflow?: boolean;
|
|
1932
1988
|
totalCost?: CostSummary;
|
|
@@ -1940,13 +1996,13 @@ export interface AsyncStatus {
|
|
|
1940
1996
|
launchContractDigest?: string;
|
|
1941
1997
|
sandbox?: string;
|
|
1942
1998
|
permissionProfile?: string;
|
|
1943
|
-
launchResolvedExtensions?:
|
|
1944
|
-
runtimeAcknowledgedExtensions?:
|
|
1999
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
2000
|
+
runtimeAcknowledgedExtensions?: RuntimeAcknowledgedChildExtensions;
|
|
1945
2001
|
execution?: ExecutionProjection;
|
|
1946
2002
|
review?: ReviewProjection;
|
|
1947
2003
|
effects?: EffectsProjection;
|
|
1948
2004
|
watchdog?: ChildWatchdogProgress;
|
|
1949
|
-
processTerminal?:
|
|
2005
|
+
processTerminal?: ProcessTerminal;
|
|
1950
2006
|
capabilityCeiling?: ResolvedSubagentCapabilityCeiling;
|
|
1951
2007
|
capabilityAudit?: SubagentCapabilityAudit;
|
|
1952
2008
|
}>;
|
|
@@ -1996,11 +2052,11 @@ export interface AsyncJobState {
|
|
|
1996
2052
|
chainStepCount?: number;
|
|
1997
2053
|
parallelGroups?: AsyncParallelGroupStatus[];
|
|
1998
2054
|
/** Bounded host-owned CI/gate nodes loaded from the workflow status graph. */
|
|
1999
|
-
hostSteps?:
|
|
2055
|
+
hostSteps?: HostStepNode[];
|
|
2000
2056
|
/** Full bounded workflow plan, including not-yet-materialized stages. */
|
|
2001
2057
|
workflowGraph?: WorkflowGraphSnapshot;
|
|
2002
2058
|
steps?: AsyncJobStep[];
|
|
2003
|
-
preflight?:
|
|
2059
|
+
preflight?: WorkflowPreflight;
|
|
2004
2060
|
stepsTotal?: number;
|
|
2005
2061
|
runningSteps?: number;
|
|
2006
2062
|
completedSteps?: number;
|
|
@@ -2029,7 +2085,7 @@ export interface AsyncJobState {
|
|
|
2029
2085
|
parentWorkflowRunId?: string;
|
|
2030
2086
|
workflowKey?: string;
|
|
2031
2087
|
workflow?: Details["workflow"];
|
|
2032
|
-
workflowChildren?:
|
|
2088
|
+
workflowChildren?: WorkflowChildSummary;
|
|
2033
2089
|
lane?: WorkflowLaneMetadata;
|
|
2034
2090
|
}
|
|
2035
2091
|
|
|
@@ -2068,7 +2124,8 @@ export interface ForegroundResumeChild {
|
|
|
2068
2124
|
agentContract?: AgentContract;
|
|
2069
2125
|
/** Private bounded launch fields needed to preserve the child contract on resume. */
|
|
2070
2126
|
resumeContract?: {
|
|
2071
|
-
|
|
2127
|
+
modelResponseAliases?: Record<string, string[]>;
|
|
2128
|
+
outputSchema?: JsonSchemaObject | false;
|
|
2072
2129
|
agentContract?: AgentContract;
|
|
2073
2130
|
acceptance?: AcceptanceInput;
|
|
2074
2131
|
output?: string | boolean;
|
|
@@ -2079,8 +2136,9 @@ export interface ForegroundResumeChild {
|
|
|
2079
2136
|
permissionProfile?: string;
|
|
2080
2137
|
/** Private retained launch authority. Never project into status or result output. */
|
|
2081
2138
|
extensionBindings?: ExtensionBindings;
|
|
2082
|
-
|
|
2083
|
-
|
|
2139
|
+
requiredExtensions?: RequiredChildExtensionSnapshot;
|
|
2140
|
+
launchResolvedExtensions?: LaunchResolvedChildExtensions;
|
|
2141
|
+
runtimeAcknowledgedExtensions?: RuntimeAcknowledgedChildExtensions;
|
|
2084
2142
|
execution?: ExecutionProjection;
|
|
2085
2143
|
review?: ReviewProjection;
|
|
2086
2144
|
effects?: EffectsProjection;
|
|
@@ -2207,6 +2265,8 @@ export interface ActiveAsyncCapacitySnapshot {
|
|
|
2207
2265
|
export interface SubagentState {
|
|
2208
2266
|
baseCwd: string;
|
|
2209
2267
|
currentSessionId: string | null;
|
|
2268
|
+
/** Exact SDK runtime session ID for supervisor ownership; never a session file path. */
|
|
2269
|
+
supervisorOwnerSessionId?: string | null;
|
|
2210
2270
|
/** Session for which active status projections were restored successfully. */
|
|
2211
2271
|
statusProjectionSessionId?: string | null;
|
|
2212
2272
|
/** Reload-stable identity for this parent Pi process/window. */
|
|
@@ -2224,6 +2284,8 @@ export interface SubagentState {
|
|
|
2224
2284
|
trustedSessionFileRoot?: string;
|
|
2225
2285
|
/** Live async session roots created by this parent executor, keyed by run id. */
|
|
2226
2286
|
liveAsyncSessionRoots?: Map<string, string>;
|
|
2287
|
+
/** Foreground nested routes retained after their direct parent settles, keyed by root run id. */
|
|
2288
|
+
retainedForegroundNestedRoutes?: Map<string, NestedRouteInfo>;
|
|
2227
2289
|
/** Last valid parent session model observed for this session; used when continuation contexts omit ctx.model. */
|
|
2228
2290
|
lastParentModel?: { provider: string; id: string };
|
|
2229
2291
|
subagentInProgress?: boolean;
|
|
@@ -2252,8 +2314,8 @@ export interface SubagentState {
|
|
|
2252
2314
|
lastUiContext: ExtensionContext | null;
|
|
2253
2315
|
poller: NodeJS.Timeout | null;
|
|
2254
2316
|
completionSeen: Map<string, number>;
|
|
2255
|
-
/**
|
|
2256
|
-
completedResults?: Map<string, { seenAt: number; completion: WaitCompletion }>;
|
|
2317
|
+
/** Session-owned terminal result payloads observed by the result watcher, keyed by run id and pruned by the completion TTL. */
|
|
2318
|
+
completedResults?: Map<string, { sessionId: string; seenAt: number; completion: WaitCompletion }>;
|
|
2257
2319
|
watcher: FSWatcher | null;
|
|
2258
2320
|
watcherRestartTimer: ReturnType<typeof setTimeout> | null;
|
|
2259
2321
|
resultFileCoalescer: {
|
|
@@ -2360,6 +2422,8 @@ export interface RunSyncOptions {
|
|
|
2360
2422
|
unknownAgentDiagnosticContext?: import("../agents/agents.ts").UnknownAgentDiagnosticContext;
|
|
2361
2423
|
/** Session factory for the in-process child; defaults to the process-wide factory. */
|
|
2362
2424
|
childSessionFactory?: import("../runs/shared/child-session.ts").ChildSessionFactory;
|
|
2425
|
+
/** Invoking parent registry inherited only by its local foreground launch. */
|
|
2426
|
+
parentProviderRegistry?: import("../runs/shared/child-session.ts").ParentProviderRegistry;
|
|
2363
2427
|
/** The launching executor's own child runtime when it is itself an in-process child. */
|
|
2364
2428
|
childRuntime?: import("../runs/shared/child-runtime-config.ts").ChildRuntimeConfig;
|
|
2365
2429
|
/** Fires once the child session exists and can be steered. */
|
|
@@ -2371,6 +2435,10 @@ export interface RunSyncOptions {
|
|
|
2371
2435
|
/** Resolved launch context for this child. */
|
|
2372
2436
|
context?: "fresh" | "fork";
|
|
2373
2437
|
cwd?: string;
|
|
2438
|
+
/** Resolved pane-native saved-machine placement. */
|
|
2439
|
+
machine?: HerdrMachineReference;
|
|
2440
|
+
/** Explicit read override resolved by the remote ambient agent profile. */
|
|
2441
|
+
remoteReads?: string[] | false;
|
|
2374
2442
|
/** Original cwd input retained for launch diagnostics. */
|
|
2375
2443
|
requestedCwd?: string;
|
|
2376
2444
|
signal?: AbortSignal;
|
|
@@ -2399,7 +2467,7 @@ export interface RunSyncOptions {
|
|
|
2399
2467
|
/** Internal foreground receipt proposal; returns true only when the outer waiter accepted it. */
|
|
2400
2468
|
onDetachReceipt?: (result: SingleResult) => boolean;
|
|
2401
2469
|
/** Authoritative terminal result, emitted only after the full detached run finalizes. */
|
|
2402
|
-
onDetachedExit?: (result: SingleResult) => void
|
|
2470
|
+
onDetachedExit?: (result: SingleResult) => void | Promise<void>;
|
|
2403
2471
|
controlConfig?: ResolvedControlConfig;
|
|
2404
2472
|
intercomSessionName?: string;
|
|
2405
2473
|
orchestratorIntercomTarget?: string;
|
|
@@ -2439,16 +2507,20 @@ export interface RunSyncOptions {
|
|
|
2439
2507
|
/** Override the agent's default thinking level for this run */
|
|
2440
2508
|
thinkingOverride?: AgentConfig["thinking"];
|
|
2441
2509
|
thinkingCeiling?: ThinkingLevel;
|
|
2510
|
+
requiredExtensions?: RequiredChildExtensionSnapshot;
|
|
2442
2511
|
extensionBindings?: ExtensionBindings;
|
|
2443
2512
|
/** Package-internal one-use authorization for one foreground workflow child. */
|
|
2444
2513
|
workflowChildPermitLaunch?: WorkflowChildPermitContext;
|
|
2445
2514
|
/** Registry models available for heuristic bare-model resolution */
|
|
2446
2515
|
availableModels?: Array<{ provider: string; id: string; fullId: string; contextWindow?: number }>;
|
|
2516
|
+
modelResponseAliases?: Record<string, string[]>;
|
|
2447
2517
|
/** Current parent-session provider to prefer for ambiguous bare model ids */
|
|
2448
2518
|
preferredModelProvider?: string;
|
|
2449
2519
|
/** Parent Pi event host used to snapshot runtime-registered MCP servers before child launch. */
|
|
2450
2520
|
runtimeSnapshotHost?: import("../runs/shared/mcp-direct-tool-allowlist.ts").McpRuntimeSnapshotHost;
|
|
2451
|
-
/**
|
|
2521
|
+
/** Builtin tool names the host runtime provides; used to intersect agent-declared tools. */
|
|
2522
|
+
hostAvailableBuiltins?: readonly string[];
|
|
2523
|
+
/** Optional subagent model-scope enforcement. */
|
|
2452
2524
|
modelScope?: ModelScopeRule | ModelScopeRule[];
|
|
2453
2525
|
/** Skills to make available (overrides agent default if provided) */
|
|
2454
2526
|
skills?: string[];
|
|
@@ -2510,11 +2582,6 @@ export interface ScheduledRunsConfig {
|
|
|
2510
2582
|
storeRoot?: string;
|
|
2511
2583
|
}
|
|
2512
2584
|
|
|
2513
|
-
export interface ModelExclusionsConfig {
|
|
2514
|
-
/** Default duration in milliseconds. A lower configured value also shortens active cached exclusions. */
|
|
2515
|
-
defaultTtlMs?: number;
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
2585
|
export type FleetViewPlacement = "aboveEditor" | "belowEditor";
|
|
2519
2586
|
|
|
2520
2587
|
export const FLEET_KEYBINDING_ACTIONS = [
|
|
@@ -2579,8 +2646,8 @@ export interface ExtensionConfig {
|
|
|
2579
2646
|
fleetKeybindings?: FleetKeybindingsConfig;
|
|
2580
2647
|
/** Show the under-editor async runs widget. Defaults to true, including when FleetView is enabled. */
|
|
2581
2648
|
asyncWidget?: boolean;
|
|
2582
|
-
/**
|
|
2583
|
-
|
|
2649
|
+
/** Exact provider/model candidates mapped to operator-declared equivalent response IDs. Empty arrays add no accepted IDs. */
|
|
2650
|
+
modelResponseAliases?: Record<string, string[]>;
|
|
2584
2651
|
/** Tool description variant registered for the parent-facing subagent tool. Defaults to split metadata. */
|
|
2585
2652
|
toolDescriptionMode?: ToolDescriptionMode;
|
|
2586
2653
|
/** Inline chat rendering for the subagent tool. Defaults to rich. */
|
|
@@ -2623,6 +2690,12 @@ export interface ExtensionConfig {
|
|
|
2623
2690
|
* are rejected with an error.
|
|
2624
2691
|
*/
|
|
2625
2692
|
toolTimeoutMs?: number;
|
|
2693
|
+
/**
|
|
2694
|
+
* Global default for the async single-agent `checkpointBeforeDeadlineMs` launch option: the runner requests that
|
|
2695
|
+
* the child checkpoint and stop this many milliseconds before its run deadline (best-effort). The call param wins; values that
|
|
2696
|
+
* leave no run time before the checkpoint disarm it.
|
|
2697
|
+
*/
|
|
2698
|
+
checkpointBeforeDeadlineMs?: number;
|
|
2626
2699
|
control?: ControlConfig;
|
|
2627
2700
|
completionBatch?: CompletionBatchConfig;
|
|
2628
2701
|
toolBudget?: ToolBudgetConfig;
|
|
@@ -2762,7 +2835,7 @@ export const POLL_INTERVAL_MS = 250;
|
|
|
2762
2835
|
export const WIDGET_ANIMATION_INTERVAL_MS = 1000;
|
|
2763
2836
|
export const MAX_WIDGET_JOBS = 4;
|
|
2764
2837
|
export const DEFAULT_SUBAGENT_MAX_DEPTH = 2;
|
|
2765
|
-
export const SUBAGENT_ACTIONS = ["list", "get", "models", "children.list", "guide", "validate", "create", "update", "delete", "eject", "disable", "enable", "reset", "mission.create", "mission.list", "mission.show", "mission.update", "mission.resolve-decision", "mission.attach-run", "mission.close", "worktree.discard", "worktree.cleanup", "lane.status", "lane.recordMerge", "lane.recordSupersession", "refine", "refine.show", "refine.rollback", "inspector.open", "inspector.status", "inspector.close", "project.open", "project.status", "project.close", "status", "debug.run", "grant-spawn-budget", "interrupt", "resume", "steer", "stop", "dismiss", "doctor", "watchdog.status", "watchdog.check", "watchdog.configure", "watchdog.recommend-model", "schedule.create", "schedule.list", "schedule.show", "schedule.history", "schedule.pause", "schedule.resume", "schedule.run", "schedule.run-due", "schedule.delete"] as const;
|
|
2838
|
+
export const SUBAGENT_ACTIONS = ["list", "get", "models", "children.list", "guide", "validate", "create", "update", "delete", "eject", "disable", "enable", "reset", "mission.create", "mission.list", "mission.show", "mission.update", "mission.resolve-decision", "mission.attach-run", "mission.close", "worktree.discard", "worktree.cleanup", "lane.status", "lane.recordMerge", "lane.recordSupersession", "refine", "refine.show", "refine.rollback", "inspector.open", "inspector.command", "inspector.status", "inspector.close", "project.open", "project.status", "project.close", "status", "debug.run", "grant-spawn-budget", "interrupt", "resume", "steer", "stop", "dismiss", "doctor", "watchdog.status", "watchdog.check", "watchdog.configure", "watchdog.recommend-model", "schedule.create", "schedule.list", "schedule.show", "schedule.history", "schedule.pause", "schedule.resume", "schedule.run", "schedule.run-due", "schedule.delete"] as const;
|
|
2766
2839
|
|
|
2767
2840
|
export const DEFAULT_FORK_PREAMBLE =
|
|
2768
2841
|
"You are a delegated subagent running from a fork of the parent session. " +
|