juno-code 1.0.10 → 1.0.12
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 +100 -11
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +100 -11
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +27 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -10
- package/dist/index.mjs.map +1 -1
- package/dist/templates/scripts/cleanup_feedback.sh +3 -0
- package/dist/templates/scripts/install_requirements.sh +38 -4
- package/dist/templates/scripts/kanban.sh +19 -0
- package/package.json +1 -1
package/dist/bin/cli.mjs
CHANGED
|
@@ -244,6 +244,28 @@ var init_types = __esm({
|
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
246
|
});
|
|
247
|
+
|
|
248
|
+
// src/templates/default-hooks.ts
|
|
249
|
+
function getDefaultHooks() {
|
|
250
|
+
return JSON.parse(JSON.stringify(DEFAULT_HOOKS));
|
|
251
|
+
}
|
|
252
|
+
var DEFAULT_HOOKS;
|
|
253
|
+
var init_default_hooks = __esm({
|
|
254
|
+
"src/templates/default-hooks.ts"() {
|
|
255
|
+
init_version();
|
|
256
|
+
DEFAULT_HOOKS = {
|
|
257
|
+
START_ITERATION: {
|
|
258
|
+
commands: [
|
|
259
|
+
// Monitor CLAUDE.md file size
|
|
260
|
+
'file="CLAUDE.md"; lines=$(wc -l < "$file" 2>/dev/null || echo 0); chars=$(wc -m < "$file" 2>/dev/null || echo 0); if [ "$lines" -gt 450 ] || [ "$chars" -gt 60000 ]; then juno-kanban "[Critical] file $file is too large, keep it lean and useful for every run of the agent."; fi',
|
|
261
|
+
// Monitor AGENTS.md file size
|
|
262
|
+
'file="AGENTS.md"; lines=$(wc -l < "$file" 2>/dev/null || echo 0); chars=$(wc -m < "$file" 2>/dev/null || echo 0); if [ "$lines" -gt 450 ] || [ "$chars" -gt 60000 ]; then juno-kanban "[Critical] file $file is too large, keep it lean and useful for every run of the agent."; fi',
|
|
263
|
+
"./.juno_task/scripts/cleanup_feedback.sh"
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
});
|
|
247
269
|
function createProfileManager(configDir) {
|
|
248
270
|
return new ProfileManager(configDir);
|
|
249
271
|
}
|
|
@@ -805,12 +827,7 @@ async function ensureHooksConfig(baseDir) {
|
|
|
805
827
|
const configPath = path.join(configDir, "config.json");
|
|
806
828
|
await fs.ensureDir(configDir);
|
|
807
829
|
const configExists = await fs.pathExists(configPath);
|
|
808
|
-
const allHookTypes =
|
|
809
|
-
START_RUN: { commands: [] },
|
|
810
|
-
START_ITERATION: { commands: [] },
|
|
811
|
-
END_ITERATION: { commands: [] },
|
|
812
|
-
END_RUN: { commands: [] }
|
|
813
|
-
};
|
|
830
|
+
const allHookTypes = getDefaultHooks();
|
|
814
831
|
if (!configExists) {
|
|
815
832
|
const defaultConfig = {
|
|
816
833
|
...DEFAULT_CONFIG,
|
|
@@ -856,6 +873,7 @@ var ENV_VAR_MAPPING, SubagentTypeSchema, LogLevelSchema, HookTypeSchema, HookSch
|
|
|
856
873
|
var init_config = __esm({
|
|
857
874
|
"src/core/config.ts"() {
|
|
858
875
|
init_version();
|
|
876
|
+
init_default_hooks();
|
|
859
877
|
init_profiles();
|
|
860
878
|
ENV_VAR_MAPPING = {
|
|
861
879
|
// Core settings
|
|
@@ -930,8 +948,8 @@ var init_config = __esm({
|
|
|
930
948
|
// Paths
|
|
931
949
|
workingDirectory: process.cwd(),
|
|
932
950
|
sessionDirectory: path.join(process.cwd(), ".juno_task"),
|
|
933
|
-
// Hooks configuration
|
|
934
|
-
hooks:
|
|
951
|
+
// Hooks configuration - populated with default hooks template
|
|
952
|
+
hooks: getDefaultHooks()
|
|
935
953
|
};
|
|
936
954
|
GLOBAL_CONFIG_FILE_NAMES = [
|
|
937
955
|
"juno-task.config.json",
|
|
@@ -12029,6 +12047,7 @@ async function promptInputOnce(question, defaultValue = "") {
|
|
|
12029
12047
|
}
|
|
12030
12048
|
|
|
12031
12049
|
// src/cli/commands/init.ts
|
|
12050
|
+
init_default_hooks();
|
|
12032
12051
|
init_types();
|
|
12033
12052
|
var SimpleInitTUI = class {
|
|
12034
12053
|
context = {};
|
|
@@ -12320,6 +12339,65 @@ Items will be added here as we discover what needs to be implemented.
|
|
|
12320
12339
|
- Task defined: ${variables.TASK}
|
|
12321
12340
|
`;
|
|
12322
12341
|
await fs.writeFile(path.join(junoTaskDir, "plan.md"), planContent);
|
|
12342
|
+
const implementContent = `# Implementation Guide
|
|
12343
|
+
|
|
12344
|
+
## Current Focus
|
|
12345
|
+
|
|
12346
|
+
**Main Task**: ${variables.TASK}
|
|
12347
|
+
|
|
12348
|
+
## Implementation Steps
|
|
12349
|
+
|
|
12350
|
+
### Step 1: Analysis and Planning
|
|
12351
|
+
- [ ] Review existing codebase structure
|
|
12352
|
+
- [ ] Identify key components and dependencies
|
|
12353
|
+
- [ ] Document current state in @.juno_task/plan.md
|
|
12354
|
+
- [ ] Create detailed specifications in @.juno_task/specs/
|
|
12355
|
+
|
|
12356
|
+
### Step 2: Design and Architecture
|
|
12357
|
+
- [ ] Define system architecture
|
|
12358
|
+
- [ ] Design data models and APIs
|
|
12359
|
+
- [ ] Plan integration points
|
|
12360
|
+
- [ ] Document architecture decisions
|
|
12361
|
+
|
|
12362
|
+
### Step 3: Implementation
|
|
12363
|
+
- [ ] Implement core functionality
|
|
12364
|
+
- [ ] Write comprehensive tests
|
|
12365
|
+
- [ ] Ensure code quality and documentation
|
|
12366
|
+
- [ ] Follow coding standards and best practices
|
|
12367
|
+
|
|
12368
|
+
### Step 4: Testing and Validation
|
|
12369
|
+
- [ ] Unit tests with >90% coverage
|
|
12370
|
+
- [ ] Integration tests
|
|
12371
|
+
- [ ] Performance testing
|
|
12372
|
+
- [ ] Security review
|
|
12373
|
+
|
|
12374
|
+
### Step 5: Documentation and Deployment
|
|
12375
|
+
- [ ] Update all documentation
|
|
12376
|
+
- [ ] Create deployment guides
|
|
12377
|
+
- [ ] Version control and tagging
|
|
12378
|
+
- [ ] Final review and sign-off
|
|
12379
|
+
|
|
12380
|
+
## Current Tasks
|
|
12381
|
+
|
|
12382
|
+
Update this section with specific tasks for the current iteration:
|
|
12383
|
+
|
|
12384
|
+
1. **Task 1**: Study existing codebase and create specifications
|
|
12385
|
+
- Status: Not Started
|
|
12386
|
+
- Owner: ${variables.EDITOR}
|
|
12387
|
+
- Priority: High
|
|
12388
|
+
|
|
12389
|
+
## Notes and Considerations
|
|
12390
|
+
|
|
12391
|
+
- Keep this file updated as implementation progresses
|
|
12392
|
+
- Document any blockers or issues encountered
|
|
12393
|
+
- Reference related specs and plan items
|
|
12394
|
+
- Track progress and update status regularly
|
|
12395
|
+
|
|
12396
|
+
---
|
|
12397
|
+
*Last updated: ${variables.CURRENT_DATE}*
|
|
12398
|
+
*Primary subagent: ${variables.EDITOR}*
|
|
12399
|
+
`;
|
|
12400
|
+
await fs.writeFile(path.join(junoTaskDir, "implement.md"), implementContent);
|
|
12323
12401
|
const specsDir = path.join(junoTaskDir, "specs");
|
|
12324
12402
|
await fs.ensureDir(specsDir);
|
|
12325
12403
|
const specsReadmeContent = `# Project Specifications
|
|
@@ -12498,6 +12576,7 @@ This project was initialized on ${variables.CURRENT_DATE} using juno-task.
|
|
|
12498
12576
|
\u2502 \u251C\u2500\u2500 prompt.md # Main task definition with AI instructions
|
|
12499
12577
|
\u2502 \u251C\u2500\u2500 init.md # Initial task breakdown and constraints
|
|
12500
12578
|
\u2502 \u251C\u2500\u2500 plan.md # Dynamic planning and priority tracking
|
|
12579
|
+
\u2502 \u251C\u2500\u2500 implement.md # Implementation guide and current tasks
|
|
12501
12580
|
\u2502 \u251C\u2500\u2500 USER_FEEDBACK.md # User feedback and issue tracking
|
|
12502
12581
|
\u2502 \u251C\u2500\u2500 scripts/ # Utility scripts for project maintenance
|
|
12503
12582
|
\u2502 \u2502 \u2514\u2500\u2500 clean_logs_folder.sh # Archive old log files
|
|
@@ -12640,8 +12719,10 @@ juno-task feedback
|
|
|
12640
12719
|
\u2502 \u251C\u2500\u2500 prompt.md # Production-ready AI instructions
|
|
12641
12720
|
\u2502 \u251C\u2500\u2500 init.md # Task breakdown and constraints
|
|
12642
12721
|
\u2502 \u251C\u2500\u2500 plan.md # Dynamic planning and tracking
|
|
12722
|
+
\u2502 \u251C\u2500\u2500 implement.md # Implementation guide and current tasks
|
|
12643
12723
|
\u2502 \u251C\u2500\u2500 USER_FEEDBACK.md # User feedback and issue tracking
|
|
12644
12724
|
\u2502 \u251C\u2500\u2500 scripts/ # Utility scripts for project maintenance
|
|
12725
|
+
\u2502 \u2502 \u251C\u2500\u2500 install_requirements.sh # Install Python dependencies
|
|
12645
12726
|
\u2502 \u2502 \u2514\u2500\u2500 clean_logs_folder.sh # Archive old log files (3+ days)
|
|
12646
12727
|
\u2502 \u2514\u2500\u2500 specs/ # Comprehensive specifications
|
|
12647
12728
|
\u2502 \u251C\u2500\u2500 README.md # Specs overview and guide
|
|
@@ -12688,8 +12769,9 @@ ${variables.GIT_URL}` : ""}
|
|
|
12688
12769
|
|
|
12689
12770
|
1. **Review Task**: Check \`.juno_task/init.md\` for main task
|
|
12690
12771
|
2. **Check Plan**: Review \`.juno_task/plan.md\` for current priorities
|
|
12691
|
-
3. **
|
|
12692
|
-
4. **
|
|
12772
|
+
3. **Track Implementation**: Follow \`.juno_task/implement.md\` for current implementation steps
|
|
12773
|
+
4. **Provide Feedback**: Use \`juno-task feedback\` for issues or suggestions
|
|
12774
|
+
5. **Monitor Progress**: Track AI development through \`.juno_task/prompt.md\`
|
|
12693
12775
|
|
|
12694
12776
|
---
|
|
12695
12777
|
|
|
@@ -12743,7 +12825,9 @@ ${variables.EDITOR ? `using ${variables.EDITOR} as primary AI subagent` : ""}
|
|
|
12743
12825
|
headlessMode: false,
|
|
12744
12826
|
// Paths
|
|
12745
12827
|
workingDirectory: targetDirectory,
|
|
12746
|
-
sessionDirectory: path.join(targetDirectory, ".juno_task")
|
|
12828
|
+
sessionDirectory: path.join(targetDirectory, ".juno_task"),
|
|
12829
|
+
// Hooks configuration with default file size monitoring
|
|
12830
|
+
hooks: getDefaultHooks()
|
|
12747
12831
|
};
|
|
12748
12832
|
const configPath = path.join(junoTaskDir, "config.json");
|
|
12749
12833
|
await fs.writeFile(configPath, JSON.stringify(configContent, null, 2));
|
|
@@ -13024,10 +13108,15 @@ var SimpleHeadlessInit = class {
|
|
|
13024
13108
|
createSimpleVariables(targetDirectory, task, editor, gitUrl) {
|
|
13025
13109
|
const projectName = path.basename(targetDirectory);
|
|
13026
13110
|
const currentDate = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
13111
|
+
let AGENTMD = "AGENTS.md";
|
|
13112
|
+
if (editor == "claude") {
|
|
13113
|
+
AGENTMD = "CLAUDE.md";
|
|
13114
|
+
}
|
|
13027
13115
|
return {
|
|
13028
13116
|
PROJECT_NAME: projectName,
|
|
13029
13117
|
TASK: task,
|
|
13030
13118
|
EDITOR: editor,
|
|
13119
|
+
AGENTMD,
|
|
13031
13120
|
CURRENT_DATE: currentDate,
|
|
13032
13121
|
VERSION: "1.0.0",
|
|
13033
13122
|
AUTHOR: "Development Team",
|