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.js CHANGED
@@ -3583,6 +3583,12 @@ function createExecutionRequest(options) {
3583
3583
  if (options.tools !== void 0) {
3584
3584
  result.tools = options.tools;
3585
3585
  }
3586
+ if (options.allowedTools !== void 0) {
3587
+ result.allowedTools = options.allowedTools;
3588
+ }
3589
+ if (options.appendAllowedTools !== void 0) {
3590
+ result.appendAllowedTools = options.appendAllowedTools;
3591
+ }
3586
3592
  if (options.disallowedTools !== void 0) {
3587
3593
  result.disallowedTools = options.disallowedTools;
3588
3594
  }
@@ -4036,6 +4042,8 @@ var init_engine = __esm({
4036
4042
  ...context.request.model !== void 0 && { model: context.request.model },
4037
4043
  ...context.request.agents !== void 0 && { agents: context.request.agents },
4038
4044
  ...context.request.tools !== void 0 && { tools: context.request.tools },
4045
+ ...context.request.allowedTools !== void 0 && { allowedTools: context.request.allowedTools },
4046
+ ...context.request.appendAllowedTools !== void 0 && { appendAllowedTools: context.request.appendAllowedTools },
4039
4047
  ...context.request.disallowedTools !== void 0 && { disallowedTools: context.request.disallowedTools },
4040
4048
  iteration: iterationNumber
4041
4049
  },
@@ -7203,14 +7211,20 @@ var init_shell_backend = __esm({
7203
7211
  args.push("--agents", request.arguments.agents);
7204
7212
  }
7205
7213
  if (isPython && request.arguments?.tools && Array.isArray(request.arguments.tools)) {
7206
- for (const tool of request.arguments.tools) {
7207
- args.push("--tool", tool);
7208
- }
7214
+ args.push("--tools");
7215
+ args.push(...request.arguments.tools);
7216
+ }
7217
+ if (isPython && request.arguments?.allowedTools && Array.isArray(request.arguments.allowedTools)) {
7218
+ args.push("--allowedTools");
7219
+ args.push(...request.arguments.allowedTools);
7220
+ }
7221
+ if (isPython && request.arguments?.appendAllowedTools && Array.isArray(request.arguments.appendAllowedTools)) {
7222
+ args.push("--appendAllowedTools");
7223
+ args.push(...request.arguments.appendAllowedTools);
7209
7224
  }
7210
7225
  if (isPython && request.arguments?.disallowedTools && Array.isArray(request.arguments.disallowedTools)) {
7211
- for (const tool of request.arguments.disallowedTools) {
7212
- args.push("--disallowed-tool", tool);
7213
- }
7226
+ args.push("--disallowedTools");
7227
+ args.push(...request.arguments.disallowedTools);
7214
7228
  }
7215
7229
  if (this.config.debug) {
7216
7230
  engineLogger.debug(`Executing script: ${command} ${args.join(" ")}`);
@@ -12617,8 +12631,12 @@ async function mainCommandHandler(args, options, command) {
12617
12631
  if (options.agents && selectedBackend !== "shell") {
12618
12632
  console.error(chalk15__default.default.yellow("\n\u26A0\uFE0F Note: --agents flag is only supported with shell backend and will be ignored"));
12619
12633
  }
12620
- if ((options.tools || options.disallowedTools) && selectedBackend !== "shell") {
12621
- console.error(chalk15__default.default.yellow("\n\u26A0\uFE0F Note: --tools and --disallowed-tools flags are only supported with shell backend and will be ignored"));
12634
+ if ((options.tools || options.allowedTools || options.appendAllowedTools || options.disallowedTools) && selectedBackend !== "shell") {
12635
+ console.error(chalk15__default.default.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"));
12636
+ }
12637
+ if (options.allowedTools && options.appendAllowedTools) {
12638
+ console.error(chalk15__default.default.red("\n\u274C Error: --allowed-tools and --append-allowed-tools are mutually exclusive. Use one or the other."));
12639
+ process.exit(1);
12622
12640
  }
12623
12641
  const executionRequest = createExecutionRequest({
12624
12642
  instruction,
@@ -12629,6 +12647,8 @@ async function mainCommandHandler(args, options, command) {
12629
12647
  model: options.model || config.defaultModel,
12630
12648
  agents: options.agents,
12631
12649
  tools: options.tools,
12650
+ allowedTools: options.allowedTools,
12651
+ appendAllowedTools: options.appendAllowedTools,
12632
12652
  disallowedTools: options.disallowedTools
12633
12653
  });
12634
12654
  const coordinator = new MainExecutionCoordinator(config, options.verbose, options.enableFeedback || false);
@@ -16430,6 +16450,8 @@ async function startCommandHandler(args, options, command) {
16430
16450
  model: options.model,
16431
16451
  agents: options.agents,
16432
16452
  tools: options.tools,
16453
+ allowedTools: options.allowedTools,
16454
+ appendAllowedTools: options.appendAllowedTools,
16433
16455
  disallowedTools: options.disallowedTools,
16434
16456
  directory: options.directory,
16435
16457
  verbose: options.verbose,
@@ -23708,7 +23730,7 @@ function handleCLIError(error, verbose = false) {
23708
23730
  process.exit(EXIT_CODES.UNEXPECTED_ERROR);
23709
23731
  }
23710
23732
  function setupGlobalOptions(program) {
23711
- 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)");
23733
+ 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)");
23712
23734
  program.exitOverride((err) => {
23713
23735
  if (err.code === "commander.helpDisplayed") {
23714
23736
  process.exit(0);