@toolplex/client 0.1.36 → 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.
- package/dist/mcp-server/policy/serverPolicy.d.ts +2 -3
- package/dist/mcp-server/policy/serverPolicy.js +2 -8
- package/dist/mcp-server/toolplexApi/service.d.ts +1 -1
- package/dist/mcp-server/toolplexApi/types.d.ts +1 -1
- package/dist/shared/mcpServerTypes.d.ts +3 -3
- package/dist/shared/mcpServerTypes.js +1 -1
- package/dist/src/mcp-server/policy/serverPolicy.js +2 -8
- package/dist/src/shared/mcpServerTypes.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -18,10 +18,9 @@ export declare class ServerPolicy {
|
|
|
18
18
|
*/
|
|
19
19
|
enforceAllowedServerPolicy(serverId: string): void;
|
|
20
20
|
/**
|
|
21
|
-
* Validates that a server is
|
|
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
|
|
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,19 +37,13 @@ export class ServerPolicy {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* Validates that a server is
|
|
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
|
|
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
|
-
if (!this.clientContext.permissions.use_desktop_commander &&
|
|
50
|
-
serverId === this.clientContext.flags.desktop_commander_server_id) {
|
|
51
|
-
throw new Error("Desktop Commander is disabled for your account");
|
|
52
|
-
}
|
|
53
47
|
}
|
|
54
48
|
/**
|
|
55
49
|
* Validates that a server can be used.
|
|
@@ -22,7 +22,7 @@ export declare class ToolplexApiService {
|
|
|
22
22
|
}>): Promise<LogTelemetryBatchResponse>;
|
|
23
23
|
lookupEntity(entityType: "server" | "playbook" | "feedback", entityId: string, includeReadme?: boolean): Promise<any>;
|
|
24
24
|
search(query: string, expandedKeywords?: string[], filter?: string, size?: number, scope?: string): Promise<SearchResponse>;
|
|
25
|
-
createPlaybook(playbook_name: string, description: string, actions: Array<PlaybookAction>, domain?: string, keywords?: string[], requirements?: string[], privacy?: "public" | "private", sourcePlaybookId?: string, forkReason?: string): Promise<CreatePlaybookResponse>;
|
|
25
|
+
createPlaybook(playbook_name: string, description: string, actions: Array<PlaybookAction>, domain?: string, keywords?: string[], requirements?: string[], privacy?: "public" | "private" | "organization", sourcePlaybookId?: string, forkReason?: string): Promise<CreatePlaybookResponse>;
|
|
26
26
|
logPlaybookUsage(playbookId: string, success: boolean, errorMessage?: string): Promise<LogPlaybookUsageResponse>;
|
|
27
27
|
submitFeedback(targetType: "server" | "playbook", targetId: string, vote: "up" | "down", message?: string, securityAssessment?: SecurityAssessment): Promise<SubmitFeedbackResponse>;
|
|
28
28
|
getFeedbackSummary(): Promise<FeedbackSummaryResponse>;
|
|
@@ -54,7 +54,7 @@ export interface CreatePlaybookRequest {
|
|
|
54
54
|
domain?: string;
|
|
55
55
|
keywords?: string[];
|
|
56
56
|
requirements?: string[];
|
|
57
|
-
privacy?: "public" | "private";
|
|
57
|
+
privacy?: "public" | "private" | "organization";
|
|
58
58
|
source_playbook_id?: string;
|
|
59
59
|
fork_reason?: string;
|
|
60
60
|
}
|
|
@@ -336,7 +336,7 @@ export declare const SavePlaybookParamsSchema: z.ZodObject<{
|
|
|
336
336
|
domain: z.ZodOptional<z.ZodString>;
|
|
337
337
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
338
338
|
requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
339
|
-
privacy: z.ZodOptional<z.ZodEnum<["public", "private"]>>;
|
|
339
|
+
privacy: z.ZodOptional<z.ZodEnum<["public", "private", "organization"]>>;
|
|
340
340
|
source_playbook_id: z.ZodOptional<z.ZodString>;
|
|
341
341
|
fork_reason: z.ZodOptional<z.ZodString>;
|
|
342
342
|
validate_only: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -354,7 +354,7 @@ export declare const SavePlaybookParamsSchema: z.ZodObject<{
|
|
|
354
354
|
domain?: string | undefined;
|
|
355
355
|
keywords?: string[] | undefined;
|
|
356
356
|
requirements?: string[] | undefined;
|
|
357
|
-
privacy?: "public" | "private" | undefined;
|
|
357
|
+
privacy?: "public" | "private" | "organization" | undefined;
|
|
358
358
|
source_playbook_id?: string | undefined;
|
|
359
359
|
fork_reason?: string | undefined;
|
|
360
360
|
validate_only?: boolean | undefined;
|
|
@@ -372,7 +372,7 @@ export declare const SavePlaybookParamsSchema: z.ZodObject<{
|
|
|
372
372
|
domain?: string | undefined;
|
|
373
373
|
keywords?: string[] | undefined;
|
|
374
374
|
requirements?: string[] | undefined;
|
|
375
|
-
privacy?: "public" | "private" | undefined;
|
|
375
|
+
privacy?: "public" | "private" | "organization" | undefined;
|
|
376
376
|
source_playbook_id?: string | undefined;
|
|
377
377
|
fork_reason?: string | undefined;
|
|
378
378
|
validate_only?: boolean | undefined;
|
|
@@ -125,7 +125,7 @@ export const SavePlaybookParamsSchema = z.object({
|
|
|
125
125
|
domain: z.string().optional(),
|
|
126
126
|
keywords: z.array(z.string()).optional(),
|
|
127
127
|
requirements: z.array(z.string()).optional(),
|
|
128
|
-
privacy: z.enum(["public", "private"]).optional(),
|
|
128
|
+
privacy: z.enum(["public", "private", "organization"]).optional(),
|
|
129
129
|
source_playbook_id: z.string().optional(),
|
|
130
130
|
fork_reason: z.string().optional(),
|
|
131
131
|
// Internal parameter for validation-only mode (not exposed to agent in tool definition)
|
|
@@ -37,19 +37,13 @@ export class ServerPolicy {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* Validates that a server is
|
|
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
|
|
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
|
-
if (!this.clientContext.permissions.use_desktop_commander &&
|
|
50
|
-
serverId === this.clientContext.flags.desktop_commander_server_id) {
|
|
51
|
-
throw new Error("Desktop Commander is disabled for your account");
|
|
52
|
-
}
|
|
53
47
|
}
|
|
54
48
|
/**
|
|
55
49
|
* Validates that a server can be used.
|
|
@@ -125,7 +125,7 @@ export const SavePlaybookParamsSchema = z.object({
|
|
|
125
125
|
domain: z.string().optional(),
|
|
126
126
|
keywords: z.array(z.string()).optional(),
|
|
127
127
|
requirements: z.array(z.string()).optional(),
|
|
128
|
-
privacy: z.enum(["public", "private"]).optional(),
|
|
128
|
+
privacy: z.enum(["public", "private", "organization"]).optional(),
|
|
129
129
|
source_playbook_id: z.string().optional(),
|
|
130
130
|
fork_reason: z.string().optional(),
|
|
131
131
|
// Internal parameter for validation-only mode (not exposed to agent in tool definition)
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.1.
|
|
1
|
+
export declare const version = "0.1.38";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.1.
|
|
1
|
+
export const version = '0.1.38';
|