@agent-smith/cli 0.0.115 → 0.0.116
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/cmd/lib/mcp.d.ts +1 -1
- package/dist/cmd/lib/mcp.js +5 -2
- package/dist/cmd/lib/tasks/cmd.js +2 -2
- package/package.json +11 -11
package/dist/cmd/lib/mcp.d.ts
CHANGED
|
@@ -11,6 +11,6 @@ declare class McpClient {
|
|
|
11
11
|
constructor(servername: string, command: string, args: Array<string>, authorizedTools?: Array<string> | null, askUserTools?: Array<string> | null);
|
|
12
12
|
start(): Promise<void>;
|
|
13
13
|
stop(): Promise<void>;
|
|
14
|
-
extractTools(): Promise<Array<ToolSpec>>;
|
|
14
|
+
extractTools(options: Record<string, any>): Promise<Array<ToolSpec>>;
|
|
15
15
|
}
|
|
16
16
|
export { McpClient, };
|
package/dist/cmd/lib/mcp.js
CHANGED
|
@@ -44,7 +44,7 @@ class McpClient {
|
|
|
44
44
|
async stop() {
|
|
45
45
|
await this.client.close();
|
|
46
46
|
}
|
|
47
|
-
async extractTools() {
|
|
47
|
+
async extractTools(options) {
|
|
48
48
|
const toolSpecs = new Array();
|
|
49
49
|
const serverToolsList = await this.client.listTools();
|
|
50
50
|
for (const tool of serverToolsList.tools) {
|
|
@@ -93,7 +93,10 @@ class McpClient {
|
|
|
93
93
|
};
|
|
94
94
|
if (this.askUserTools) {
|
|
95
95
|
if (this.askUserTools.includes(tool.name)) {
|
|
96
|
-
t.canRun = confirmToolUsage
|
|
96
|
+
t.canRun = options?.confirmToolUsage ?
|
|
97
|
+
options.confirmToolUsage :
|
|
98
|
+
confirmToolUsage;
|
|
99
|
+
//t.canRun = confirmToolUsage;
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
this.tools[tool.name] = t;
|
|
@@ -50,7 +50,7 @@ async function executeTask(name, payload, options) {
|
|
|
50
50
|
}
|
|
51
51
|
for (const mcp of mcpServers) {
|
|
52
52
|
await mcp.start();
|
|
53
|
-
const tools = await mcp.extractTools();
|
|
53
|
+
const tools = await mcp.extractTools(options);
|
|
54
54
|
tools.forEach(t => task.def.tools?.push(t));
|
|
55
55
|
if (options?.debug) {
|
|
56
56
|
console.log("MCP start", mcp.name);
|
|
@@ -318,7 +318,7 @@ async function executeTask(name, payload, options) {
|
|
|
318
318
|
}
|
|
319
319
|
else if (errMsg.includes("400 Bad Request")) {
|
|
320
320
|
clearInterval(abortTicker);
|
|
321
|
-
runtimeError("The server answered with a 400 Bad Request error. That might mean that
|
|
321
|
+
runtimeError("The server answered with a 400 Bad Request error. That might mean that:\n- The model you are requesting does not exist on the server\n- A parameter is wrong or missing in your request\n- The request size exceeds the available context window size");
|
|
322
322
|
if (options?.nocli) {
|
|
323
323
|
throw new Error(errMsg);
|
|
324
324
|
}
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-smith/cli",
|
|
3
3
|
"description": "Agent Smith: terminal client for language model agents",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.116",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rm -rf dist/* && tsc",
|
|
7
7
|
"cli": "node --loader ts-node/esm bin/index.ts",
|
|
8
8
|
"watch": "tsc --noCheck -p . -w"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@agent-smith/agent": "^0.4.
|
|
12
|
-
"@agent-smith/nodetask": "^0.3.
|
|
13
|
-
"
|
|
14
|
-
"@agent-smith/
|
|
15
|
-
"@
|
|
11
|
+
"@agent-smith/agent": "^0.4.1",
|
|
12
|
+
"@agent-smith/nodetask": "^0.3.1",
|
|
13
|
+
"modprompt": "^0.14.3",
|
|
14
|
+
"@agent-smith/task": "^0.4.1",
|
|
15
|
+
"@agent-smith/tfm": "^0.3.1",
|
|
16
|
+
"@inquirer/prompts": "^8.4.0",
|
|
16
17
|
"@intrinsicai/gbnfgen": "^0.12.0",
|
|
17
18
|
"@locallm/api": "^0.8.0",
|
|
18
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
19
|
-
"@vue/reactivity": "^3.5.
|
|
19
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
20
|
+
"@vue/reactivity": "^3.5.32",
|
|
20
21
|
"ansi-colors": "^4.1.3",
|
|
21
22
|
"better-sqlite3": "^12.8.0",
|
|
22
23
|
"clipboardy": "^5.3.1",
|
|
23
24
|
"commander": "^14.0.3",
|
|
24
25
|
"marked-terminal": "^7.3.0",
|
|
25
|
-
"modprompt": "^0.14.2",
|
|
26
26
|
"ora": "^9.3.0",
|
|
27
27
|
"python-shell": "^5.0.0",
|
|
28
28
|
"yaml": "^2.8.3"
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
36
36
|
"@types/better-sqlite3": "^7.6.13",
|
|
37
37
|
"@types/marked-terminal": "^6.1.1",
|
|
38
|
-
"@types/node": "^25.5.
|
|
38
|
+
"@types/node": "^25.5.2",
|
|
39
39
|
"openai": "^6.33.0",
|
|
40
40
|
"restmix": "^0.6.1",
|
|
41
41
|
"tslib": "2.8.1",
|
|
42
|
-
"typescript": "^
|
|
42
|
+
"typescript": "^6.0.2"
|
|
43
43
|
},
|
|
44
44
|
"type": "module",
|
|
45
45
|
"preferGlobal": true,
|