@toolplex/client 0.1.40 → 0.1.42
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/clientContext.d.ts +2 -2
- package/dist/mcp-server/index.js +4 -1
- package/dist/mcp-server/toolHandlers/initHandler.js +2 -3
- package/dist/shared/mcpServerTypes.d.ts +1 -1
- package/dist/src/mcp-server/toolHandlers/initHandler.js +2 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -21,8 +21,8 @@ export declare class ClientContext {
|
|
|
21
21
|
set dev(isDev: boolean);
|
|
22
22
|
get apiKey(): string;
|
|
23
23
|
set apiKey(key: string);
|
|
24
|
-
get clientMode(): "standard" | "restricted";
|
|
25
|
-
set clientMode(mode: "standard" | "restricted");
|
|
24
|
+
get clientMode(): "standard" | "restricted" | "automation";
|
|
25
|
+
set clientMode(mode: "standard" | "restricted" | "automation");
|
|
26
26
|
get clientName(): string;
|
|
27
27
|
set clientName(name: string);
|
|
28
28
|
get llmContext(): LLMContext;
|
package/dist/mcp-server/index.js
CHANGED
|
@@ -6,7 +6,10 @@ dotenv.config();
|
|
|
6
6
|
FileLogger.initialize("mcp-server");
|
|
7
7
|
const isDev = process.env.DEV === "true";
|
|
8
8
|
const apiKey = process.env.TOOLPLEX_API_KEY;
|
|
9
|
-
|
|
9
|
+
// CLIENT_MODE can come from ai-engine (automation mode) or TOOLPLEX_CLIENT_MODE (legacy)
|
|
10
|
+
const clientMode = process.env.CLIENT_MODE ||
|
|
11
|
+
process.env.TOOLPLEX_CLIENT_MODE ||
|
|
12
|
+
"standard";
|
|
10
13
|
const clientName = process.env.CLIENT_NAME || "unknown";
|
|
11
14
|
const logLevel = process.env.LOG_LEVEL || "info";
|
|
12
15
|
// Optional user ID for per-user telemetry (system API keys only)
|
|
@@ -176,15 +176,14 @@ export async function handleInitialize(params) {
|
|
|
176
176
|
if (clientContext.isOrgUser && allSucceeded.length === 0) {
|
|
177
177
|
result.content.push({
|
|
178
178
|
type: "text",
|
|
179
|
-
text: "
|
|
179
|
+
text: "No tools are currently approved for this organization. Inform the user that tools will become available once an admin approves them.",
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
// Add custom prompt / agent instructions for org users
|
|
183
183
|
if (clientContext.permissions.custom_prompt) {
|
|
184
184
|
result.content.push({
|
|
185
185
|
type: "text",
|
|
186
|
-
text: "
|
|
187
|
-
"The following instructions have been set by your organization's administrator. Follow these guidelines:\n\n" +
|
|
186
|
+
text: "**Organization Guidelines:**\n" +
|
|
188
187
|
clientContext.permissions.custom_prompt,
|
|
189
188
|
});
|
|
190
189
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export type ClientMode = "standard" | "restricted";
|
|
2
|
+
export type ClientMode = "standard" | "restricted" | "automation";
|
|
3
3
|
export type LogLevel = "error" | "warn" | "info" | "debug";
|
|
4
4
|
/**
|
|
5
5
|
* Paths to bundled dependencies provided by the host application (e.g., Electron).
|
|
@@ -176,15 +176,14 @@ export async function handleInitialize(params) {
|
|
|
176
176
|
if (clientContext.isOrgUser && allSucceeded.length === 0) {
|
|
177
177
|
result.content.push({
|
|
178
178
|
type: "text",
|
|
179
|
-
text: "
|
|
179
|
+
text: "No tools are currently approved for this organization. Inform the user that tools will become available once an admin approves them.",
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
// Add custom prompt / agent instructions for org users
|
|
183
183
|
if (clientContext.permissions.custom_prompt) {
|
|
184
184
|
result.content.push({
|
|
185
185
|
type: "text",
|
|
186
|
-
text: "
|
|
187
|
-
"The following instructions have been set by your organization's administrator. Follow these guidelines:\n\n" +
|
|
186
|
+
text: "**Organization Guidelines:**\n" +
|
|
188
187
|
clientContext.permissions.custom_prompt,
|
|
189
188
|
});
|
|
190
189
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.1.
|
|
1
|
+
export declare const version = "0.1.42";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.1.
|
|
1
|
+
export const version = '0.1.42';
|