@arhen/pi-core-subagent 1.1.1 → 1.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +3 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arhen/pi-core-subagent",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "description": "pi extension: fast in-process subagents with single/parallel/chain, background runs, intercom and agent-to-agent mailbox. Leader defines agents inline.",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -25,7 +25,7 @@ const DEFAULT_CONCURRENCY = 3;
25
25
  const MAX_CONCURRENCY = 8;
26
26
  const MAX_TASKS = 16;
27
27
  const DEFAULT_RUNTIME_MS = 10 * 60 * 1000;
28
- const DEFAULT_STALL_MS = 90_000;
28
+ const DEFAULT_STALL_MS = 180_000; // 3 min: long model thinking streams emit message_update, not message_end
29
29
  const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"] as const;
30
30
  const READONLY_TOOLS = ["read", "grep", "find", "ls"];
31
31
  const WRITE_TOOLS = ["read", "grep", "find", "ls", "bash", "edit", "write"];
@@ -705,7 +705,7 @@ class SubagentManager {
705
705
  });
706
706
 
707
707
  unsubscribe = child.subscribe((event: AgentSessionEvent) => {
708
- const active = event.type === "message_end" || event.type === "tool_execution_start" || event.type === "tool_execution_end" || event.type === "agent_settled";
708
+ const active = event.type === "message_update" || event.type === "message_end" || event.type === "tool_execution_start" || event.type === "tool_execution_end" || event.type === "agent_settled";
709
709
  if (active) {
710
710
  watchdog.touch();
711
711
  this.emit("subagent:session-event", { runId: run.id, taskId: task.id, seq: eventSeq++, event: { type: event.type } });
@@ -1117,7 +1117,7 @@ export default function (pi: ExtensionAPI) {
1117
1117
  "Use allowIntercom:true only when a child may need to ask you something; keep children autonomous otherwise.",
1118
1118
  ],
1119
1119
  parameters: SubagentParams,
1120
- executionMode: "sequential",
1120
+ executionMode: "parallel", // sibling subagent calls run concurrently, not serialized
1121
1121
  async execute(_toolCallId, params, signal, onUpdate, ctx) {
1122
1122
  const typed = params as unknown as SubagentParamsShape;
1123
1123
  if (typed.background) {
@@ -1140,7 +1140,6 @@ export default function (pi: ExtensionAPI) {
1140
1140
  if (args.model) parts.push(args.model);
1141
1141
  if (args.thinking) parts.push(args.thinking);
1142
1142
  if (args.write) parts.push("write");
1143
- else if (writeCount === 0) parts.push("read-only");
1144
1143
  if (writeCount > 0) parts.push(`${writeCount} write`);
1145
1144
  if (args.concurrency) parts.push(`c${args.concurrency}`);
1146
1145
  if (args.maxRuntimeMs) parts.push(`${Math.round(args.maxRuntimeMs / 60000)}m`);