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.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,12 @@ 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.disallowedTools !== void 0) {
|
|
3551
|
+
result.disallowedTools = options.disallowedTools;
|
|
3552
|
+
}
|
|
3532
3553
|
if (options.mcpServerName !== void 0) {
|
|
3533
3554
|
result.mcpServerName = options.mcpServerName;
|
|
3534
3555
|
}
|
|
@@ -3978,6 +3999,8 @@ var init_engine = __esm({
|
|
|
3978
3999
|
project_path: context.request.workingDirectory,
|
|
3979
4000
|
...context.request.model !== void 0 && { model: context.request.model },
|
|
3980
4001
|
...context.request.agents !== void 0 && { agents: context.request.agents },
|
|
4002
|
+
...context.request.tools !== void 0 && { tools: context.request.tools },
|
|
4003
|
+
...context.request.disallowedTools !== void 0 && { disallowedTools: context.request.disallowedTools },
|
|
3981
4004
|
iteration: iterationNumber
|
|
3982
4005
|
},
|
|
3983
4006
|
timeout: context.request.timeoutMs || this.engineConfig.config.mcpTimeout,
|
|
@@ -7143,6 +7166,16 @@ var init_shell_backend = __esm({
|
|
|
7143
7166
|
if (isPython && request.arguments?.agents) {
|
|
7144
7167
|
args.push("--agents", request.arguments.agents);
|
|
7145
7168
|
}
|
|
7169
|
+
if (isPython && request.arguments?.tools && Array.isArray(request.arguments.tools)) {
|
|
7170
|
+
for (const tool of request.arguments.tools) {
|
|
7171
|
+
args.push("--tool", tool);
|
|
7172
|
+
}
|
|
7173
|
+
}
|
|
7174
|
+
if (isPython && request.arguments?.disallowedTools && Array.isArray(request.arguments.disallowedTools)) {
|
|
7175
|
+
for (const tool of request.arguments.disallowedTools) {
|
|
7176
|
+
args.push("--disallowed-tool", tool);
|
|
7177
|
+
}
|
|
7178
|
+
}
|
|
7146
7179
|
if (this.config.debug) {
|
|
7147
7180
|
engineLogger.debug(`Executing script: ${command} ${args.join(" ")}`);
|
|
7148
7181
|
engineLogger.debug(`Working directory: ${this.config.workingDirectory}`);
|
|
@@ -12548,6 +12581,9 @@ async function mainCommandHandler(args, options, command) {
|
|
|
12548
12581
|
if (options.agents && selectedBackend !== "shell") {
|
|
12549
12582
|
console.error(chalk15.yellow("\n\u26A0\uFE0F Note: --agents flag is only supported with shell backend and will be ignored"));
|
|
12550
12583
|
}
|
|
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"));
|
|
12586
|
+
}
|
|
12551
12587
|
const executionRequest = createExecutionRequest({
|
|
12552
12588
|
instruction,
|
|
12553
12589
|
subagent: options.subagent,
|
|
@@ -12555,7 +12591,9 @@ async function mainCommandHandler(args, options, command) {
|
|
|
12555
12591
|
workingDirectory: config.workingDirectory,
|
|
12556
12592
|
maxIterations: options.maxIterations || config.defaultMaxIterations,
|
|
12557
12593
|
model: options.model || config.defaultModel,
|
|
12558
|
-
agents: options.agents
|
|
12594
|
+
agents: options.agents,
|
|
12595
|
+
tools: options.tools,
|
|
12596
|
+
disallowedTools: options.disallowedTools
|
|
12559
12597
|
});
|
|
12560
12598
|
const coordinator = new MainExecutionCoordinator(config, options.verbose, options.enableFeedback || false);
|
|
12561
12599
|
const result = await coordinator.execute(executionRequest);
|
|
@@ -15938,7 +15976,7 @@ ${variables.EDITOR ? `using ${variables.EDITOR} as primary AI subagent` : ""}
|
|
|
15938
15976
|
}
|
|
15939
15977
|
getDefaultModelForSubagent(subagent) {
|
|
15940
15978
|
const modelDefaults = {
|
|
15941
|
-
claude: "sonnet
|
|
15979
|
+
claude: ":sonnet",
|
|
15942
15980
|
codex: "gpt-5",
|
|
15943
15981
|
gemini: "gemini-2.5-pro",
|
|
15944
15982
|
cursor: "auto"
|
|
@@ -16355,6 +16393,8 @@ async function startCommandHandler(args, options, command) {
|
|
|
16355
16393
|
maxIterations: options.maxIterations,
|
|
16356
16394
|
model: options.model,
|
|
16357
16395
|
agents: options.agents,
|
|
16396
|
+
tools: options.tools,
|
|
16397
|
+
disallowedTools: options.disallowedTools,
|
|
16358
16398
|
directory: options.directory,
|
|
16359
16399
|
verbose: options.verbose,
|
|
16360
16400
|
quiet: options.quiet,
|
|
@@ -23632,7 +23672,7 @@ function handleCLIError(error, verbose = false) {
|
|
|
23632
23672
|
process.exit(EXIT_CODES.UNEXPECTED_ERROR);
|
|
23633
23673
|
}
|
|
23634
23674
|
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)");
|
|
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...>", "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)");
|
|
23636
23676
|
program.exitOverride((err) => {
|
|
23637
23677
|
if (err.code === "commander.helpDisplayed") {
|
|
23638
23678
|
process.exit(0);
|
|
@@ -23650,7 +23690,7 @@ function setupGlobalOptions(program) {
|
|
|
23650
23690
|
});
|
|
23651
23691
|
}
|
|
23652
23692
|
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("-
|
|
23693
|
+
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
23694
|
try {
|
|
23655
23695
|
const globalOptions = program.opts();
|
|
23656
23696
|
const definedGlobalOptions = Object.fromEntries(
|
|
@@ -23733,11 +23773,13 @@ function setupCompletion(program) {
|
|
|
23733
23773
|
function setupAliases(program) {
|
|
23734
23774
|
const subagents = ["claude", "cursor", "codex", "gemini"];
|
|
23735
23775
|
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("-
|
|
23776
|
+
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
23777
|
try {
|
|
23738
23778
|
const { mainCommandHandler: mainCommandHandler2 } = await Promise.resolve().then(() => (init_main(), main_exports));
|
|
23739
23779
|
const promptText = Array.isArray(prompt) ? prompt.join(" ") : prompt;
|
|
23780
|
+
const globalOptions = program.opts();
|
|
23740
23781
|
await mainCommandHandler2([], {
|
|
23782
|
+
...globalOptions,
|
|
23741
23783
|
...options,
|
|
23742
23784
|
subagent,
|
|
23743
23785
|
prompt: promptText
|