@toolplex/client 0.1.17 → 0.1.18
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.
|
@@ -145,15 +145,7 @@ export async function handleInstallServer(params) {
|
|
|
145
145
|
if (!parsed.success) {
|
|
146
146
|
throw new Error(`Invalid list_tools response: ${JSON.stringify(parsed.error.errors)}, response was: ${JSON.stringify(toolsResponse)}`);
|
|
147
147
|
}
|
|
148
|
-
let toolsText = "";
|
|
149
148
|
const tools = parsed.data.tools || [];
|
|
150
|
-
if (tools.length > 0) {
|
|
151
|
-
toolsText = "Available tools from this server:\n\n";
|
|
152
|
-
for (const tool of tools) {
|
|
153
|
-
toolsText += `- ${tool.name}: ${tool.description}\n`;
|
|
154
|
-
toolsText += ` Input Schema: ${JSON.stringify(tool.inputSchema, null, 2)}\n\n`;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
149
|
await telemetryLogger.log("client_install", {
|
|
158
150
|
success: true,
|
|
159
151
|
log_context: {
|
|
@@ -162,24 +154,22 @@ export async function handleInstallServer(params) {
|
|
|
162
154
|
},
|
|
163
155
|
latency_ms: Date.now() - startTime,
|
|
164
156
|
});
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
];
|
|
175
|
-
if (!clientContext.permissions.enable_read_only_mode) {
|
|
176
|
-
content.push({
|
|
177
|
-
type: "text",
|
|
178
|
-
text: promptsCache.getPrompt("install_next_steps"),
|
|
179
|
-
});
|
|
180
|
-
}
|
|
157
|
+
// Return structured JSON for clean UI rendering
|
|
158
|
+
const response = {
|
|
159
|
+
success: true,
|
|
160
|
+
server_id: installResult.server_id,
|
|
161
|
+
server_name: installResult.server_name,
|
|
162
|
+
message: `Successfully installed server ${installResult.server_id} (${installResult.server_name})`,
|
|
163
|
+
tools: tools,
|
|
164
|
+
tool_count: tools.length,
|
|
165
|
+
};
|
|
181
166
|
return {
|
|
182
|
-
content
|
|
167
|
+
content: [
|
|
168
|
+
{
|
|
169
|
+
type: "text",
|
|
170
|
+
text: JSON.stringify(response, null, 2),
|
|
171
|
+
},
|
|
172
|
+
],
|
|
183
173
|
};
|
|
184
174
|
}
|
|
185
175
|
catch (error) {
|
|
@@ -196,23 +186,20 @@ export async function handleInstallServer(params) {
|
|
|
196
186
|
pii_sanitized_error_message: errorMessage,
|
|
197
187
|
latency_ms: Date.now() - startTime,
|
|
198
188
|
});
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
},
|
|
206
|
-
];
|
|
207
|
-
if (!clientContext.permissions.enable_read_only_mode) {
|
|
208
|
-
content.push({
|
|
209
|
-
type: "text",
|
|
210
|
-
text: promptsCache.getPrompt("install_next_steps"),
|
|
211
|
-
});
|
|
212
|
-
}
|
|
189
|
+
// Return structured error JSON
|
|
190
|
+
const errorResponse = {
|
|
191
|
+
success: false,
|
|
192
|
+
error: errorMessage,
|
|
193
|
+
server_id: params.server_id,
|
|
194
|
+
};
|
|
213
195
|
return {
|
|
214
196
|
isError: true,
|
|
215
|
-
content
|
|
197
|
+
content: [
|
|
198
|
+
{
|
|
199
|
+
type: "text",
|
|
200
|
+
text: JSON.stringify(errorResponse, null, 2),
|
|
201
|
+
},
|
|
202
|
+
],
|
|
216
203
|
};
|
|
217
204
|
}
|
|
218
205
|
finally {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.1.
|
|
1
|
+
export declare const version = "0.1.18";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.1.
|
|
1
|
+
export const version = '0.1.18';
|