juno-code 1.0.27 → 1.0.29

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
@@ -3562,6 +3562,9 @@ function createExecutionRequest(options) {
3562
3562
  if (options.model !== void 0) {
3563
3563
  result.model = options.model;
3564
3564
  }
3565
+ if (options.agents !== void 0) {
3566
+ result.agents = options.agents;
3567
+ }
3565
3568
  if (options.mcpServerName !== void 0) {
3566
3569
  result.mcpServerName = options.mcpServerName;
3567
3570
  }
@@ -4010,6 +4013,7 @@ var init_engine = __esm({
4010
4013
  instruction: context.request.instruction,
4011
4014
  project_path: context.request.workingDirectory,
4012
4015
  ...context.request.model !== void 0 && { model: context.request.model },
4016
+ ...context.request.agents !== void 0 && { agents: context.request.agents },
4013
4017
  iteration: iterationNumber
4014
4018
  },
4015
4019
  timeout: context.request.timeoutMs || this.engineConfig.config.mcpTimeout,
@@ -7172,10 +7176,14 @@ var init_shell_backend = __esm({
7172
7176
  if (isPython && request.arguments?.model) {
7173
7177
  args.push("-m", request.arguments.model);
7174
7178
  }
7179
+ if (isPython && request.arguments?.agents) {
7180
+ args.push("--agents", request.arguments.agents);
7181
+ }
7175
7182
  if (this.config.debug) {
7176
7183
  engineLogger.debug(`Executing script: ${command} ${args.join(" ")}`);
7177
7184
  engineLogger.debug(`Working directory: ${this.config.workingDirectory}`);
7178
7185
  engineLogger.debug(`Environment variables: ${Object.keys(env2).filter((k) => k.startsWith("JUNO_")).join(", ")}`);
7186
+ engineLogger.debug(`Request arguments: ${JSON.stringify(request.arguments)}`);
7179
7187
  }
7180
7188
  const child = child_process.spawn(command, args, {
7181
7189
  env: env2,
@@ -12573,13 +12581,17 @@ async function mainCommandHandler(args, options, command) {
12573
12581
  if (options.verbose) {
12574
12582
  console.error(chalk15__default.default.gray(` Backend: ${getBackendDisplayName(selectedBackend)}`));
12575
12583
  }
12584
+ if (options.agents && selectedBackend !== "shell") {
12585
+ console.error(chalk15__default.default.yellow("\n\u26A0\uFE0F Note: --agents flag is only supported with shell backend and will be ignored"));
12586
+ }
12576
12587
  const executionRequest = createExecutionRequest({
12577
12588
  instruction,
12578
12589
  subagent: options.subagent,
12579
12590
  backend: selectedBackend,
12580
12591
  workingDirectory: config.workingDirectory,
12581
12592
  maxIterations: options.maxIterations || config.defaultMaxIterations,
12582
- model: options.model || config.defaultModel
12593
+ model: options.model || config.defaultModel,
12594
+ agents: options.agents
12583
12595
  });
12584
12596
  const coordinator = new MainExecutionCoordinator(config, options.verbose, options.enableFeedback || false);
12585
12597
  const result = await coordinator.execute(executionRequest);
@@ -12672,6 +12684,11 @@ function createMainCommand() {
12672
12684
  description: "Model to use (optional, subagent-specific)",
12673
12685
  env: "JUNO_CODE_MODEL"
12674
12686
  }),
12687
+ createOption({
12688
+ flags: "--agents <config>",
12689
+ description: "Agents configuration (forwarded to shell backend, ignored for MCP)",
12690
+ env: "JUNO_CODE_AGENTS"
12691
+ }),
12675
12692
  createOption({
12676
12693
  flags: "-I, --interactive",
12677
12694
  description: "Interactive mode for typing/pasting prompts",
@@ -16250,12 +16267,13 @@ async function initCommandHandler(args, options, command) {
16250
16267
  }
16251
16268
  }
16252
16269
  function configureInitCommand(program) {
16253
- program.command("init").description("Initialize new juno-code project with simple setup").argument("[directory]", "Target directory (default: current directory)").option("-f, --force", "Force overwrite existing files").option("-t, --task <description>", "Main task description").option("-g, --git-url <url>", "Git repository URL").option("-i, --interactive", "Launch simple interactive setup").action(async (directory, options, command) => {
16270
+ program.command("init").description("Initialize new juno-code project - supports both interactive and inline modes").argument("[description]", "Task description for inline mode (optional - triggers inline mode if provided)").option("-s, --subagent <name>", "AI subagent to use (claude, codex, gemini, cursor)").option("-g, --git-repo <url>", "Git repository URL").option("-d, --directory <path>", "Target directory (default: current directory)").option("-f, --force", "Force overwrite existing files").option("-i, --interactive", "Force interactive mode (even if description is provided)").option("--git-url <url>", "Git repository URL (alias for --git-repo)").option("-t, --task <description>", "Task description (alias for positional description)").action(async (description, options, command) => {
16271
+ const taskDescription = description || options.task;
16254
16272
  const initOptions = {
16255
- directory,
16273
+ directory: options.directory,
16256
16274
  force: options.force,
16257
- task: options.task,
16258
- gitUrl: options.gitUrl,
16275
+ task: taskDescription,
16276
+ gitUrl: options.gitRepo || options.gitUrl,
16259
16277
  subagent: options.subagent,
16260
16278
  interactive: options.interactive,
16261
16279
  // Global options
@@ -16267,12 +16285,35 @@ function configureInitCommand(program) {
16267
16285
  };
16268
16286
  await initCommandHandler([], initOptions, command);
16269
16287
  }).addHelpText("after", `
16270
- Examples:
16271
- $ juno-code init # Initialize in current directory
16272
- $ juno-code init my-project # Initialize in ./my-project
16273
- $ juno-code init --interactive # Use simple interactive setup
16288
+ Modes:
16289
+ Interactive Mode (default):
16290
+ $ juno-code init # Opens interactive TUI
16291
+ $ juno-code init --interactive # Force interactive mode
16292
+
16293
+ Inline Mode (for automation):
16294
+ $ juno-code init "Build a REST API" # Minimal inline mode
16295
+ $ juno-code init "Build a REST API" --subagent claude --git-repo https://github.com/owner/repo
16296
+ $ juno-code init "Build a REST API" --subagent codex --directory ./my-project
16274
16297
 
16275
- Simplified Interactive Flow:
16298
+ Examples:
16299
+ # Interactive mode (default)
16300
+ $ juno-code init # Initialize in current directory with TUI
16301
+ $ juno-code init --directory my-project # Initialize in ./my-project with TUI
16302
+
16303
+ # Inline mode (automation-friendly)
16304
+ $ juno-code init "Create a TypeScript library" # Quick init with inline description
16305
+ $ juno-code init "Build web app" --subagent claude # Specify AI subagent
16306
+ $ juno-code init "API server" --git-repo https://github.com/me/repo
16307
+
16308
+ Arguments & Options:
16309
+ [description] Task description (optional - triggers inline mode)
16310
+ -s, --subagent <name> AI subagent: claude, codex, gemini, cursor (default: claude)
16311
+ -g, --git-repo <url> Git repository URL
16312
+ -d, --directory <path> Target directory (default: current directory)
16313
+ -f, --force Force overwrite existing files
16314
+ -i, --interactive Force interactive mode
16315
+
16316
+ Interactive Flow:
16276
16317
  1. Project Root \u2192 Specify target directory
16277
16318
  2. Main Task \u2192 Multi-line description (no character limits)
16278
16319
  3. Subagent Selection \u2192 Choose from Claude, Codex, Gemini, Cursor
@@ -16280,10 +16321,10 @@ Simplified Interactive Flow:
16280
16321
  5. Save \u2192 Handle existing files with override/cancel options
16281
16322
 
16282
16323
  Notes:
16324
+ - All inline mode arguments are optional
16325
+ - Defaults: directory=cwd, subagent=claude, no git repo
16283
16326
  - No prompt cost calculation or token counting
16284
16327
  - No character limits on task descriptions
16285
- - Simple file structure with basic templates
16286
- - Focus on quick project setup without complexity
16287
16328
  `);
16288
16329
  }
16289
16330
 
@@ -16349,6 +16390,7 @@ async function startCommandHandler(args, options, command) {
16349
16390
  backend: options.backend,
16350
16391
  maxIterations: options.maxIterations,
16351
16392
  model: options.model,
16393
+ agents: options.agents,
16352
16394
  directory: options.directory,
16353
16395
  verbose: options.verbose,
16354
16396
  quiet: options.quiet,
@@ -16383,7 +16425,7 @@ async function startCommandHandler(args, options, command) {
16383
16425
  }
16384
16426
  }
16385
16427
  function configureStartCommand(program) {
16386
- program.command("start").description("Start execution using .juno_task/init.md as prompt").option("-s, --subagent <name>", "Subagent to use (claude, cursor, codex, gemini)").option("-b, --backend <type>", "Backend to use (mcp, shell)").option("-i, --max-iterations <number>", "Maximum number of iterations", parseInt).option("-m, --model <name>", "Model to use for execution").option("-d, --directory <path>", "Project directory (default: current)").option("--enable-feedback", "Enable concurrent feedback collection during execution").option("--show-metrics", "Display performance metrics summary after execution").option("--show-dashboard", "Show interactive performance dashboard after execution").option("--show-trends", "Display performance trends from historical data").option("--save-metrics [file]", "Save performance metrics to file (default: .juno_task/metrics.json)").option("--metrics-file <path>", "Specify custom path for metrics file").option("--dry-run", "Validate configuration and exit without executing").action(async (options, command) => {
16428
+ program.command("start").description("Start execution using .juno_task/init.md as prompt").option("-s, --subagent <name>", "Subagent to use (claude, cursor, codex, gemini)").option("-b, --backend <type>", "Backend to use (mcp, shell)").option("-i, --max-iterations <number>", "Maximum number of iterations", parseInt).option("-m, --model <name>", "Model to use for execution").option("--agents <config>", "Agents configuration (forwarded to shell backend, ignored for MCP)").option("-d, --directory <path>", "Project directory (default: current)").option("--enable-feedback", "Enable concurrent feedback collection during execution").option("--show-metrics", "Display performance metrics summary after execution").option("--show-dashboard", "Show interactive performance dashboard after execution").option("--show-trends", "Display performance trends from historical data").option("--save-metrics [file]", "Save performance metrics to file (default: .juno_task/metrics.json)").option("--metrics-file <path>", "Specify custom path for metrics file").option("--dry-run", "Validate configuration and exit without executing").action(async (options, command) => {
16387
16429
  const allOptions2 = command.optsWithGlobals ? command.optsWithGlobals() : { ...command.opts(), ...options };
16388
16430
  if (allOptions2.saveMetrics === true) {
16389
16431
  allOptions2.saveMetrics = true;
@@ -23644,10 +23686,13 @@ function setupGlobalOptions(program) {
23644
23686
  });
23645
23687
  }
23646
23688
  function setupMainCommand(program) {
23647
- 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) => {
23689
+ 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) => {
23648
23690
  try {
23649
23691
  const globalOptions = program.opts();
23650
- const allOptions2 = { ...options, ...globalOptions };
23692
+ const definedGlobalOptions = Object.fromEntries(
23693
+ Object.entries(globalOptions).filter(([_, v]) => v !== void 0)
23694
+ );
23695
+ const allOptions2 = { ...definedGlobalOptions, ...options };
23651
23696
  if (!globalOptions.subagent && !options.prompt && !options.interactive && !options.interactivePrompt) {
23652
23697
  const fs21 = await import('fs-extra');
23653
23698
  const path23 = await import('path');