juno-code 1.0.27 → 1.0.28

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
@@ -3526,6 +3526,9 @@ function createExecutionRequest(options) {
3526
3526
  if (options.model !== void 0) {
3527
3527
  result.model = options.model;
3528
3528
  }
3529
+ if (options.agents !== void 0) {
3530
+ result.agents = options.agents;
3531
+ }
3529
3532
  if (options.mcpServerName !== void 0) {
3530
3533
  result.mcpServerName = options.mcpServerName;
3531
3534
  }
@@ -3974,6 +3977,7 @@ var init_engine = __esm({
3974
3977
  instruction: context.request.instruction,
3975
3978
  project_path: context.request.workingDirectory,
3976
3979
  ...context.request.model !== void 0 && { model: context.request.model },
3980
+ ...context.request.agents !== void 0 && { agents: context.request.agents },
3977
3981
  iteration: iterationNumber
3978
3982
  },
3979
3983
  timeout: context.request.timeoutMs || this.engineConfig.config.mcpTimeout,
@@ -7136,10 +7140,14 @@ var init_shell_backend = __esm({
7136
7140
  if (isPython && request.arguments?.model) {
7137
7141
  args.push("-m", request.arguments.model);
7138
7142
  }
7143
+ if (isPython && request.arguments?.agents) {
7144
+ args.push("--agents", request.arguments.agents);
7145
+ }
7139
7146
  if (this.config.debug) {
7140
7147
  engineLogger.debug(`Executing script: ${command} ${args.join(" ")}`);
7141
7148
  engineLogger.debug(`Working directory: ${this.config.workingDirectory}`);
7142
7149
  engineLogger.debug(`Environment variables: ${Object.keys(env2).filter((k) => k.startsWith("JUNO_")).join(", ")}`);
7150
+ engineLogger.debug(`Request arguments: ${JSON.stringify(request.arguments)}`);
7143
7151
  }
7144
7152
  const child = spawn(command, args, {
7145
7153
  env: env2,
@@ -12537,13 +12545,17 @@ async function mainCommandHandler(args, options, command) {
12537
12545
  if (options.verbose) {
12538
12546
  console.error(chalk15.gray(` Backend: ${getBackendDisplayName(selectedBackend)}`));
12539
12547
  }
12548
+ if (options.agents && selectedBackend !== "shell") {
12549
+ console.error(chalk15.yellow("\n\u26A0\uFE0F Note: --agents flag is only supported with shell backend and will be ignored"));
12550
+ }
12540
12551
  const executionRequest = createExecutionRequest({
12541
12552
  instruction,
12542
12553
  subagent: options.subagent,
12543
12554
  backend: selectedBackend,
12544
12555
  workingDirectory: config.workingDirectory,
12545
12556
  maxIterations: options.maxIterations || config.defaultMaxIterations,
12546
- model: options.model || config.defaultModel
12557
+ model: options.model || config.defaultModel,
12558
+ agents: options.agents
12547
12559
  });
12548
12560
  const coordinator = new MainExecutionCoordinator(config, options.verbose, options.enableFeedback || false);
12549
12561
  const result = await coordinator.execute(executionRequest);
@@ -23608,10 +23620,13 @@ function setupGlobalOptions(program) {
23608
23620
  });
23609
23621
  }
23610
23622
  function setupMainCommand(program) {
23611
- program.option("-p, --prompt <text>", "Prompt input (file path or inline text)").option("-w, --cwd <path>", "Working directory").option("-i, --max-iterations <number>", "Maximum iterations (-1 for unlimited)", parseInt).option("-m, --model <name>", "Model to use (subagent-specific)").option("-b, --backend <type>", "Backend to use (mcp, shell)").option("-I, --interactive", "Interactive mode for typing prompts").option("-ip, --interactive-prompt", "Launch TUI prompt editor").action(async (options, command) => {
23623
+ program.option("-p, --prompt <text>", "Prompt input (file path or inline text)").option("-w, --cwd <path>", "Working directory").option("-i, --max-iterations <number>", "Maximum iterations (-1 for unlimited)", parseInt).option("-m, --model <name>", "Model to use (subagent-specific)").option("--agents <agents>", "Agents configuration (forwarded to claude.py when using shell backend)").option("-b, --backend <type>", "Backend to use (mcp, shell)").option("-I, --interactive", "Interactive mode for typing prompts").option("-ip, --interactive-prompt", "Launch TUI prompt editor").action(async (options, command) => {
23612
23624
  try {
23613
23625
  const globalOptions = program.opts();
23614
- const allOptions2 = { ...options, ...globalOptions };
23626
+ const definedGlobalOptions = Object.fromEntries(
23627
+ Object.entries(globalOptions).filter(([_, v]) => v !== void 0)
23628
+ );
23629
+ const allOptions2 = { ...definedGlobalOptions, ...options };
23615
23630
  if (!globalOptions.subagent && !options.prompt && !options.interactive && !options.interactivePrompt) {
23616
23631
  const fs21 = await import('fs-extra');
23617
23632
  const path23 = await import('path');