@getpochi/cli 0.5.63 → 0.5.65
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 +13 -13
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -353280,8 +353280,7 @@ var askFollowupQuestion = tool(toolDef2);
|
|
|
353280
353280
|
|
|
353281
353281
|
// ../tools/src/attempt-completion.ts
|
|
353282
353282
|
var attemptCompletionSchema = exports_external2.object({
|
|
353283
|
-
result: exports_external2.string().describe("The result of the task. Formulate this result in a way that is final and does not require further input from the user.")
|
|
353284
|
-
command: exports_external2.string().optional().describe("A CLI command to execute to show a live demo of the result to the user.")
|
|
353283
|
+
result: exports_external2.string().describe("The result of the task. Formulate this result in a way that is final and does not require further input from the user.")
|
|
353285
353284
|
});
|
|
353286
353285
|
var toolDef3 = {
|
|
353287
353286
|
description: `After each tool use. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user.
|
|
@@ -368971,7 +368970,7 @@ var {
|
|
|
368971
368970
|
// package.json
|
|
368972
368971
|
var package_default = {
|
|
368973
368972
|
name: "@getpochi/cli",
|
|
368974
|
-
version: "0.5.
|
|
368973
|
+
version: "0.5.65",
|
|
368975
368974
|
type: "module",
|
|
368976
368975
|
bin: {
|
|
368977
368976
|
pochi: "src/cli.ts"
|
|
@@ -396497,7 +396496,8 @@ class McpConnection {
|
|
|
396497
396496
|
#status = {
|
|
396498
396497
|
status: "stopped",
|
|
396499
396498
|
error: undefined,
|
|
396500
|
-
tools: {}
|
|
396499
|
+
tools: {},
|
|
396500
|
+
instructions: undefined
|
|
396501
396501
|
};
|
|
396502
396502
|
get status() {
|
|
396503
396503
|
return this.#status;
|
|
@@ -396540,7 +396540,7 @@ class McpConnection {
|
|
|
396540
396540
|
ready: {
|
|
396541
396541
|
entry: (context15, event) => {
|
|
396542
396542
|
if (event.type !== "connected") {
|
|
396543
|
-
this.logger.
|
|
396543
|
+
this.logger.warn(`Expected 'connected' event entry 'ready' state, got: ${event.type}`);
|
|
396544
396544
|
return;
|
|
396545
396545
|
}
|
|
396546
396546
|
context15.client = event.client;
|
|
@@ -396564,12 +396564,12 @@ class McpConnection {
|
|
|
396564
396564
|
error: {
|
|
396565
396565
|
entry: (context15, event) => {
|
|
396566
396566
|
if (event.type !== "error") {
|
|
396567
|
-
this.logger.
|
|
396567
|
+
this.logger.warn(`Expected 'error' event entry 'error' state, got: ${event.type}`);
|
|
396568
396568
|
return;
|
|
396569
396569
|
}
|
|
396570
396570
|
context15.error = event.error;
|
|
396571
396571
|
if (context15.autoReconnectAttempts < AutoReconnectMaxAttempts) {
|
|
396572
|
-
this.logger.
|
|
396572
|
+
this.logger.warn(`Auto reconnect in ${AutoReconnectDelay}ms`);
|
|
396573
396573
|
context15.autoReconnectTimer = setTimeout(() => {
|
|
396574
396574
|
this.fsm.send({ type: "restart" });
|
|
396575
396575
|
}, AutoReconnectDelay);
|
|
@@ -396665,7 +396665,7 @@ class McpConnection {
|
|
|
396665
396665
|
}
|
|
396666
396666
|
return await tool2.execute(args2, options6);
|
|
396667
396667
|
} catch (error46) {
|
|
396668
|
-
this.logger.
|
|
396668
|
+
this.logger.warn(`Error while executing tool ${name17}`, error46);
|
|
396669
396669
|
this.handleError(error46);
|
|
396670
396670
|
throw error46;
|
|
396671
396671
|
}
|
|
@@ -396680,7 +396680,7 @@ class McpConnection {
|
|
|
396680
396680
|
let client = undefined;
|
|
396681
396681
|
try {
|
|
396682
396682
|
const onUncaughtError = (error46) => {
|
|
396683
|
-
this.logger.
|
|
396683
|
+
this.logger.error("Uncaught error.", error46);
|
|
396684
396684
|
this.handleError(error46);
|
|
396685
396685
|
};
|
|
396686
396686
|
if (isStdioTransport(this.config)) {
|
|
@@ -396755,7 +396755,7 @@ class McpConnection {
|
|
|
396755
396755
|
return;
|
|
396756
396756
|
}
|
|
396757
396757
|
const message = readableError(error46);
|
|
396758
|
-
this.logger.
|
|
396758
|
+
this.logger.error("Error while connecting.", error46);
|
|
396759
396759
|
this.fsm.send({ type: "error", error: message });
|
|
396760
396760
|
}
|
|
396761
396761
|
}
|
|
@@ -396763,7 +396763,7 @@ class McpConnection {
|
|
|
396763
396763
|
try {
|
|
396764
396764
|
await client.close();
|
|
396765
396765
|
} catch (error46) {
|
|
396766
|
-
this.logger.
|
|
396766
|
+
this.logger.error("Error while shutting down.", error46);
|
|
396767
396767
|
}
|
|
396768
396768
|
}
|
|
396769
396769
|
isToolDisabled(toolName) {
|
|
@@ -396943,8 +396943,8 @@ class McpHub {
|
|
|
396943
396943
|
};
|
|
396944
396944
|
}
|
|
396945
396945
|
const toolset = r4(r2(d2(connections, (connection2) => connection2.status === "ready" && !!connection2.tools)).map((connection2) => d2(connection2.tools, (tool2) => !tool2.disabled)).map((tool2) => i5(tool2, (tool3) => y5(tool3, ["disabled"]))));
|
|
396946
|
-
const instructions = Object.entries(connections).filter(([,
|
|
396947
|
-
${
|
|
396946
|
+
const instructions = Object.entries(connections).filter(([, conn]) => !!conn.instructions).map(([name17, conn]) => `# Instructions from ${name17} mcp server
|
|
396947
|
+
${conn.instructions}`).join(`
|
|
396948
396948
|
|
|
396949
396949
|
`);
|
|
396950
396950
|
return {
|