juno-code 1.0.38 → 1.0.40
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/README.md +93 -0
- package/dist/bin/cli.js +54 -9
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +54 -9
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/templates/scripts/__pycache__/github.cpython-38.pyc +0 -0
- package/dist/templates/scripts/github.py +2383 -0
- package/dist/templates/scripts/install_requirements.sh +270 -1
- package/dist/templates/scripts/kanban.sh +3 -1
- package/dist/templates/scripts/run_until_completion.sh +44 -4
- package/dist/templates/scripts/slack_respond.py +2 -2
- package/package.json +1 -1
package/dist/bin/cli.mjs
CHANGED
|
@@ -1301,7 +1301,7 @@ var init_config = __esm({
|
|
|
1301
1301
|
DEFAULT_CONFIG = {
|
|
1302
1302
|
// Core settings
|
|
1303
1303
|
defaultSubagent: "claude",
|
|
1304
|
-
defaultBackend: "
|
|
1304
|
+
defaultBackend: "shell",
|
|
1305
1305
|
defaultMaxIterations: 50,
|
|
1306
1306
|
// Logging settings
|
|
1307
1307
|
logLevel: "info",
|
|
@@ -13390,8 +13390,11 @@ var init_script_installer = __esm({
|
|
|
13390
13390
|
// Wrapper script for Slack fetch
|
|
13391
13391
|
"slack_respond.py",
|
|
13392
13392
|
// Core logic for sending responses to Slack
|
|
13393
|
-
"slack_respond.sh"
|
|
13393
|
+
"slack_respond.sh",
|
|
13394
13394
|
// Wrapper script for Slack respond
|
|
13395
|
+
// GitHub integration script (single-file architecture)
|
|
13396
|
+
"github.py"
|
|
13397
|
+
// Unified GitHub integration (fetch, respond, sync)
|
|
13395
13398
|
];
|
|
13396
13399
|
/**
|
|
13397
13400
|
* Get the templates scripts directory from the package
|
|
@@ -14008,15 +14011,17 @@ async function validateStartupConfigs(baseDir = process.cwd(), verbose = false)
|
|
|
14008
14011
|
console.error(chalk15.blue("\u{1F50D} Validating JSON configuration files...\n"));
|
|
14009
14012
|
}
|
|
14010
14013
|
try {
|
|
14011
|
-
let backendType = "
|
|
14014
|
+
let backendType = "shell";
|
|
14015
|
+
let backendSetViaCliArg = false;
|
|
14012
14016
|
const backendArgIndex = process.argv.findIndex((arg) => arg === "-b" || arg === "--backend");
|
|
14013
14017
|
if (backendArgIndex !== -1 && process.argv[backendArgIndex + 1]) {
|
|
14014
14018
|
const cliBackend = process.argv[backendArgIndex + 1].toLowerCase().trim();
|
|
14015
14019
|
if (cliBackend === "shell" || cliBackend === "mcp") {
|
|
14016
14020
|
backendType = cliBackend;
|
|
14021
|
+
backendSetViaCliArg = true;
|
|
14017
14022
|
}
|
|
14018
14023
|
}
|
|
14019
|
-
if (
|
|
14024
|
+
if (!backendSetViaCliArg) {
|
|
14020
14025
|
const envBackend = process.env.JUNO_CODE_AGENT || process.env.JUNO_CODE_BACKEND || process.env.JUNO_TASK_BACKEND;
|
|
14021
14026
|
if (envBackend) {
|
|
14022
14027
|
const normalized = envBackend.toLowerCase().trim();
|
|
@@ -24271,7 +24276,7 @@ function handleCLIError(error, verbose = false) {
|
|
|
24271
24276
|
process.exit(EXIT_CODES.UNEXPECTED_ERROR);
|
|
24272
24277
|
}
|
|
24273
24278
|
function setupGlobalOptions(program) {
|
|
24274
|
-
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)");
|
|
24279
|
+
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) - default: 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)").option("--til-completion", "Run juno-code in a loop until all kanban tasks are complete (aliases: --until-completion, --run-until-completion, --till-complete)").option("--until-completion", "Alias for --til-completion").addOption(new Option("--run-until-completion", "Alias for --til-completion").hideHelp()).addOption(new Option("--till-complete", "Alias for --til-completion").hideHelp()).option("--pre-run-hook <hooks...>", "Execute named hooks from .juno_task/config.json before each iteration (only with --til-completion)");
|
|
24275
24280
|
program.exitOverride((err) => {
|
|
24276
24281
|
if (err.code === "commander.helpDisplayed") {
|
|
24277
24282
|
process.exit(0);
|
|
@@ -24296,6 +24301,42 @@ function setupMainCommand(program) {
|
|
|
24296
24301
|
Object.entries(globalOptions).filter(([_, v]) => v !== void 0)
|
|
24297
24302
|
);
|
|
24298
24303
|
const allOptions2 = { ...definedGlobalOptions, ...options };
|
|
24304
|
+
if (allOptions2.tilCompletion || allOptions2.untilCompletion || allOptions2.runUntilCompletion || allOptions2.tillComplete) {
|
|
24305
|
+
const { spawn: spawn4 } = await import('child_process');
|
|
24306
|
+
const path24 = await import('path');
|
|
24307
|
+
const fs22 = await import('fs-extra');
|
|
24308
|
+
const scriptPath = path24.join(process.cwd(), ".juno_task", "scripts", "run_until_completion.sh");
|
|
24309
|
+
if (!await fs22.pathExists(scriptPath)) {
|
|
24310
|
+
console.error(chalk15.red.bold("\n\u274C Error: run_until_completion.sh not found"));
|
|
24311
|
+
console.error(chalk15.red(` Expected location: ${scriptPath}`));
|
|
24312
|
+
console.error(chalk15.yellow('\n\u{1F4A1} Suggestion: Run "juno-code init" to initialize the project'));
|
|
24313
|
+
process.exit(1);
|
|
24314
|
+
}
|
|
24315
|
+
const scriptArgs = [];
|
|
24316
|
+
if (allOptions2.preRunHook && Array.isArray(allOptions2.preRunHook)) {
|
|
24317
|
+
for (const hook of allOptions2.preRunHook) {
|
|
24318
|
+
scriptArgs.push("--pre-run-hook", hook);
|
|
24319
|
+
}
|
|
24320
|
+
}
|
|
24321
|
+
const completionFlags = ["--til-completion", "--until-completion", "--run-until-completion", "--till-complete"];
|
|
24322
|
+
const forwardedArgs = process.argv.slice(2).filter(
|
|
24323
|
+
(arg) => !completionFlags.includes(arg) && !arg.startsWith("--pre-run-hook")
|
|
24324
|
+
);
|
|
24325
|
+
scriptArgs.push(...forwardedArgs);
|
|
24326
|
+
const child = spawn4(scriptPath, scriptArgs, {
|
|
24327
|
+
stdio: "inherit",
|
|
24328
|
+
cwd: process.cwd()
|
|
24329
|
+
});
|
|
24330
|
+
child.on("exit", (code) => {
|
|
24331
|
+
process.exit(code || 0);
|
|
24332
|
+
});
|
|
24333
|
+
child.on("error", (error) => {
|
|
24334
|
+
console.error(chalk15.red.bold("\n\u274C Error executing run_until_completion.sh"));
|
|
24335
|
+
console.error(chalk15.red(` ${error.message}`));
|
|
24336
|
+
process.exit(1);
|
|
24337
|
+
});
|
|
24338
|
+
return;
|
|
24339
|
+
}
|
|
24299
24340
|
if (!globalOptions.subagent && !options.prompt && !options.interactive && !options.interactivePrompt) {
|
|
24300
24341
|
const fs22 = await import('fs-extra');
|
|
24301
24342
|
const path24 = await import('path');
|
|
@@ -24536,9 +24577,12 @@ ${chalk15.blue.bold("\u{1F3AF} Juno Code")} - TypeScript CLI for AI Subagent Orc
|
|
|
24536
24577
|
`);
|
|
24537
24578
|
program.addHelpText("afterAll", `
|
|
24538
24579
|
${chalk15.blue.bold("Examples:")}
|
|
24539
|
-
${chalk15.gray("# Initialize new project")}
|
|
24580
|
+
${chalk15.gray("# Initialize new project (interactive mode)")}
|
|
24540
24581
|
juno-code init
|
|
24541
24582
|
|
|
24583
|
+
${chalk15.gray("# Initialize with inline mode (automation-friendly)")}
|
|
24584
|
+
juno-code init "Build a REST API" --subagent claude --git-repo https://github.com/user/repo
|
|
24585
|
+
|
|
24542
24586
|
${chalk15.gray("# Start execution using .juno_task/init.md")}
|
|
24543
24587
|
juno-code start
|
|
24544
24588
|
|
|
@@ -24568,7 +24612,7 @@ ${chalk15.blue.bold("Examples:")}
|
|
|
24568
24612
|
juno-code config create development
|
|
24569
24613
|
|
|
24570
24614
|
${chalk15.gray("# Setup Git repository")}
|
|
24571
|
-
juno-code setup-git https://github.com/
|
|
24615
|
+
juno-code setup-git https://github.com/askbudi/juno-code
|
|
24572
24616
|
|
|
24573
24617
|
${chalk15.blue.bold("Environment Variables:")}
|
|
24574
24618
|
JUNO_CODE_SUBAGENT Default subagent (claude, cursor, codex, gemini)
|
|
@@ -24591,8 +24635,9 @@ ${chalk15.blue.bold("Configuration:")}
|
|
|
24591
24635
|
4. Built-in defaults (lowest priority)
|
|
24592
24636
|
|
|
24593
24637
|
${chalk15.blue.bold("Support:")}
|
|
24594
|
-
Documentation: https://github.com/
|
|
24595
|
-
Issues: https://github.com/
|
|
24638
|
+
Documentation: https://github.com/askbudi/juno-code#readme
|
|
24639
|
+
Issues: https://github.com/askbudi/juno-code/issues
|
|
24640
|
+
Website: https://askbudi.ai
|
|
24596
24641
|
License: MIT
|
|
24597
24642
|
|
|
24598
24643
|
`);
|