@exreve/exk 1.0.62 → 1.0.63
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/dist/cli/agentSession.js +8 -7
- package/dist/cli/piBackend.js +11 -18
- package/dist/ttc-cli.tar.gz +0 -0
- package/package.json +2 -1
package/dist/cli/agentSession.js
CHANGED
|
@@ -273,16 +273,17 @@ export class AgentSessionManager {
|
|
|
273
273
|
// Priority: explicit parameter > env var
|
|
274
274
|
const requested = agentBackend || process.env.TTC_AGENT_BACKEND;
|
|
275
275
|
if (requested === 'pi') {
|
|
276
|
+
let piBackend;
|
|
276
277
|
try {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
console.warn('[AgentSessionManager] Pi backend requested but SDK not installed, falling back to Claude');
|
|
278
|
+
piBackend = require('./piBackend.js').piBackend;
|
|
279
|
+
}
|
|
280
|
+
catch (err) {
|
|
281
|
+
throw new Error(`Pi backend requested but module failed to load: ${err.message}. Install with: cd $(npm root -g)/@exreve/exk && npm install @mariozechner/pi-coding-agent`);
|
|
282
282
|
}
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
if (!piBackend.isAvailable()) {
|
|
284
|
+
throw new Error('Pi backend requested but SDK (@mariozechner/pi-coding-agent) is not installed. Install with: cd $(npm root -g)/@exreve/exk && npm install @mariozechner/pi-coding-agent');
|
|
285
285
|
}
|
|
286
|
+
return piBackend;
|
|
286
287
|
}
|
|
287
288
|
return claudeBackend;
|
|
288
289
|
}
|
package/dist/cli/piBackend.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { executeAnalyzeImage, executeSendFile, executeBrowserQuery } from './sharedTools.js';
|
|
17
17
|
// Conditional import — will be undefined if package not installed
|
|
18
|
-
// @ts-expect-error — Pi SDK is an optional dependency, may not be installed
|
|
19
18
|
let piSdk;
|
|
20
19
|
try {
|
|
21
|
-
// @ts-expect-error — optional dependency
|
|
22
20
|
piSdk = await import('@mariozechner/pi-coding-agent');
|
|
23
21
|
}
|
|
24
22
|
catch {
|
|
@@ -62,20 +60,12 @@ export class PiBackend {
|
|
|
62
60
|
// Set model if specified
|
|
63
61
|
if (model) {
|
|
64
62
|
try {
|
|
65
|
-
// Try
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
sessionOpts.model =
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
// Try as a custom model — Pi supports custom providers via models.json
|
|
72
|
-
// For now, we try the model string directly
|
|
73
|
-
const found = modelRegistry.find(provider || 'anthropic', model);
|
|
74
|
-
if (found) {
|
|
75
|
-
sessionOpts.model = found;
|
|
76
|
-
}
|
|
77
|
-
// If not found, Pi will use its default model
|
|
63
|
+
// Try as a custom model via ModelRegistry
|
|
64
|
+
const found = modelRegistry.find(provider || 'anthropic', model);
|
|
65
|
+
if (found) {
|
|
66
|
+
sessionOpts.model = found;
|
|
78
67
|
}
|
|
68
|
+
// If not found, Pi will use its default model
|
|
79
69
|
}
|
|
80
70
|
catch {
|
|
81
71
|
// Model not found — Pi will use default
|
|
@@ -330,7 +320,8 @@ export class PiBackend {
|
|
|
330
320
|
required: ['image_path', 'question'],
|
|
331
321
|
},
|
|
332
322
|
execute: async (_toolCallId, params) => {
|
|
333
|
-
|
|
323
|
+
const result = await executeAnalyzeImage({ image_path: params.image_path, question: params.question }, sharedConfig);
|
|
324
|
+
return { ...result, details: {} };
|
|
334
325
|
},
|
|
335
326
|
});
|
|
336
327
|
}
|
|
@@ -352,7 +343,8 @@ export class PiBackend {
|
|
|
352
343
|
},
|
|
353
344
|
},
|
|
354
345
|
execute: async (_toolCallId, params) => {
|
|
355
|
-
|
|
346
|
+
const result = await executeSendFile(params, sharedConfig);
|
|
347
|
+
return { ...result, details: {} };
|
|
356
348
|
},
|
|
357
349
|
});
|
|
358
350
|
}
|
|
@@ -373,7 +365,8 @@ export class PiBackend {
|
|
|
373
365
|
required: ['query'],
|
|
374
366
|
},
|
|
375
367
|
execute: async (_toolCallId, params) => {
|
|
376
|
-
|
|
368
|
+
const result = await executeBrowserQuery({ query: params.query, maxSteps: params.maxSteps }, sharedConfig);
|
|
369
|
+
return { ...result, details: {} };
|
|
377
370
|
},
|
|
378
371
|
});
|
|
379
372
|
}
|
package/dist/ttc-cli.tar.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exreve/exk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.63",
|
|
4
4
|
"description": "exk - Control Claude CLI with voice and programmable interfaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"@anthropic-ai/claude-agent-sdk": "^0.2.126",
|
|
37
37
|
"@anthropic-ai/sdk": "^0.92.0",
|
|
38
38
|
"@fastify/static": "^9.0.0",
|
|
39
|
+
"@mariozechner/pi-coding-agent": "^0.73.1",
|
|
39
40
|
"@xenova/transformers": "^2.17.2",
|
|
40
41
|
"anthropic-proxy": "^1.3.0",
|
|
41
42
|
"chokidar": "^3.6.0",
|