@getpochi/cli 0.5.32 → 0.5.33
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.js +15 -22
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -353657,7 +353657,7 @@ var {
|
|
|
353657
353657
|
// package.json
|
|
353658
353658
|
var package_default = {
|
|
353659
353659
|
name: "@getpochi/cli",
|
|
353660
|
-
version: "0.5.
|
|
353660
|
+
version: "0.5.33",
|
|
353661
353661
|
type: "module",
|
|
353662
353662
|
bin: {
|
|
353663
353663
|
pochi: "src/cli.ts"
|
|
@@ -371085,7 +371085,7 @@ class McpHub {
|
|
|
371085
371085
|
logger13.debug(`Tried to stop non-existing server: ${name17}`);
|
|
371086
371086
|
}
|
|
371087
371087
|
}
|
|
371088
|
-
addServer(name17, serverConfig) {
|
|
371088
|
+
async addServer(name17, serverConfig) {
|
|
371089
371089
|
if (!serverConfig) {
|
|
371090
371090
|
throw new Error("Server configuration is required");
|
|
371091
371091
|
}
|
|
@@ -371094,7 +371094,7 @@ class McpHub {
|
|
|
371094
371094
|
...this.config,
|
|
371095
371095
|
[serverName]: serverConfig
|
|
371096
371096
|
};
|
|
371097
|
-
this.reloadConfig(newConfig);
|
|
371097
|
+
await this.reloadConfig(newConfig);
|
|
371098
371098
|
return serverName;
|
|
371099
371099
|
}
|
|
371100
371100
|
addServers(serverConfigs) {
|
|
@@ -371108,10 +371108,10 @@ class McpHub {
|
|
|
371108
371108
|
this.reloadConfig(newConfig);
|
|
371109
371109
|
return addedNames;
|
|
371110
371110
|
}
|
|
371111
|
-
reloadConfig(newConfig, save = true) {
|
|
371111
|
+
async reloadConfig(newConfig, save = true) {
|
|
371112
371112
|
this.config = newConfig;
|
|
371113
371113
|
if (save) {
|
|
371114
|
-
updateConfig({ mcp: newConfig }).catch((error40) => {
|
|
371114
|
+
await updateConfig({ mcp: newConfig }).catch((error40) => {
|
|
371115
371115
|
logger13.error("Failed to persist MCP configuration changes", error40);
|
|
371116
371116
|
});
|
|
371117
371117
|
}
|
|
@@ -397341,7 +397341,6 @@ class FlexibleChatTransport {
|
|
|
397341
397341
|
isCli;
|
|
397342
397342
|
store;
|
|
397343
397343
|
customAgent;
|
|
397344
|
-
cwd;
|
|
397345
397344
|
constructor(options4) {
|
|
397346
397345
|
this.onStart = options4.onStart;
|
|
397347
397346
|
this.getters = options4.getters;
|
|
@@ -397349,7 +397348,6 @@ class FlexibleChatTransport {
|
|
|
397349
397348
|
this.isCli = options4.isCli;
|
|
397350
397349
|
this.store = options4.store;
|
|
397351
397350
|
this.customAgent = overrideCustomAgentTools(options4.customAgent);
|
|
397352
|
-
this.cwd = options4.cwd;
|
|
397353
397351
|
}
|
|
397354
397352
|
sendMessages = async ({
|
|
397355
397353
|
chatId,
|
|
@@ -397368,7 +397366,7 @@ class FlexibleChatTransport {
|
|
|
397368
397366
|
});
|
|
397369
397367
|
const middlewares = [];
|
|
397370
397368
|
if (!this.isSubTask) {
|
|
397371
|
-
middlewares.push(createNewTaskMiddleware(this.store,
|
|
397369
|
+
middlewares.push(createNewTaskMiddleware(this.store, environment2?.info.cwd, chatId, customAgents));
|
|
397372
397370
|
}
|
|
397373
397371
|
if ("modelId" in llm && isWellKnownReasoningModel(llm.modelId)) {
|
|
397374
397372
|
middlewares.push(createReasoningMiddleware());
|
|
@@ -397468,11 +397466,9 @@ class LiveChatKit {
|
|
|
397468
397466
|
store;
|
|
397469
397467
|
chat;
|
|
397470
397468
|
transport;
|
|
397471
|
-
cwd;
|
|
397472
397469
|
spawn;
|
|
397473
397470
|
constructor({
|
|
397474
397471
|
taskId,
|
|
397475
|
-
cwd: cwd2,
|
|
397476
397472
|
abortSignal,
|
|
397477
397473
|
store,
|
|
397478
397474
|
chatClass,
|
|
@@ -397484,7 +397480,6 @@ class LiveChatKit {
|
|
|
397484
397480
|
...chatInit
|
|
397485
397481
|
}) {
|
|
397486
397482
|
this.taskId = taskId;
|
|
397487
|
-
this.cwd = cwd2;
|
|
397488
397483
|
this.store = store;
|
|
397489
397484
|
this.transport = new FlexibleChatTransport({
|
|
397490
397485
|
store,
|
|
@@ -397492,8 +397487,7 @@ class LiveChatKit {
|
|
|
397492
397487
|
getters,
|
|
397493
397488
|
isSubTask,
|
|
397494
397489
|
isCli,
|
|
397495
|
-
customAgent
|
|
397496
|
-
cwd: cwd2
|
|
397490
|
+
customAgent
|
|
397497
397491
|
});
|
|
397498
397492
|
this.chat = new chatClass({
|
|
397499
397493
|
...chatInit,
|
|
@@ -397543,7 +397537,7 @@ class LiveChatKit {
|
|
|
397543
397537
|
}
|
|
397544
397538
|
this.store.commit(events.taskInited({
|
|
397545
397539
|
id: taskId2,
|
|
397546
|
-
cwd: this.cwd,
|
|
397540
|
+
cwd: this.task?.cwd || undefined,
|
|
397547
397541
|
createdAt: new Date,
|
|
397548
397542
|
initMessage: {
|
|
397549
397543
|
id: crypto.randomUUID(),
|
|
@@ -397562,12 +397556,12 @@ class LiveChatKit {
|
|
|
397562
397556
|
return taskId2;
|
|
397563
397557
|
};
|
|
397564
397558
|
}
|
|
397565
|
-
init(prompt) {
|
|
397559
|
+
init(cwd2, prompt) {
|
|
397566
397560
|
this.store.commit(events.taskInited({
|
|
397567
397561
|
id: this.taskId,
|
|
397568
|
-
cwd:
|
|
397562
|
+
cwd: cwd2,
|
|
397569
397563
|
createdAt: new Date,
|
|
397570
|
-
initMessage: {
|
|
397564
|
+
initMessage: prompt ? {
|
|
397571
397565
|
id: crypto.randomUUID(),
|
|
397572
397566
|
parts: [
|
|
397573
397567
|
{
|
|
@@ -397575,7 +397569,7 @@ class LiveChatKit {
|
|
|
397575
397569
|
text: prompt
|
|
397576
397570
|
}
|
|
397577
397571
|
]
|
|
397578
|
-
}
|
|
397572
|
+
} : undefined
|
|
397579
397573
|
}));
|
|
397580
397574
|
this.chat.messages = this.messages;
|
|
397581
397575
|
}
|
|
@@ -397607,7 +397601,7 @@ class LiveChatKit {
|
|
|
397607
397601
|
if (!this.inited) {
|
|
397608
397602
|
store.commit(events.taskInited({
|
|
397609
397603
|
id: this.taskId,
|
|
397610
|
-
cwd:
|
|
397604
|
+
cwd: environment2?.info.cwd,
|
|
397611
397605
|
createdAt: new Date
|
|
397612
397606
|
}));
|
|
397613
397607
|
}
|
|
@@ -398269,7 +398263,6 @@ class TaskRunner {
|
|
|
398269
398263
|
this.stepCount = new StepCount(options4.maxSteps, options4.maxRetries);
|
|
398270
398264
|
this.chatKit = new LiveChatKit({
|
|
398271
398265
|
taskId: options4.uid,
|
|
398272
|
-
cwd: options4.cwd,
|
|
398273
398266
|
store: options4.store,
|
|
398274
398267
|
chatClass: Chat,
|
|
398275
398268
|
isCli: true,
|
|
@@ -398301,7 +398294,7 @@ class TaskRunner {
|
|
|
398301
398294
|
parts: [{ type: "text", text: options4.prompt }]
|
|
398302
398295
|
});
|
|
398303
398296
|
} else {
|
|
398304
|
-
this.chatKit.init(options4.prompt);
|
|
398297
|
+
this.chatKit.init(options4.cwd, options4.prompt);
|
|
398305
398298
|
}
|
|
398306
398299
|
}
|
|
398307
398300
|
this.taskId = options4.uid;
|
|
@@ -398636,7 +398629,7 @@ async function downloadAndInstall(program5, release2) {
|
|
|
398636
398629
|
// package.json
|
|
398637
398630
|
var package_default2 = {
|
|
398638
398631
|
name: "@getpochi/cli",
|
|
398639
|
-
version: "0.5.
|
|
398632
|
+
version: "0.5.33",
|
|
398640
398633
|
type: "module",
|
|
398641
398634
|
bin: {
|
|
398642
398635
|
pochi: "src/cli.ts"
|