juno-code 1.0.43 → 1.0.45

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.mjs CHANGED
@@ -13604,12 +13604,16 @@ var init_script_installer = __esm({
13604
13604
  * Required scripts include both standalone scripts and their dependencies.
13605
13605
  * kanban.sh depends on install_requirements.sh for Python venv setup.
13606
13606
  * Slack integration scripts allow fetching tasks from Slack and responding.
13607
+ * Hook scripts are stored in the hooks/ subdirectory.
13607
13608
  */
13608
13609
  static REQUIRED_SCRIPTS = [
13609
13610
  "run_until_completion.sh",
13610
13611
  "kanban.sh",
13611
13612
  "install_requirements.sh",
13612
13613
  // Required by kanban.sh for Python venv creation
13614
+ // Shared utilities
13615
+ "attachment_downloader.py",
13616
+ // File attachment downloading utility (used by Slack/GitHub)
13613
13617
  // Slack integration scripts
13614
13618
  "slack_state.py",
13615
13619
  // State management for Slack integration
@@ -13622,8 +13626,11 @@ var init_script_installer = __esm({
13622
13626
  "slack_respond.sh",
13623
13627
  // Wrapper script for Slack respond
13624
13628
  // GitHub integration script (single-file architecture)
13625
- "github.py"
13629
+ "github.py",
13626
13630
  // Unified GitHub integration (fetch, respond, sync)
13631
+ // Claude Code hooks (stored in hooks/ subdirectory)
13632
+ "hooks/session_counter.sh"
13633
+ // Session message counter hook for warning about long sessions
13627
13634
  ];
13628
13635
  /**
13629
13636
  * Get the templates scripts directory from the package
@@ -13680,6 +13687,10 @@ var init_script_installer = __esm({
13680
13687
  const destDir = path3.join(projectDir, ".juno_task", "scripts");
13681
13688
  await fs3.ensureDir(destDir);
13682
13689
  const destPath = path3.join(destDir, scriptName);
13690
+ const destParentDir = path3.dirname(destPath);
13691
+ if (destParentDir !== destDir) {
13692
+ await fs3.ensureDir(destParentDir);
13693
+ }
13683
13694
  await fs3.copy(sourcePath, destPath, { overwrite: true });
13684
13695
  if (scriptName.endsWith(".sh") || scriptName.endsWith(".py")) {
13685
13696
  await fs3.chmod(destPath, 493);
@@ -14855,8 +14866,7 @@ After completing the proccess an implementer agent would start the job and go th
14855
14866
  category: "core" /* CORE */,
14856
14867
  content: `0a. study @.juno_task/implement.md.
14857
14868
 
14858
- 0b. When you discover a syntax, logic, UI, User Flow Error or bug. Immediately update tasks.md with your findings using a {{SUBAGENT}} subagent. When the issue is resolved, update tasks.md and remove the item using a {{SUBAGENT}} subagent.
14859
-
14869
+ 0b. When you discover a syntax, logic, UI, User Flow Error or bug. Immediately update Kanban with your findings using a {{SUBAGENT}} subagent. When the issue is resolved, update Kanban.
14860
14870
 
14861
14871
  999. Important: When authoring documentation capture the why tests and the backing implementation is important.
14862
14872
 
@@ -14946,7 +14956,7 @@ Tasks , USER_FEEDBACK and @{{AGENT_DOC_FILE}} should repesent truth. User Open I
14946
14956
  description: "Implementation steps and current task breakdown",
14947
14957
  category: "workflow" /* WORKFLOW */,
14948
14958
  content: `---
14949
- description: Execute the implementation plan by processing and executing all tasks defined in tasks.md
14959
+ description: Execute the implementation plan by processing and executing all tasks defined in Kanban
14950
14960
  ---
14951
14961
 
14952
14962
  ## User Input
@@ -15005,7 +15015,7 @@ You **MUST** consider the user input before proceeding (if not empty).
15005
15015
  1. Run \`./.juno_task/scripts/kanban.sh list\` from repo root and check current project status.
15006
15016
 
15007
15017
  2. Load and analyze the implementation context:
15008
- - **REQUIRED**: Read tasks.md for the complete task list and execution plan
15018
+ - **REQUIRED**: Read Kanban for the complete task list and execution plan
15009
15019
  - **REQUIRED**: Read plan.md for tech stack, architecture, and file structure
15010
15020
  - **IF EXISTS**: Read data-model.md for entities and relationships
15011
15021
  - **IF EXISTS**: Read contracts/ for API specifications and test requirements
@@ -15045,7 +15055,7 @@ You **MUST** consider the user input before proceeding (if not empty).
15045
15055
  - **Prettier**: \`node_modules/\`, \`dist/\`, \`build/\`, \`coverage/\`, \`package-lock.json\`, \`yarn.lock\`, \`pnpm-lock.yaml\`
15046
15056
  - **Terraform**: \`.terraform/\`, \`*.tfstate*\`, \`*.tfvars\`, \`.terraform.lock.hcl\`
15047
15057
 
15048
- 5. Parse tasks.md structure and extract:
15058
+ 5. Parse Kanban structure and extract:
15049
15059
  - **Task phases**: Setup, Tests, Core, Integration, Polish
15050
15060
  - **Task dependencies**: Sequential vs parallel execution rules
15051
15061
  - **Task details**: ID, description, file paths, parallel markers [P]
@@ -15094,7 +15104,7 @@ You **MUST** consider the user input before proceeding (if not empty).
15094
15104
 
15095
15105
 
15096
15106
 
15097
- Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running \`/tasks\` first to regenerate the task list.
15107
+ Note: This command assumes a complete task breakdown exists in Kanban. If tasks are incomplete or missing, suggest running \`/tasks\` first to regenerate the task list.
15098
15108
 
15099
15109
 
15100
15110
  ---
@@ -15181,6 +15191,8 @@ Items that have been resolved will be moved here.`,
15181
15191
  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
15182
15192
  \`./.juno_task/scripts/kanban.sh get {TASK_ID}\`
15183
15193
 
15194
+ When creating a task, relevant to another task, you can add the following format anywhere in the body of the task : \`[task_id]{Ref_TASK_ID}[/task_id]\` , using ref task id, help kanban organize dependecies between tasks better.
15195
+
15184
15196
  Important: You need to get maximum 3 tasks done in one go.
15185
15197
 
15186
15198
  ## Agent-Specific Instructions
@@ -15314,6 +15326,9 @@ When a task on kanban, has related_tasks key, you need to get the task to unders
15314
15326
  \`./.juno_task/scripts/kanban.sh get {TASK_ID}\`
15315
15327
 
15316
15328
 
15329
+ When creating a task, relevant to another task, you can add the following format anywhere in the body of the task : \`[task_id]{Ref_TASK_ID}[/task_id]\` , using ref task id, help kanban organize dependecies between tasks better.
15330
+
15331
+ Important: You need to get maximum 3 tasks done in one go.
15317
15332
 
15318
15333
  ## Build & Test Commands
15319
15334
 
@@ -16548,142 +16563,16 @@ This project uses AI-assisted development with juno-code to achieve: ${variables
16548
16563
  - Security best practices
16549
16564
  `;
16550
16565
  await fs3.writeFile(path3.join(specsDir, "architecture.md"), architectureContent);
16551
- const claudeContent = `# Claude Development Session Learnings
16552
-
16553
- ## Project Overview
16554
-
16555
- This project was initialized on ${variables.CURRENT_DATE} using juno-code.
16556
-
16557
- **Main Task**: ${variables.TASK}
16558
- **Preferred Subagent**: ${variables.EDITOR}
16559
- **Project Root**: ${targetDirectory}
16560
-
16561
- ## Development Environment
16562
-
16563
- ### Build System
16564
- - Use \`npm run build\` to build the project
16565
- - Test with \`npm test\` for unit tests
16566
- - Use \`npm run test:binary\` for CLI testing
16567
-
16568
- ### Key Commands
16569
- - \`juno-code start\` - Begin task execution
16570
- - \`juno-code -s ${variables.EDITOR}\` - Quick execution with preferred subagent
16571
- - \`juno-code feedback\` - Provide feedback on the process
16572
-
16573
- ## Project Structure
16574
-
16575
- \`\`\`
16576
- .
16577
- \u251C\u2500\u2500 .juno_task/
16578
- \u2502 \u251C\u2500\u2500 prompt.md # Main task definition with AI instructions
16579
- \u2502 \u251C\u2500\u2500 init.md # Initial task breakdown and constraints
16580
- \u2502 \u251C\u2500\u2500 plan.md # Dynamic planning and priority tracking
16581
- \u2502 \u251C\u2500\u2500 implement.md # Implementation guide and current tasks
16582
- \u2502 \u251C\u2500\u2500 USER_FEEDBACK.md # User feedback and issue tracking
16583
- \u2502 \u251C\u2500\u2500 scripts/ # Utility scripts for project maintenance
16584
- \u2502 \u2502 \u2514\u2500\u2500 clean_logs_folder.sh # Archive old log files
16585
- \u2502 \u2514\u2500\u2500 specs/ # Project specifications
16586
- \u2502 \u251C\u2500\u2500 README.md # Specs overview
16587
- \u2502 \u251C\u2500\u2500 requirements.md # Functional requirements
16588
- \u2502 \u2514\u2500\u2500 architecture.md # System architecture
16589
- \u251C\u2500\u2500 CLAUDE.md # This file - session documentation
16590
- \u2514\u2500\u2500 README.md # Project overview
16591
- \`\`\`
16592
-
16593
- ## AI Workflow
16594
-
16595
- The project uses a sophisticated AI workflow with:
16596
-
16597
- 1. **Task Analysis**: Study existing codebase and requirements
16598
- 2. **Specification Creation**: Detailed specs for each component
16599
- 3. **Implementation**: AI-assisted development with parallel subagents
16600
- 4. **Testing**: Automated testing and validation
16601
- 5. **Documentation**: Continuous documentation updates
16602
- 6. **Version Control**: Automated Git workflow management
16603
-
16604
- ## Important Notes
16605
-
16606
- - Always check USER_FEEDBACK.md first for user input
16607
- - Keep plan.md up to date with current priorities
16608
- - Use up to 500 parallel subagents for analysis
16609
- - Use only 1 subagent for build/test operations
16610
- - Focus on full implementations, not placeholders
16611
- - Maintain comprehensive documentation
16612
-
16613
- ## Session Progress
16614
-
16615
- This file will be updated as development progresses to track:
16616
- - Key decisions and their rationale
16617
- - Important learnings and discoveries
16618
- - Build/test optimization techniques
16619
- - Solutions to complex problems
16620
- - Performance improvements and optimizations
16621
- `;
16622
- await fs3.writeFile(path3.join(targetDirectory, "CLAUDE.md"), claudeContent);
16623
- const agentsContent = `# AI Agent Selection and Performance
16624
-
16625
- ## Available Agents
16626
-
16627
- ### ${variables.EDITOR.toUpperCase()} \u2705 SELECTED
16628
- **Status**: Primary agent for this project
16629
- **Usage**: Main development and task execution
16630
- **Strengths**: ${this.getAgentStrengths(variables.EDITOR)}
16631
- **Best For**: ${this.getAgentBestFor(variables.EDITOR)}
16632
-
16633
- ### CLAUDE \u2B55 Available
16634
- **Status**: Available as secondary agent
16635
- **Usage**: Complex reasoning, analysis, documentation
16636
- **Strengths**: Analytical thinking, detailed explanations
16637
- **Best For**: Code analysis, architectural decisions, documentation
16638
-
16639
- ### CURSOR \u2B55 Available
16640
- **Status**: Available as secondary agent
16641
- **Usage**: Code generation, debugging, optimization
16642
- **Strengths**: Code-centric development, debugging
16643
- **Best For**: Feature implementation, bug fixes, code optimization
16644
-
16645
- ### CODEX \u2B55 Available
16646
- **Status**: Available as secondary agent
16647
- **Usage**: General development, problem solving
16648
- **Strengths**: Versatile development capabilities
16649
- **Best For**: General purpose development tasks
16650
-
16651
- ### GEMINI \u2B55 Available
16652
- **Status**: Available as secondary agent
16653
- **Usage**: Creative solutions, alternative approaches
16654
- **Strengths**: Creative problem solving, diverse perspectives
16655
- **Best For**: Brainstorming, alternative implementations, creative solutions
16656
-
16657
- ## Agent Selection Strategy
16658
-
16659
- ### Primary Agent Selection
16660
- - **${variables.EDITOR}** chosen as primary agent for this project
16661
- - Based on task requirements and project needs
16662
- - Can be changed by updating project configuration
16663
-
16664
- ### Secondary Agent Usage
16665
- - Use parallel agents for analysis and research
16666
- - Specialized agents for specific task types
16667
- - Load balancing for complex operations
16668
-
16669
- ## Performance Tracking
16670
-
16671
- Track agent performance for:
16672
- - Task completion time
16673
- - Code quality
16674
- - Accuracy of implementation
16675
- - Documentation quality
16676
- - Problem-solving effectiveness
16677
-
16678
- ## Optimization Tips
16679
-
16680
- 1. **Right Agent for Right Task**: Choose agents based on their strengths
16681
- 2. **Parallel Processing**: Use multiple agents for analysis phases
16682
- 3. **Quality Validation**: Review and validate agent output
16683
- 4. **Feedback Loop**: Provide feedback to improve agent performance
16684
- 5. **Performance Monitoring**: Track and optimize agent usage
16685
- `;
16686
- await fs3.writeFile(path3.join(targetDirectory, "AGENTS.md"), agentsContent);
16566
+ const claudeTemplate = templateEngine.getBuiltInTemplate("CLAUDE.md");
16567
+ if (claudeTemplate) {
16568
+ const claudeContent = await templateEngine.render(claudeTemplate, templateContext);
16569
+ await fs3.writeFile(path3.join(targetDirectory, "CLAUDE.md"), claudeContent);
16570
+ }
16571
+ const agentsTemplate = templateEngine.getBuiltInTemplate("AGENTS.md");
16572
+ if (agentsTemplate) {
16573
+ const agentsContent = await templateEngine.render(agentsTemplate, templateContext);
16574
+ await fs3.writeFile(path3.join(targetDirectory, "AGENTS.md"), agentsContent);
16575
+ }
16687
16576
  const readmeContent = `# ${variables.PROJECT_NAME}
16688
16577
 
16689
16578
  ${variables.DESCRIPTION}
@@ -16789,24 +16678,6 @@ ${variables.EDITOR ? `using ${variables.EDITOR} as primary AI subagent` : ""}
16789
16678
  console.log(chalk15.green.bold("\n\u2705 Project initialization complete!"));
16790
16679
  this.printNextSteps(targetDirectory, variables.EDITOR);
16791
16680
  }
16792
- getAgentStrengths(agent) {
16793
- const strengths = {
16794
- claude: "Analytical thinking, detailed explanations, architectural decisions",
16795
- cursor: "Code-centric development, debugging, optimization",
16796
- codex: "Versatile development capabilities, general purpose tasks",
16797
- gemini: "Creative problem solving, diverse perspectives"
16798
- };
16799
- return strengths[agent] || "General AI assistance";
16800
- }
16801
- getAgentBestFor(agent) {
16802
- const bestFor = {
16803
- claude: "Code analysis, architectural decisions, documentation",
16804
- cursor: "Feature implementation, bug fixes, code optimization",
16805
- codex: "General purpose development tasks",
16806
- gemini: "Brainstorming, alternative implementations, creative solutions"
16807
- };
16808
- return bestFor[agent] || "General development tasks";
16809
- }
16810
16681
  async createConfigFile(junoTaskDir, targetDirectory) {
16811
16682
  const configContent = {
16812
16683
  // Core settings
@@ -24868,7 +24739,7 @@ function handleCLIError(error, verbose = false) {
24868
24739
  process.exit(EXIT_CODES.UNEXPECTED_ERROR);
24869
24740
  }
24870
24741
  function setupGlobalOptions(program) {
24871
- 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)").option("--force-update", "Force update scripts, services, and Python dependencies (bypasses 24-hour cache)").option("--on-hourly-limit <behavior>", 'Behavior when Claude hourly quota limit is reached: "wait" to sleep until reset, "raise" to exit immediately (default: raise)');
24742
+ 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)").option("--stale-threshold <n>", "Number of stale iterations before exiting (default: 3). Set to 0 to disable. (only with --til-completion)", parseInt).option("--no-stale-check", "Disable stale iteration detection (alias for --stale-threshold 0). (only with --til-completion)").option("--force-update", "Force update scripts, services, and Python dependencies (bypasses 24-hour cache)").option("--on-hourly-limit <behavior>", 'Behavior when Claude hourly quota limit is reached: "wait" to sleep until reset, "raise" to exit immediately (default: raise)');
24872
24743
  program.exitOverride((err) => {
24873
24744
  if (err.code === "commander.helpDisplayed") {
24874
24745
  process.exit(0);