juno-code 1.0.29 → 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 +69 -5
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +69 -5
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -1
- package/dist/index.mjs.map +1 -1
- package/dist/templates/services/claude.py +75 -17
- package/package.json +6 -6
package/dist/bin/cli.mjs
CHANGED
|
@@ -1104,8 +1104,23 @@ async function ensureHooksConfig(baseDir) {
|
|
|
1104
1104
|
await fs3.writeJson(configPath, defaultConfig, { spaces: 2 });
|
|
1105
1105
|
} else {
|
|
1106
1106
|
const existingConfig = await fs3.readJson(configPath);
|
|
1107
|
+
let needsUpdate = false;
|
|
1107
1108
|
if (!existingConfig.hooks) {
|
|
1108
1109
|
existingConfig.hooks = allHookTypes;
|
|
1110
|
+
needsUpdate = true;
|
|
1111
|
+
}
|
|
1112
|
+
if (!existingConfig.defaultModel) {
|
|
1113
|
+
const subagent = existingConfig.defaultSubagent || "claude";
|
|
1114
|
+
const modelDefaults = {
|
|
1115
|
+
claude: ":sonnet",
|
|
1116
|
+
codex: "gpt-5",
|
|
1117
|
+
gemini: "gemini-2.5-pro",
|
|
1118
|
+
cursor: "auto"
|
|
1119
|
+
};
|
|
1120
|
+
existingConfig.defaultModel = modelDefaults[subagent] || ":sonnet";
|
|
1121
|
+
needsUpdate = true;
|
|
1122
|
+
}
|
|
1123
|
+
if (needsUpdate) {
|
|
1109
1124
|
await fs3.writeJson(configPath, existingConfig, { spaces: 2 });
|
|
1110
1125
|
}
|
|
1111
1126
|
}
|
|
@@ -3529,6 +3544,18 @@ function createExecutionRequest(options) {
|
|
|
3529
3544
|
if (options.agents !== void 0) {
|
|
3530
3545
|
result.agents = options.agents;
|
|
3531
3546
|
}
|
|
3547
|
+
if (options.tools !== void 0) {
|
|
3548
|
+
result.tools = options.tools;
|
|
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
|
+
}
|
|
3556
|
+
if (options.disallowedTools !== void 0) {
|
|
3557
|
+
result.disallowedTools = options.disallowedTools;
|
|
3558
|
+
}
|
|
3532
3559
|
if (options.mcpServerName !== void 0) {
|
|
3533
3560
|
result.mcpServerName = options.mcpServerName;
|
|
3534
3561
|
}
|
|
@@ -3978,6 +4005,10 @@ var init_engine = __esm({
|
|
|
3978
4005
|
project_path: context.request.workingDirectory,
|
|
3979
4006
|
...context.request.model !== void 0 && { model: context.request.model },
|
|
3980
4007
|
...context.request.agents !== void 0 && { agents: context.request.agents },
|
|
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 },
|
|
4011
|
+
...context.request.disallowedTools !== void 0 && { disallowedTools: context.request.disallowedTools },
|
|
3981
4012
|
iteration: iterationNumber
|
|
3982
4013
|
},
|
|
3983
4014
|
timeout: context.request.timeoutMs || this.engineConfig.config.mcpTimeout,
|
|
@@ -7143,6 +7174,22 @@ var init_shell_backend = __esm({
|
|
|
7143
7174
|
if (isPython && request.arguments?.agents) {
|
|
7144
7175
|
args.push("--agents", request.arguments.agents);
|
|
7145
7176
|
}
|
|
7177
|
+
if (isPython && request.arguments?.tools && Array.isArray(request.arguments.tools)) {
|
|
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);
|
|
7188
|
+
}
|
|
7189
|
+
if (isPython && request.arguments?.disallowedTools && Array.isArray(request.arguments.disallowedTools)) {
|
|
7190
|
+
args.push("--disallowedTools");
|
|
7191
|
+
args.push(...request.arguments.disallowedTools);
|
|
7192
|
+
}
|
|
7146
7193
|
if (this.config.debug) {
|
|
7147
7194
|
engineLogger.debug(`Executing script: ${command} ${args.join(" ")}`);
|
|
7148
7195
|
engineLogger.debug(`Working directory: ${this.config.workingDirectory}`);
|
|
@@ -12548,6 +12595,13 @@ async function mainCommandHandler(args, options, command) {
|
|
|
12548
12595
|
if (options.agents && selectedBackend !== "shell") {
|
|
12549
12596
|
console.error(chalk15.yellow("\n\u26A0\uFE0F Note: --agents flag is only supported with shell backend and will be ignored"));
|
|
12550
12597
|
}
|
|
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);
|
|
12604
|
+
}
|
|
12551
12605
|
const executionRequest = createExecutionRequest({
|
|
12552
12606
|
instruction,
|
|
12553
12607
|
subagent: options.subagent,
|
|
@@ -12555,7 +12609,11 @@ async function mainCommandHandler(args, options, command) {
|
|
|
12555
12609
|
workingDirectory: config.workingDirectory,
|
|
12556
12610
|
maxIterations: options.maxIterations || config.defaultMaxIterations,
|
|
12557
12611
|
model: options.model || config.defaultModel,
|
|
12558
|
-
agents: options.agents
|
|
12612
|
+
agents: options.agents,
|
|
12613
|
+
tools: options.tools,
|
|
12614
|
+
allowedTools: options.allowedTools,
|
|
12615
|
+
appendAllowedTools: options.appendAllowedTools,
|
|
12616
|
+
disallowedTools: options.disallowedTools
|
|
12559
12617
|
});
|
|
12560
12618
|
const coordinator = new MainExecutionCoordinator(config, options.verbose, options.enableFeedback || false);
|
|
12561
12619
|
const result = await coordinator.execute(executionRequest);
|
|
@@ -15938,7 +15996,7 @@ ${variables.EDITOR ? `using ${variables.EDITOR} as primary AI subagent` : ""}
|
|
|
15938
15996
|
}
|
|
15939
15997
|
getDefaultModelForSubagent(subagent) {
|
|
15940
15998
|
const modelDefaults = {
|
|
15941
|
-
claude: "sonnet
|
|
15999
|
+
claude: ":sonnet",
|
|
15942
16000
|
codex: "gpt-5",
|
|
15943
16001
|
gemini: "gemini-2.5-pro",
|
|
15944
16002
|
cursor: "auto"
|
|
@@ -16355,6 +16413,10 @@ async function startCommandHandler(args, options, command) {
|
|
|
16355
16413
|
maxIterations: options.maxIterations,
|
|
16356
16414
|
model: options.model,
|
|
16357
16415
|
agents: options.agents,
|
|
16416
|
+
tools: options.tools,
|
|
16417
|
+
allowedTools: options.allowedTools,
|
|
16418
|
+
appendAllowedTools: options.appendAllowedTools,
|
|
16419
|
+
disallowedTools: options.disallowedTools,
|
|
16358
16420
|
directory: options.directory,
|
|
16359
16421
|
verbose: options.verbose,
|
|
16360
16422
|
quiet: options.quiet,
|
|
@@ -23632,7 +23694,7 @@ function handleCLIError(error, verbose = false) {
|
|
|
23632
23694
|
process.exit(EXIT_CODES.UNEXPECTED_ERROR);
|
|
23633
23695
|
}
|
|
23634
23696
|
function setupGlobalOptions(program) {
|
|
23635
|
-
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("--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)");
|
|
23636
23698
|
program.exitOverride((err) => {
|
|
23637
23699
|
if (err.code === "commander.helpDisplayed") {
|
|
23638
23700
|
process.exit(0);
|
|
@@ -23650,7 +23712,7 @@ function setupGlobalOptions(program) {
|
|
|
23650
23712
|
});
|
|
23651
23713
|
}
|
|
23652
23714
|
function setupMainCommand(program) {
|
|
23653
|
-
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("-
|
|
23715
|
+
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("-I, --interactive", "Interactive mode for typing prompts").option("-ip, --interactive-prompt", "Launch TUI prompt editor").action(async (options, command) => {
|
|
23654
23716
|
try {
|
|
23655
23717
|
const globalOptions = program.opts();
|
|
23656
23718
|
const definedGlobalOptions = Object.fromEntries(
|
|
@@ -23733,11 +23795,13 @@ function setupCompletion(program) {
|
|
|
23733
23795
|
function setupAliases(program) {
|
|
23734
23796
|
const subagents = ["claude", "cursor", "codex", "gemini"];
|
|
23735
23797
|
for (const subagent of subagents) {
|
|
23736
|
-
program.command(subagent, { hidden: true }).description(`Execute with ${subagent} subagent`).argument("[prompt...]", "Prompt text or file path").option("-i, --max-iterations <number>", "Maximum iterations", parseInt).option("-
|
|
23798
|
+
program.command(subagent, { hidden: true }).description(`Execute with ${subagent} subagent`).argument("[prompt...]", "Prompt text or file path").option("-i, --max-iterations <number>", "Maximum iterations", parseInt).option("-w, --cwd <path>", "Working directory").action(async (prompt, options, command) => {
|
|
23737
23799
|
try {
|
|
23738
23800
|
const { mainCommandHandler: mainCommandHandler2 } = await Promise.resolve().then(() => (init_main(), main_exports));
|
|
23739
23801
|
const promptText = Array.isArray(prompt) ? prompt.join(" ") : prompt;
|
|
23802
|
+
const globalOptions = program.opts();
|
|
23740
23803
|
await mainCommandHandler2([], {
|
|
23804
|
+
...globalOptions,
|
|
23741
23805
|
...options,
|
|
23742
23806
|
subagent,
|
|
23743
23807
|
prompt: promptText
|