juno-code 1.0.30 → 1.0.32
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 +73 -12
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +73 -12
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +40 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -3
- package/dist/index.mjs.map +1 -1
- package/dist/templates/services/claude.py +77 -17
- package/package.json +1 -1
package/dist/bin/cli.mjs
CHANGED
|
@@ -1174,6 +1174,8 @@ var init_config = __esm({
|
|
|
1174
1174
|
JUNO_CODE_MCP_RETRIES: "mcpRetries",
|
|
1175
1175
|
JUNO_CODE_MCP_SERVER_PATH: "mcpServerPath",
|
|
1176
1176
|
JUNO_CODE_MCP_SERVER_NAME: "mcpServerName",
|
|
1177
|
+
// Hook settings
|
|
1178
|
+
JUNO_CODE_HOOK_COMMAND_TIMEOUT: "hookCommandTimeout",
|
|
1177
1179
|
// TUI settings
|
|
1178
1180
|
JUNO_CODE_INTERACTIVE: "interactive",
|
|
1179
1181
|
JUNO_CODE_HEADLESS_MODE: "headlessMode",
|
|
@@ -1197,6 +1199,8 @@ var init_config = __esm({
|
|
|
1197
1199
|
JUNO_TASK_MCP_RETRIES: "mcpRetries",
|
|
1198
1200
|
JUNO_TASK_MCP_SERVER_PATH: "mcpServerPath",
|
|
1199
1201
|
JUNO_TASK_MCP_SERVER_NAME: "mcpServerName",
|
|
1202
|
+
// Hook settings
|
|
1203
|
+
JUNO_TASK_HOOK_COMMAND_TIMEOUT: "hookCommandTimeout",
|
|
1200
1204
|
// TUI settings
|
|
1201
1205
|
JUNO_TASK_INTERACTIVE: "interactive",
|
|
1202
1206
|
JUNO_TASK_HEADLESS_MODE: "headlessMode",
|
|
@@ -1228,6 +1232,8 @@ var init_config = __esm({
|
|
|
1228
1232
|
mcpRetries: z.number().int().min(0).max(10).describe("Number of retries for MCP operations"),
|
|
1229
1233
|
mcpServerPath: z.string().optional().describe("Path to MCP server executable (auto-discovered if not specified)"),
|
|
1230
1234
|
mcpServerName: z.string().optional().describe('Named MCP server to connect to (e.g., "roundtable-ai")'),
|
|
1235
|
+
// Hook settings
|
|
1236
|
+
hookCommandTimeout: z.number().int().min(1e3).max(36e5).optional().describe("Timeout for individual hook commands in milliseconds (default: 300000 = 5 minutes)"),
|
|
1231
1237
|
// TUI settings
|
|
1232
1238
|
interactive: z.boolean().describe("Enable interactive mode"),
|
|
1233
1239
|
headlessMode: z.boolean().describe("Enable headless mode (no TUI)"),
|
|
@@ -3337,7 +3343,8 @@ var init_advanced_logger = __esm({
|
|
|
3337
3343
|
async function executeHook(hookType, hooks, context = {}, options = {}) {
|
|
3338
3344
|
const startTime = Date.now();
|
|
3339
3345
|
const {
|
|
3340
|
-
commandTimeout =
|
|
3346
|
+
commandTimeout = 3e5,
|
|
3347
|
+
// 5 minutes default (increased from 30s to support long-running hook scripts)
|
|
3341
3348
|
env: env2 = {},
|
|
3342
3349
|
continueOnError = true,
|
|
3343
3350
|
logContext = "SYSTEM" /* SYSTEM */
|
|
@@ -3412,8 +3419,12 @@ async function executeHook(hookType, hooks, context = {}, options = {}) {
|
|
|
3412
3419
|
env: execEnv,
|
|
3413
3420
|
// Capture both stdout and stderr
|
|
3414
3421
|
all: true,
|
|
3415
|
-
reject: false
|
|
3422
|
+
reject: false,
|
|
3416
3423
|
// Don't throw on non-zero exit codes
|
|
3424
|
+
// Use input: '' to provide empty stdin and properly close it (sends EOF)
|
|
3425
|
+
// This prevents commands from hanging waiting for stdin while still
|
|
3426
|
+
// allowing internal pipe operations to work correctly
|
|
3427
|
+
input: ""
|
|
3417
3428
|
});
|
|
3418
3429
|
const duration = Date.now() - commandStartTime;
|
|
3419
3430
|
const success2 = result2.exitCode === 0;
|
|
@@ -3547,12 +3558,24 @@ function createExecutionRequest(options) {
|
|
|
3547
3558
|
if (options.tools !== void 0) {
|
|
3548
3559
|
result.tools = options.tools;
|
|
3549
3560
|
}
|
|
3561
|
+
if (options.allowedTools !== void 0) {
|
|
3562
|
+
result.allowedTools = options.allowedTools;
|
|
3563
|
+
}
|
|
3564
|
+
if (options.appendAllowedTools !== void 0) {
|
|
3565
|
+
result.appendAllowedTools = options.appendAllowedTools;
|
|
3566
|
+
}
|
|
3550
3567
|
if (options.disallowedTools !== void 0) {
|
|
3551
3568
|
result.disallowedTools = options.disallowedTools;
|
|
3552
3569
|
}
|
|
3553
3570
|
if (options.mcpServerName !== void 0) {
|
|
3554
3571
|
result.mcpServerName = options.mcpServerName;
|
|
3555
3572
|
}
|
|
3573
|
+
if (options.resume !== void 0) {
|
|
3574
|
+
result.resume = options.resume;
|
|
3575
|
+
}
|
|
3576
|
+
if (options.continueConversation !== void 0) {
|
|
3577
|
+
result.continueConversation = options.continueConversation;
|
|
3578
|
+
}
|
|
3556
3579
|
return result;
|
|
3557
3580
|
}
|
|
3558
3581
|
var DEFAULT_ERROR_RECOVERY_CONFIG, DEFAULT_RATE_LIMIT_CONFIG, DEFAULT_PROGRESS_CONFIG, ExecutionEngine;
|
|
@@ -3903,6 +3926,8 @@ var init_engine = __esm({
|
|
|
3903
3926
|
maxIterations: context.request.maxIterations,
|
|
3904
3927
|
instruction: context.request.instruction
|
|
3905
3928
|
}
|
|
3929
|
+
}, {
|
|
3930
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
3906
3931
|
});
|
|
3907
3932
|
}
|
|
3908
3933
|
} catch (error) {
|
|
@@ -3935,6 +3960,8 @@ var init_engine = __esm({
|
|
|
3935
3960
|
duration: context.endTime ? context.endTime.getTime() - context.startTime.getTime() : 0,
|
|
3936
3961
|
success: context.status === "completed" /* COMPLETED */
|
|
3937
3962
|
}
|
|
3963
|
+
}, {
|
|
3964
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
3938
3965
|
});
|
|
3939
3966
|
}
|
|
3940
3967
|
} catch (error) {
|
|
@@ -3986,6 +4013,8 @@ var init_engine = __esm({
|
|
|
3986
4013
|
maxIterations: context.request.maxIterations,
|
|
3987
4014
|
subagent: context.request.subagent
|
|
3988
4015
|
}
|
|
4016
|
+
}, {
|
|
4017
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
3989
4018
|
});
|
|
3990
4019
|
}
|
|
3991
4020
|
} catch (error) {
|
|
@@ -4000,7 +4029,11 @@ var init_engine = __esm({
|
|
|
4000
4029
|
...context.request.model !== void 0 && { model: context.request.model },
|
|
4001
4030
|
...context.request.agents !== void 0 && { agents: context.request.agents },
|
|
4002
4031
|
...context.request.tools !== void 0 && { tools: context.request.tools },
|
|
4032
|
+
...context.request.allowedTools !== void 0 && { allowedTools: context.request.allowedTools },
|
|
4033
|
+
...context.request.appendAllowedTools !== void 0 && { appendAllowedTools: context.request.appendAllowedTools },
|
|
4003
4034
|
...context.request.disallowedTools !== void 0 && { disallowedTools: context.request.disallowedTools },
|
|
4035
|
+
...context.request.resume !== void 0 && { resume: context.request.resume },
|
|
4036
|
+
...context.request.continueConversation !== void 0 && { continueConversation: context.request.continueConversation },
|
|
4004
4037
|
iteration: iterationNumber
|
|
4005
4038
|
},
|
|
4006
4039
|
timeout: context.request.timeoutMs || this.engineConfig.config.mcpTimeout,
|
|
@@ -4048,6 +4081,8 @@ var init_engine = __esm({
|
|
|
4048
4081
|
duration: iterationResult.duration,
|
|
4049
4082
|
toolCallStatus: iterationResult.toolResult.status
|
|
4050
4083
|
}
|
|
4084
|
+
}, {
|
|
4085
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
4051
4086
|
});
|
|
4052
4087
|
}
|
|
4053
4088
|
} catch (error) {
|
|
@@ -4096,6 +4131,8 @@ var init_engine = __esm({
|
|
|
4096
4131
|
error: mcpError.message,
|
|
4097
4132
|
errorType: mcpError.type
|
|
4098
4133
|
}
|
|
4134
|
+
}, {
|
|
4135
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
4099
4136
|
});
|
|
4100
4137
|
}
|
|
4101
4138
|
} catch (hookError) {
|
|
@@ -7167,14 +7204,26 @@ var init_shell_backend = __esm({
|
|
|
7167
7204
|
args.push("--agents", request.arguments.agents);
|
|
7168
7205
|
}
|
|
7169
7206
|
if (isPython && request.arguments?.tools && Array.isArray(request.arguments.tools)) {
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7207
|
+
args.push("--tools");
|
|
7208
|
+
args.push(...request.arguments.tools);
|
|
7209
|
+
}
|
|
7210
|
+
if (isPython && request.arguments?.allowedTools && Array.isArray(request.arguments.allowedTools)) {
|
|
7211
|
+
args.push("--allowedTools");
|
|
7212
|
+
args.push(...request.arguments.allowedTools);
|
|
7213
|
+
}
|
|
7214
|
+
if (isPython && request.arguments?.appendAllowedTools && Array.isArray(request.arguments.appendAllowedTools)) {
|
|
7215
|
+
args.push("--appendAllowedTools");
|
|
7216
|
+
args.push(...request.arguments.appendAllowedTools);
|
|
7173
7217
|
}
|
|
7174
7218
|
if (isPython && request.arguments?.disallowedTools && Array.isArray(request.arguments.disallowedTools)) {
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7219
|
+
args.push("--disallowedTools");
|
|
7220
|
+
args.push(...request.arguments.disallowedTools);
|
|
7221
|
+
}
|
|
7222
|
+
if (isPython && request.arguments?.resume) {
|
|
7223
|
+
args.push("--resume", request.arguments.resume);
|
|
7224
|
+
}
|
|
7225
|
+
if (isPython && request.arguments?.continueConversation) {
|
|
7226
|
+
args.push("--continue");
|
|
7178
7227
|
}
|
|
7179
7228
|
if (this.config.debug) {
|
|
7180
7229
|
engineLogger.debug(`Executing script: ${command} ${args.join(" ")}`);
|
|
@@ -12581,8 +12630,12 @@ async function mainCommandHandler(args, options, command) {
|
|
|
12581
12630
|
if (options.agents && selectedBackend !== "shell") {
|
|
12582
12631
|
console.error(chalk15.yellow("\n\u26A0\uFE0F Note: --agents flag is only supported with shell backend and will be ignored"));
|
|
12583
12632
|
}
|
|
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"));
|
|
12633
|
+
if ((options.tools || options.allowedTools || options.appendAllowedTools || options.disallowedTools) && selectedBackend !== "shell") {
|
|
12634
|
+
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"));
|
|
12635
|
+
}
|
|
12636
|
+
if (options.allowedTools && options.appendAllowedTools) {
|
|
12637
|
+
console.error(chalk15.red("\n\u274C Error: --allowed-tools and --append-allowed-tools are mutually exclusive. Use one or the other."));
|
|
12638
|
+
process.exit(1);
|
|
12586
12639
|
}
|
|
12587
12640
|
const executionRequest = createExecutionRequest({
|
|
12588
12641
|
instruction,
|
|
@@ -12593,7 +12646,11 @@ async function mainCommandHandler(args, options, command) {
|
|
|
12593
12646
|
model: options.model || config.defaultModel,
|
|
12594
12647
|
agents: options.agents,
|
|
12595
12648
|
tools: options.tools,
|
|
12596
|
-
|
|
12649
|
+
allowedTools: options.allowedTools,
|
|
12650
|
+
appendAllowedTools: options.appendAllowedTools,
|
|
12651
|
+
disallowedTools: options.disallowedTools,
|
|
12652
|
+
resume: options.resume,
|
|
12653
|
+
continueConversation: options.continue
|
|
12597
12654
|
});
|
|
12598
12655
|
const coordinator = new MainExecutionCoordinator(config, options.verbose, options.enableFeedback || false);
|
|
12599
12656
|
const result = await coordinator.execute(executionRequest);
|
|
@@ -16394,7 +16451,11 @@ async function startCommandHandler(args, options, command) {
|
|
|
16394
16451
|
model: options.model,
|
|
16395
16452
|
agents: options.agents,
|
|
16396
16453
|
tools: options.tools,
|
|
16454
|
+
allowedTools: options.allowedTools,
|
|
16455
|
+
appendAllowedTools: options.appendAllowedTools,
|
|
16397
16456
|
disallowedTools: options.disallowedTools,
|
|
16457
|
+
resume: options.resume,
|
|
16458
|
+
continue: options.continue,
|
|
16398
16459
|
directory: options.directory,
|
|
16399
16460
|
verbose: options.verbose,
|
|
16400
16461
|
quiet: options.quiet,
|
|
@@ -23672,7 +23733,7 @@ function handleCLIError(error, verbose = false) {
|
|
|
23672
23733
|
process.exit(EXIT_CODES.UNEXPECTED_ERROR);
|
|
23673
23734
|
}
|
|
23674
23735
|
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...>", "
|
|
23736
|
+
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)").option("-r, --resume <sessionId>", "Resume a conversation by session ID (shell backend only)").option("--continue", "Continue the most recent conversation (shell backend only)");
|
|
23676
23737
|
program.exitOverride((err) => {
|
|
23677
23738
|
if (err.code === "commander.helpDisplayed") {
|
|
23678
23739
|
process.exit(0);
|