@gotgenes/pi-subagents 7.2.0 → 7.2.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [7.2.1](https://github.com/gotgenes/pi-packages/compare/pi-subagents-v7.2.0...pi-subagents-v7.2.1) (2026-05-25)
9
+
10
+
11
+ ### Documentation
12
+
13
+ * mark Layer 2 done and update health metrics in architecture doc ([ad00426](https://github.com/gotgenes/pi-packages/commit/ad00426f0f29ceff0915033419fdc2f1b53755b0))
14
+ * plan align tool interfaces for structural typing ([#194](https://github.com/gotgenes/pi-packages/issues/194)) ([36e56b0](https://github.com/gotgenes/pi-packages/commit/36e56b08351893e3c2d63569e7cfa140c172e20b))
15
+ * **retro:** add planning stage notes for issue [#194](https://github.com/gotgenes/pi-packages/issues/194) ([63a5763](https://github.com/gotgenes/pi-packages/commit/63a5763ed2bf4c2a6e2e9a19fdcdce71a2a9905a))
16
+ * **retro:** add retro notes for issue [#193](https://github.com/gotgenes/pi-packages/issues/193) ([8987f90](https://github.com/gotgenes/pi-packages/commit/8987f907e00bb70429782c947a2afbdb1db5faa9))
17
+ * **retro:** add TDD stage notes for issue [#194](https://github.com/gotgenes/pi-packages/issues/194) ([f692323](https://github.com/gotgenes/pi-packages/commit/f69232395882c07d6d95273e08021b94800f0e43))
18
+
8
19
  ## [7.2.0](https://github.com/gotgenes/pi-packages/compare/pi-subagents-v7.1.0...pi-subagents-v7.2.0) (2026-05-25)
9
20
 
10
21
 
@@ -608,16 +608,16 @@ The approach is layered: each step makes the next step trivial.
608
608
 
609
609
  ### Findings
610
610
 
611
- | Metric | Value |
612
- | ------------------------- | --------------------------------------- |
613
- | Health score | 75/100 (B) |
614
- | #1 hotspot | `index.ts` (128 commits, accelerating) |
615
- | Dead exports | 1 (`getToolCallName` re-export) |
616
- | Production duplication | 0 |
617
- | Test duplication | 1,396 lines (69 clone groups, 22 files) |
618
- | `as any` casts in index | 1 (down from 5; Layer 1 resolved 4) |
619
- | Adapter closures in index | 41 (down from 44; Layer 1 resolved 3) |
620
- | Index fan-out | 25 imports |
611
+ | Metric | Value |
612
+ | ------------------------- | ------------------------------------------ |
613
+ | Health score | 75/100 (B) |
614
+ | #1 hotspot | `index.ts` (128 commits, accelerating) |
615
+ | Dead exports | 0 (down from 1; Layer 2 removed re-export) |
616
+ | Production duplication | 0 |
617
+ | Test duplication | 1,396 lines (69 clone groups, 22 files) |
618
+ | `as any` casts in index | 1 (down from 5; Layer 1 resolved 4) |
619
+ | Adapter closures in index | 40 (down from 44; Layers 1–2 resolved 4) |
620
+ | Index fan-out | 25 imports |
621
621
 
622
622
  ### Root cause
623
623
 
@@ -628,8 +628,10 @@ The real objects can't satisfy the interfaces because:
628
628
  Resolved by Layer 0 (#192) + Layer 1 (#193).
629
629
  2. ~~Context queries (`buildSnapshot`, `getModelInfo`, `getSessionInfo`) live as closures in index.ts instead of methods on the state holder.~~
630
630
  Resolved by Layer 1 (#193).
631
- 3. `AgentToolManager` mixes fields from `AgentManager` and `SettingsManager` (source mismatch).
632
- 4. `AgentToolWidget` uses different method names than `SubagentRuntime` (name mismatch).
631
+ 3. ~~`AgentToolManager` mixes fields from `AgentManager` and `SettingsManager` (source mismatch).~~
632
+ Resolved by Layer 2 (#194).
633
+ 4. ~~`AgentToolWidget` uses different method names than `SubagentRuntime` (name mismatch).~~
634
+ Resolved by Layer 2 (#194).
633
635
 
634
636
  Fix these structural misalignments and the class conversions become mechanical.
635
637
 
@@ -668,7 +670,7 @@ Add typed methods: `buildSnapshot(inheritContext)`, `getModelInfo()`, `getSessio
668
670
  - Outcome: 3 closure queries in index.ts → 0; `SubagentRuntime` is self-sufficient for tool deps
669
671
  - Enables: Layer 3 (tools accept `SubagentRuntime` directly)
670
672
 
671
- ### Layer 2: Align interfaces so real objects satisfy tool deps structurally ([#194][194])
673
+ ### Layer 2: Align interfaces so real objects satisfy tool deps structurally ([#194][194]) ✓ done
672
674
 
673
675
  Three alignment changes:
674
676
 
@@ -681,7 +683,7 @@ After this step, `AgentManager` structurally satisfies `AgentToolManager` and `S
681
683
 
682
684
  - Target: `src/tools/agent-tool.ts` (interface), `src/runtime.ts` (method names), `src/ui/message-formatters.ts`
683
685
  - Smell: Category C (source mismatch, name mismatch) + Category A (dead export)
684
- - Outcome: structural typing connects real objects to tool interfaces without adapters
686
+ - Outcome: structural typing connects real objects to tool interfaces without adapters; 0 dead exports (fallow clean)
685
687
  - Enables: Layer 3 (class constructors accept real objects directly)
686
688
 
687
689
  ### Layer 3: Convert closure factories to classes ([#195][195], [#196][196])
@@ -0,0 +1,139 @@
1
+ ---
2
+ issue: 194
3
+ issue_title: "Align tool interfaces for structural typing"
4
+ ---
5
+
6
+ # Align tool interfaces for structural typing
7
+
8
+ ## Problem Statement
9
+
10
+ The narrow interfaces that tool factories accept don't structurally match the real objects (`AgentManager`, `SubagentRuntime`, `SettingsManager`).
11
+ This forces `index.ts` to build adapter closures bridging the gap — each a one-liner that exists only because names or ownership don't align.
12
+ Three specific mismatches prevent structural typing from connecting real objects to tool interfaces directly.
13
+
14
+ ## Goals
15
+
16
+ - Remove `getMaxConcurrent()` from `AgentToolManager` — it belongs on the settings accessor.
17
+ - Rename `SubagentRuntime.updateWidget()` → `update()` so `SubagentRuntime` structurally satisfies `AgentToolWidget`.
18
+ - Remove the dead `getToolCallName` re-export from `ui/message-formatters.ts`.
19
+ - After these changes, `AgentManager` structurally satisfies `AgentToolManager` and `SubagentRuntime` structurally satisfies `AgentToolWidget` — no adapter closures needed in `index.ts`.
20
+
21
+ ## Non-Goals
22
+
23
+ - Converting tool factories to classes (that's #195).
24
+ - Simplifying `index.ts` wiring (that's #195/#196, after this layer).
25
+ - Changing `NotificationManager`'s constructor parameter name (`updateWidget` callback) — it's a positional callback, not a structural interface member.
26
+
27
+ ## Background
28
+
29
+ This is Phase 11, Layer 2 in `docs/architecture/architecture.md`.
30
+ Layer 0 (#192, done) and Layer 1 (#193, done) established the typed `SessionContext` and moved context queries onto `SubagentRuntime`.
31
+ Layer 2 (this issue) aligns the remaining structural mismatches.
32
+ Layer 3 (#195) depends on this layer.
33
+
34
+ Relevant modules:
35
+
36
+ - `src/tools/agent-tool.ts` — defines `AgentToolManager` and `AgentToolWidget` interfaces.
37
+ - `src/tools/background-spawner.ts` — defines `BackgroundManagerDeps` with `getMaxConcurrent()`.
38
+ - `src/runtime.ts` — defines `SubagentRuntime` class with `updateWidget()` delegation method.
39
+ - `src/ui/message-formatters.ts` — has the dead `getToolCallName` re-export.
40
+ - `src/index.ts` — composition root that builds adapter closures.
41
+ - `src/settings.ts` — `SettingsManager` owns `maxConcurrent`.
42
+
43
+ ## Design Overview
44
+
45
+ ### 1. Move `getMaxConcurrent` off manager interfaces → settings
46
+
47
+ The `BackgroundManagerDeps` and `AgentToolManager` interfaces both declare `getMaxConcurrent(): number`.
48
+ In reality, the value comes from `SettingsManager.maxConcurrent`.
49
+ The fix:
50
+
51
+ - Remove `getMaxConcurrent` from `AgentToolManager`.
52
+ - Remove `getMaxConcurrent` from `BackgroundManagerDeps`.
53
+ - Widen `AgentToolDeps.settings` from `{ readonly defaultMaxTurns: number | undefined }` to also include `readonly maxConcurrent: number`.
54
+ - Pass `settings` (or a narrow settings interface) to `spawnBackground` so it can read `maxConcurrent` directly.
55
+ - `SettingsManager` already exposes a `get maxConcurrent(): number` property, so it structurally satisfies the widened interface.
56
+
57
+ After this, `AgentManager` (which has `spawn`, `spawnAndWait`, `resume`, `getRecord` but NOT `getMaxConcurrent`) structurally satisfies `AgentToolManager`.
58
+
59
+ ### 2. Rename `SubagentRuntime.updateWidget()` → `update()`
60
+
61
+ The `AgentToolWidget` interface declares `update(): void`.
62
+ `SubagentRuntime` has `updateWidget(): void` which delegates to `this.widget?.update()`.
63
+ Renaming the delegation method to `update()` makes `SubagentRuntime` structurally satisfy `AgentToolWidget` (it already has `setUICtx`, `ensureTimer`, and `markFinished`).
64
+
65
+ Callers of `runtime.updateWidget()`:
66
+
67
+ - `src/index.ts` line 70: `() => runtime.updateWidget()` → `() => runtime.update()`
68
+ - `src/index.ts` line 199: `update: () => runtime.updateWidget()` → can now pass `runtime` directly (but that's a #195 concern — for now just rename the call).
69
+
70
+ The `WidgetLike` interface in `runtime.ts` already uses `update()` — no conflict.
71
+
72
+ ### 3. Remove dead re-export
73
+
74
+ `src/ui/message-formatters.ts` line 24 exports `getToolCallName` from `#src/session/content-items`.
75
+ No consumer imports `getToolCallName` from `message-formatters` — all uses go directly to `content-items.ts`.
76
+ Delete the re-export line.
77
+
78
+ ### After all three changes
79
+
80
+ ```typescript
81
+ // AgentToolManager (after removing getMaxConcurrent):
82
+ interface AgentToolManager {
83
+ spawn(...): string;
84
+ spawnAndWait(...): Promise<AgentRecord>;
85
+ resume(...): Promise<AgentRecord | undefined>;
86
+ getRecord(id: string): AgentRecord | undefined;
87
+ }
88
+ // AgentManager has all four methods → structural match ✓
89
+
90
+ // AgentToolWidget (unchanged):
91
+ interface AgentToolWidget {
92
+ setUICtx(ctx: unknown): void;
93
+ ensureTimer(): void;
94
+ update(): void;
95
+ markFinished(id: string): void;
96
+ }
97
+ // SubagentRuntime has all four methods (after rename) → structural match ✓
98
+ ```
99
+
100
+ ## Module-Level Changes
101
+
102
+ | File | Change |
103
+ | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
104
+ | `src/tools/agent-tool.ts` | Remove `getMaxConcurrent` from `AgentToolManager`. Widen `settings` type in `AgentToolDeps` to include `readonly maxConcurrent: number`. |
105
+ | `src/tools/background-spawner.ts` | Remove `getMaxConcurrent` from `BackgroundManagerDeps`. Add a `settings: { readonly maxConcurrent: number }` parameter (or add to `BackgroundParams`). Read `settings.maxConcurrent` instead of `manager.getMaxConcurrent()`. |
106
+ | `src/runtime.ts` | Rename `updateWidget()` → `update()`. |
107
+ | `src/ui/message-formatters.ts` | Remove the `export { getToolCallName } from ...` line. |
108
+ | `src/index.ts` | Update `runtime.updateWidget()` → `runtime.update()` at both call sites. Remove `getMaxConcurrent` from the `manager` adapter object passed to `createAgentTool`. Pass `settings` through to `spawnBackground` via the tool deps. |
109
+ | `test/tools/background-spawner.test.ts` | Remove `getMaxConcurrent` from mock manager objects. Add `settings` mock with `maxConcurrent`. |
110
+ | `test/runtime.test.ts` | Rename `updateWidget` → `update` in test descriptions and call sites. |
111
+ | `docs/architecture/architecture.md` | Update Layer 2 status and health metrics (adapter closures count, dead exports count). |
112
+
113
+ ## Test Impact Analysis
114
+
115
+ 1. No new unit tests are strictly needed — this is interface alignment, not new behavior.
116
+ 2. `test/tools/background-spawner.test.ts` needs mock shape updates (remove `getMaxConcurrent` from manager mock, add settings mock).
117
+ 3. `test/runtime.test.ts` needs the method name updated from `updateWidget` to `update`.
118
+ 4. Existing tests for `agent-tool`, `notification`, and `message-formatters` remain as-is (no behavior change).
119
+
120
+ ## TDD Order
121
+
122
+ 1. `refactor:` Rename `SubagentRuntime.updateWidget()` → `update()` — update `runtime.ts`, `test/runtime.test.ts`, and both call sites in `index.ts`.
123
+ Run `pnpm run check` to verify no type errors remain.
124
+ 2. `refactor:` Move `getMaxConcurrent` off manager interfaces — remove from `AgentToolManager` and `BackgroundManagerDeps`, widen `AgentToolDeps.settings`, add settings parameter to `spawnBackground`, update `index.ts` call site and `test/tools/background-spawner.test.ts`.
125
+ Run `pnpm run check`.
126
+ 3. `refactor:` Remove dead `getToolCallName` re-export from `ui/message-formatters.ts`.
127
+ 4. `docs:` Update architecture doc — mark Layer 2 as done, update health metrics (dead exports: 0, adapter closures reduced).
128
+
129
+ ## Risks and Mitigations
130
+
131
+ | Risk | Mitigation |
132
+ | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
133
+ | `update()` is a generic name on `SubagentRuntime` — could confuse readers about what's being updated | The method is a documented widget delegation like its siblings (`markFinished`, `ensureTimer`); the JSDoc comment clarifies it delegates to `widget.update()`. |
134
+ | `background-spawner` signature change could break other callers | Grep confirms only `agent-tool.ts` calls `spawnBackground` — no other consumers. |
135
+ | Renaming method in runtime could miss a call site | Grep and `pnpm run check` after each step catch all references. |
136
+
137
+ ## Open Questions
138
+
139
+ None — the issue's proposed direction is unambiguous and the architecture doc confirms the design.
@@ -41,3 +41,35 @@ This is cleaner than the plan's `getModelInfo(): { modelRegistry: unknown }` app
41
41
  - Biome's `noUnusedPrivateClassMembers` warning caught the leftover `private readonly pi: unknown` in `SessionLifecycleHandler`.
42
42
  Removed `pi` from the constructor entirely (rather than adding `_` prefix), which also cleaned up `index.ts`.
43
43
  - The `eslint-disable` directive at the top of `index.ts` had two now-unused entries (`no-unsafe-member-access`, `no-unsafe-call`) removed by `eslint --fix`.
44
+
45
+ ## Stage: Final Retrospective (2026-05-24T20:45:00Z)
46
+
47
+ ### Session summary
48
+
49
+ All three stages (plan, TDD, ship) completed in a single session.
50
+ Released as `pi-subagents-v7.2.0`.
51
+ One plan contradiction required a judgment call during implementation; otherwise clean mechanical execution.
52
+
53
+ ### Observations
54
+
55
+ #### What went well
56
+
57
+ - The architecture doc's Phase 11 Layer 1 spec was precise enough that no `ask_user` was needed at any stage — the issue body, architecture doc, and #192 retro were fully aligned.
58
+ - `ServiceRuntimeLike` ended up simpler than planned (only `currentCtx` + `buildSnapshot` instead of also requiring `getModelInfo()`) — the implementation found a cleaner design than the plan specified.
59
+ - Test count increase (+6) validates the design: methods that were previously untestable as anonymous closures now have dedicated unit tests.
60
+
61
+ #### What caused friction (agent side)
62
+
63
+ - `missing-context` — The plan's Non-Goals section claimed `buildParentContext` would not change, contradicting Module-Level Changes item #4 which explicitly listed the file.
64
+ The planning stage didn't cross-check these sections before committing.
65
+ Impact: brief confusion during step 3 about which section to trust (resolved by following Module-Level Changes); no rework, added ~30s of deliberation.
66
+ - `missing-context` — TypeScript's discriminated union narrowing limitation with a `{ type: string }` catch-all arm was not anticipated.
67
+ Impact: required adding a local `BranchEntry` union type and explicit casts in `context.ts`; no rework but ~2 min of debugging the type error.
68
+
69
+ #### What caused friction (user side)
70
+
71
+ - None — no user intervention was needed at any point across all three stages.
72
+
73
+ ### Changes made
74
+
75
+ 1. `.pi/prompts/plan-issue.md` — added a Non-Goals vs Module-Level Changes cross-check instruction under the Module-Level Changes bullet.
@@ -0,0 +1,36 @@
1
+ ---
2
+ issue: 194
3
+ issue_title: "Align tool interfaces for structural typing"
4
+ ---
5
+
6
+ # Retro: #194 — Align tool interfaces for structural typing
7
+
8
+ ## Stage: Planning (2026-05-24T12:00:00Z)
9
+
10
+ ### Session summary
11
+
12
+ Produced an implementation plan for three targeted alignment changes: moving `getMaxConcurrent` off manager interfaces to the settings accessor, renaming `SubagentRuntime.updateWidget()` → `update()`, and removing the dead `getToolCallName` re-export.
13
+ The plan includes a 4-step TDD order with type-check gates after each refactoring step.
14
+
15
+ ### Observations
16
+
17
+ - Issue #193 (Layer 1) is already closed/implemented, confirming this layer can proceed immediately.
18
+
19
+ ## Stage: Implementation — TDD (2026-05-24T21:00:00Z)
20
+
21
+ ### Session summary
22
+
23
+ Completed all 4 TDD steps: renamed `SubagentRuntime.updateWidget()` → `update()`, moved `getMaxConcurrent` from manager interfaces to the `settings` narrow type, removed the dead `getToolCallName` re-export, and updated the architecture doc.
24
+ Test count stayed flat at 854 (53 files) — all green.
25
+ The `pnpm run check` type-gate caught a previously-unnoticed `test/helpers/make-deps.test.ts` that also validated `getMaxConcurrent` and the old `settings` shape; this file was updated as part of step 2.
26
+
27
+ ### Observations
28
+
29
+ - An unexpected file `test/helpers/make-deps.test.ts` had three type errors after removing `getMaxConcurrent` (one test asserting `manager.getMaxConcurrent()`, one structural compatibility check referencing it, and one settings override that only passed `defaultMaxTurns`).
30
+ All three were fixed in the same commit as step 2 — no deviation from the plan.
31
+ - Adding `settings` to `BackgroundParams` (instead of as a 5th function parameter) was the right call: it keeps `spawnBackground` at 4 arguments and groups all spawn-context values together.
32
+ - The health metric update: dead exports 1 → 0, adapter closures 41 → 40 (only `getMaxConcurrent` was removed in this layer; the remaining 8 widget/manager adapter closures need #195 class conversion to collapse).
33
+ - The `background-spawner.ts` module is the only consumer of `getMaxConcurrent` — grep confirms no other call sites beyond `agent-tool.ts`'s interface definition.
34
+ - The `NotificationManager` constructor takes `updateWidget` as a positional callback parameter name — this does NOT need renaming (it's not a structural interface member).
35
+ - The rename from `updateWidget` → `update` is safe because the `WidgetLike` interface in `runtime.ts` already uses `update()` — no naming conflict within the class.
36
+ - All three changes are independent of each other and could be committed in any order, but the plan sequences them for clean `pnpm run check` passes at each step.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gotgenes/pi-subagents",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/service.ts"
package/src/index.ts CHANGED
@@ -67,7 +67,7 @@ export default function (pi: ExtensionAPI) {
67
67
  (msg, opts) => pi.sendMessage(msg, opts),
68
68
  runtime.agentActivity,
69
69
  (id) => runtime.markFinished(id),
70
- () => runtime.updateWidget(),
70
+ () => runtime.update(),
71
71
  );
72
72
 
73
73
  // Settings: owns all three in-memory values and handles load/save/emit.
@@ -191,12 +191,11 @@ export default function (pi: ExtensionAPI) {
191
191
  spawnAndWait: (snapshot, type, prompt, opts) => manager.spawnAndWait(snapshot, type, prompt, opts),
192
192
  resume: (id, prompt, signal) => manager.resume(id, prompt, signal),
193
193
  getRecord: (id) => manager.getRecord(id),
194
- getMaxConcurrent: () => settings.maxConcurrent,
195
194
  },
196
195
  widget: {
197
196
  setUICtx: (ctx) => runtime.setUICtx(ctx as UICtx),
198
197
  ensureTimer: () => runtime.ensureTimer(),
199
- update: () => runtime.updateWidget(),
198
+ update: () => runtime.update(),
200
199
  markFinished: (id) => runtime.markFinished(id),
201
200
  },
202
201
  agentActivity: runtime.agentActivity,
package/src/runtime.ts CHANGED
@@ -109,7 +109,7 @@ export class SubagentRuntime {
109
109
  }
110
110
 
111
111
  /** Delegate to widget.update — no-op when widget is null. */
112
- updateWidget(): void {
112
+ update(): void {
113
113
  this.widget?.update();
114
114
  }
115
115
 
@@ -23,7 +23,6 @@ export interface AgentToolManager {
23
23
  spawnAndWait: (snapshot: ParentSnapshot, type: string, prompt: string, opts: Omit<AgentSpawnConfig, "isBackground">) => Promise<AgentRecord>;
24
24
  resume: (id: string, prompt: string, signal: AbortSignal) => Promise<AgentRecord | undefined>;
25
25
  getRecord: (id: string) => AgentRecord | undefined;
26
- getMaxConcurrent: () => number;
27
26
  }
28
27
 
29
28
  /** Narrow widget interface — only the methods the Agent tool calls. */
@@ -50,8 +49,8 @@ export interface AgentToolDeps {
50
49
  agentActivity: AgentActivityAccess;
51
50
  registry: AgentTypeRegistry;
52
51
  agentDir: string;
53
- /** Narrow settings accessor — only the default max turns is needed here. */
54
- settings: { readonly defaultMaxTurns: number | undefined };
52
+ /** Narrow settings accessor — only the fields the Agent tool reads. */
53
+ settings: { readonly defaultMaxTurns: number | undefined; readonly maxConcurrent: number };
55
54
  /** Build a ParentSnapshot from the current session context. */
56
55
  buildSnapshot: (inheritContext: boolean) => ParentSnapshot;
57
56
  /** Model info from the current session context. */
@@ -252,7 +251,7 @@ Guidelines:
252
251
  manager,
253
252
  widget,
254
253
  agentActivity,
255
- { config, snapshot, parentSession },
254
+ { config, snapshot, parentSession, settings },
256
255
  );
257
256
  }
258
257
 
@@ -11,7 +11,6 @@ import { subscribeUIObserver } from "#src/ui/ui-observer";
11
11
  export interface BackgroundManagerDeps {
12
12
  spawn(snapshot: ParentSnapshot, type: string, prompt: string, opts: AgentSpawnConfig): string;
13
13
  getRecord(id: string): AgentRecord | undefined;
14
- getMaxConcurrent(): number;
15
14
  }
16
15
 
17
16
  /** Narrow widget interface for the background spawner. */
@@ -25,6 +24,7 @@ export interface BackgroundParams {
25
24
  config: ResolvedSpawnConfig;
26
25
  snapshot: ParentSnapshot;
27
26
  parentSession: ParentSessionInfo;
27
+ settings: { readonly maxConcurrent: number };
28
28
  }
29
29
 
30
30
  /**
@@ -77,7 +77,7 @@ export function spawnBackground(
77
77
  `Description: ${execution.description}\n` +
78
78
  (record?.outputFile ? `Output file: ${record.outputFile}\n` : "") +
79
79
  (isQueued
80
- ? `Position: queued (max ${manager.getMaxConcurrent()} concurrent)\n`
80
+ ? `Position: queued (max ${params.settings.maxConcurrent} concurrent)\n`
81
81
  : "") +
82
82
  `\nYou will be notified when this agent completes.\n` +
83
83
  `Use get_subagent_result to retrieve full results, or steer_subagent to send it messages.\n` +
@@ -21,8 +21,6 @@ export interface FormatterContext {
21
21
 
22
22
  // ── File-local types and guards ─────────────────────────────────────────────
23
23
 
24
- export { getToolCallName } from "#src/session/content-items";
25
-
26
24
  /** Bash execution message — 'bashExecution' role is not in the SDK's AgentSession message role union. */
27
25
  export interface BashExecutionMessage {
28
26
  role: "bashExecution";