@toolplex/client 0.1.37 → 0.1.38

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.
@@ -18,10 +18,9 @@ export declare class ServerPolicy {
18
18
  */
19
19
  enforceAllowedServerPolicy(serverId: string): void;
20
20
  /**
21
- * Validates that a server is not blocked before calling a tool on it.
22
- * Also checks if desktop commander is enabled when calling tools on the desktop commander server.
21
+ * Validates that a server is allowed before calling a tool on it.
23
22
  *
24
- * @throws Error if attempting to call a tool on a blocked server or if desktop commander is disabled
23
+ * @throws Error if attempting to call a tool on a blocked or disallowed server
25
24
  */
26
25
  enforceCallToolPolicy(serverId: string): void;
27
26
  /**
@@ -37,23 +37,13 @@ export class ServerPolicy {
37
37
  }
38
38
  }
39
39
  /**
40
- * Validates that a server is not blocked before calling a tool on it.
41
- * Also checks if desktop commander is enabled when calling tools on the desktop commander server.
40
+ * Validates that a server is allowed before calling a tool on it.
42
41
  *
43
- * @throws Error if attempting to call a tool on a blocked server or if desktop commander is disabled
42
+ * @throws Error if attempting to call a tool on a blocked or disallowed server
44
43
  */
45
44
  enforceCallToolPolicy(serverId) {
46
45
  this.enforceBlockedServerPolicy(serverId);
47
46
  this.enforceAllowedServerPolicy(serverId);
48
- // Check if desktop commander is disabled and this is the desktop commander server
49
- // Skip this check if the server is in the allowed list (admin explicitly approved it)
50
- const allowedServers = this.clientContext.permissions.allowed_mcp_servers;
51
- const isExplicitlyAllowed = allowedServers && allowedServers.includes(serverId);
52
- if (!isExplicitlyAllowed &&
53
- !this.clientContext.permissions.use_desktop_commander &&
54
- serverId === this.clientContext.flags.desktop_commander_server_id) {
55
- throw new Error("Desktop Commander is disabled for your account");
56
- }
57
47
  }
58
48
  /**
59
49
  * Validates that a server can be used.
@@ -37,23 +37,13 @@ export class ServerPolicy {
37
37
  }
38
38
  }
39
39
  /**
40
- * Validates that a server is not blocked before calling a tool on it.
41
- * Also checks if desktop commander is enabled when calling tools on the desktop commander server.
40
+ * Validates that a server is allowed before calling a tool on it.
42
41
  *
43
- * @throws Error if attempting to call a tool on a blocked server or if desktop commander is disabled
42
+ * @throws Error if attempting to call a tool on a blocked or disallowed server
44
43
  */
45
44
  enforceCallToolPolicy(serverId) {
46
45
  this.enforceBlockedServerPolicy(serverId);
47
46
  this.enforceAllowedServerPolicy(serverId);
48
- // Check if desktop commander is disabled and this is the desktop commander server
49
- // Skip this check if the server is in the allowed list (admin explicitly approved it)
50
- const allowedServers = this.clientContext.permissions.allowed_mcp_servers;
51
- const isExplicitlyAllowed = allowedServers && allowedServers.includes(serverId);
52
- if (!isExplicitlyAllowed &&
53
- !this.clientContext.permissions.use_desktop_commander &&
54
- serverId === this.clientContext.flags.desktop_commander_server_id) {
55
- throw new Error("Desktop Commander is disabled for your account");
56
- }
57
47
  }
58
48
  /**
59
49
  * Validates that a server can be used.
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.1.37";
1
+ export declare const version = "0.1.38";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '0.1.37';
1
+ export const version = '0.1.38';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolplex/client",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "author": "ToolPlex LLC",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "description": "The official ToolPlex client for AI agent tool discovery and execution",