@ryan_nookpi/pi-extension-subagent 0.4.8 → 0.4.9
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 +101 -101
- package/runner.ts +3 -5
package/package.json
CHANGED
|
@@ -1,102 +1,102 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
2
|
+
"name": "@ryan_nookpi/pi-extension-subagent",
|
|
3
|
+
"version": "0.4.9",
|
|
4
|
+
"description": "Asynchronous subagent delegation for pi with run, batch, chain, and continuation workflows.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/Jonghakseo/pi-extension.git",
|
|
9
|
+
"directory": "packages/subagent"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/Jonghakseo/pi-extension/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/Jonghakseo/pi-extension/tree/main/packages/subagent#readme",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"pi-package",
|
|
18
|
+
"subagent",
|
|
19
|
+
"delegation"
|
|
20
|
+
],
|
|
21
|
+
"files": [
|
|
22
|
+
"above-widget.ts",
|
|
23
|
+
"agents.ts",
|
|
24
|
+
"claude-args.ts",
|
|
25
|
+
"claude-sdk-runner.ts",
|
|
26
|
+
"claude-sdk-stream-adapter.ts",
|
|
27
|
+
"claude-sidecar-writer.ts",
|
|
28
|
+
"claude-stream-parser.ts",
|
|
29
|
+
"cli.ts",
|
|
30
|
+
"commands.ts",
|
|
31
|
+
"config.ts",
|
|
32
|
+
"constants.ts",
|
|
33
|
+
"context-limits.ts",
|
|
34
|
+
"diagnostics.ts",
|
|
35
|
+
"display-task.ts",
|
|
36
|
+
"escalation.ts",
|
|
37
|
+
"failure-telemetry.ts",
|
|
38
|
+
"format.ts",
|
|
39
|
+
"group-pending.ts",
|
|
40
|
+
"index.ts",
|
|
41
|
+
"lifecycle.ts",
|
|
42
|
+
"invocation-queue.ts",
|
|
43
|
+
"live-preview.ts",
|
|
44
|
+
"mentions.ts",
|
|
45
|
+
"persisted-session.ts",
|
|
46
|
+
"replay.ts",
|
|
47
|
+
"registration-manifest.ts",
|
|
48
|
+
"retry.ts",
|
|
49
|
+
"run-utils.ts",
|
|
50
|
+
"runner.ts",
|
|
51
|
+
"session.ts",
|
|
52
|
+
"starter-pack.ts",
|
|
53
|
+
"store.ts",
|
|
54
|
+
"tool-execute.ts",
|
|
55
|
+
"tool-render.ts",
|
|
56
|
+
"types.ts",
|
|
57
|
+
"widget.ts",
|
|
58
|
+
"utils/agent-utils.ts",
|
|
59
|
+
"utils/short-label.ts",
|
|
60
|
+
"utils/string-utils.ts",
|
|
61
|
+
"utils/format-utils.ts",
|
|
62
|
+
"utils/time-utils.ts",
|
|
63
|
+
"seeds",
|
|
64
|
+
"README.md"
|
|
65
|
+
],
|
|
66
|
+
"pi": {
|
|
67
|
+
"extensions": [
|
|
68
|
+
"./index.ts"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.98",
|
|
73
|
+
"yaml": "^2.9.0"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"@earendil-works/pi-ai": "*",
|
|
77
|
+
"@earendil-works/pi-agent-core": "*",
|
|
78
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
79
|
+
"@earendil-works/pi-tui": "*",
|
|
80
|
+
"typebox": "*"
|
|
81
|
+
},
|
|
82
|
+
"peerDependenciesMeta": {
|
|
83
|
+
"@earendil-works/pi-ai": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"@earendil-works/pi-agent-core": {
|
|
87
|
+
"optional": true
|
|
88
|
+
},
|
|
89
|
+
"@earendil-works/pi-coding-agent": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"@earendil-works/pi-tui": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"typebox": {
|
|
96
|
+
"optional": true
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"publishConfig": {
|
|
100
|
+
"access": "public"
|
|
101
|
+
}
|
|
102
|
+
}
|
package/runner.ts
CHANGED
|
@@ -946,11 +946,9 @@ async function runPiAgent(
|
|
|
946
946
|
return;
|
|
947
947
|
}
|
|
948
948
|
|
|
949
|
-
if (event.type === "
|
|
950
|
-
|
|
951
|
-
currentResult.
|
|
952
|
-
if (typeof toolResultMessage.toolName === "string") currentResult.lastToolName = toolResultMessage.toolName;
|
|
953
|
-
currentResult.lastToolOutputChars = countTextChars(toolResultMessage.content);
|
|
949
|
+
if (event.type === "tool_execution_end" && event.result) {
|
|
950
|
+
if (typeof event.toolName === "string") currentResult.lastToolName = event.toolName;
|
|
951
|
+
currentResult.lastToolOutputChars = countTextChars(event.result.content);
|
|
954
952
|
emitUpdate();
|
|
955
953
|
if (sawAgentEnd) scheduleAgentEndForceResolve();
|
|
956
954
|
return;
|