@narumitw/pi-subagents 3.4.1 → 3.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-subagents",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "Subagent jobs with asynchronous main-agent messaging for Pi.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,6 +18,7 @@
18
18
  "dist",
19
19
  "docs",
20
20
  "README.md",
21
+ "CHANGELOG.md",
21
22
  "LICENSE"
22
23
  ],
23
24
  "pi": {
@@ -39,9 +40,9 @@
39
40
  "typebox": "*"
40
41
  },
41
42
  "devDependencies": {
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",
43
+ "@earendil-works/pi-ai": "1.5.0",
44
+ "@earendil-works/pi-coding-agent": "1.5.0",
45
+ "@earendil-works/pi-tui": "1.5.0",
45
46
  "@types/node": "26.6.5",
46
47
  "esbuild": "0.28.2",
47
48
  "typebox": "1.4.3",
@@ -53,7 +54,7 @@
53
54
  "directory": "packages/pi-subagents"
54
55
  },
55
56
  "dependencies": {
56
- "@narumitw/pi-tui-kit": "^0.68.0",
57
+ "@narumitw/pi-tui-kit": "^0.69.0",
57
58
  "ignore": "^7.0.14"
58
59
  }
59
60
  }
@@ -1,4 +1,4 @@
1
- import { type ExtensionAPI, getMarkdownTheme, keyText } from "@earendil-works/pi-coding-agent";
1
+ import { type ExtensionAPI, getMarkdownTheme } from "@earendil-works/pi-coding-agent";
2
2
  import { Box, type Component, Markdown, Spacer, Text } from "@earendil-works/pi-tui";
3
3
  import { sanitizeTerminalText } from "./message-broker.js";
4
4
 
@@ -31,15 +31,9 @@ export function registerMessageRenderers(pi: ExtensionAPI): void {
31
31
  new Spacer(1),
32
32
  ];
33
33
  if (!options.expanded) {
34
- children.push(
35
- new Text(
36
- theme.fg("customMessageText", `${summary} (`) +
37
- theme.fg("dim", keyText("app.tools.expand")) +
38
- theme.fg("customMessageText", " to expand)"),
39
- 0,
40
- 0,
41
- ),
42
- );
34
+ const expansionKey = options.keyText?.("app.tools.expand");
35
+ const hint = expansionKey ? theme.fg("muted", ` (${expansionKey} to expand)`) : "";
36
+ children.push(new Text(theme.fg("customMessageText", summary) + hint, 0, 0));
43
37
  } else {
44
38
  const content =
45
39
  typeof message.content === "string"
@@ -127,6 +127,9 @@ export async function showSubagentSettings(
127
127
  () => complete("back"),
128
128
  );
129
129
  return {
130
+ get capturesViewportInput() {
131
+ return list.capturesViewportInput;
132
+ },
130
133
  render(width: number) {
131
134
  if (!current()) complete("stale");
132
135
  renderedWidth = Number.isFinite(width) ? Math.max(0, Math.floor(width)) : 0;
package/src/tools.ts CHANGED
@@ -60,9 +60,11 @@ const SpawnParameters = Type.Object(
60
60
  ),
61
61
  tools: Type.Optional(
62
62
  Type.Array(
63
- StringEnum(CHILD_CORE_TOOL_NAMES, {
64
- description: "Available Pi core child work tool name.",
65
- }),
63
+ Type.Unsafe<(typeof CHILD_CORE_TOOL_NAMES)[number]>(
64
+ StringEnum(CHILD_CORE_TOOL_NAMES, {
65
+ description: "Available Pi core child work tool name.",
66
+ }),
67
+ ),
66
68
  {
67
69
  description: "Child work tools. Defaults to read, grep, find, and ls. Communication tools are always added.",
68
70
  maxItems: MAX_TOOLS,
@@ -114,9 +116,11 @@ const SpawnParameters = Type.Object(
114
116
  ),
115
117
  ),
116
118
  thinkingLevel: Type.Optional(
117
- StringEnum(SUBAGENT_THINKING_LEVELS, {
118
- description: "Child thinking level. Defaults to the main agent's effective level.",
119
- }),
119
+ Type.Unsafe<SubagentThinkingLevel>(
120
+ StringEnum(SUBAGENT_THINKING_LEVELS, {
121
+ description: "Child thinking level. Defaults to the main agent's effective level.",
122
+ }),
123
+ ),
120
124
  ),
121
125
  timeout: Type.Optional(Type.Number({ description: "Timeout in seconds (optional, no default timeout)" })),
122
126
  },