pi-subagent-manager 1.13.3 → 1.14.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.
|
@@ -172,5 +172,10 @@ export function checklistGuidance(mode) {
|
|
|
172
172
|
? "As /root in orchestration mode you MUST use checklist_create, checklist_read and checklist_update to plan, track and report orchestration work: create a task for every delegated unit and keep statuses current."
|
|
173
173
|
: "When you track work with checklist_create, checklist_read or checklist_update, you may also label delegated tasks by agent. Using the checklist is optional in opportunistic mode.",
|
|
174
174
|
tagging,
|
|
175
|
+
...(mode === "orchestration"
|
|
176
|
+
? [
|
|
177
|
+
"For tasks needing an expanded plan, set meta.plan to the path of one local .txt or .md file; the assigned agent can read it if needed.",
|
|
178
|
+
]
|
|
179
|
+
: []),
|
|
175
180
|
].join("\n");
|
|
176
181
|
}
|
package/dist/orch/runtime.js
CHANGED
|
@@ -373,7 +373,7 @@ export function createDriverFactory(getRootContext, getModelSelection = () => "p
|
|
|
373
373
|
options.type.systemPrompt,
|
|
374
374
|
`Your thread path is ${options.path}.`,
|
|
375
375
|
options.parentPath
|
|
376
|
-
? `Your lexical parent is ${options.parentPath}; inherited conversation comes only from that parent.`
|
|
376
|
+
? `Your lexical parent is ${options.parentPath}; inherited conversation comes only from that parent. Treat it as historical context, not your assignment; do not replay its tasks or actions. Your initial assignment is the task message after that history; follow subsequent instructions for your thread.`
|
|
377
377
|
: "You are an independent root thread with no inherited history.",
|
|
378
378
|
"When finished, give your final answer normally so it can be handed back. To retain unfinished work without a final answer, call agent_pause (if available), then stop; resume only when instructed.",
|
|
379
379
|
delegationGuidance(options.canSpawnChildren !== false),
|
package/dist/ui/agent-loader.js
CHANGED
|
@@ -16,6 +16,7 @@ export const AGENT_LOADERS = {
|
|
|
16
16
|
label: "Braille",
|
|
17
17
|
requiresNerdFont: false,
|
|
18
18
|
frames: Array.from("⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"),
|
|
19
|
+
interval: 120,
|
|
19
20
|
states: { completed: "✓", paused: "Ⅱ", failed: "×", stopped: "■" },
|
|
20
21
|
},
|
|
21
22
|
hourglass: {
|
|
@@ -49,10 +50,15 @@ export function availableLoaderStyles(nerdFontIcons) {
|
|
|
49
50
|
export function effectiveLoaderStyle(style, nerdFontIcons) {
|
|
50
51
|
return !nerdFontIcons && AGENT_LOADERS[style].requiresNerdFont ? "ascii" : style;
|
|
51
52
|
}
|
|
53
|
+
export function loaderInterval(style, nerdFontIcons) {
|
|
54
|
+
const { interval } = AGENT_LOADERS[effectiveLoaderStyle(style, nerdFontIcons)];
|
|
55
|
+
return interval ?? AGENT_PROGRESS_INTERVAL;
|
|
56
|
+
}
|
|
52
57
|
export function agentProgressIcon(thread, nerdFontIcons, now = Date.now(), animate = true, loaderStyle = "circle") {
|
|
53
58
|
const loader = AGENT_LOADERS[effectiveLoaderStyle(loaderStyle, nerdFontIcons)];
|
|
54
59
|
if (thread.state === "starting" || thread.state === "running") {
|
|
55
|
-
const
|
|
60
|
+
const interval = loader.interval ?? AGENT_PROGRESS_INTERVAL;
|
|
61
|
+
const index = animate ? Math.floor(Math.max(0, now) / interval) : 0;
|
|
56
62
|
return loader.frames[index % loader.frames.length];
|
|
57
63
|
}
|
|
58
64
|
return loader.states[thread.state];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getMarkdownTheme } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { Input, Key, Markdown, matchesKey, ScrollView, stripTerminalSequences, truncateToWidth, visibleWidth, wrapTextWithAnsi, } from "@earendil-works/pi-tui";
|
|
3
3
|
import { dialogText } from "./dialog.js";
|
|
4
|
-
import {
|
|
4
|
+
import { agentProgressIcon, agentTypeLabel, loaderInterval } from "./ui.js";
|
|
5
5
|
import { renderTranscriptTool } from "./transcript-tool.js";
|
|
6
6
|
const DETAIL_CYCLE = ["full", "preview", "compact"];
|
|
7
7
|
export function fillViewport(lines, width, height) {
|
|
@@ -181,7 +181,7 @@ export class LiveAgentView {
|
|
|
181
181
|
this.progressTimer = undefined;
|
|
182
182
|
}
|
|
183
183
|
else if (this.progressTimer === undefined) {
|
|
184
|
-
this.progressTimer = setInterval(() => this.scheduleRender(),
|
|
184
|
+
this.progressTimer = setInterval(() => this.scheduleRender(), loaderInterval(this.loaderStyle, this.nerdFontIcons));
|
|
185
185
|
this.progressTimer.unref?.();
|
|
186
186
|
}
|
|
187
187
|
}
|
package/dist/ui/status-ui.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getKeybindings, setKeybindings, Key, matchesKey, } from "@earendil-work
|
|
|
2
2
|
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
3
3
|
import { canOpenDialog, DIALOG_OPTIONS, DialogSession, scopeDialogContext, dialogMenu, dialogEditor, dialogHeight, dialogText, frameDialog, } from "./dialog.js";
|
|
4
4
|
import { buildStatusTree, threadActivity } from "./thread-tree.js";
|
|
5
|
-
import {
|
|
5
|
+
import { agentProgressIcon, agentTypeBadge, agentTypeLabel, loaderInterval, showThreads, threadMetrics, } from "./ui.js";
|
|
6
6
|
import { LiveAgentView, fillViewport } from "./live-agent-view.js";
|
|
7
7
|
export { buildStatusTree };
|
|
8
8
|
const ROOT = "/root";
|
|
@@ -93,7 +93,7 @@ export class StatusDialog {
|
|
|
93
93
|
const delay = this.service
|
|
94
94
|
.list()
|
|
95
95
|
.some((thread) => thread.path !== ROOT && (thread.state === "starting" || thread.state === "running"))
|
|
96
|
-
?
|
|
96
|
+
? loaderInterval(this.loaderStyle, this.nerdFontIcons)
|
|
97
97
|
: 1000;
|
|
98
98
|
if (this.timer !== undefined && this.refreshDelay === delay)
|
|
99
99
|
return;
|
package/dist/ui/ui.js
CHANGED
|
@@ -11,8 +11,8 @@ import { editModelPreferences, MODEL_EDITOR_CANCEL } from "./model-picker.js";
|
|
|
11
11
|
import { editToolSelection, TOOL_EDITOR_CANCEL } from "./tool-picker.js";
|
|
12
12
|
import { canOpenDialog, dialogEditor, dialogMenu, dialogHeight, frameDialog, DIALOG_OPTIONS, withDialogSession, } from "./dialog.js";
|
|
13
13
|
import { getModelPreferences } from "../prefs/models.js";
|
|
14
|
-
import {
|
|
15
|
-
export { AGENT_PROGRESS_INTERVAL, agentProgressIcon } from "./agent-loader.js";
|
|
14
|
+
import { agentProgressIcon, isAgentLoaderGlyph, loaderInterval } from "./agent-loader.js";
|
|
15
|
+
export { AGENT_PROGRESS_INTERVAL, agentProgressIcon, loaderInterval } from "./agent-loader.js";
|
|
16
16
|
import { buildStatusTree, lastStarted, threadActivity } from "./thread-tree.js";
|
|
17
17
|
import { THINKING_LEVELS, } from "../types.js";
|
|
18
18
|
export function sanitizeText(text) {
|
|
@@ -286,7 +286,7 @@ export function updateWidget(ctx, threads, mode = "full", nerdFontIcons = false,
|
|
|
286
286
|
ctx.ui.setWidget("pi-subagent", (tui) => {
|
|
287
287
|
let timer;
|
|
288
288
|
if (snapshot.some(isLive)) {
|
|
289
|
-
timer = setInterval(() => tui.requestRender(),
|
|
289
|
+
timer = setInterval(() => tui.requestRender(), loaderInterval(loaderStyle, nerdFontIcons));
|
|
290
290
|
timer.unref();
|
|
291
291
|
}
|
|
292
292
|
return {
|