@toolplex/client 0.1.19 → 0.1.21
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/mcp-server/index.js +4 -2
- package/dist/mcp-server/toolHandlers/callToolHandler.js +2 -0
- package/dist/mcp-server/toolHandlers/initHandler.js +8 -4
- package/dist/mcp-server/toolHandlers/lookupEntityHandler.js +1 -0
- package/dist/mcp-server/toolHandlers/searchHandler.js +1 -1
- package/dist/shared/mcpServerTypes.d.ts +4 -2
- package/dist/src/mcp-server/toolHandlers/initHandler.js +8 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/mcp-server/index.js
CHANGED
|
@@ -13,10 +13,12 @@ const logLevel = process.env.LOG_LEVEL || "info";
|
|
|
13
13
|
// These are provided by the host application (e.g., Electron desktop)
|
|
14
14
|
const bundledDependencies = {
|
|
15
15
|
node: process.env.TOOLPLEX_NODE_PATH,
|
|
16
|
+
npx: process.env.TOOLPLEX_NPX_PATH,
|
|
16
17
|
python: process.env.TOOLPLEX_PYTHON_PATH,
|
|
17
|
-
|
|
18
|
+
pip: process.env.TOOLPLEX_PIP_PATH,
|
|
19
|
+
uv: process.env.TOOLPLEX_UV_PATH,
|
|
18
20
|
uvx: process.env.TOOLPLEX_UVX_PATH,
|
|
19
|
-
|
|
21
|
+
git: process.env.TOOLPLEX_GIT_PATH,
|
|
20
22
|
};
|
|
21
23
|
if (!apiKey) {
|
|
22
24
|
process.exit(1);
|
|
@@ -45,6 +45,7 @@ export async function handleCallTool(params) {
|
|
|
45
45
|
content.push({
|
|
46
46
|
type: "text",
|
|
47
47
|
text: promptsCache.getPrompt("tool_call_next_steps"),
|
|
48
|
+
_meta: { role: "system" },
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
await logger.debug("Tool called successfully");
|
|
@@ -86,6 +87,7 @@ export async function handleCallTool(params) {
|
|
|
86
87
|
.replace("{ERROR}", errorMessage)
|
|
87
88
|
.replace("{SERVER_ID}", params.server_id)
|
|
88
89
|
.replace("{TOOL_NAME}", params.tool_name),
|
|
90
|
+
_meta: { role: "system" },
|
|
89
91
|
},
|
|
90
92
|
],
|
|
91
93
|
};
|
|
@@ -71,10 +71,12 @@ export async function handleInitialize(params) {
|
|
|
71
71
|
}),
|
|
72
72
|
// Resolve dependency paths with bundled > system > not available priority
|
|
73
73
|
nodePath: resolveDependencyForInit(bundledDeps.node, "node"),
|
|
74
|
+
npxPath: resolveDependencyForInit(bundledDeps.npx, "npx"),
|
|
74
75
|
pythonPath: resolveDependencyForInit(bundledDeps.python, platform === "win32" ? "python" : "python3"),
|
|
75
|
-
|
|
76
|
+
pipPath: resolveDependencyForInit(bundledDeps.pip, platform === "win32" ? "pip" : "pip3"),
|
|
77
|
+
uvPath: resolveDependencyForInit(bundledDeps.uv, "uv"),
|
|
76
78
|
uvxPath: resolveDependencyForInit(bundledDeps.uvx, "uvx"),
|
|
77
|
-
|
|
79
|
+
gitPath: resolveDependencyForInit(bundledDeps.git, "git"),
|
|
78
80
|
};
|
|
79
81
|
await logger.debug("Initializing server managers and API service");
|
|
80
82
|
const [serverManagerInitResults, toolplexApiInitResponse] = await Promise.all([
|
|
@@ -118,10 +120,12 @@ export async function handleInitialize(params) {
|
|
|
118
120
|
.replace("{ARGS.workDir}", systemInfo.workDir)
|
|
119
121
|
.replace("{ARGS.date}", systemInfo.date)
|
|
120
122
|
.replace("{ARGS.nodePath}", systemInfo.nodePath)
|
|
123
|
+
.replace("{ARGS.npxPath}", systemInfo.npxPath)
|
|
121
124
|
.replace("{ARGS.pythonPath}", systemInfo.pythonPath)
|
|
122
|
-
.replace("{ARGS.
|
|
125
|
+
.replace("{ARGS.pipPath}", systemInfo.pipPath)
|
|
126
|
+
.replace("{ARGS.uvPath}", systemInfo.uvPath)
|
|
123
127
|
.replace("{ARGS.uvxPath}", systemInfo.uvxPath)
|
|
124
|
-
.replace("{ARGS.
|
|
128
|
+
.replace("{ARGS.gitPath}", systemInfo.gitPath),
|
|
125
129
|
},
|
|
126
130
|
],
|
|
127
131
|
};
|
|
@@ -121,10 +121,10 @@ export async function handleSearchTool(params) {
|
|
|
121
121
|
type: "text",
|
|
122
122
|
text: JSON.stringify(responseData),
|
|
123
123
|
},
|
|
124
|
-
// Second: Followup instructions
|
|
125
124
|
{
|
|
126
125
|
type: "text",
|
|
127
126
|
text: promptsCache.getPrompt("search_results_footer"),
|
|
127
|
+
_meta: { role: "system" },
|
|
128
128
|
},
|
|
129
129
|
];
|
|
130
130
|
await logger.info("Search completed successfully");
|
|
@@ -7,10 +7,12 @@ export type LogLevel = "error" | "warn" | "info" | "debug";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface BundledDependencies {
|
|
9
9
|
node?: string;
|
|
10
|
+
npx?: string;
|
|
10
11
|
python?: string;
|
|
11
|
-
|
|
12
|
+
pip?: string;
|
|
13
|
+
uv?: string;
|
|
12
14
|
uvx?: string;
|
|
13
|
-
|
|
15
|
+
git?: string;
|
|
14
16
|
}
|
|
15
17
|
export interface ToolplexServerConfig {
|
|
16
18
|
dev: boolean;
|
|
@@ -71,10 +71,12 @@ export async function handleInitialize(params) {
|
|
|
71
71
|
}),
|
|
72
72
|
// Resolve dependency paths with bundled > system > not available priority
|
|
73
73
|
nodePath: resolveDependencyForInit(bundledDeps.node, "node"),
|
|
74
|
+
npxPath: resolveDependencyForInit(bundledDeps.npx, "npx"),
|
|
74
75
|
pythonPath: resolveDependencyForInit(bundledDeps.python, platform === "win32" ? "python" : "python3"),
|
|
75
|
-
|
|
76
|
+
pipPath: resolveDependencyForInit(bundledDeps.pip, platform === "win32" ? "pip" : "pip3"),
|
|
77
|
+
uvPath: resolveDependencyForInit(bundledDeps.uv, "uv"),
|
|
76
78
|
uvxPath: resolveDependencyForInit(bundledDeps.uvx, "uvx"),
|
|
77
|
-
|
|
79
|
+
gitPath: resolveDependencyForInit(bundledDeps.git, "git"),
|
|
78
80
|
};
|
|
79
81
|
await logger.debug("Initializing server managers and API service");
|
|
80
82
|
const [serverManagerInitResults, toolplexApiInitResponse] = await Promise.all([
|
|
@@ -118,10 +120,12 @@ export async function handleInitialize(params) {
|
|
|
118
120
|
.replace("{ARGS.workDir}", systemInfo.workDir)
|
|
119
121
|
.replace("{ARGS.date}", systemInfo.date)
|
|
120
122
|
.replace("{ARGS.nodePath}", systemInfo.nodePath)
|
|
123
|
+
.replace("{ARGS.npxPath}", systemInfo.npxPath)
|
|
121
124
|
.replace("{ARGS.pythonPath}", systemInfo.pythonPath)
|
|
122
|
-
.replace("{ARGS.
|
|
125
|
+
.replace("{ARGS.pipPath}", systemInfo.pipPath)
|
|
126
|
+
.replace("{ARGS.uvPath}", systemInfo.uvPath)
|
|
123
127
|
.replace("{ARGS.uvxPath}", systemInfo.uvxPath)
|
|
124
|
-
.replace("{ARGS.
|
|
128
|
+
.replace("{ARGS.gitPath}", systemInfo.gitPath),
|
|
125
129
|
},
|
|
126
130
|
],
|
|
127
131
|
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.1.
|
|
1
|
+
export declare const version = "0.1.21";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.1.
|
|
1
|
+
export const version = '0.1.21';
|