@ferris1225/pi-subagents 4.1.15 → 4.1.17
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 +335 -302
- package/agents/cleaner.md +23 -29
- package/agents/documenter.md +21 -18
- package/agents/explorer.md +6 -1
- package/agents/reviewer.md +82 -85
- package/agents/worker.md +45 -37
- package/package.json +9 -9
- package/src/announcements.ts +75 -61
- package/src/background.ts +26 -10
- package/src/completion.ts +7 -1
- package/src/dispatch.ts +48 -16
- package/src/durable.ts +72 -7
- package/src/format.ts +179 -175
- package/src/monitor.ts +4 -2
- package/src/prompt.ts +2 -2
- package/src/rpc-run.ts +984 -962
- package/src/runtime.ts +3 -3
- package/src/spawn.ts +650 -642
- package/src/temp-hygiene.ts +0 -28
- package/src/thread-lifecycle.ts +42 -33
- package/src/tools.ts +712 -708
- package/src/widget.ts +9 -0
- package/src/workflow.ts +199 -200
- package/src/worktree.ts +64 -37
package/src/runtime.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import { rmSync } from "node:fs";
|
|
13
|
-
import {
|
|
13
|
+
import { resolveSubagentConcurrency, BackgroundTaskQueue } from "./background.ts";
|
|
14
14
|
import {
|
|
15
15
|
completionGroupTriggersTurn,
|
|
16
16
|
createCompletionBatcher,
|
|
@@ -120,7 +120,7 @@ export interface SubagentRuntime {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
export function createRuntime(pi: ExtensionAPI, configPath: string): SubagentRuntime {
|
|
123
|
-
const backgroundQueue = new BackgroundTaskQueue(
|
|
123
|
+
const backgroundQueue = new BackgroundTaskQueue(resolveSubagentConcurrency());
|
|
124
124
|
|
|
125
125
|
const runtime: SubagentRuntime = {
|
|
126
126
|
configPath,
|
|
@@ -140,7 +140,7 @@ export function createRuntime(pi: ExtensionAPI, configPath: string): SubagentRun
|
|
|
140
140
|
const active = monitor
|
|
141
141
|
.getRuns()
|
|
142
142
|
.filter((run) => isRunActiveStatus(run.status))
|
|
143
|
-
.map((run) => ({ id: run.id, agent: run.agent, label: run.label }));
|
|
143
|
+
.map((run) => ({ id: run.id, agent: run.agent, label: run.label, queued: run.status === "queued" }));
|
|
144
144
|
const message = {
|
|
145
145
|
customType: "subagent-result",
|
|
146
146
|
content: formatCompletionMessage(items) + formatActiveRunsFooter(active),
|