@hyperdrive.bot/paseo-protocol 0.3.40 → 0.3.41

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.
@@ -443,6 +443,16 @@ export interface AgentSessionConfig {
443
443
  claude?: AgentMetadata;
444
444
  };
445
445
  mcpServers?: Record<string, McpServerConfig>;
446
+ /**
447
+ * Per-run tool allowlist in Claude Code permission-rule syntax, e.g.
448
+ * ["Read", "Grep", "Bash(git:*)", "mcp__playwright__browser_navigate"].
449
+ *
450
+ * When present, a tool absent from the list cannot run at all: it is blocked
451
+ * before execution and the model is told why. Undefined or empty means no
452
+ * allowlist is applied. Only the claude provider can enforce this; the others
453
+ * fail the create call rather than accept an unenforceable restriction.
454
+ */
455
+ allowedTools?: string[];
446
456
  /**
447
457
  * Internal agents are hidden from listings and don't trigger notifications.
448
458
  * They are used for ephemeral system tasks like commit/PR generation.
@@ -1747,6 +1747,7 @@ export declare const CreateAgentRequestMessageSchema: z.ZodObject<{
1747
1747
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1748
1748
  alwaysLoad: z.ZodOptional<z.ZodBoolean>;
1749
1749
  }, z.core.$strip>], "type">>>;
1750
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1750
1751
  }, z.core.$strip>;
1751
1752
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1752
1753
  workspaceId: z.ZodOptional<z.ZodString>;
@@ -1935,6 +1936,7 @@ export declare const ResumeAgentRequestMessageSchema: z.ZodObject<{
1935
1936
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1936
1937
  alwaysLoad: z.ZodOptional<z.ZodBoolean>;
1937
1938
  }, z.core.$strip>], "type">>>>;
1939
+ allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1938
1940
  }, z.core.$strip>>;
1939
1941
  requestId: z.ZodString;
1940
1942
  }, z.core.$strip>;
@@ -3951,6 +3953,7 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zod
3951
3953
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3952
3954
  alwaysLoad: z.ZodOptional<z.ZodBoolean>;
3953
3955
  }, z.core.$strip>], "type">>>;
3956
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
3954
3957
  }, z.core.$strip>;
3955
3958
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3956
3959
  workspaceId: z.ZodOptional<z.ZodString>;
@@ -4134,6 +4137,7 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zod
4134
4137
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4135
4138
  alwaysLoad: z.ZodOptional<z.ZodBoolean>;
4136
4139
  }, z.core.$strip>], "type">>>>;
4140
+ allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
4137
4141
  }, z.core.$strip>>;
4138
4142
  requestId: z.ZodString;
4139
4143
  }, z.core.$strip>, z.ZodObject<{
@@ -21219,6 +21223,7 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
21219
21223
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
21220
21224
  alwaysLoad: z.ZodOptional<z.ZodBoolean>;
21221
21225
  }, z.core.$strip>], "type">>>;
21226
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
21222
21227
  }, z.core.$strip>;
21223
21228
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
21224
21229
  workspaceId: z.ZodOptional<z.ZodString>;
@@ -21402,6 +21407,7 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
21402
21407
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
21403
21408
  alwaysLoad: z.ZodOptional<z.ZodBoolean>;
21404
21409
  }, z.core.$strip>], "type">>>>;
21410
+ allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
21405
21411
  }, z.core.$strip>>;
21406
21412
  requestId: z.ZodString;
21407
21413
  }, z.core.$strip>, z.ZodObject<{
@@ -30783,6 +30789,7 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
30783
30789
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
30784
30790
  alwaysLoad: z.ZodOptional<z.ZodBoolean>;
30785
30791
  }, z.core.$strip>], "type">>>;
30792
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
30786
30793
  }, z.core.$strip>;
30787
30794
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
30788
30795
  workspaceId: z.ZodOptional<z.ZodString>;
@@ -30966,6 +30973,7 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
30966
30973
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
30967
30974
  alwaysLoad: z.ZodOptional<z.ZodBoolean>;
30968
30975
  }, z.core.$strip>], "type">>>>;
30976
+ allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
30969
30977
  }, z.core.$strip>>;
30970
30978
  requestId: z.ZodString;
30971
30979
  }, z.core.$strip>, z.ZodObject<{
package/dist/messages.js CHANGED
@@ -471,6 +471,12 @@ const AgentSessionConfigSchema = z.object({
471
471
  .optional(),
472
472
  systemPrompt: z.string().optional(),
473
473
  mcpServers: z.record(z.string(), McpServerConfigSchema).optional(),
474
+ // Per-run tool allowlist, in Claude Code permission-rule syntax ("Bash",
475
+ // "Bash(git:*)", "mcp__server__tool"). Optional: absent means "no allowlist",
476
+ // which is the pre-existing behaviour, so old clients keep working.
477
+ // Enforced by the claude provider through a PreToolUse hook; other providers
478
+ // reject the field rather than accept it and silently ignore it.
479
+ allowedTools: z.array(z.string()).optional(),
474
480
  });
475
481
  const AgentPermissionUpdateSchema = z.record(z.string(), z.unknown());
476
482
  const AgentPermissionActionSchema = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperdrive.bot/paseo-protocol",
3
- "version": "0.3.40",
3
+ "version": "0.3.41",
4
4
  "description": "Paseo shared protocol schemas and wire types",
5
5
  "files": [
6
6
  "dist",