@pi-unipi/subagents 2.6.2 → 2.9.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/subagents",
3
- "version": "2.6.2",
4
- "description": "Subagents for UniPi parallel execution, file locking, workflow integration",
3
+ "version": "2.9.0",
4
+ "description": "Subagents for UniPi \u2014 parallel execution, file locking, workflow integration",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
@@ -9,16 +9,16 @@
9
9
  "test": "npx tsx --test src/__tests__/*.test.ts"
10
10
  },
11
11
  "dependencies": {
12
- "@pi-unipi/core": "2.6.1",
13
- "@earendil-works/pi-agent-core": "^0.80.0",
12
+ "@pi-unipi/core": "2.9.0",
13
+ "@earendil-works/pi-agent-core": "^0.84.0",
14
14
  "acorn": "8.18.0"
15
15
  },
16
16
  "devDependencies": {
17
17
  "typescript": "^5.8.3"
18
18
  },
19
19
  "peerDependencies": {
20
- "@earendil-works/pi-coding-agent": "^0.80.0",
21
- "@earendil-works/pi-tui": "^0.80.0",
20
+ "@earendil-works/pi-coding-agent": "^0.84.0",
21
+ "@earendil-works/pi-tui": "^0.84.0",
22
22
  "typebox": "^1.1.38"
23
23
  },
24
24
  "files": [
@@ -10,10 +10,12 @@ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
10
10
  import {
11
11
  type AgentSession,
12
12
  type AgentSessionEvent,
13
+ type CreateAgentSessionOptions,
13
14
  createAgentSession,
14
15
  DefaultResourceLoader,
15
16
  type ExtensionAPI,
16
17
  getAgentDir,
18
+ type ModelRuntime,
17
19
  SessionManager,
18
20
  SettingsManager,
19
21
  } from "@earendil-works/pi-coding-agent";
@@ -174,12 +176,16 @@ export async function runAgent(
174
176
  const model = options.model ?? ctx.model;
175
177
 
176
178
  // Create session
177
- const sessionOpts: Parameters<typeof createAgentSession>[0] = {
179
+ // SDK >=0.84: CreateAgentSessionOptions takes `modelRuntime` (the canonical
180
+ // ModelRuntime) instead of the removed `modelRegistry` option. The extension
181
+ // context exposes only the ModelRegistry facade, whose `runtime` field is the
182
+ // same ModelRuntime the parent session runs on.
183
+ const sessionOpts: CreateAgentSessionOptions = {
178
184
  cwd: effectiveCwd,
179
185
  agentDir,
180
186
  sessionManager: SessionManager.inMemory(effectiveCwd),
181
187
  settingsManager: SettingsManager.create(effectiveCwd, agentDir),
182
- modelRegistry: ctx.modelRegistry,
188
+ modelRuntime: (ctx.modelRegistry as unknown as { runtime: ModelRuntime }).runtime,
183
189
  model,
184
190
  tools: toolNames,
185
191
  resourceLoader: loader,