juno-code 1.0.38 → 1.0.41
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 +115 -19
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +115 -19
- 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();
|
|
@@ -14515,22 +14520,19 @@ and for each part create a seperate .md file under @.juno_task/spec/*
|
|
|
14515
14520
|
|
|
14516
14521
|
## ULTIMATE Goal
|
|
14517
14522
|
We want to achieve the main Task with respect to the Constraints section
|
|
14523
|
+
|
|
14524
|
+
Part 1)
|
|
14518
14525
|
Consider missing steps and plan. If the step is missing then author the specification at @.juno_task/spec/FILENAME.md (do NOT assume that it does not exist, search before creating). The naming of the module should be GenZ named and not conflict with another module name. If you create a new step then document the plan to implement in @.juno_task/plan.md
|
|
14519
14526
|
|
|
14520
14527
|
|
|
14528
|
+
Part 2) after completing the plan, and spec, create task for implementing each part on kanban './.juno_task/scripts/kanban.sh' You need to create a task for each step of implementation and testing. You need to go through the project, the spec and plan at the end to make sure you have covered all tasks on the kanban. We will later on implement tasks from kanban one by one.
|
|
14529
|
+
After completing the proccess an implementer agent would start the job and go through kanban tasks one by one.
|
|
14530
|
+
|
|
14531
|
+
|
|
14521
14532
|
### Constraints
|
|
14522
14533
|
**Preferred Subagent**: {{SUBAGENT}}
|
|
14523
14534
|
**Repository URL**: {{GIT_URL}}
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
## Environment Setup
|
|
14527
|
-
[Empty]
|
|
14528
|
-
|
|
14529
|
-
### 2. Package Installation
|
|
14530
|
-
[Empty]
|
|
14531
|
-
|
|
14532
|
-
### 3. Test Installation
|
|
14533
|
-
[Empty]`,
|
|
14535
|
+
`,
|
|
14534
14536
|
variables: [
|
|
14535
14537
|
{
|
|
14536
14538
|
name: "main_task",
|
|
@@ -14875,6 +14877,23 @@ Items that have been resolved will be moved here.`,
|
|
|
14875
14877
|
**Git Repository:** {{GIT_URL}}
|
|
14876
14878
|
**Configuration Date:** {{CURRENT_DATE}}
|
|
14877
14879
|
|
|
14880
|
+
## Kanban Task Management
|
|
14881
|
+
|
|
14882
|
+
\`\`\`bash
|
|
14883
|
+
# List tasks
|
|
14884
|
+
./.juno_task/scripts/kanban.sh list --limit 5 --sort asc
|
|
14885
|
+
./.juno_task/scripts/kanban.sh list --status [backlog|todo|in_progress|done] --sort asc
|
|
14886
|
+
|
|
14887
|
+
# Task operations
|
|
14888
|
+
./.juno_task/scripts/kanban.sh get {TASK_ID}
|
|
14889
|
+
./.juno_task/scripts/kanban.sh mark [in_progress|done|todo] --id {TASK_ID} --response "message"
|
|
14890
|
+
./.juno_task/scripts/kanban.sh update {TASK_ID} --commit {COMMIT_HASH}
|
|
14891
|
+
\`\`\`
|
|
14892
|
+
|
|
14893
|
+
When a task on kanban, has related_tasks key, you need to get the task to understand the complete picture of tasks related to the current current task, you can get all the context through
|
|
14894
|
+
\`./.juno_task/scripts/kanban.sh get {TASK_ID}\`
|
|
14895
|
+
|
|
14896
|
+
|
|
14878
14897
|
## Agent-Specific Instructions
|
|
14879
14898
|
|
|
14880
14899
|
### {{SUBAGENT}} Configuration
|
|
@@ -14989,6 +15008,24 @@ python -m pytest tests/ --cov=src --cov-report=term-missing
|
|
|
14989
15008
|
- **Code Quality:** Focus on production-ready, well-documented code
|
|
14990
15009
|
- **Testing:** Comprehensive unit and integration tests required
|
|
14991
15010
|
|
|
15011
|
+
## Kanban Task Management
|
|
15012
|
+
|
|
15013
|
+
\`\`\`bash
|
|
15014
|
+
# List tasks
|
|
15015
|
+
./.juno_task/scripts/kanban.sh list --limit 5 --sort asc
|
|
15016
|
+
./.juno_task/scripts/kanban.sh list --status [backlog|todo|in_progress|done] --sort asc
|
|
15017
|
+
|
|
15018
|
+
# Task operations
|
|
15019
|
+
./.juno_task/scripts/kanban.sh get {TASK_ID}
|
|
15020
|
+
./.juno_task/scripts/kanban.sh mark [in_progress|done|todo] --id {TASK_ID} --response "message"
|
|
15021
|
+
./.juno_task/scripts/kanban.sh update {TASK_ID} --commit {COMMIT_HASH}
|
|
15022
|
+
\`\`\`
|
|
15023
|
+
|
|
15024
|
+
When a task on kanban, has related_tasks key, you need to get the task to understand the complete picture of tasks related to the current current task, you can get all the context through
|
|
15025
|
+
\`./.juno_task/scripts/kanban.sh get {TASK_ID}\`
|
|
15026
|
+
|
|
15027
|
+
|
|
15028
|
+
|
|
14992
15029
|
## Build & Test Commands
|
|
14993
15030
|
|
|
14994
15031
|
**Environment Setup:**
|
|
@@ -24271,7 +24308,7 @@ function handleCLIError(error, verbose = false) {
|
|
|
24271
24308
|
process.exit(EXIT_CODES.UNEXPECTED_ERROR);
|
|
24272
24309
|
}
|
|
24273
24310
|
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)");
|
|
24311
|
+
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
24312
|
program.exitOverride((err) => {
|
|
24276
24313
|
if (err.code === "commander.helpDisplayed") {
|
|
24277
24314
|
process.exit(0);
|
|
@@ -24296,6 +24333,61 @@ function setupMainCommand(program) {
|
|
|
24296
24333
|
Object.entries(globalOptions).filter(([_, v]) => v !== void 0)
|
|
24297
24334
|
);
|
|
24298
24335
|
const allOptions2 = { ...definedGlobalOptions, ...options };
|
|
24336
|
+
if (allOptions2.tilCompletion || allOptions2.untilCompletion || allOptions2.runUntilCompletion || allOptions2.tillComplete) {
|
|
24337
|
+
const { spawn: spawn4 } = await import('child_process');
|
|
24338
|
+
const path24 = await import('path');
|
|
24339
|
+
const fs22 = await import('fs-extra');
|
|
24340
|
+
const scriptPath = path24.join(process.cwd(), ".juno_task", "scripts", "run_until_completion.sh");
|
|
24341
|
+
if (!await fs22.pathExists(scriptPath)) {
|
|
24342
|
+
console.error(chalk15.red.bold("\n\u274C Error: run_until_completion.sh not found"));
|
|
24343
|
+
console.error(chalk15.red(` Expected location: ${scriptPath}`));
|
|
24344
|
+
console.error(chalk15.yellow('\n\u{1F4A1} Suggestion: Run "juno-code init" to initialize the project'));
|
|
24345
|
+
process.exit(1);
|
|
24346
|
+
}
|
|
24347
|
+
const scriptArgs = [];
|
|
24348
|
+
if (allOptions2.preRunHook && Array.isArray(allOptions2.preRunHook)) {
|
|
24349
|
+
for (const hook of allOptions2.preRunHook) {
|
|
24350
|
+
scriptArgs.push("--pre-run-hook", hook);
|
|
24351
|
+
}
|
|
24352
|
+
}
|
|
24353
|
+
const completionFlags = ["--til-completion", "--until-completion", "--run-until-completion", "--till-complete"];
|
|
24354
|
+
const forwardedArgs = process.argv.slice(2).filter(
|
|
24355
|
+
(arg) => !completionFlags.includes(arg) && !arg.startsWith("--pre-run-hook")
|
|
24356
|
+
);
|
|
24357
|
+
scriptArgs.push(...forwardedArgs);
|
|
24358
|
+
const child = spawn4(scriptPath, scriptArgs, {
|
|
24359
|
+
stdio: "inherit",
|
|
24360
|
+
cwd: process.cwd()
|
|
24361
|
+
});
|
|
24362
|
+
process.removeAllListeners("SIGINT");
|
|
24363
|
+
process.removeAllListeners("SIGTERM");
|
|
24364
|
+
let childExited = false;
|
|
24365
|
+
const signalHandler = (signal) => {
|
|
24366
|
+
if (!childExited && child.pid) {
|
|
24367
|
+
try {
|
|
24368
|
+
process.kill(child.pid, signal);
|
|
24369
|
+
} catch (err) {
|
|
24370
|
+
}
|
|
24371
|
+
}
|
|
24372
|
+
};
|
|
24373
|
+
process.on("SIGINT", signalHandler);
|
|
24374
|
+
process.on("SIGTERM", signalHandler);
|
|
24375
|
+
child.on("exit", (code) => {
|
|
24376
|
+
childExited = true;
|
|
24377
|
+
process.removeListener("SIGINT", signalHandler);
|
|
24378
|
+
process.removeListener("SIGTERM", signalHandler);
|
|
24379
|
+
process.exit(code || 0);
|
|
24380
|
+
});
|
|
24381
|
+
child.on("error", (error) => {
|
|
24382
|
+
childExited = true;
|
|
24383
|
+
process.removeListener("SIGINT", signalHandler);
|
|
24384
|
+
process.removeListener("SIGTERM", signalHandler);
|
|
24385
|
+
console.error(chalk15.red.bold("\n\u274C Error executing run_until_completion.sh"));
|
|
24386
|
+
console.error(chalk15.red(` ${error.message}`));
|
|
24387
|
+
process.exit(1);
|
|
24388
|
+
});
|
|
24389
|
+
return;
|
|
24390
|
+
}
|
|
24299
24391
|
if (!globalOptions.subagent && !options.prompt && !options.interactive && !options.interactivePrompt) {
|
|
24300
24392
|
const fs22 = await import('fs-extra');
|
|
24301
24393
|
const path24 = await import('path');
|
|
@@ -24536,9 +24628,12 @@ ${chalk15.blue.bold("\u{1F3AF} Juno Code")} - TypeScript CLI for AI Subagent Orc
|
|
|
24536
24628
|
`);
|
|
24537
24629
|
program.addHelpText("afterAll", `
|
|
24538
24630
|
${chalk15.blue.bold("Examples:")}
|
|
24539
|
-
${chalk15.gray("# Initialize new project")}
|
|
24631
|
+
${chalk15.gray("# Initialize new project (interactive mode)")}
|
|
24540
24632
|
juno-code init
|
|
24541
24633
|
|
|
24634
|
+
${chalk15.gray("# Initialize with inline mode (automation-friendly)")}
|
|
24635
|
+
juno-code init "Build a REST API" --subagent claude --git-repo https://github.com/user/repo
|
|
24636
|
+
|
|
24542
24637
|
${chalk15.gray("# Start execution using .juno_task/init.md")}
|
|
24543
24638
|
juno-code start
|
|
24544
24639
|
|
|
@@ -24568,7 +24663,7 @@ ${chalk15.blue.bold("Examples:")}
|
|
|
24568
24663
|
juno-code config create development
|
|
24569
24664
|
|
|
24570
24665
|
${chalk15.gray("# Setup Git repository")}
|
|
24571
|
-
juno-code setup-git https://github.com/
|
|
24666
|
+
juno-code setup-git https://github.com/askbudi/juno-code
|
|
24572
24667
|
|
|
24573
24668
|
${chalk15.blue.bold("Environment Variables:")}
|
|
24574
24669
|
JUNO_CODE_SUBAGENT Default subagent (claude, cursor, codex, gemini)
|
|
@@ -24591,8 +24686,9 @@ ${chalk15.blue.bold("Configuration:")}
|
|
|
24591
24686
|
4. Built-in defaults (lowest priority)
|
|
24592
24687
|
|
|
24593
24688
|
${chalk15.blue.bold("Support:")}
|
|
24594
|
-
Documentation: https://github.com/
|
|
24595
|
-
Issues: https://github.com/
|
|
24689
|
+
Documentation: https://github.com/askbudi/juno-code#readme
|
|
24690
|
+
Issues: https://github.com/askbudi/juno-code/issues
|
|
24691
|
+
Website: https://askbudi.ai
|
|
24596
24692
|
License: MIT
|
|
24597
24693
|
|
|
24598
24694
|
`);
|