pi-subagent-manager 1.8.0 → 1.10.0

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.
@@ -5,10 +5,10 @@ description: Design architecture, weigh tradeoffs, and decompose ambiguous work
5
5
  color: mdLink
6
6
  thinkingLevel: high
7
7
  modelSuggestions:
8
- - opus-5.5
9
- - gpt-6-astra
10
- - fable-5.1
11
- - kimi-k3
8
+ - gemini-4-neon
9
+ - claude-opus-5.5
10
+ - claude-fable-5.2
11
+ - gpt-6.2-astra
12
12
  tools:
13
13
  allow:
14
14
  - read
package/agents/coder.md CHANGED
@@ -5,10 +5,9 @@ description: Own complex or long-running implementation, refactoring, debugging,
5
5
  thinkingLevel: high
6
6
  color: mdCode
7
7
  modelSuggestions:
8
- - sonnet-5.5
9
- - gpt-6.1-sol
10
- - kimi-k3.1-pro
11
- - muse-wonder-full-1.0
8
+ - gemini-4-hydrogen
9
+ - gpt-6.2-sol
10
+ - claude-sonnet-5.5
12
11
  tools:
13
12
  allow:
14
13
  - read
@@ -3,9 +3,9 @@ name: researcher
3
3
  icon: ""
4
4
  description: Evidence-backed local/remote codebase and internet research; source verification, versioned citations, and decision-ready synthesis
5
5
  modelSuggestions:
6
+ - claude-sonnet-5.5
6
7
  - gpt-6.1-terra
7
- - sonnet-5.5
8
- - muse-spark-1.3
8
+ - gemini-4-hydrogen
9
9
  thinkingLevel: medium
10
10
  color: syntaxVariable
11
11
  tools:
package/agents/writer.md CHANGED
@@ -5,11 +5,8 @@ description: Draft or revise original long-form prose for a stated audience and
5
5
  thinkingLevel: medium
6
6
  color: thinkingXhigh
7
7
  modelSuggestions:
8
- - opus-5.5
9
- - gemini-4-argon
10
- - gemini-3.8-flash
11
- - fable-5.1
12
- - muse-spark-1.3
8
+ - gemini-4-carbon
9
+ - claude-opus-5.5
13
10
  tools:
14
11
  allow:
15
12
  - read
@@ -2,7 +2,7 @@
2
2
 
3
3
  Six packaged roles are Markdown definitions in `agents/`. User/project definitions can override any role. Retained threads keep their saved definitions until replaced through the normal configuration flow.
4
4
 
5
- The original model shortlist was audited **October 4, 2026 local time (October 3 UTC)**. The tasker, researcher, and coder suggestions below reflect subsequent user-selected updates checked against the current Pi model list. Read the [source-backed model audit](research-model-audit-2026-10.md) for historical measurements and qualifications, and [researcher workflow research](research-researcher-workflow.md) for retrieval guidance. The older [five-role shortlist](research-default-agent-models.md) is historical.
5
+ The original model shortlist was audited **October 4, 2026 local time (October 3 UTC)**. The suggestions below include subsequent user-selected updates checked against the Pi and OpenRouter model catalogs. Read the [source-backed model audit](research-model-audit-2026-10.md) for historical measurements and qualifications, and [researcher workflow research](research-researcher-workflow.md) for retrieval guidance. The older [five-role shortlist](research-default-agent-models.md) is historical.
6
6
 
7
7
  ## Role routing
8
8
 
@@ -40,23 +40,21 @@ Suggestions are chosen by task capability, quality, cost, and speed. API formats
40
40
 
41
41
  Every `modelSuggestions` entry is a single plain model-name string suitable for fuzzy search—no parentheticals, tier labels, benchmark scores, or provider paths. Those belong in this guide and the audit. Suggestions are advisory: they **do not select a runtime model**. Defaults inherit the parent/default model until configured. Actual runtime preferences belong in `models` as eligible `provider/model-id` identities and are subject to scoped-model filtering.
42
42
 
43
- | Role | Suggested names, in order | Rationale |
44
- | ---------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
45
- | architect | `opus-5.5`, `gpt-6-astra`, `fable-5.1`, `kimi-k3` | Heavyweight, quality-first reasoning for ambiguous architecture, difficult constraints, and consequential plans; Kimi is the user-selected long-context alternative. |
46
- | coder | `sonnet-5.5`, `gpt-6.1-sol`, `kimi-k3.1-pro`, `muse-wonder-full-1.0` | User-selected implementation shortlist, with high thinking by default. |
47
- | researcher | `gpt-6.1-terra`, `sonnet-5.5`, `muse-spark-1.3` | User-selected research shortlist, with medium thinking by default; no matched research-citation tournament is claimed. |
48
- | reviewer | `gpt-6.1-sol`, `sonnet-5.5`, `opus-5.5`, `glm-5.3`, `gemini-4-argon` | Reasoning and code evidence, without treating premium Astra as necessary for every review. |
49
- | tasker | `gpt-6-luna`, `haiku-5.5`, `deepseek-v4.1-flash-1017` | User-selected bounded-task shortlist, with low thinking by default. |
50
- | writer | `opus-5.5`, `gemini-4-argon`, `gemini-3.8-flash`, `fable-5.1`, `muse-spark-1.3` | Quality-sensitive editorial work, creative-writing Arena candidates, low-cost drafting, and a user-selected Muse alternative. |
43
+ | Role | Suggested names, in order | Rationale |
44
+ | ---------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
45
+ | architect | `gemini-4-neon`, `claude-opus-5.5`, `claude-fable-5.2`, `gpt-6.2-astra` | User-selected shortlist for ambiguous architecture, difficult constraints, and consequential plans. |
46
+ | coder | `gemini-4-hydrogen`, `gpt-6.2-sol`, `claude-sonnet-5.5` | User-selected implementation shortlist, with high thinking by default. |
47
+ | researcher | `claude-sonnet-5.5`, `gpt-6.1-terra`, `gemini-4-hydrogen` | User-selected research shortlist, with medium thinking by default. |
48
+ | reviewer | `gpt-6.1-sol`, `sonnet-5.5`, `opus-5.5`, `glm-5.3`, `gemini-4-argon` | Reasoning and code evidence, without treating premium Astra as necessary for every review. |
49
+ | tasker | `gpt-6-luna`, `haiku-5.5`, `deepseek-v4.1-flash-1017` | User-selected bounded-task shortlist, with low thinking by default. |
50
+ | writer | `gemini-4-carbon`, `claude-opus-5.5` | User-selected shortlist for drafting and revision, with medium thinking by default. |
51
51
 
52
- These are choices, not an automatic fallback/escalation chain or a universal quality ranking. Model aliases were checked against `pi --list-models`, including `claude-haiku-5-5`, `claude-sonnet-5-5`, and `moonshotai/kimi-k3.1-pro`; fuzzy suggestions omit provider paths and normalize version separators. The historical audit is not a new benchmark evaluation of these updates. Deep-research product results are not automatically results for their underlying base models.
52
+ These are choices, not an automatic fallback/escalation chain or a universal quality ranking. The architect, coder, researcher, and writer names use the model-ID suffixes from [OpenRouter](https://openrouter.ai/api/v1/models), cross-checked against the [Pi catalog](https://pi.dev/models) and local `pi --list-models`. Fuzzy matching can surface the same model across providers and normalize version separators (for example, `claude-fable-5.2` and `claude-fable-5-2`). The picker saves the concrete provider/model ID only when selected and confirmed. The historical audit is not a new benchmark evaluation of these updates. Deep-research product results are not automatically results for their underlying base models.
53
53
 
54
54
  The November 4, 2026 additions were checked against provider sources and the current catalog:
55
55
 
56
56
  - Tasker uses `deepseek-v4.1-flash-1017`, the latest V4.1 Flash weight revision. [DeepSeek](https://api-docs.deepseek.com/) serves it through `deepseek-flash`; Pi and OpenRouter also list the explicit `deepseek/deepseek-v4.1-flash-1017` identifier.
57
- - Coder adds `muse-wonder-full-1.0`, the exact identifier in [Meta’s Wonder model table](https://dev.meta.ai/models/muse-wonder). Full is a distinct, Muse Code subscription-only variant, not ordinary Wonder at max reasoning effort. It is an advisory suggestion and may not match a model available in Pi; it does not imply public Model API access.
58
- - Researcher adds `muse-spark-1.3`, [Meta’s recommended current Spark version](https://dev.meta.ai/docs/models), not the separate Spark Open model.
59
- - Reviewer adds `gemini-4-argon` (`google/gemini-4-argon` in the [OpenRouter catalog](https://openrouter.ai/api/v1/models)); writer already includes it. Existing suggestions and thinking defaults are preserved.
57
+ - Reviewer adds `gemini-4-argon` (`google/gemini-4-argon` in the [OpenRouter catalog](https://openrouter.ai/api/v1/models)).
60
58
 
61
59
  ### Quality, price, and speed are different axes
62
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-subagent-manager",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "Hierarchical, steerable subagent threads for pi",
5
5
  "type": "module",
6
6
  "engines": {
package/src/index.ts CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  offerAgentImport,
15
15
  } from "./prefs/agent-import.ts";
16
16
  import { ThreadManager } from "./orch/manager.ts";
17
+ import { inheritedContextEntries } from "./orch/context-entries.ts";
17
18
  import { loadManagerSettings } from "./prefs/settings.ts";
18
19
  import { configureAgents } from "./ui/settings-ui.ts";
19
20
  import { AgentNavigationController } from "./ui/status-ui.ts";
@@ -656,6 +657,8 @@ export default function piSubagent(pi: ExtensionAPI): void {
656
657
  ...limits,
657
658
  createDriver: driverFactory,
658
659
  rootSnapshot: () => buildSessionContext(requireContext().sessionManager.getBranch()).messages,
660
+ rootContextEntries: () =>
661
+ inheritedContextEntries(requireContext().sessionManager.getBranch()),
659
662
  getType: (name) => store.get(name),
660
663
  toolsFor,
661
664
  onEventError: (error, event) => {
@@ -0,0 +1,15 @@
1
+ import type { InheritedContextEntry } from "../types.ts";
2
+
3
+ /** Preserve only pruner state; other extension state is private to its session. */
4
+ export function inheritedContextEntries(
5
+ branch: readonly { type: string; customType?: string; data?: unknown }[],
6
+ ): InheritedContextEntry[] {
7
+ return structuredClone(
8
+ branch.flatMap((entry) =>
9
+ entry.type === "custom" &&
10
+ (entry.customType === "context-prune-index" || entry.customType === "context-prune-frontier")
11
+ ? [{ customType: entry.customType, data: entry.data }]
12
+ : [],
13
+ ),
14
+ );
15
+ }
@@ -4,6 +4,7 @@ import type {
4
4
  AgentDriver,
5
5
  AgentType,
6
6
  DriverOptions,
7
+ InheritedContextEntry,
7
8
  ManagerOptions,
8
9
  SavedThread,
9
10
  SavedThreadView,
@@ -22,6 +23,7 @@ interface Record {
22
23
  view: ThreadView;
23
24
  definition: AgentType;
24
25
  inherited: AgentMessage[];
26
+ inheritedContextEntries: InheritedContextEntry[];
25
27
  contextReady?: Promise<void>;
26
28
  contextPending?: boolean;
27
29
  startup: AbortController;
@@ -232,7 +234,10 @@ export class ThreadManager {
232
234
  view,
233
235
  definition: structuredClone(record.definition),
234
236
  ...(!view.sessionFile && !record.contextPending
235
- ? { inherited: structuredClone(record.inherited) }
237
+ ? {
238
+ inherited: structuredClone(record.inherited),
239
+ inheritedContextEntries: structuredClone(record.inheritedContextEntries),
240
+ }
236
241
  : {}),
237
242
  };
238
243
  });
@@ -274,6 +279,7 @@ export class ThreadManager {
274
279
  view,
275
280
  definition: structuredClone(item.definition),
276
281
  inherited: structuredClone(item.inherited ?? []),
282
+ inheritedContextEntries: structuredClone(item.inheritedContextEntries ?? []),
277
283
  // A reservation saved before its lexical parent opened has no snapshot yet.
278
284
  contextPending: !view.sessionFile && item.inherited === undefined && view.parent !== null,
279
285
  startup: new AbortController(),
@@ -337,6 +343,11 @@ export class ThreadManager {
337
343
  : parentRecord?.driver
338
344
  ? inheritContext(parentRecord.driver.snapshot())
339
345
  : [];
346
+ const inheritedContextEntries = structuredClone(
347
+ parent === "/root"
348
+ ? (this.options.rootContextEntries?.() ?? [])
349
+ : (parentRecord?.driver?.contextEntries?.() ?? []),
350
+ );
340
351
  const now = Date.now();
341
352
  const record: Record = {
342
353
  view: {
@@ -358,6 +369,7 @@ export class ThreadManager {
358
369
  },
359
370
  definition: type,
360
371
  inherited,
372
+ inheritedContextEntries,
361
373
  contextPending: !!(parentRecord && !parentRecord.driver),
362
374
  startup: new AbortController(),
363
375
  pauseRequested: false,
@@ -730,6 +742,7 @@ export class ThreadManager {
730
742
  canSpawnChildren,
731
743
  type: record.definition,
732
744
  inherited: record.inherited,
745
+ inheritedContextEntries: record.inheritedContextEntries,
733
746
  tools: this.options.toolsFor(record.view.path),
734
747
  parentPath: record.view.parent,
735
748
  sessionFile: record.view.sessionFile,
@@ -983,6 +996,7 @@ export class ThreadManager {
983
996
  if (record.contextReady) return record.contextReady;
984
997
  if (!record.view.parent || record.view.parent === "/root") {
985
998
  record.inherited = inheritContext(this.options.rootSnapshot());
999
+ record.inheritedContextEntries = structuredClone(this.options.rootContextEntries?.() ?? []);
986
1000
  record.contextPending = false;
987
1001
  return undefined;
988
1002
  }
@@ -991,6 +1005,7 @@ export class ThreadManager {
991
1005
  ready = this.ensureDriver(parentRecord, readOnly)
992
1006
  .then((driver) => {
993
1007
  record.inherited = inheritContext(driver.snapshot());
1008
+ record.inheritedContextEntries = structuredClone(driver.contextEntries?.() ?? []);
994
1009
  record.contextPending = false;
995
1010
  if (record.contextReady === ready) record.contextReady = undefined;
996
1011
  this.touch(record);
@@ -31,6 +31,7 @@ import { TranscriptChannel } from "./transcript.ts";
31
31
  import { delegationGuidance } from "./prompt.ts";
32
32
  import { discoverSubagentExtensions, selectSubagentExtensions } from "./extensions.ts";
33
33
  import type { InheritedToolSource } from "./inherited-tools.ts";
34
+ import { inheritedContextEntries } from "./context-entries.ts";
34
35
  import type {
35
36
  ModelSelectionMode,
36
37
  SubagentExtensionSelection,
@@ -347,6 +348,9 @@ export function createDriverFactory(
347
348
  sessionManager.appendMessage(message);
348
349
  }
349
350
  }
351
+ for (const entry of options.inheritedContextEntries ?? []) {
352
+ sessionManager.appendCustomEntry(entry.customType, entry.data);
353
+ }
350
354
  }
351
355
  const restored = options.sessionFile ? sessionManager.buildSessionContext() : undefined;
352
356
  const modelSelection = getModelSelection();
@@ -979,6 +983,9 @@ export function createDriverFactory(
979
983
  snapshot() {
980
984
  return structuredClone(session.messages);
981
985
  },
986
+ contextEntries() {
987
+ return inheritedContextEntries(sessionManager.getBranch());
988
+ },
982
989
  observeTranscript(listener) {
983
990
  assertOpen();
984
991
  return transcript.observe(listener);
package/src/types.ts CHANGED
@@ -140,10 +140,17 @@ export interface TranscriptObservation {
140
140
  }
141
141
  export type TranscriptListener = (snapshot: TranscriptSnapshot) => void;
142
142
 
143
+ /** Opaque session metadata needed to reproduce inherited context transformations. */
144
+ export interface InheritedContextEntry {
145
+ customType: string;
146
+ data: unknown;
147
+ }
148
+
143
149
  export interface AgentDriver {
144
150
  prompt(message: string): Promise<void>;
145
151
  steer(message: string): Promise<void>;
146
152
  snapshot(): AgentMessage[];
153
+ contextEntries?(): InheritedContextEntry[];
147
154
  observeTranscript?(listener: TranscriptListener): TranscriptObservation;
148
155
  output(): string;
149
156
  abort(): Promise<void>;
@@ -158,6 +165,7 @@ export interface DriverOptions {
158
165
  canSpawnChildren?: boolean;
159
166
  type: AgentType;
160
167
  inherited: AgentMessage[];
168
+ inheritedContextEntries?: InheritedContextEntry[];
161
169
  tools: ToolDefinition[];
162
170
  onEvent(event: DriverEvent): void;
163
171
  shouldPause(): boolean;
@@ -198,6 +206,7 @@ export interface SavedThread {
198
206
  definition: AgentType;
199
207
  /** Reserved threads may not have a transcript yet; preserve their initial context. */
200
208
  inherited?: AgentMessage[];
209
+ inheritedContextEntries?: InheritedContextEntry[];
201
210
  }
202
211
  export interface ThreadService {
203
212
  list(): ThreadView[];
@@ -245,6 +254,7 @@ export interface ThreadActivity {
245
254
  export interface ManagerOptions {
246
255
  createDriver: DriverFactory;
247
256
  rootSnapshot(): AgentMessage[];
257
+ rootContextEntries?(): InheritedContextEntry[];
248
258
  getType(name: string): AgentType;
249
259
  toolsFor(path: string): ToolDefinition[];
250
260
  onEvent?(event: ThreadEvent): void;