pi-subagents 0.81.0 → 0.82.1
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 +55 -0
- package/README.md +1 -1
- package/bundle/agents.js +3 -3
- package/bundle/child-tool-plan.js +2 -2
- package/bundle/{chunk-L5ZHE4L4.js → chunk-3JCDWF4V.js} +4 -4
- package/bundle/{chunk-LSRUTHT7.js → chunk-43SCHIMD.js} +1 -1
- package/bundle/{chunk-VJHOELQP.js → chunk-46XKCPJR.js} +193 -81
- package/bundle/{chunk-G5DKFLLI.js → chunk-4SDU2BZX.js} +15 -10
- package/bundle/{chunk-2ZSNH26H.js → chunk-4Y2ROR7L.js} +7 -7
- package/bundle/{chunk-V2JWDB5U.js → chunk-52UBALJL.js} +2 -2
- package/bundle/{chunk-3DC5KBVP.js → chunk-5TYMSZX3.js} +1 -1
- package/bundle/{chunk-NNLASTQE.js → chunk-6XJB7PIX.js} +20 -6
- package/bundle/{chunk-ZBC44JJ3.js → chunk-CIZQXJ5Q.js} +22 -9
- package/bundle/{chunk-KSWQVGDW.js → chunk-FXUXCX2K.js} +225 -18
- package/bundle/{chunk-563BHAZ5.js → chunk-G4GZD3OJ.js} +35 -26
- package/bundle/{chunk-ARRKBB2B.js → chunk-GJECHSAR.js} +2 -2
- package/bundle/{chunk-V3BIUPLU.js → chunk-IVAE5Z6Q.js} +256 -52
- package/bundle/{chunk-V6MR5TOQ.js → chunk-JYUKW2SY.js} +25 -19
- package/bundle/{chunk-BJN5LUQY.js → chunk-OYF6AFDY.js} +1 -1
- package/bundle/{chunk-CEKS3TFO.js → chunk-PBK2I7WY.js} +6 -6
- package/bundle/{chunk-TUWLXTAM.js → chunk-PDZWJCHD.js} +681 -320
- package/bundle/{chunk-EYNJ6VL6.js → chunk-PLCCBLPY.js} +2 -2
- package/bundle/{chunk-XMFLCKMQ.js → chunk-QE4AGIMG.js} +339 -132
- package/bundle/{chunk-74RT5YQE.js → chunk-RMQFMMAT.js} +123 -33
- package/bundle/{chunk-WSBNENFS.js → chunk-UCPP4GNU.js} +14 -4
- package/bundle/{chunk-2XYWN7QJ.js → chunk-UTT254JE.js} +2 -2
- package/bundle/{chunk-BPS2AGBZ.js → chunk-VSUSLDNW.js} +93 -52
- package/bundle/{chunk-ZP3HODFH.js → chunk-XSWOTIA3.js} +1 -1
- package/bundle/{chunk-3IF2PGW7.js → chunk-YKEWIB4M.js} +1 -1
- package/bundle/{chunk-26C3WLYQ.js → chunk-ZIV4J4HG.js} +498 -274
- package/bundle/control-channel.js +2 -2
- package/bundle/index.js +1 -1
- package/bundle/intercom-bridge.js +2 -2
- package/bundle/preflight.js +8 -8
- package/bundle/project-panes.js +3 -3
- package/docs/agents.md +37 -7
- package/docs/configuration.md +9 -1
- package/docs/tool-reference.md +3 -1
- package/docs/workflows.md +16 -0
- package/package.json +2 -2
- package/skills/council-mode/SKILL.md +1 -4
- package/skills/pi-subagents/SKILL.md +130 -107
- package/skills/pi-subagents/references/orchestration.md +124 -0
- package/skills/pi-subagents/references/prompting-and-roles.md +96 -295
- package/src/agents/agent-management.js +3 -3
- package/src/agents/agent-memory.js +3 -1
- package/src/agents/agents.js +6 -6
- package/src/agents/frontmatter.d.ts +2 -0
- package/src/agents/frontmatter.js +15 -1
- package/src/agents/skills.js +2 -1
- package/src/extension/config.js +3 -0
- package/src/extension/herdr-pi-bridge.js +17 -10
- package/src/extension/index.js +82 -2
- package/src/extension/reply-workflow-script.js +5 -2
- package/src/extension/schemas.js +3 -3
- package/src/extension/subagent-guide.js +1 -2
- package/src/intercom/native-supervisor-channel.js +20 -0
- package/src/missions/lifecycle.js +7 -1
- package/src/runs/background/active-async-capacity.d.ts +1 -0
- package/src/runs/background/active-async-capacity.js +9 -3
- package/src/runs/background/async-execution.js +20 -10
- package/src/runs/background/async-job-tracker.d.ts +6 -1
- package/src/runs/background/async-job-tracker.js +9 -4
- package/src/runs/background/async-status.d.ts +4 -0
- package/src/runs/background/async-status.js +22 -3
- package/src/runs/background/await-async-run.js +3 -7
- package/src/runs/background/boot-id.d.ts +12 -0
- package/src/runs/background/boot-id.js +47 -0
- package/src/runs/background/interrupted-elsewhere.d.ts +22 -0
- package/src/runs/background/interrupted-elsewhere.js +68 -0
- package/src/runs/background/notify.d.ts +2 -0
- package/src/runs/background/notify.js +13 -0
- package/src/runs/background/result-delivery-ownership.d.ts +6 -0
- package/src/runs/background/result-delivery-ownership.js +19 -1
- package/src/runs/background/result-watcher.d.ts +3 -1
- package/src/runs/background/result-watcher.js +24 -8
- package/src/runs/background/run-child-session.d.ts +1 -6
- package/src/runs/background/run-child-session.js +1 -1
- package/src/runs/background/run-status.js +2 -1
- package/src/runs/background/stale-run-reconciler.d.ts +25 -0
- package/src/runs/background/stale-run-reconciler.js +52 -13
- package/src/runs/background/subagent-runner-bootstrap.js +3 -0
- package/src/runs/background/subagent-runner.d.ts +4 -0
- package/src/runs/background/subagent-runner.js +13 -5
- package/src/runs/background/subagent-wait.d.ts +1 -1
- package/src/runs/background/subagent-wait.js +6 -1
- package/src/runs/background/terminal-run-index.d.ts +2 -0
- package/src/runs/background/terminal-run-index.js +44 -3
- package/src/runs/foreground/async-stop-action.js +3 -1
- package/src/runs/foreground/execution.js +6 -3
- package/src/runs/foreground/foreground-history.d.ts +16 -2
- package/src/runs/foreground/foreground-history.js +133 -31
- package/src/runs/foreground/subagent-executor.d.ts +11 -0
- package/src/runs/foreground/subagent-executor.js +277 -74
- package/src/runs/shared/child-launch.d.ts +2 -2
- package/src/runs/shared/child-session.d.ts +3 -2
- package/src/runs/shared/child-session.js +51 -8
- package/src/runs/shared/child-tool-plan.d.ts +7 -0
- package/src/runs/shared/child-tool-plan.js +21 -6
- package/src/runs/shared/herdr-connection.d.ts +17 -8
- package/src/runs/shared/herdr-connection.js +19 -7
- package/src/runs/shared/herdr-external-adapters.d.ts +3 -2
- package/src/runs/shared/herdr-external-adapters.js +1 -1
- package/src/runs/shared/herdr-machine.d.ts +12 -2
- package/src/runs/shared/herdr-machine.js +55 -9
- package/src/runs/shared/herdr-pane-host.d.ts +88 -0
- package/src/runs/shared/herdr-pane-host.js +155 -0
- package/src/runs/shared/herdr-placed-run.d.ts +27 -150
- package/src/runs/shared/herdr-placed-run.js +48 -395
- package/src/runs/shared/local-machine-access.d.ts +5 -0
- package/src/runs/shared/local-machine-access.js +28 -0
- package/src/runs/shared/orca-progress-tabs.d.ts +0 -1
- package/src/runs/shared/orca-progress-tabs.js +1 -24
- package/src/runs/shared/parallel-utils.d.ts +1 -1
- package/src/runs/shared/placed-run-owner.d.ts +49 -0
- package/src/runs/shared/placed-run-owner.js +93 -0
- package/src/runs/shared/placement-host.d.ts +99 -0
- package/src/runs/shared/placement-host.js +157 -0
- package/src/runs/shared/rex-machine.d.ts +25 -0
- package/src/runs/shared/rex-machine.js +83 -0
- package/src/runs/shared/rex-pane-host.d.ts +62 -0
- package/src/runs/shared/rex-pane-host.js +327 -0
- package/src/shared/completion-owner.d.ts +5 -0
- package/src/shared/completion-owner.js +5 -0
- package/src/shared/session-identity.d.ts +2 -0
- package/src/shared/session-identity.js +26 -0
- package/src/shared/types.d.ts +45 -6
- package/src/tui/fleet.d.ts +1 -0
- package/src/tui/fleet.js +25 -15
- package/src/tui/render.d.ts +6 -0
- package/src/tui/render.js +3 -3
- package/src/tui/subagent-messages.js +1 -0
- package/src/workflows/scripted-workflow.d.ts +1 -1
- package/src/workflows/workflow-auto-resume.d.ts +32 -0
- package/src/workflows/workflow-auto-resume.js +102 -0
- package/src/workflows/workflow-launch-record.d.ts +27 -0
- package/src/workflows/workflow-launch-record.js +48 -0
- package/src/workflows/workflow-resume-claim.d.ts +82 -0
- package/src/workflows/workflow-resume-claim.js +210 -0
- package/src/workflows/workflow-resume.d.ts +56 -0
- package/src/workflows/workflow-resume.js +106 -0
- package/src/workflows/workflow-reuse.d.ts +15 -9
- package/src/workflows/workflow-reuse.js +77 -14
- package/src/workflows/workflow-revival.d.ts +2 -0
- package/src/workflows/workflow-revival.js +2 -1
- package/src/workflows/workflow-stop-cause.d.ts +6 -0
- package/src/workflows/workflow-stop-cause.js +8 -0
- package/skills/pi-subagents/references/constraints-and-recipes.md +0 -74
- package/skills/pi-subagents/references/execution-controls.md +0 -563
- package/skills/pi-subagents/references/management-authoring-rpc.md +0 -165
- package/skills/pi-subagents/references/multi-lane-orchestration.md +0 -61
- package/skills/pi-subagents/references/review-and-validation.md +0 -73
|
@@ -6,33 +6,35 @@ import {
|
|
|
6
6
|
resolveWorkflowForegroundSteeringTarget,
|
|
7
7
|
steerAsyncRun,
|
|
8
8
|
steerWorkflowForegroundTarget
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PBK2I7WY.js";
|
|
10
10
|
import {
|
|
11
11
|
FLEET_STATUS_WIDGET_KEY,
|
|
12
12
|
reportFleetWarning,
|
|
13
|
-
runningTone
|
|
14
|
-
|
|
13
|
+
runningTone,
|
|
14
|
+
stepTaskSummary
|
|
15
|
+
} from "./chunk-4Y2ROR7L.js";
|
|
15
16
|
import {
|
|
17
|
+
foregroundChildStateLabel,
|
|
16
18
|
formatAsyncRunTranscript,
|
|
17
19
|
stopAsyncRun
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FXUXCX2K.js";
|
|
19
21
|
import {
|
|
20
22
|
contextModeBadge,
|
|
21
23
|
contextModeLabel,
|
|
22
24
|
decodeUtf8Tail,
|
|
23
25
|
listAsyncRuns
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-6XJB7PIX.js";
|
|
27
|
+
import "./chunk-46XKCPJR.js";
|
|
28
|
+
import "./chunk-OYF6AFDY.js";
|
|
27
29
|
import "./chunk-NIXWDZZV.js";
|
|
28
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-XSWOTIA3.js";
|
|
29
31
|
import "./chunk-7F6RKT6W.js";
|
|
30
32
|
import "./chunk-CTPAE36Y.js";
|
|
31
33
|
import "./chunk-7J4ZXMY7.js";
|
|
32
34
|
import {
|
|
33
35
|
getArtifactPaths,
|
|
34
36
|
getArtifactsDir
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-5TYMSZX3.js";
|
|
36
38
|
import {
|
|
37
39
|
snapshotExternalRuns
|
|
38
40
|
} from "./chunk-UKG4V45O.js";
|
|
@@ -44,7 +46,7 @@ import {
|
|
|
44
46
|
formatTokens,
|
|
45
47
|
readStatus,
|
|
46
48
|
shortenPath
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-CIZQXJ5Q.js";
|
|
48
50
|
import {
|
|
49
51
|
DIRS
|
|
50
52
|
} from "./chunk-5LFLVSTM.js";
|
|
@@ -203,18 +205,22 @@ function asyncItems(run, description) {
|
|
|
203
205
|
if (run.steps.length === 0 || run.mode === "workflow") {
|
|
204
206
|
return [{ key: `async:${run.id}`, kind: "async", runId: run.id, agent: run.mode, state: run.state, updatedAt, run, ...description ? { description } : {} }];
|
|
205
207
|
}
|
|
206
|
-
return run.steps.map((step) =>
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
208
|
+
return run.steps.map((step) => {
|
|
209
|
+
const task = stepTaskSummary(step, step.agent);
|
|
210
|
+
return {
|
|
211
|
+
key: `async:${run.id}:${step.index}`,
|
|
212
|
+
kind: "async",
|
|
213
|
+
runId: run.id,
|
|
214
|
+
index: step.index,
|
|
215
|
+
agent: step.label ? `${step.label} (${step.agent})` : step.agent,
|
|
216
|
+
state: step.status,
|
|
217
|
+
updatedAt: step.lastActivityAt ?? updatedAt,
|
|
218
|
+
run,
|
|
219
|
+
step,
|
|
220
|
+
...task ? { task } : {},
|
|
221
|
+
...description ? { description } : {}
|
|
222
|
+
};
|
|
223
|
+
});
|
|
218
224
|
}
|
|
219
225
|
function orderFleetAsyncRuns(runs, terminalLimit, trackedJobs) {
|
|
220
226
|
const updatedAt = (run) => run.lastUpdate ?? run.endedAt ?? run.startedAt;
|
|
@@ -296,7 +302,8 @@ function collectFleetSnapshot(state, options = {}) {
|
|
|
296
302
|
...state.currentSessionId ? { sessionId: state.currentSessionId } : {},
|
|
297
303
|
entryLimit: MAX_FLEET_HISTORY_CANDIDATES,
|
|
298
304
|
resultsDir: options.resultsDir ?? DIRS.results,
|
|
299
|
-
reconcile: false
|
|
305
|
+
reconcile: false,
|
|
306
|
+
onCorruptStatus: (warning) => reportFleetWarning(state, warning)
|
|
300
307
|
}).filter((run) => !trackedIds.has(run.id));
|
|
301
308
|
runs = [...trackedRuns, ...history];
|
|
302
309
|
} else {
|
|
@@ -503,7 +510,7 @@ function foregroundRecentDetail(item, state) {
|
|
|
503
510
|
const lines = [
|
|
504
511
|
`Run: ${item.runId}`,
|
|
505
512
|
"Source: foreground",
|
|
506
|
-
`State: ${child
|
|
513
|
+
`State: ${foregroundChildStateLabel(run, child)}`,
|
|
507
514
|
`Mode: ${run.mode}`,
|
|
508
515
|
`Child: ${child.index} (${child.agent})${contextModeLabel(child.context) ? ` ${contextModeLabel(child.context)}` : ""}`,
|
|
509
516
|
modelThinking ? `Model: ${modelThinking}` : void 0,
|
|
@@ -1179,8 +1186,10 @@ var SubagentFleetComponent = class {
|
|
|
1179
1186
|
const item = this.snapshot.items[index];
|
|
1180
1187
|
const marker = index === this.selected ? this.theme.fg("accent", "\u203A") : " ";
|
|
1181
1188
|
const context = item.kind === "async" ? contextModeBadge(this.theme, item.step?.context ?? item.run.context) : item.kind === "foreground-recent" ? contextModeBadge(this.theme, item.child.context) : "";
|
|
1182
|
-
const
|
|
1183
|
-
const
|
|
1189
|
+
const task = item.kind === "async" ? item.task : void 0;
|
|
1190
|
+
const name = task && item.kind === "async" && item.step ? item.step.agent : item.agent;
|
|
1191
|
+
const agent = index === this.selected ? this.theme.bold(name) : name;
|
|
1192
|
+
const identity = task ?? item.runId.slice(0, 8);
|
|
1184
1193
|
const left = `${marker} ${statusGlyph(item, this.theme)} ${agent}${context} ${this.theme.fg("dim", `\xB7 ${identity}`)}`;
|
|
1185
1194
|
return rightAligned(left, this.theme.fg("dim", item.state), layout.roster.width);
|
|
1186
1195
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appendAgentRefinementOverlay
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PLCCBLPY.js";
|
|
4
4
|
import {
|
|
5
5
|
buildAgentMemoryInjection,
|
|
6
6
|
buildSkillInjection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CIZQXJ5Q.js";
|
|
8
8
|
|
|
9
9
|
// src/runs/shared/effective-system-prompt.ts
|
|
10
10
|
function appendSection(prompt, section) {
|