juno-code 1.0.29 → 1.0.30
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 +47 -5
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +47 -5
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +24 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -1
- package/dist/index.mjs.map +1 -1
- package/dist/templates/services/claude.py +15 -3
- package/package.json +6 -6
package/dist/bin/cli.js
CHANGED
|
@@ -1140,8 +1140,23 @@ async function ensureHooksConfig(baseDir) {
|
|
|
1140
1140
|
await fs3__default.default.writeJson(configPath, defaultConfig, { spaces: 2 });
|
|
1141
1141
|
} else {
|
|
1142
1142
|
const existingConfig = await fs3__default.default.readJson(configPath);
|
|
1143
|
+
let needsUpdate = false;
|
|
1143
1144
|
if (!existingConfig.hooks) {
|
|
1144
1145
|
existingConfig.hooks = allHookTypes;
|
|
1146
|
+
needsUpdate = true;
|
|
1147
|
+
}
|
|
1148
|
+
if (!existingConfig.defaultModel) {
|
|
1149
|
+
const subagent = existingConfig.defaultSubagent || "claude";
|
|
1150
|
+
const modelDefaults = {
|
|
1151
|
+
claude: ":sonnet",
|
|
1152
|
+
codex: "gpt-5",
|
|
1153
|
+
gemini: "gemini-2.5-pro",
|
|
1154
|
+
cursor: "auto"
|
|
1155
|
+
};
|
|
1156
|
+
existingConfig.defaultModel = modelDefaults[subagent] || ":sonnet";
|
|
1157
|
+
needsUpdate = true;
|
|
1158
|
+
}
|
|
1159
|
+
if (needsUpdate) {
|
|
1145
1160
|
await fs3__default.default.writeJson(configPath, existingConfig, { spaces: 2 });
|
|
1146
1161
|
}
|
|
1147
1162
|
}
|
|
@@ -3565,6 +3580,12 @@ function createExecutionRequest(options) {
|
|
|
3565
3580
|
if (options.agents !== void 0) {
|
|
3566
3581
|
result.agents = options.agents;
|
|
3567
3582
|
}
|
|
3583
|
+
if (options.tools !== void 0) {
|
|
3584
|
+
result.tools = options.tools;
|
|
3585
|
+
}
|
|
3586
|
+
if (options.disallowedTools !== void 0) {
|
|
3587
|
+
result.disallowedTools = options.disallowedTools;
|
|
3588
|
+
}
|
|
3568
3589
|
if (options.mcpServerName !== void 0) {
|
|
3569
3590
|
result.mcpServerName = options.mcpServerName;
|
|
3570
3591
|
}
|
|
@@ -4014,6 +4035,8 @@ var init_engine = __esm({
|
|
|
4014
4035
|
project_path: context.request.workingDirectory,
|
|
4015
4036
|
...context.request.model !== void 0 && { model: context.request.model },
|
|
4016
4037
|
...context.request.agents !== void 0 && { agents: context.request.agents },
|
|
4038
|
+
...context.request.tools !== void 0 && { tools: context.request.tools },
|
|
4039
|
+
...context.request.disallowedTools !== void 0 && { disallowedTools: context.request.disallowedTools },
|
|
4017
4040
|
iteration: iterationNumber
|
|
4018
4041
|
},
|
|
4019
4042
|
timeout: context.request.timeoutMs || this.engineConfig.config.mcpTimeout,
|
|
@@ -7179,6 +7202,16 @@ var init_shell_backend = __esm({
|
|
|
7179
7202
|
if (isPython && request.arguments?.agents) {
|
|
7180
7203
|
args.push("--agents", request.arguments.agents);
|
|
7181
7204
|
}
|
|
7205
|
+
if (isPython && request.arguments?.tools && Array.isArray(request.arguments.tools)) {
|
|
7206
|
+
for (const tool of request.arguments.tools) {
|
|
7207
|
+
args.push("--tool", tool);
|
|
7208
|
+
}
|
|
7209
|
+
}
|
|
7210
|
+
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
|
+
}
|
|
7214
|
+
}
|
|
7182
7215
|
if (this.config.debug) {
|
|
7183
7216
|
engineLogger.debug(`Executing script: ${command} ${args.join(" ")}`);
|
|
7184
7217
|
engineLogger.debug(`Working directory: ${this.config.workingDirectory}`);
|
|
@@ -12584,6 +12617,9 @@ async function mainCommandHandler(args, options, command) {
|
|
|
12584
12617
|
if (options.agents && selectedBackend !== "shell") {
|
|
12585
12618
|
console.error(chalk15__default.default.yellow("\n\u26A0\uFE0F Note: --agents flag is only supported with shell backend and will be ignored"));
|
|
12586
12619
|
}
|
|
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"));
|
|
12622
|
+
}
|
|
12587
12623
|
const executionRequest = createExecutionRequest({
|
|
12588
12624
|
instruction,
|
|
12589
12625
|
subagent: options.subagent,
|
|
@@ -12591,7 +12627,9 @@ async function mainCommandHandler(args, options, command) {
|
|
|
12591
12627
|
workingDirectory: config.workingDirectory,
|
|
12592
12628
|
maxIterations: options.maxIterations || config.defaultMaxIterations,
|
|
12593
12629
|
model: options.model || config.defaultModel,
|
|
12594
|
-
agents: options.agents
|
|
12630
|
+
agents: options.agents,
|
|
12631
|
+
tools: options.tools,
|
|
12632
|
+
disallowedTools: options.disallowedTools
|
|
12595
12633
|
});
|
|
12596
12634
|
const coordinator = new MainExecutionCoordinator(config, options.verbose, options.enableFeedback || false);
|
|
12597
12635
|
const result = await coordinator.execute(executionRequest);
|
|
@@ -15974,7 +16012,7 @@ ${variables.EDITOR ? `using ${variables.EDITOR} as primary AI subagent` : ""}
|
|
|
15974
16012
|
}
|
|
15975
16013
|
getDefaultModelForSubagent(subagent) {
|
|
15976
16014
|
const modelDefaults = {
|
|
15977
|
-
claude: "sonnet
|
|
16015
|
+
claude: ":sonnet",
|
|
15978
16016
|
codex: "gpt-5",
|
|
15979
16017
|
gemini: "gemini-2.5-pro",
|
|
15980
16018
|
cursor: "auto"
|
|
@@ -16391,6 +16429,8 @@ async function startCommandHandler(args, options, command) {
|
|
|
16391
16429
|
maxIterations: options.maxIterations,
|
|
16392
16430
|
model: options.model,
|
|
16393
16431
|
agents: options.agents,
|
|
16432
|
+
tools: options.tools,
|
|
16433
|
+
disallowedTools: options.disallowedTools,
|
|
16394
16434
|
directory: options.directory,
|
|
16395
16435
|
verbose: options.verbose,
|
|
16396
16436
|
quiet: options.quiet,
|
|
@@ -23668,7 +23708,7 @@ function handleCLIError(error, verbose = false) {
|
|
|
23668
23708
|
process.exit(EXIT_CODES.UNEXPECTED_ERROR);
|
|
23669
23709
|
}
|
|
23670
23710
|
function setupGlobalOptions(program) {
|
|
23671
|
-
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)");
|
|
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)");
|
|
23672
23712
|
program.exitOverride((err) => {
|
|
23673
23713
|
if (err.code === "commander.helpDisplayed") {
|
|
23674
23714
|
process.exit(0);
|
|
@@ -23686,7 +23726,7 @@ function setupGlobalOptions(program) {
|
|
|
23686
23726
|
});
|
|
23687
23727
|
}
|
|
23688
23728
|
function setupMainCommand(program) {
|
|
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("-
|
|
23729
|
+
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) => {
|
|
23690
23730
|
try {
|
|
23691
23731
|
const globalOptions = program.opts();
|
|
23692
23732
|
const definedGlobalOptions = Object.fromEntries(
|
|
@@ -23769,11 +23809,13 @@ function setupCompletion(program) {
|
|
|
23769
23809
|
function setupAliases(program) {
|
|
23770
23810
|
const subagents = ["claude", "cursor", "codex", "gemini"];
|
|
23771
23811
|
for (const subagent of subagents) {
|
|
23772
|
-
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("-
|
|
23812
|
+
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) => {
|
|
23773
23813
|
try {
|
|
23774
23814
|
const { mainCommandHandler: mainCommandHandler2 } = await Promise.resolve().then(() => (init_main(), main_exports));
|
|
23775
23815
|
const promptText = Array.isArray(prompt) ? prompt.join(" ") : prompt;
|
|
23816
|
+
const globalOptions = program.opts();
|
|
23776
23817
|
await mainCommandHandler2([], {
|
|
23818
|
+
...globalOptions,
|
|
23777
23819
|
...options,
|
|
23778
23820
|
subagent,
|
|
23779
23821
|
prompt: promptText
|