juno-code 1.0.30 → 1.0.31

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/bin/cli.mjs CHANGED
@@ -3547,6 +3547,12 @@ function createExecutionRequest(options) {
3547
3547
  if (options.tools !== void 0) {
3548
3548
  result.tools = options.tools;
3549
3549
  }
3550
+ if (options.allowedTools !== void 0) {
3551
+ result.allowedTools = options.allowedTools;
3552
+ }
3553
+ if (options.appendAllowedTools !== void 0) {
3554
+ result.appendAllowedTools = options.appendAllowedTools;
3555
+ }
3550
3556
  if (options.disallowedTools !== void 0) {
3551
3557
  result.disallowedTools = options.disallowedTools;
3552
3558
  }
@@ -4000,6 +4006,8 @@ var init_engine = __esm({
4000
4006
  ...context.request.model !== void 0 && { model: context.request.model },
4001
4007
  ...context.request.agents !== void 0 && { agents: context.request.agents },
4002
4008
  ...context.request.tools !== void 0 && { tools: context.request.tools },
4009
+ ...context.request.allowedTools !== void 0 && { allowedTools: context.request.allowedTools },
4010
+ ...context.request.appendAllowedTools !== void 0 && { appendAllowedTools: context.request.appendAllowedTools },
4003
4011
  ...context.request.disallowedTools !== void 0 && { disallowedTools: context.request.disallowedTools },
4004
4012
  iteration: iterationNumber
4005
4013
  },
@@ -7167,14 +7175,20 @@ var init_shell_backend = __esm({
7167
7175
  args.push("--agents", request.arguments.agents);
7168
7176
  }
7169
7177
  if (isPython && request.arguments?.tools && Array.isArray(request.arguments.tools)) {
7170
- for (const tool of request.arguments.tools) {
7171
- args.push("--tool", tool);
7172
- }
7178
+ args.push("--tools");
7179
+ args.push(...request.arguments.tools);
7180
+ }
7181
+ if (isPython && request.arguments?.allowedTools && Array.isArray(request.arguments.allowedTools)) {
7182
+ args.push("--allowedTools");
7183
+ args.push(...request.arguments.allowedTools);
7184
+ }
7185
+ if (isPython && request.arguments?.appendAllowedTools && Array.isArray(request.arguments.appendAllowedTools)) {
7186
+ args.push("--appendAllowedTools");
7187
+ args.push(...request.arguments.appendAllowedTools);
7173
7188
  }
7174
7189
  if (isPython && request.arguments?.disallowedTools && Array.isArray(request.arguments.disallowedTools)) {
7175
- for (const tool of request.arguments.disallowedTools) {
7176
- args.push("--disallowed-tool", tool);
7177
- }
7190
+ args.push("--disallowedTools");
7191
+ args.push(...request.arguments.disallowedTools);
7178
7192
  }
7179
7193
  if (this.config.debug) {
7180
7194
  engineLogger.debug(`Executing script: ${command} ${args.join(" ")}`);
@@ -12581,8 +12595,12 @@ async function mainCommandHandler(args, options, command) {
12581
12595
  if (options.agents && selectedBackend !== "shell") {
12582
12596
  console.error(chalk15.yellow("\n\u26A0\uFE0F Note: --agents flag is only supported with shell backend and will be ignored"));
12583
12597
  }
12584
- if ((options.tools || options.disallowedTools) && selectedBackend !== "shell") {
12585
- console.error(chalk15.yellow("\n\u26A0\uFE0F Note: --tools and --disallowed-tools flags are only supported with shell backend and will be ignored"));
12598
+ if ((options.tools || options.allowedTools || options.appendAllowedTools || options.disallowedTools) && selectedBackend !== "shell") {
12599
+ console.error(chalk15.yellow("\n\u26A0\uFE0F Note: --tools, --allowed-tools, --append-allowed-tools and --disallowed-tools flags are only supported with shell backend and will be ignored"));
12600
+ }
12601
+ if (options.allowedTools && options.appendAllowedTools) {
12602
+ console.error(chalk15.red("\n\u274C Error: --allowed-tools and --append-allowed-tools are mutually exclusive. Use one or the other."));
12603
+ process.exit(1);
12586
12604
  }
12587
12605
  const executionRequest = createExecutionRequest({
12588
12606
  instruction,
@@ -12593,6 +12611,8 @@ async function mainCommandHandler(args, options, command) {
12593
12611
  model: options.model || config.defaultModel,
12594
12612
  agents: options.agents,
12595
12613
  tools: options.tools,
12614
+ allowedTools: options.allowedTools,
12615
+ appendAllowedTools: options.appendAllowedTools,
12596
12616
  disallowedTools: options.disallowedTools
12597
12617
  });
12598
12618
  const coordinator = new MainExecutionCoordinator(config, options.verbose, options.enableFeedback || false);
@@ -16394,6 +16414,8 @@ async function startCommandHandler(args, options, command) {
16394
16414
  model: options.model,
16395
16415
  agents: options.agents,
16396
16416
  tools: options.tools,
16417
+ allowedTools: options.allowedTools,
16418
+ appendAllowedTools: options.appendAllowedTools,
16397
16419
  disallowedTools: options.disallowedTools,
16398
16420
  directory: options.directory,
16399
16421
  verbose: options.verbose,
@@ -23672,7 +23694,7 @@ function handleCLIError(error, verbose = false) {
23672
23694
  process.exit(EXIT_CODES.UNEXPECTED_ERROR);
23673
23695
  }
23674
23696
  function setupGlobalOptions(program) {
23675
- program.option("-v, --verbose", "Enable verbose output with detailed progress").option("-q, --quiet", "Disable rich formatting, use plain text").option("-c, --config <path>", "Configuration file path (.json, .toml, pyproject.toml)").option("-l, --log-file <path>", "Log file path (auto-generated if not specified)").option("--no-color", "Disable colored output").option("--log-level <level>", "Log level for output (error, warn, info, debug, trace)", "info").option("-s, --subagent <name>", "Subagent to use (claude, cursor, codex, gemini)").option("-b, --backend <type>", "Backend to use (mcp, shell)").option("-m, --model <name>", "Model to use (subagent-specific)").option("--agents <config>", "Agents configuration (forwarded to shell backend, ignored for MCP)").option("--tools <tools...>", "Allowed tools for Claude (passed to shell backend, ignored for MCP)").option("--disallowed-tools <tools...>", "Disallowed tools for Claude (passed to shell backend, ignored for MCP)").option("--mcp-timeout <number>", "MCP server timeout in milliseconds", parseInt).option("--enable-feedback", "Enable interactive feedback mode (F+Enter to enter, Q+Enter to submit)");
23697
+ program.option("-v, --verbose", "Enable verbose output with detailed progress").option("-q, --quiet", "Disable rich formatting, use plain text").option("-c, --config <path>", "Configuration file path (.json, .toml, pyproject.toml)").option("-l, --log-file <path>", "Log file path (auto-generated if not specified)").option("--no-color", "Disable colored output").option("--log-level <level>", "Log level for output (error, warn, info, debug, trace)", "info").option("-s, --subagent <name>", "Subagent to use (claude, cursor, codex, gemini)").option("-b, --backend <type>", "Backend to use (mcp, shell)").option("-m, --model <name>", "Model to use (subagent-specific)").option("--agents <config>", "Agents configuration (forwarded to shell backend, ignored for MCP)").option("--tools <tools...>", 'Specify the list of available tools from the built-in set (only works with --print mode). Use "" to disable all tools, "default" to use all tools, or specify tool names (e.g. "Bash,Edit,Read"). Passed to shell backend, ignored for MCP.').option("--allowed-tools <tools...>", 'Permission-based filtering of specific tool instances (e.g. "Bash(git:*) Edit"). Default when not specified: Task, Bash, Glob, Grep, ExitPlanMode, Read, Edit, Write, NotebookEdit, WebFetch, TodoWrite, WebSearch, BashOutput, KillShell, Skill, SlashCommand, EnterPlanMode. Passed to shell backend, ignored for MCP.').option("--disallowed-tools <tools...>", "Disallowed tools for Claude (passed to shell backend, ignored for MCP). By default, no tools are disallowed").option("--append-allowed-tools <tools...>", "Append tools to the default allowed-tools list (mutually exclusive with --allowed-tools). Passed to shell backend, ignored for MCP.").option("--mcp-timeout <number>", "MCP server timeout in milliseconds", parseInt).option("--enable-feedback", "Enable interactive feedback mode (F+Enter to enter, Q+Enter to submit)");
23676
23698
  program.exitOverride((err) => {
23677
23699
  if (err.code === "commander.helpDisplayed") {
23678
23700
  process.exit(0);