@hyperdrive.bot/paseo-cli 0.3.39 → 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.
@@ -26,6 +26,7 @@ export interface AgentRunOptions extends CommandOptions {
26
26
  workspace?: string;
27
27
  image?: string[];
28
28
  cwd?: string;
29
+ allowedTools?: string[];
29
30
  env?: string[];
30
31
  label?: string[];
31
32
  waitTimeout?: string;
@@ -24,6 +24,9 @@ export function addRunOptions(cmd) {
24
24
  .option("--workspace <id>", "Run in an existing workspace (default: a new workspace is created per run; falls back to $PASEO_WORKSPACE_ID)")
25
25
  .option("--image <path>", "Attach image(s) to the initial prompt (can be used multiple times)", collectMultiple, [])
26
26
  .option("--cwd <path>", "Working directory (default: current)")
27
+ .option("--allowed-tools <tools>", "Restrict the agent to these tools (comma separated, repeatable). " +
28
+ 'Claude Code permission-rule syntax: "Read", "Bash(git:*)", "mcp__server__tool". ' +
29
+ "A tool outside the list is blocked before it runs. claude provider only.", collectMultiple, [])
27
30
  .option("--env <key=value>", "Set environment variable(s) for the agent process (can be used multiple times)", collectMultiple, [])
28
31
  .option("--label <key=value>", "Add label(s) to the agent (can be used multiple times)", collectMultiple, [])
29
32
  .option("--wait-timeout <duration>", "Maximum time to wait for agent to finish (e.g., 30s, 5m, 1h). Default: no limit")
@@ -40,6 +43,17 @@ export const agentRunSchema = {
40
43
  { header: "TITLE", field: "title", width: 20 },
41
44
  ],
42
45
  };
46
+ /**
47
+ * Flatten repeated and comma-separated --allowed-tools values into the wire field.
48
+ * Empty stays undefined so "no flag" keeps meaning "no allowlist at all".
49
+ */
50
+ function normalizeAllowedTools(values) {
51
+ const tools = (values ?? [])
52
+ .flatMap((entry) => entry.split(","))
53
+ .map((entry) => entry.trim())
54
+ .filter((entry) => entry.length > 0);
55
+ return tools.length > 0 ? tools : undefined;
56
+ }
43
57
  function toRunResult(agent, statusOverride) {
44
58
  return {
45
59
  agentId: agent.id,
@@ -355,6 +369,7 @@ export async function runRunCommand(prompt, options, _command) {
355
369
  const labels = parseRunLabels(options.label);
356
370
  const env = parseRunEnv(options.env);
357
371
  const requestEnv = Object.keys(env).length > 0 ? env : undefined;
372
+ const allowedTools = normalizeAllowedTools(options.allowedTools);
358
373
  const workspace = await resolveRunWorkspace(client, options, cwd);
359
374
  const workspaceId = workspace.id;
360
375
  const runCwd = workspace.cwd;
@@ -370,6 +385,7 @@ export async function runRunCommand(prompt, options, _command) {
370
385
  modeId: options.mode,
371
386
  model: resolvedProviderModel.model,
372
387
  thinkingOptionId,
388
+ ...(allowedTools ? { allowedTools } : {}),
373
389
  initialPrompt: structuredPrompt,
374
390
  outputSchema,
375
391
  images,
@@ -424,6 +440,7 @@ export async function runRunCommand(prompt, options, _command) {
424
440
  modeId: options.mode,
425
441
  model: resolvedProviderModel.model,
426
442
  thinkingOptionId,
443
+ ...(allowedTools ? { allowedTools } : {}),
427
444
  initialPrompt: prompt,
428
445
  images,
429
446
  env: requestEnv,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperdrive.bot/paseo-cli",
3
- "version": "0.3.39",
3
+ "version": "0.3.41",
4
4
  "description": "Paseo CLI - control your AI coding agents from the command line",
5
5
  "bin": {
6
6
  "paseo": "bin/paseo"
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@clack/prompts": "^1.0.0",
30
- "@hyperdrive.bot/paseo-client": "0.3.39",
31
- "@hyperdrive.bot/paseo-protocol": "0.3.39",
32
- "@hyperdrive.bot/paseo-server": "0.3.39",
30
+ "@hyperdrive.bot/paseo-client": "0.3.41",
31
+ "@hyperdrive.bot/paseo-protocol": "0.3.41",
32
+ "@hyperdrive.bot/paseo-server": "0.3.41",
33
33
  "chalk": "^5.3.0",
34
34
  "commander": "^12.0.0",
35
35
  "mime-types": "^2.1.35",