@narumitw/pi-subagents 3.3.0 → 3.3.3
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 +4 -2
- package/dist/chunks/{settings-ui-PSEYB6JX.ts → settings-ui-24GHO6E2.ts} +12 -23
- package/dist/chunks/settings-ui-24GHO6E2.ts.map +7 -0
- package/dist/index.ts +5 -2
- package/dist/index.ts.map +2 -2
- package/package.json +7 -7
- package/src/runtime.ts +4 -0
- package/src/settings-ui.ts +12 -24
- package/src/widget.ts +2 -1
- package/dist/chunks/settings-ui-PSEYB6JX.ts.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-subagents",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "Subagent jobs with asynchronous main-agent messaging for Pi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"typebox": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@earendil-works/pi-ai": "1.
|
|
43
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
44
|
-
"@earendil-works/pi-tui": "1.
|
|
42
|
+
"@earendil-works/pi-ai": "1.4.0",
|
|
43
|
+
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
44
|
+
"@earendil-works/pi-tui": "1.4.0",
|
|
45
45
|
"@types/node": "26.6.5",
|
|
46
46
|
"esbuild": "0.28.2",
|
|
47
|
-
"typebox": "1.4.
|
|
47
|
+
"typebox": "1.4.3",
|
|
48
48
|
"typescript": "7.0.2"
|
|
49
49
|
},
|
|
50
50
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"directory": "packages/pi-subagents"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@narumitw/pi-tui-kit": "^0.
|
|
57
|
-
"ignore": "^7.0.
|
|
56
|
+
"@narumitw/pi-tui-kit": "^0.67.0",
|
|
57
|
+
"ignore": "^7.0.13"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/src/runtime.ts
CHANGED
|
@@ -29,6 +29,7 @@ interface InternalJob extends JobSummary {
|
|
|
29
29
|
resolveTerminal: () => void;
|
|
30
30
|
task?: Promise<void>;
|
|
31
31
|
taskText: string;
|
|
32
|
+
thinkingLevel: SubagentThinkingLevel;
|
|
32
33
|
stopRequest?: StopRequest;
|
|
33
34
|
control?: ChildControl;
|
|
34
35
|
controlReady: Promise<ChildControl>;
|
|
@@ -51,6 +52,7 @@ export interface ActiveJobDisplay {
|
|
|
51
52
|
jobId: string;
|
|
52
53
|
task: string;
|
|
53
54
|
state: Extract<SubagentJobState, "queued" | "running">;
|
|
55
|
+
thinkingLevel: SubagentThinkingLevel;
|
|
54
56
|
elapsedMs: number;
|
|
55
57
|
timeout?: number;
|
|
56
58
|
tools: string[];
|
|
@@ -117,6 +119,7 @@ export class SubagentRuntime {
|
|
|
117
119
|
jobId: job.jobId,
|
|
118
120
|
task: job.taskText,
|
|
119
121
|
state: job.state,
|
|
122
|
+
thinkingLevel: job.thinkingLevel,
|
|
120
123
|
elapsedMs: Math.max(0, now - (job.startedAt ?? job.createdAt)),
|
|
121
124
|
...(job.timeout !== undefined ? { timeout: job.timeout } : {}),
|
|
122
125
|
tools: [...job.tools],
|
|
@@ -159,6 +162,7 @@ export class SubagentRuntime {
|
|
|
159
162
|
controller,
|
|
160
163
|
tools: effectiveTools,
|
|
161
164
|
taskText: input.task,
|
|
165
|
+
thinkingLevel: input.thinkingLevel,
|
|
162
166
|
terminal,
|
|
163
167
|
resolveTerminal,
|
|
164
168
|
controlReady,
|
package/src/settings-ui.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { stripVTControlCharacters } from "node:util";
|
|
2
2
|
import { type ExtensionCommandContext, getSettingsListTheme } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { Key, matchesKey, type SettingItem, SettingsList, Text, type TuiMouseEvent } from "@earendil-works/pi-tui";
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type TuiMouseEvent,
|
|
10
|
-
truncateToWidth,
|
|
11
|
-
} from "@earendil-works/pi-tui";
|
|
12
|
-
import { HorizontalRule, renderBoundedFrame, runCustomInteraction, sanitizeTerminalText } from "@narumitw/pi-tui-kit";
|
|
5
|
+
HorizontalRule,
|
|
6
|
+
renderBoundedFrameLayout,
|
|
7
|
+
runCustomInteraction,
|
|
8
|
+
sanitizeTerminalText,
|
|
9
|
+
} from "@narumitw/pi-tui-kit";
|
|
13
10
|
import type { SubagentSettings } from "./settings.js";
|
|
14
11
|
|
|
15
12
|
interface SubagentSettingsUIOptions {
|
|
@@ -140,30 +137,21 @@ export async function showSubagentSettings(
|
|
|
140
137
|
contentHeight = content.length;
|
|
141
138
|
const focusedRow = content.findIndex((line) => stripVTControlCharacters(line).startsWith("→"));
|
|
142
139
|
mouseRows.clear();
|
|
143
|
-
|
|
144
|
-
const layout = content.map((line, index) => {
|
|
145
|
-
if (!stripVTControlCharacters(line).trim()) return line;
|
|
146
|
-
const token = `content:${index}`;
|
|
147
|
-
tokens.set(token, index);
|
|
148
|
-
return token;
|
|
149
|
-
});
|
|
140
|
+
|
|
150
141
|
const terminalRows = Number.isFinite(tui.terminal.rows) ? Math.floor(tui.terminal.rows) : 24;
|
|
151
|
-
const frame =
|
|
152
|
-
width:
|
|
142
|
+
const frame = renderBoundedFrameLayout({
|
|
143
|
+
width: renderedWidth,
|
|
153
144
|
maxRows: Math.max(1, terminalRows - 3),
|
|
154
145
|
rule: rule.render(renderedWidth)[0] ?? "",
|
|
155
146
|
title: new Text(theme.fg("accent", theme.bold("Subagents Settings")), 0, 0).render(renderedWidth),
|
|
156
147
|
context: [theme.fg("muted", "Saved changes apply immediately.")],
|
|
157
|
-
content
|
|
148
|
+
content,
|
|
158
149
|
hints: new Text(theme.fg("muted", "Ctrl+C close"), 0, 0).render(renderedWidth),
|
|
159
150
|
priorityRows: focusedRow < 0 ? [] : [focusedRow],
|
|
160
151
|
focusedRow,
|
|
161
152
|
});
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
if (nativeRow !== undefined) mouseRows.set(row, nativeRow);
|
|
165
|
-
return truncateToWidth(nativeRow === undefined ? line : (content[nativeRow] ?? ""), renderedWidth, "");
|
|
166
|
-
});
|
|
153
|
+
for (const { frameIndex, contentIndex } of frame.contentRows) mouseRows.set(frameIndex, contentIndex);
|
|
154
|
+
return frame.lines;
|
|
167
155
|
},
|
|
168
156
|
invalidate() {
|
|
169
157
|
mouseRows.clear();
|
package/src/widget.ts
CHANGED
|
@@ -125,6 +125,7 @@ function renderJob(job: ActiveJobDisplay, theme: Theme, settings: SubagentSettin
|
|
|
125
125
|
const tools = job.tools.length > 0 ? job.tools.map(sanitizeLabel).join(", ") : "none";
|
|
126
126
|
const timeout = job.timeout === undefined ? "no timeout" : formatSeconds(job.timeout);
|
|
127
127
|
const details = [
|
|
128
|
+
`thinking: ${sanitizeLabel(job.thinkingLevel)}`,
|
|
128
129
|
...(settings.showTiming ? [`${formatSeconds(Math.floor(job.elapsedMs / 1_000))} / ${timeout}`] : []),
|
|
129
130
|
...(settings.showTools ? [`tools: ${tools}`] : []),
|
|
130
131
|
];
|
|
@@ -136,7 +137,7 @@ function widgetValue(jobs: readonly ActiveJobDisplay[]): string {
|
|
|
136
137
|
return jobs
|
|
137
138
|
.map(
|
|
138
139
|
(job) =>
|
|
139
|
-
`${job.jobId}\0${job.task}\0${job.state}\0${Math.floor(job.elapsedMs / 1_000)}\0${job.timeout ?? ""}\0${job.tools.join(",")}`,
|
|
140
|
+
`${job.jobId}\0${job.task}\0${job.state}\0${job.thinkingLevel}\0${Math.floor(job.elapsedMs / 1_000)}\0${job.timeout ?? ""}\0${job.tools.join(",")}`,
|
|
140
141
|
)
|
|
141
142
|
.join("\n");
|
|
142
143
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/settings-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { stripVTControlCharacters } from \"node:util\";\nimport { type ExtensionCommandContext, getSettingsListTheme } from \"@earendil-works/pi-coding-agent\";\nimport {\n Key,\n matchesKey,\n type SettingItem,\n SettingsList,\n Text,\n type TuiMouseEvent,\n truncateToWidth,\n} from \"@earendil-works/pi-tui\";\nimport { HorizontalRule, renderBoundedFrame, runCustomInteraction, sanitizeTerminalText } from \"@narumitw/pi-tui-kit\";\nimport type { SubagentSettings } from \"./settings.js\";\n\ninterface SubagentSettingsUIOptions {\n signal: AbortSignal;\n isCurrent(): boolean;\n get(): SubagentSettings;\n save(key: keyof SubagentSettings, value: boolean, signal: AbortSignal): Promise<SubagentSettings>;\n apply(settings: SubagentSettings): void;\n}\n\ntype CloseReason = \"back\" | \"close\" | \"stale\";\n\nconst SETTINGS: { key: keyof SubagentSettings; label: string; description: string }[] = [\n { key: \"showWidget\", label: \"Show widget\", description: \"Show subagent jobs above the editor.\" },\n { key: \"showJobId\", label: \"Show job ID\", description: \"Show job IDs in the widget.\" },\n { key: \"showTools\", label: \"Show tools\", description: \"Show active tools in the widget.\" },\n { key: \"showTiming\", label: \"Show timing\", description: \"Show job timing in the widget.\" },\n];\n\nexport async function showSubagentSettings(\n ctx: ExtensionCommandContext,\n options: SubagentSettingsUIOptions,\n): Promise<CloseReason> {\n const result = await runCustomInteraction<CloseReason>(ctx, {\n signal: options.signal,\n isCurrent: options.isCurrent,\n // The command owner reports interaction failures and non-TUI settings paths.\n onError: () => {},\n create({ tui, theme, signal, complete }) {\n let queue = Promise.resolve();\n const current = () => !signal.aborted && options.isCurrent();\n const revisions = new Map<string, number>();\n const pending = new Map<string, number>();\n const mouseRows = new Map<number, number>();\n let renderedWidth = 0;\n let contentHeight = 0;\n let mousePressed = false;\n const reportFailure = (message: string) => {\n if (!current()) return;\n try {\n ctx.ui.notify(sanitizeTerminalText(`Could not save pi-subagents.json: ${message}`), \"error\");\n } catch {\n // The host can dispose its notifier after the ownership check.\n }\n };\n const rule = new HorizontalRule({ ruleStyle: (text) => theme.fg(\"border\", text) });\n // Keep native SettingsList semantics, but use this screen's callback theme.\n const listTheme = {\n ...getSettingsListTheme(),\n label: (text: string, selected: boolean) => (selected ? theme.fg(\"accent\", text) : text),\n value: (text: string, selected: boolean) => theme.fg(selected ? \"accent\" : \"muted\", text),\n description: (text: string) => theme.fg(\"dim\", text),\n cursor: theme.fg(\"accent\", \"\u2192 \"),\n hint: (text: string) => theme.fg(\"dim\", text),\n };\n const initial = options.get();\n const items: SettingItem[] = SETTINGS.map(({ key, label, description }) => ({\n id: key,\n label,\n description,\n currentValue: String(initial[key]),\n values: [\"true\", \"false\"],\n }));\n const list = new SettingsList(\n items,\n items.length,\n listTheme,\n (id, value) => {\n if (!current()) return;\n const key = id as keyof SubagentSettings;\n const revision = (revisions.get(id) ?? 0) + 1;\n revisions.set(id, revision);\n pending.set(id, revision);\n queue = queue\n .then(async () => {\n if (!current()) {\n complete(\"stale\");\n return;\n }\n const before = { ...options.get() };\n let effective = before;\n try {\n const settings = await options.save(key, value === \"true\", signal);\n // A successful rename is durable, even when closing aborted the save signal.\n if (!options.isCurrent()) {\n complete(\"stale\");\n return;\n }\n options.apply(settings);\n effective = options.get();\n } catch (error) {\n if (!options.isCurrent()) {\n complete(\"stale\");\n return;\n }\n let message = error instanceof Error ? error.message : String(error);\n try {\n options.apply(before);\n } catch (rollbackError) {\n message += `; could not restore effective settings: ${rollbackError instanceof Error ? rollbackError.message : String(rollbackError)}`;\n }\n reportFailure(message);\n }\n if (!current()) return;\n if (pending.get(id) === revision) pending.delete(id);\n // Saving rereads the full document, including unrelated manual edits. Keep newer\n // optimistic choices, but refresh every row with no outstanding user change.\n for (const { key: settingKey } of SETTINGS) {\n if (!pending.has(settingKey)) list.updateValue(settingKey, String(effective[settingKey]));\n }\n tui.requestRender();\n })\n .catch((error: unknown) => {\n // A failed action must not prevent later requests from entering the queue.\n reportFailure(error instanceof Error ? error.message : String(error));\n });\n },\n () => complete(\"back\"),\n );\n return {\n render(width: number) {\n if (!current()) complete(\"stale\");\n renderedWidth = Number.isFinite(width) ? Math.max(0, Math.floor(width)) : 0;\n listTheme.cursor = theme.fg(\"accent\", \"\u2192 \");\n // The native footer hardcodes keys. Advertise only the hard-cancel key owned here;\n // configured native navigation, change, and Back actions remain unchanged.\n const content = list.render(Math.max(4, renderedWidth)).slice(0, -2);\n contentHeight = content.length;\n const focusedRow = content.findIndex((line) => stripVTControlCharacters(line).startsWith(\"\u2192\"));\n mouseRows.clear();\n const tokens = new Map<string, number>();\n const layout = content.map((line, index) => {\n if (!stripVTControlCharacters(line).trim()) return line;\n const token = `content:${index}`;\n tokens.set(token, index);\n return token;\n });\n const terminalRows = Number.isFinite(tui.terminal.rows) ? Math.floor(tui.terminal.rows) : 24;\n const frame = renderBoundedFrame({\n width: Math.max(renderedWidth, `content:${content.length}`.length),\n maxRows: Math.max(1, terminalRows - 3),\n rule: rule.render(renderedWidth)[0] ?? \"\",\n title: new Text(theme.fg(\"accent\", theme.bold(\"Subagents Settings\")), 0, 0).render(renderedWidth),\n context: [theme.fg(\"muted\", \"Saved changes apply immediately.\")],\n content: layout,\n hints: new Text(theme.fg(\"muted\", \"Ctrl+C close\"), 0, 0).render(renderedWidth),\n priorityRows: focusedRow < 0 ? [] : [focusedRow],\n focusedRow,\n });\n return frame.map((line, row) => {\n const nativeRow = tokens.get(line);\n if (nativeRow !== undefined) mouseRows.set(row, nativeRow);\n return truncateToWidth(nativeRow === undefined ? line : (content[nativeRow] ?? \"\"), renderedWidth, \"\");\n });\n },\n invalidate() {\n mouseRows.clear();\n mousePressed = false;\n list.invalidate();\n },\n handleInput(data: string) {\n if (!current()) return complete(\"stale\");\n mouseRows.clear();\n mousePressed = false;\n if (matchesKey(data, Key.ctrl(\"c\"))) complete(\"close\");\n else {\n // SettingsList uses Pi's effective native keybindings for standard actions.\n list.handleInput(data);\n }\n tui.requestRender();\n },\n handleMouse(event: TuiMouseEvent) {\n if (!current()) {\n complete(\"stale\");\n return;\n }\n const nativeRow = mouseRows.get(event.y);\n if (nativeRow === undefined || event.x < 0 || event.x >= renderedWidth) {\n if (event.button === \"left\" && (event.type === \"press\" || event.type === \"click\")) mousePressed = false;\n return;\n }\n const nativeEvent = { ...event, y: nativeRow, width: renderedWidth, height: contentHeight };\n if (event.type === \"click\" && event.button === \"left\" && !mousePressed) {\n list.handleMouse({ ...nativeEvent, type: \"press\" });\n }\n const result = list.handleMouse(nativeEvent);\n if (event.type === \"press\" && event.button === \"left\") mousePressed = result?.handled === true;\n if (event.type === \"click\" || event.type === \"wheel\") mousePressed = false;\n if (result?.handled && result.render !== false) tui.requestRender();\n return result;\n },\n waitForPending() {\n return queue;\n },\n dispose() {\n mouseRows.clear();\n mousePressed = false;\n },\n };\n },\n });\n if (result.kind === \"error\") throw result.error;\n return result.kind === \"completed\" ? result.value : result.kind === \"unsupported\" ? \"back\" : \"stale\";\n}\n"],
|
|
5
|
-
"mappings": ";;;;AAAA,SAAS,gCAAgC;AACzC,SAAuC,4BAA4B;AACnE;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAS,gBAAgB,oBAAoB,sBAAsB,4BAA4B;AAa/F,IAAM,WAAkF;AAAA,EACtF,EAAE,KAAK,cAAc,OAAO,eAAe,aAAa,uCAAuC;AAAA,EAC/F,EAAE,KAAK,aAAa,OAAO,eAAe,aAAa,8BAA8B;AAAA,EACrF,EAAE,KAAK,aAAa,OAAO,cAAc,aAAa,mCAAmC;AAAA,EACzF,EAAE,KAAK,cAAc,OAAO,eAAe,aAAa,iCAAiC;AAC3F;AAEA,eAAsB,qBACpB,KACA,SACsB;AACtB,QAAM,SAAS,MAAM,qBAAkC,KAAK;AAAA,IAC1D,QAA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