claude-code-workflow 6.3.54 → 7.0.0
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/.claude/agents/action-planning-agent.md +332 -187
- package/.claude/agents/cli-execution-agent.md +13 -12
- package/.claude/agents/cli-explore-agent.md +66 -11
- package/.claude/agents/cli-lite-planning-agent.md +908 -892
- package/.claude/agents/cli-roadmap-plan-agent.md +1001 -0
- package/.claude/agents/code-developer.md +75 -85
- package/.claude/agents/conceptual-planning-agent.md +49 -19
- package/.claude/agents/context-search-agent.md +96 -19
- package/.claude/agents/debug-explore-agent.md +439 -436
- package/.claude/agents/issue-plan-agent.md +15 -11
- package/.claude/agents/memory-bridge.md +2 -2
- package/.claude/agents/tdd-developer.md +84 -107
- package/.claude/agents/team-worker.md +440 -0
- package/.claude/agents/test-action-planning-agent.md +684 -0
- package/.claude/agents/test-fix-agent.md +24 -12
- package/.claude/agents/ui-design-agent.md +3 -3
- package/.claude/agents/universal-executor.md +1 -1
- package/.claude/commands/ccw-coordinator.md +316 -62
- package/.claude/commands/ccw.md +502 -172
- package/.claude/commands/cli/cli-init.md +441 -441
- package/.claude/commands/flow-create.md +16 -25
- package/.claude/commands/issue/convert-to-plan.md +21 -19
- package/.claude/commands/issue/discover-by-prompt.md +2 -2
- package/.claude/commands/issue/discover.md +4 -4
- package/.claude/commands/issue/execute.md +43 -15
- package/.claude/commands/issue/from-brainstorm.md +5 -5
- package/.claude/commands/issue/plan.md +335 -335
- package/.claude/commands/issue/queue.md +1 -1
- package/.claude/commands/memory/prepare.md +240 -0
- package/.claude/commands/memory/style-skill-memory.md +2 -2
- package/.claude/commands/workflow/analyze-with-file.md +639 -667
- package/.claude/commands/workflow/brainstorm-with-file.md +779 -1153
- package/.claude/commands/workflow/clean.md +572 -548
- package/.claude/commands/workflow/collaborative-plan-with-file.md +635 -761
- package/.claude/commands/workflow/debug-with-file.md +648 -672
- package/.claude/commands/workflow/init-guidelines.md +447 -0
- package/.claude/commands/workflow/init-specs.md +380 -0
- package/.claude/commands/workflow/init.md +291 -224
- package/.claude/commands/workflow/integration-test-cycle.md +932 -0
- package/.claude/commands/workflow/refactor-cycle.md +852 -0
- package/.claude/commands/workflow/roadmap-with-file.md +544 -0
- package/.claude/commands/workflow/session/complete.md +139 -203
- package/.claude/commands/workflow/session/solidify.md +453 -303
- package/.claude/commands/workflow/session/start.md +202 -202
- package/.claude/commands/workflow/session/sync.md +201 -0
- package/.claude/commands/workflow/ui-design/codify-style.md +20 -20
- package/.claude/commands/workflow/ui-design/design-sync.md +7 -7
- package/.claude/commands/workflow/ui-design/explore-auto.md +16 -16
- package/.claude/commands/workflow/ui-design/generate.md +1 -1
- package/.claude/commands/workflow/ui-design/imitate-auto.md +19 -19
- package/.claude/commands/workflow/ui-design/import-from-code.md +540 -540
- package/.claude/commands/workflow/unified-execute-with-file.md +864 -889
- package/.claude/scripts/cleanup-ghost-commands.mjs +402 -0
- package/.claude/skills/_shared/COMMAND-TO-SKILL-CONVERSION.md +741 -0
- package/.claude/skills/brainstorm/SKILL.md +382 -0
- package/.claude/skills/brainstorm/phases/01-mode-routing.md +207 -0
- package/.claude/skills/brainstorm/phases/02-artifacts.md +457 -0
- package/.claude/skills/brainstorm/phases/03-role-analysis.md +718 -0
- package/.claude/skills/brainstorm/phases/04-synthesis.md +817 -0
- package/.claude/skills/ccw-help/SKILL.md +176 -176
- package/.claude/skills/ccw-help/index/all-commands.json +376 -805
- package/.claude/skills/ccw-help/index/by-category.json +400 -833
- package/.claude/skills/ccw-help/index/by-use-case.json +388 -819
- package/.claude/skills/ccw-help/index/command-relationships.json +15 -160
- package/.claude/skills/ccw-help/index/essential-commands.json +13 -90
- package/.claude/skills/command-generator/SKILL.md +190 -0
- package/.claude/skills/command-generator/phases/01-parameter-validation.md +174 -0
- package/.claude/skills/command-generator/phases/02-target-path-resolution.md +171 -0
- package/.claude/skills/command-generator/phases/03-template-loading.md +123 -0
- package/.claude/skills/command-generator/phases/04-content-formatting.md +184 -0
- package/.claude/skills/command-generator/phases/05-file-generation.md +185 -0
- package/.claude/skills/command-generator/specs/command-design-spec.md +160 -0
- package/.claude/skills/command-generator/templates/command-md.md +75 -0
- package/.claude/skills/issue-manage/SKILL.md +291 -285
- package/.claude/skills/memory-capture/SKILL.md +129 -0
- package/.claude/skills/memory-capture/phases/01-compact.md +254 -0
- package/.claude/skills/memory-capture/phases/02-tips.md +206 -0
- package/.claude/skills/memory-manage/SKILL.md +229 -0
- package/.claude/skills/memory-manage/phases/01-update-full.md +316 -0
- package/.claude/skills/memory-manage/phases/02-update-related.md +267 -0
- package/.claude/skills/memory-manage/phases/03-update-single.md +306 -0
- package/.claude/skills/memory-manage/phases/04-docs-full.md +435 -0
- package/.claude/skills/memory-manage/phases/05-docs-related.md +315 -0
- package/.claude/skills/review-cycle/SKILL.md +128 -0
- package/.claude/skills/review-cycle/phases/review-fix.md +760 -0
- package/.claude/skills/review-cycle/phases/review-module.md +764 -0
- package/.claude/skills/review-cycle/phases/review-session.md +775 -0
- package/.claude/skills/skill-generator/templates/llm-action.md +3 -3
- package/.claude/skills/spec-generator/README.md +81 -0
- package/.claude/skills/spec-generator/SKILL.md +290 -0
- package/.claude/skills/spec-generator/phases/01-5-requirement-clarification.md +404 -0
- package/.claude/skills/spec-generator/phases/01-discovery.md +242 -0
- package/.claude/skills/spec-generator/phases/02-product-brief.md +247 -0
- package/.claude/skills/spec-generator/phases/03-requirements.md +179 -0
- package/.claude/skills/spec-generator/phases/04-architecture.md +213 -0
- package/.claude/skills/spec-generator/phases/05-epics-stories.md +168 -0
- package/.claude/skills/spec-generator/phases/06-readiness-check.md +449 -0
- package/.claude/skills/spec-generator/specs/document-standards.md +248 -0
- package/.claude/skills/spec-generator/specs/quality-gates.md +219 -0
- package/.claude/skills/spec-generator/templates/architecture-doc.md +254 -0
- package/.claude/skills/spec-generator/templates/epics-template.md +196 -0
- package/.claude/skills/spec-generator/templates/product-brief.md +133 -0
- package/.claude/skills/spec-generator/templates/requirements-prd.md +224 -0
- package/.claude/skills/team-brainstorm/SKILL.md +407 -0
- package/.claude/skills/team-brainstorm/roles/challenger.md +167 -0
- package/.claude/skills/team-brainstorm/roles/coordinator.md +257 -0
- package/.claude/skills/team-brainstorm/roles/evaluator.md +157 -0
- package/.claude/skills/team-brainstorm/roles/ideator.md +160 -0
- package/.claude/skills/team-brainstorm/roles/synthesizer.md +168 -0
- package/.claude/skills/team-brainstorm/specs/team-config.json +86 -0
- package/.claude/skills/team-coordinate/SKILL.md +445 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +197 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md +85 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md +296 -0
- package/.claude/skills/team-coordinate/roles/coordinator/role.md +283 -0
- package/.claude/skills/team-coordinate/specs/role-template.md +434 -0
- package/.claude/skills/team-coordinate/subagents/discuss-subagent.md +133 -0
- package/.claude/skills/team-coordinate/subagents/explore-subagent.md +120 -0
- package/.claude/skills/team-coordinate-v2/SKILL.md +265 -0
- package/.claude/skills/team-coordinate-v2/roles/coordinator/commands/analyze-task.md +185 -0
- package/.claude/skills/team-coordinate-v2/roles/coordinator/commands/dispatch.md +87 -0
- package/.claude/skills/team-coordinate-v2/roles/coordinator/commands/monitor.md +301 -0
- package/.claude/skills/team-coordinate-v2/roles/coordinator/role.md +297 -0
- package/.claude/skills/team-coordinate-v2/specs/role-spec-template.md +295 -0
- package/.claude/skills/team-coordinate-v2/subagents/discuss-subagent.md +133 -0
- package/.claude/skills/team-coordinate-v2/subagents/explore-subagent.md +120 -0
- package/.claude/skills/team-executor/SKILL.md +372 -0
- package/.claude/skills/team-executor/roles/executor/commands/monitor.md +277 -0
- package/.claude/skills/team-executor/roles/executor/role.md +202 -0
- package/.claude/skills/team-executor/specs/session-schema.md +272 -0
- package/.claude/skills/team-executor-v2/SKILL.md +215 -0
- package/.claude/skills/team-executor-v2/roles/executor/commands/monitor.md +239 -0
- package/.claude/skills/team-executor-v2/roles/executor/role.md +171 -0
- package/.claude/skills/team-executor-v2/specs/session-schema.md +264 -0
- package/.claude/skills/team-frontend/SKILL.md +426 -0
- package/.claude/skills/team-frontend/roles/analyst/commands/design-intelligence.md +150 -0
- package/.claude/skills/team-frontend/roles/analyst/role.md +225 -0
- package/.claude/skills/team-frontend/roles/architect/role.md +219 -0
- package/.claude/skills/team-frontend/roles/coordinator/role.md +257 -0
- package/.claude/skills/team-frontend/roles/developer/role.md +238 -0
- package/.claude/skills/team-frontend/roles/qa/commands/pre-delivery-checklist.md +116 -0
- package/.claude/skills/team-frontend/roles/qa/role.md +257 -0
- package/.claude/skills/team-frontend/specs/team-config.json +84 -0
- package/.claude/skills/team-issue/SKILL.md +425 -0
- package/.claude/skills/team-issue/roles/coordinator.md +340 -0
- package/.claude/skills/team-issue/roles/explorer.md +212 -0
- package/.claude/skills/team-issue/roles/implementer.md +322 -0
- package/.claude/skills/team-issue/roles/integrator.md +241 -0
- package/.claude/skills/team-issue/roles/planner.md +207 -0
- package/.claude/skills/team-issue/roles/reviewer.md +268 -0
- package/.claude/skills/team-issue/specs/team-config.json +70 -0
- package/.claude/skills/team-iterdev/SKILL.md +493 -0
- package/.claude/skills/team-iterdev/roles/architect.md +265 -0
- package/.claude/skills/team-iterdev/roles/coordinator.md +423 -0
- package/.claude/skills/team-iterdev/roles/developer.md +280 -0
- package/.claude/skills/team-iterdev/roles/reviewer.md +307 -0
- package/.claude/skills/team-iterdev/roles/tester.md +253 -0
- package/.claude/skills/team-iterdev/specs/team-config.json +172 -0
- package/.claude/skills/team-lifecycle-v3/SKILL.md +384 -0
- package/.claude/skills/team-lifecycle-v3/roles/analyst/role.md +113 -0
- package/.claude/skills/team-lifecycle-v3/roles/architect/commands/assess.md +193 -0
- package/.claude/skills/team-lifecycle-v3/roles/architect/role.md +103 -0
- package/.claude/skills/team-lifecycle-v3/roles/coordinator/commands/dispatch.md +142 -0
- package/.claude/skills/team-lifecycle-v3/roles/coordinator/commands/monitor.md +180 -0
- package/.claude/skills/team-lifecycle-v3/roles/coordinator/role.md +209 -0
- package/.claude/skills/team-lifecycle-v3/roles/discussant/commands/critique.md +136 -0
- package/.claude/skills/team-lifecycle-v3/roles/discussant/role.md +128 -0
- package/.claude/skills/team-lifecycle-v3/roles/executor/commands/implement.md +166 -0
- package/.claude/skills/team-lifecycle-v3/roles/executor/role.md +103 -0
- package/.claude/skills/team-lifecycle-v3/roles/explorer/role.md +91 -0
- package/.claude/skills/team-lifecycle-v3/roles/fe-developer/role.md +111 -0
- package/.claude/skills/team-lifecycle-v3/roles/fe-qa/commands/pre-delivery-checklist.md +152 -0
- package/.claude/skills/team-lifecycle-v3/roles/fe-qa/role.md +113 -0
- package/.claude/skills/team-lifecycle-v3/roles/planner/commands/explore.md +154 -0
- package/.claude/skills/team-lifecycle-v3/roles/planner/role.md +120 -0
- package/.claude/skills/team-lifecycle-v3/roles/reviewer/commands/code-review.md +163 -0
- package/.claude/skills/team-lifecycle-v3/roles/reviewer/commands/spec-quality.md +202 -0
- package/.claude/skills/team-lifecycle-v3/roles/reviewer/role.md +104 -0
- package/.claude/skills/team-lifecycle-v3/roles/tester/commands/validate.md +152 -0
- package/.claude/skills/team-lifecycle-v3/roles/tester/role.md +108 -0
- package/.claude/skills/team-lifecycle-v3/roles/writer/commands/generate-doc.md +187 -0
- package/.claude/skills/team-lifecycle-v3/roles/writer/role.md +96 -0
- package/.claude/skills/team-lifecycle-v3/specs/document-standards.md +192 -0
- package/.claude/skills/team-lifecycle-v3/specs/quality-gates.md +207 -0
- package/.claude/skills/team-lifecycle-v3/specs/team-config.json +158 -0
- package/.claude/skills/team-lifecycle-v3/templates/architecture-doc.md +254 -0
- package/.claude/skills/team-lifecycle-v3/templates/epics-template.md +196 -0
- package/.claude/skills/team-lifecycle-v3/templates/product-brief.md +133 -0
- package/.claude/skills/team-lifecycle-v3/templates/requirements-prd.md +224 -0
- package/.claude/skills/team-lifecycle-v4/SKILL.md +643 -0
- package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +174 -0
- package/.claude/skills/team-lifecycle-v4/roles/architect/commands/assess.md +193 -0
- package/.claude/skills/team-lifecycle-v4/roles/architect/role.md +103 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +198 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +413 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md +230 -0
- package/.claude/skills/team-lifecycle-v4/roles/executor/commands/implement.md +166 -0
- package/.claude/skills/team-lifecycle-v4/roles/executor/role.md +103 -0
- package/.claude/skills/team-lifecycle-v4/roles/fe-developer/role.md +111 -0
- package/.claude/skills/team-lifecycle-v4/roles/fe-qa/commands/pre-delivery-checklist.md +152 -0
- package/.claude/skills/team-lifecycle-v4/roles/fe-qa/role.md +113 -0
- package/.claude/skills/team-lifecycle-v4/roles/planner/commands/explore.md +172 -0
- package/.claude/skills/team-lifecycle-v4/roles/planner/role.md +139 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/code-review.md +163 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/spec-quality.md +202 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/role.md +150 -0
- package/.claude/skills/team-lifecycle-v4/roles/tester/commands/validate.md +152 -0
- package/.claude/skills/team-lifecycle-v4/roles/tester/role.md +108 -0
- package/.claude/skills/team-lifecycle-v4/roles/writer/commands/generate-doc.md +192 -0
- package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +246 -0
- package/.claude/skills/team-lifecycle-v4/specs/document-standards.md +192 -0
- package/.claude/skills/team-lifecycle-v4/specs/quality-gates.md +207 -0
- package/.claude/skills/team-lifecycle-v4/specs/team-config.json +200 -0
- package/.claude/skills/team-lifecycle-v4/subagents/discuss-subagent.md +169 -0
- package/.claude/skills/team-lifecycle-v4/subagents/doc-generation-subagent.md +62 -0
- package/.claude/skills/team-lifecycle-v4/subagents/explore-subagent.md +172 -0
- package/.claude/skills/team-lifecycle-v4/templates/architecture-doc.md +254 -0
- package/.claude/skills/team-lifecycle-v4/templates/epics-template.md +196 -0
- package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.claude/skills/team-lifecycle-v4/templates/requirements-prd.md +224 -0
- package/.claude/skills/team-lifecycle-v5/SKILL.md +320 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/analyst.md +93 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/architect.md +76 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/executor.md +67 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/fe-developer.md +79 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/fe-qa.md +79 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/planner.md +98 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/reviewer.md +94 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/tester.md +76 -0
- package/.claude/skills/team-lifecycle-v5/role-specs/writer.md +126 -0
- package/.claude/skills/team-lifecycle-v5/roles/coordinator/commands/dispatch.md +178 -0
- package/.claude/skills/team-lifecycle-v5/roles/coordinator/commands/monitor.md +237 -0
- package/.claude/skills/team-lifecycle-v5/roles/coordinator/role.md +194 -0
- package/.claude/skills/team-lifecycle-v5/specs/document-standards.md +192 -0
- package/.claude/skills/team-lifecycle-v5/specs/quality-gates.md +207 -0
- package/.claude/skills/team-lifecycle-v5/specs/team-config.json +218 -0
- package/.claude/skills/team-lifecycle-v5/subagents/discuss-subagent.md +169 -0
- package/.claude/skills/team-lifecycle-v5/subagents/doc-generation-subagent.md +62 -0
- package/.claude/skills/team-lifecycle-v5/subagents/explore-subagent.md +172 -0
- package/.claude/skills/team-lifecycle-v5/templates/architecture-doc.md +254 -0
- package/.claude/skills/team-lifecycle-v5/templates/epics-template.md +196 -0
- package/.claude/skills/team-lifecycle-v5/templates/product-brief.md +133 -0
- package/.claude/skills/team-lifecycle-v5/templates/requirements-prd.md +224 -0
- package/.claude/skills/team-planex/SKILL.md +439 -0
- package/.claude/skills/team-planex/roles/executor.md +356 -0
- package/.claude/skills/team-planex/roles/planner.md +315 -0
- package/.claude/skills/team-quality-assurance/SKILL.md +466 -0
- package/.claude/skills/team-quality-assurance/roles/analyst/commands/quality-report.md +360 -0
- package/.claude/skills/team-quality-assurance/roles/analyst/role.md +186 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +169 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +336 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/role.md +195 -0
- package/.claude/skills/team-quality-assurance/roles/executor/commands/run-fix-cycle.md +220 -0
- package/.claude/skills/team-quality-assurance/roles/executor/role.md +179 -0
- package/.claude/skills/team-quality-assurance/roles/generator/commands/generate-tests.md +258 -0
- package/.claude/skills/team-quality-assurance/roles/generator/role.md +172 -0
- package/.claude/skills/team-quality-assurance/roles/scout/commands/scan.md +216 -0
- package/.claude/skills/team-quality-assurance/roles/scout/role.md +244 -0
- package/.claude/skills/team-quality-assurance/roles/strategist/commands/analyze-scope.md +221 -0
- package/.claude/skills/team-quality-assurance/roles/strategist/role.md +166 -0
- package/.claude/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.claude/skills/team-review/SKILL.md +264 -0
- package/.claude/skills/team-review/roles/coordinator/commands/dispatch.md +145 -0
- package/.claude/skills/team-review/roles/coordinator/commands/monitor.md +218 -0
- package/.claude/skills/team-review/roles/coordinator/role.md +244 -0
- package/.claude/skills/team-review/roles/fixer/commands/execute-fixes.md +163 -0
- package/.claude/skills/team-review/roles/fixer/commands/plan-fixes.md +187 -0
- package/.claude/skills/team-review/roles/fixer/role.md +247 -0
- package/.claude/skills/team-review/roles/reviewer/commands/deep-analyze.md +186 -0
- package/.claude/skills/team-review/roles/reviewer/commands/generate-report.md +174 -0
- package/.claude/skills/team-review/roles/reviewer/role.md +233 -0
- package/.claude/skills/team-review/roles/scanner/commands/semantic-scan.md +186 -0
- package/.claude/skills/team-review/roles/scanner/commands/toolchain-scan.md +187 -0
- package/.claude/skills/team-review/roles/scanner/role.md +255 -0
- package/.claude/skills/team-review/specs/dimensions.md +82 -0
- package/.claude/skills/team-review/specs/finding-schema.json +82 -0
- package/.claude/skills/team-review/specs/team-config.json +27 -0
- package/.claude/skills/team-roadmap-dev/SKILL.md +389 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/dispatch.md +213 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +378 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/pause.md +91 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/resume.md +138 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +287 -0
- package/.claude/skills/team-roadmap-dev/roles/coordinator/role.md +237 -0
- package/.claude/skills/team-roadmap-dev/roles/executor/commands/implement.md +309 -0
- package/.claude/skills/team-roadmap-dev/roles/executor/role.md +220 -0
- package/.claude/skills/team-roadmap-dev/roles/planner/commands/create-plans.md +362 -0
- package/.claude/skills/team-roadmap-dev/roles/planner/commands/research.md +219 -0
- package/.claude/skills/team-roadmap-dev/roles/planner/role.md +243 -0
- package/.claude/skills/team-roadmap-dev/roles/verifier/commands/verify.md +335 -0
- package/.claude/skills/team-roadmap-dev/roles/verifier/role.md +247 -0
- package/.claude/skills/team-roadmap-dev/specs/team-config.json +96 -0
- package/.claude/skills/team-tech-debt/SKILL.md +473 -0
- package/.claude/skills/team-tech-debt/roles/assessor/commands/evaluate.md +164 -0
- package/.claude/skills/team-tech-debt/roles/assessor/role.md +187 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +157 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md +434 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/role.md +387 -0
- package/.claude/skills/team-tech-debt/roles/executor/commands/remediate.md +180 -0
- package/.claude/skills/team-tech-debt/roles/executor/role.md +228 -0
- package/.claude/skills/team-tech-debt/roles/planner/commands/create-plan.md +165 -0
- package/.claude/skills/team-tech-debt/roles/planner/role.md +190 -0
- package/.claude/skills/team-tech-debt/roles/scanner/commands/scan-debt.md +388 -0
- package/.claude/skills/team-tech-debt/roles/scanner/role.md +225 -0
- package/.claude/skills/team-tech-debt/roles/validator/commands/verify.md +203 -0
- package/.claude/skills/team-tech-debt/roles/validator/role.md +237 -0
- package/.claude/skills/team-tech-debt/specs/team-config.json +132 -0
- package/.claude/skills/team-testing/SKILL.md +362 -0
- package/.claude/skills/team-testing/roles/analyst.md +265 -0
- package/.claude/skills/team-testing/roles/coordinator.md +304 -0
- package/.claude/skills/team-testing/roles/executor.md +300 -0
- package/.claude/skills/team-testing/roles/generator.md +272 -0
- package/.claude/skills/team-testing/roles/strategist.md +218 -0
- package/.claude/skills/team-testing/specs/team-config.json +93 -0
- package/.claude/skills/team-uidesign/SKILL.md +419 -0
- package/.claude/skills/team-uidesign/roles/coordinator.md +315 -0
- package/.claude/skills/team-uidesign/roles/designer.md +251 -0
- package/.claude/skills/team-uidesign/roles/implementer.md +280 -0
- package/.claude/skills/team-uidesign/roles/researcher.md +286 -0
- package/.claude/skills/team-uidesign/roles/reviewer.md +301 -0
- package/.claude/skills/team-uidesign/specs/team-config.json +107 -0
- package/.claude/skills/team-ultra-analyze/SKILL.md +444 -0
- package/.claude/skills/team-ultra-analyze/roles/analyst/commands/analyze.md +210 -0
- package/.claude/skills/team-ultra-analyze/roles/analyst/role.md +253 -0
- package/.claude/skills/team-ultra-analyze/roles/coordinator/commands/dispatch.md +237 -0
- package/.claude/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +461 -0
- package/.claude/skills/team-ultra-analyze/roles/coordinator/role.md +354 -0
- package/.claude/skills/team-ultra-analyze/roles/discussant/commands/deepen.md +222 -0
- package/.claude/skills/team-ultra-analyze/roles/discussant/role.md +227 -0
- package/.claude/skills/team-ultra-analyze/roles/explorer/commands/explore.md +194 -0
- package/.claude/skills/team-ultra-analyze/roles/explorer/role.md +219 -0
- package/.claude/skills/team-ultra-analyze/roles/synthesizer/commands/synthesize.md +255 -0
- package/.claude/skills/team-ultra-analyze/roles/synthesizer/role.md +251 -0
- package/.claude/skills/team-ultra-analyze/specs/team-config.json +131 -0
- package/.claude/skills/workflow-execute/SKILL.md +625 -0
- package/.claude/skills/workflow-execute/phases/06-review.md +215 -0
- package/.claude/skills/workflow-lite-plan/SKILL.md +174 -0
- package/.claude/skills/workflow-lite-plan/phases/01-lite-plan.md +762 -0
- package/.claude/skills/workflow-lite-plan/phases/02-lite-execute.md +786 -0
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +163 -0
- package/.claude/skills/workflow-multi-cli-plan/phases/01-multi-cli-plan.md +604 -0
- package/.claude/skills/workflow-multi-cli-plan/phases/02-lite-execute.md +788 -0
- package/.claude/skills/workflow-plan/SKILL.md +441 -0
- package/.claude/skills/workflow-plan/phases/01-session-discovery.md +99 -0
- package/.claude/skills/workflow-plan/phases/02-context-gathering.md +338 -0
- package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +422 -0
- package/.claude/skills/workflow-plan/phases/04-task-generation.md +433 -0
- package/.claude/skills/workflow-plan/phases/05-plan-verify.md +391 -0
- package/.claude/skills/workflow-plan/phases/06-replan.md +594 -0
- package/.claude/skills/workflow-skill-designer/SKILL.md +496 -0
- package/.claude/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
- package/.claude/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
- package/.claude/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
- package/.claude/skills/workflow-skill-designer/phases/04-validation.md +471 -0
- package/.claude/skills/workflow-tdd/SKILL.md +502 -0
- package/.claude/skills/workflow-tdd/phases/01-session-discovery.md +57 -0
- package/.claude/skills/workflow-tdd/phases/02-context-gathering.md +406 -0
- package/.claude/skills/workflow-tdd/phases/03-test-coverage-analysis.md +172 -0
- package/.claude/skills/workflow-tdd/phases/04-conflict-resolution.md +426 -0
- package/.claude/skills/workflow-tdd/phases/05-tdd-task-generation.md +472 -0
- package/.claude/skills/workflow-tdd/phases/06-tdd-structure-validation.md +189 -0
- package/.claude/skills/workflow-tdd/phases/07-tdd-verify.md +635 -0
- package/.claude/skills/workflow-test-fix/SKILL.md +458 -0
- package/.claude/skills/workflow-test-fix/phases/01-session-start.md +60 -0
- package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +492 -0
- package/.claude/skills/workflow-test-fix/phases/03-test-concept-enhanced.md +150 -0
- package/.claude/skills/workflow-test-fix/phases/04-test-task-generate.md +346 -0
- package/.claude/skills/workflow-test-fix/phases/05-test-cycle-execute.md +537 -0
- package/.codex/AGENTS.md +126 -122
- package/.codex/agents/action-planning-agent.md +88 -93
- package/.codex/agents/cli-execution-agent.md +4 -4
- package/.codex/agents/cli-explore-agent.md +56 -11
- package/.codex/agents/cli-lite-planning-agent.md +906 -736
- package/.codex/agents/code-developer.md +147 -38
- package/.codex/agents/conceptual-planning-agent.md +5 -5
- package/.codex/agents/context-search-agent.md +8 -4
- package/.codex/agents/issue-plan-agent.md +11 -11
- package/.codex/agents/memory-bridge.md +2 -2
- package/.codex/agents/tdd-developer.md +512 -0
- package/.codex/agents/test-action-planning-agent.md +684 -0
- package/.codex/agents/test-fix-agent.md +19 -7
- package/.codex/agents/ui-design-agent.md +3 -3
- package/.codex/prompts/prep-cycle.md +416 -0
- package/.codex/prompts/prep-plan.md +371 -0
- package/.codex/skills/analyze-with-file/EXECUTE.md +716 -0
- package/.codex/skills/analyze-with-file/SKILL.md +1049 -0
- package/.codex/skills/brainstorm-with-file/SKILL.md +1033 -0
- package/.codex/skills/clean/SKILL.md +421 -0
- package/.codex/skills/collaborative-plan-with-file/SKILL.md +822 -0
- package/.codex/skills/debug-with-file/SKILL.md +617 -0
- package/.codex/skills/issue-discover/SKILL.md +353 -0
- package/.codex/skills/issue-discover/phases/01-issue-new.md +334 -0
- package/.codex/skills/issue-discover/phases/02-discover.md +369 -0
- package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +531 -0
- package/.codex/skills/issue-discover/phases/04-quick-execute.md +241 -0
- package/.codex/skills/memory-compact/SKILL.md +381 -0
- package/.codex/skills/parallel-dev-cycle/SKILL.md +401 -0
- package/.codex/skills/parallel-dev-cycle/phases/00-prep-checklist.md +191 -0
- package/.codex/skills/parallel-dev-cycle/phases/01-session-init.md +261 -0
- package/.codex/skills/parallel-dev-cycle/phases/02-agent-execution.md +449 -0
- package/.codex/skills/parallel-dev-cycle/phases/03-result-aggregation.md +230 -0
- package/.codex/skills/parallel-dev-cycle/phases/04-completion-summary.md +109 -0
- package/.codex/skills/parallel-dev-cycle/roles/code-developer.md +392 -0
- package/.codex/skills/parallel-dev-cycle/roles/exploration-planner.md +352 -0
- package/.codex/skills/parallel-dev-cycle/roles/requirements-analyst.md +433 -0
- package/.codex/skills/parallel-dev-cycle/roles/validation-archivist.md +447 -0
- package/.codex/skills/review-cycle/SKILL.md +476 -0
- package/.codex/skills/review-cycle/phases/01-discovery-initialization.md +341 -0
- package/.codex/skills/review-cycle/phases/02-parallel-review.md +546 -0
- package/.codex/skills/review-cycle/phases/03-aggregation.md +74 -0
- package/.codex/skills/review-cycle/phases/04-iterative-deep-dive.md +333 -0
- package/.codex/skills/review-cycle/phases/05-review-completion.md +173 -0
- package/.codex/skills/review-cycle/phases/06-fix-discovery-batching.md +238 -0
- package/.codex/skills/review-cycle/phases/07-fix-parallel-planning.md +223 -0
- package/.codex/skills/review-cycle/phases/08-fix-execution.md +238 -0
- package/.codex/skills/review-cycle/phases/09-fix-completion.md +141 -0
- package/.codex/skills/roadmap-with-file/SKILL.md +898 -0
- package/.codex/skills/team-lifecycle/agents/analyst.md +424 -0
- package/.codex/skills/team-lifecycle/agents/architect.md +274 -0
- package/.codex/skills/team-lifecycle/agents/discuss-agent.md +422 -0
- package/.codex/skills/team-lifecycle/agents/executor.md +423 -0
- package/.codex/skills/team-lifecycle/agents/explore-agent.md +471 -0
- package/.codex/skills/team-lifecycle/agents/fe-developer.md +239 -0
- package/.codex/skills/team-lifecycle/agents/fe-qa.md +357 -0
- package/.codex/skills/team-lifecycle/agents/planner.md +437 -0
- package/.codex/skills/team-lifecycle/agents/reviewer.md +483 -0
- package/.codex/skills/team-lifecycle/agents/tester.md +423 -0
- package/.codex/skills/team-lifecycle/agents/writer.md +502 -0
- package/.codex/skills/team-lifecycle/orchestrator.md +817 -0
- package/.codex/skills/team-lifecycle/phases/01-requirement-clarification.md +209 -0
- package/.codex/skills/team-lifecycle/phases/02-team-initialization.md +205 -0
- package/.codex/skills/team-lifecycle/phases/03-task-chain-creation.md +251 -0
- package/.codex/skills/team-lifecycle/phases/04-pipeline-coordination.md +719 -0
- package/.codex/skills/team-lifecycle/phases/05-completion-report.md +288 -0
- package/.codex/skills/team-lifecycle/specs/document-standards.md +192 -0
- package/.codex/skills/team-lifecycle/specs/quality-gates.md +207 -0
- package/.codex/skills/team-lifecycle/templates/architecture-doc.md +254 -0
- package/.codex/skills/team-lifecycle/templates/epics-template.md +196 -0
- package/.codex/skills/team-lifecycle/templates/product-brief.md +133 -0
- package/.codex/skills/team-lifecycle/templates/requirements-prd.md +224 -0
- package/.codex/skills/team-planex/agents/executor.md +217 -0
- package/.codex/skills/team-planex/agents/planner.md +183 -0
- package/.codex/skills/team-planex/orchestrator.md +284 -0
- package/.codex/skills/unified-execute-with-file/SKILL.md +786 -0
- package/.codex/skills/workflow-test-fix-cycle/SKILL.md +391 -0
- package/.codex/skills/workflow-test-fix-cycle/phases/01-test-fix-gen.md +452 -0
- package/.codex/skills/workflow-test-fix-cycle/phases/02-test-cycle-execute.md +476 -0
- package/README.md +187 -157
- package/ccw/README.md +46 -0
- package/ccw/bin/ccw-mcp.js +16 -1
- package/ccw/dist/cli.d.ts.map +1 -1
- package/ccw/dist/cli.js +58 -2
- package/ccw/dist/cli.js.map +1 -1
- package/ccw/dist/commands/cli.d.ts +3 -0
- package/ccw/dist/commands/cli.d.ts.map +1 -1
- package/ccw/dist/commands/cli.js +109 -63
- package/ccw/dist/commands/cli.js.map +1 -1
- package/ccw/dist/commands/core-memory.d.ts +5 -0
- package/ccw/dist/commands/core-memory.d.ts.map +1 -1
- package/ccw/dist/commands/core-memory.js +307 -2
- package/ccw/dist/commands/core-memory.js.map +1 -1
- package/ccw/dist/commands/hook.d.ts +3 -1
- package/ccw/dist/commands/hook.d.ts.map +1 -1
- package/ccw/dist/commands/hook.js +669 -85
- package/ccw/dist/commands/hook.js.map +1 -1
- package/ccw/dist/commands/install.d.ts +12 -0
- package/ccw/dist/commands/install.d.ts.map +1 -1
- package/ccw/dist/commands/install.js +313 -3
- package/ccw/dist/commands/install.js.map +1 -1
- package/ccw/dist/commands/issue.d.ts +18 -5
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +58 -19
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/dist/commands/memory.d.ts +1 -1
- package/ccw/dist/commands/memory.d.ts.map +1 -1
- package/ccw/dist/commands/memory.js +371 -1
- package/ccw/dist/commands/memory.js.map +1 -1
- package/ccw/dist/commands/serve.d.ts.map +1 -1
- package/ccw/dist/commands/serve.js +74 -4
- package/ccw/dist/commands/serve.js.map +1 -1
- package/ccw/dist/commands/spec.d.ts +24 -0
- package/ccw/dist/commands/spec.d.ts.map +1 -0
- package/ccw/dist/commands/spec.js +374 -0
- package/ccw/dist/commands/spec.js.map +1 -0
- package/ccw/dist/commands/stop.d.ts +0 -4
- package/ccw/dist/commands/stop.d.ts.map +1 -1
- package/ccw/dist/commands/stop.js +135 -12
- package/ccw/dist/commands/stop.js.map +1 -1
- package/ccw/dist/commands/team.d.ts +27 -0
- package/ccw/dist/commands/team.d.ts.map +1 -0
- package/ccw/dist/commands/team.js +164 -0
- package/ccw/dist/commands/team.js.map +1 -0
- package/ccw/dist/commands/upgrade.js +4 -2
- package/ccw/dist/commands/upgrade.js.map +1 -1
- package/ccw/dist/commands/view.d.ts.map +1 -1
- package/ccw/dist/commands/view.js +2 -3
- package/ccw/dist/commands/view.js.map +1 -1
- package/ccw/dist/commands/workflow.js +2 -2
- package/ccw/dist/commands/workflow.js.map +1 -1
- package/ccw/dist/config/cli-settings-manager.d.ts +12 -3
- package/ccw/dist/config/cli-settings-manager.d.ts.map +1 -1
- package/ccw/dist/config/cli-settings-manager.js +146 -12
- package/ccw/dist/config/cli-settings-manager.js.map +1 -1
- package/ccw/dist/config/litellm-static-models.d.ts +30 -0
- package/ccw/dist/config/litellm-static-models.d.ts.map +1 -0
- package/ccw/dist/config/litellm-static-models.js +82 -0
- package/ccw/dist/config/litellm-static-models.js.map +1 -0
- package/ccw/dist/config/provider-models.d.ts +5 -32
- package/ccw/dist/config/provider-models.d.ts.map +1 -1
- package/ccw/dist/config/provider-models.js +5 -103
- package/ccw/dist/config/provider-models.js.map +1 -1
- package/ccw/dist/config/remote-notification-config.d.ts +32 -0
- package/ccw/dist/config/remote-notification-config.d.ts.map +1 -0
- package/ccw/dist/config/remote-notification-config.js +131 -0
- package/ccw/dist/config/remote-notification-config.js.map +1 -0
- package/ccw/dist/config/storage-paths.d.ts +22 -0
- package/ccw/dist/config/storage-paths.d.ts.map +1 -1
- package/ccw/dist/config/storage-paths.js +27 -0
- package/ccw/dist/config/storage-paths.js.map +1 -1
- package/ccw/dist/core/a2ui/A2UITypes.d.ts +143 -0
- package/ccw/dist/core/a2ui/A2UITypes.d.ts.map +1 -0
- package/ccw/dist/core/a2ui/A2UITypes.js +84 -0
- package/ccw/dist/core/a2ui/A2UITypes.js.map +1 -0
- package/ccw/dist/core/a2ui/A2UIWebSocketHandler.d.ts +170 -0
- package/ccw/dist/core/a2ui/A2UIWebSocketHandler.d.ts.map +1 -0
- package/ccw/dist/core/a2ui/A2UIWebSocketHandler.js +718 -0
- package/ccw/dist/core/a2ui/A2UIWebSocketHandler.js.map +1 -0
- package/ccw/dist/core/a2ui/index.d.ts +3 -0
- package/ccw/dist/core/a2ui/index.d.ts.map +1 -0
- package/ccw/dist/core/a2ui/index.js +6 -0
- package/ccw/dist/core/a2ui/index.js.map +1 -0
- package/ccw/dist/core/auth/csrf-middleware.d.ts.map +1 -1
- package/ccw/dist/core/auth/csrf-middleware.js +26 -8
- package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
- package/ccw/dist/core/auth/middleware.d.ts.map +1 -1
- package/ccw/dist/core/auth/middleware.js +55 -0
- package/ccw/dist/core/auth/middleware.js.map +1 -1
- package/ccw/dist/core/core-memory-store.d.ts +99 -5
- package/ccw/dist/core/core-memory-store.d.ts.map +1 -1
- package/ccw/dist/core/core-memory-store.js +389 -56
- package/ccw/dist/core/core-memory-store.js.map +1 -1
- package/ccw/dist/core/data-aggregator.d.ts +6 -0
- package/ccw/dist/core/data-aggregator.d.ts.map +1 -1
- package/ccw/dist/core/data-aggregator.js +6 -35
- package/ccw/dist/core/data-aggregator.js.map +1 -1
- package/ccw/dist/core/hooks/context-limit-detector.d.ts +65 -0
- package/ccw/dist/core/hooks/context-limit-detector.d.ts.map +1 -0
- package/ccw/dist/core/hooks/context-limit-detector.js +91 -0
- package/ccw/dist/core/hooks/context-limit-detector.js.map +1 -0
- package/ccw/dist/core/hooks/index.d.ts +11 -0
- package/ccw/dist/core/hooks/index.d.ts.map +1 -0
- package/ccw/dist/core/hooks/index.js +16 -0
- package/ccw/dist/core/hooks/index.js.map +1 -0
- package/ccw/dist/core/hooks/keyword-detector.d.ts +106 -0
- package/ccw/dist/core/hooks/keyword-detector.d.ts.map +1 -0
- package/ccw/dist/core/hooks/keyword-detector.js +194 -0
- package/ccw/dist/core/hooks/keyword-detector.js.map +1 -0
- package/ccw/dist/core/hooks/recovery-handler.d.ts +114 -0
- package/ccw/dist/core/hooks/recovery-handler.d.ts.map +1 -0
- package/ccw/dist/core/hooks/recovery-handler.js +244 -0
- package/ccw/dist/core/hooks/recovery-handler.js.map +1 -0
- package/ccw/dist/core/hooks/stop-handler.d.ts +128 -0
- package/ccw/dist/core/hooks/stop-handler.d.ts.map +1 -0
- package/ccw/dist/core/hooks/stop-handler.js +269 -0
- package/ccw/dist/core/hooks/stop-handler.js.map +1 -0
- package/ccw/dist/core/hooks/user-abort-detector.d.ts +76 -0
- package/ccw/dist/core/hooks/user-abort-detector.d.ts.map +1 -0
- package/ccw/dist/core/hooks/user-abort-detector.js +168 -0
- package/ccw/dist/core/hooks/user-abort-detector.js.map +1 -0
- package/ccw/dist/core/lite-scanner-complete.d.ts +18 -3
- package/ccw/dist/core/lite-scanner-complete.d.ts.map +1 -1
- package/ccw/dist/core/lite-scanner-complete.js +54 -12
- package/ccw/dist/core/lite-scanner-complete.js.map +1 -1
- package/ccw/dist/core/lite-scanner.d.ts +74 -3
- package/ccw/dist/core/lite-scanner.d.ts.map +1 -1
- package/ccw/dist/core/lite-scanner.js +57 -12
- package/ccw/dist/core/lite-scanner.js.map +1 -1
- package/ccw/dist/core/memory-consolidation-pipeline.d.ts +126 -0
- package/ccw/dist/core/memory-consolidation-pipeline.d.ts.map +1 -0
- package/ccw/dist/core/memory-consolidation-pipeline.js +364 -0
- package/ccw/dist/core/memory-consolidation-pipeline.js.map +1 -0
- package/ccw/dist/core/memory-consolidation-prompts.d.ts +27 -0
- package/ccw/dist/core/memory-consolidation-prompts.d.ts.map +1 -0
- package/ccw/dist/core/memory-consolidation-prompts.js +103 -0
- package/ccw/dist/core/memory-consolidation-prompts.js.map +1 -0
- package/ccw/dist/core/memory-embedder-bridge.d.ts +22 -0
- package/ccw/dist/core/memory-embedder-bridge.d.ts.map +1 -1
- package/ccw/dist/core/memory-embedder-bridge.js +85 -0
- package/ccw/dist/core/memory-embedder-bridge.js.map +1 -1
- package/ccw/dist/core/memory-extraction-pipeline.d.ts +244 -0
- package/ccw/dist/core/memory-extraction-pipeline.d.ts.map +1 -0
- package/ccw/dist/core/memory-extraction-pipeline.js +934 -0
- package/ccw/dist/core/memory-extraction-pipeline.js.map +1 -0
- package/ccw/dist/core/memory-extraction-prompts.d.ts +29 -0
- package/ccw/dist/core/memory-extraction-prompts.d.ts.map +1 -0
- package/ccw/dist/core/memory-extraction-prompts.js +99 -0
- package/ccw/dist/core/memory-extraction-prompts.js.map +1 -0
- package/ccw/dist/core/memory-job-scheduler.d.ts +92 -0
- package/ccw/dist/core/memory-job-scheduler.d.ts.map +1 -0
- package/ccw/dist/core/memory-job-scheduler.js +264 -0
- package/ccw/dist/core/memory-job-scheduler.js.map +1 -0
- package/ccw/dist/core/memory-v2-config.d.ts +48 -0
- package/ccw/dist/core/memory-v2-config.d.ts.map +1 -0
- package/ccw/dist/core/memory-v2-config.js +51 -0
- package/ccw/dist/core/memory-v2-config.js.map +1 -0
- package/ccw/dist/core/mode-workflow-map.d.ts +148 -0
- package/ccw/dist/core/mode-workflow-map.d.ts.map +1 -0
- package/ccw/dist/core/mode-workflow-map.js +271 -0
- package/ccw/dist/core/mode-workflow-map.js.map +1 -0
- package/ccw/dist/core/pattern-detector.d.ts +99 -0
- package/ccw/dist/core/pattern-detector.d.ts.map +1 -0
- package/ccw/dist/core/pattern-detector.js +385 -0
- package/ccw/dist/core/pattern-detector.js.map +1 -0
- package/ccw/dist/core/routes/analysis-routes.d.ts +40 -0
- package/ccw/dist/core/routes/analysis-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/analysis-routes.js +172 -0
- package/ccw/dist/core/routes/analysis-routes.js.map +1 -0
- package/ccw/dist/core/routes/audit-routes.d.ts +14 -0
- package/ccw/dist/core/routes/audit-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/audit-routes.js +150 -0
- package/ccw/dist/core/routes/audit-routes.js.map +1 -0
- package/ccw/dist/core/routes/ccw-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/ccw-routes.js +87 -0
- package/ccw/dist/core/routes/ccw-routes.js.map +1 -1
- package/ccw/dist/core/routes/claude-routes.js +13 -13
- package/ccw/dist/core/routes/claude-routes.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.d.ts +6 -2
- package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js +308 -22
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/cli-sessions-routes.d.ts +20 -0
- package/ccw/dist/core/routes/cli-sessions-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/cli-sessions-routes.js +449 -0
- package/ccw/dist/core/routes/cli-sessions-routes.js.map +1 -0
- package/ccw/dist/core/routes/cli-settings-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-settings-routes.js +217 -3
- package/ccw/dist/core/routes/cli-settings-routes.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.js +164 -26
- package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/index-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/index-handlers.js +98 -1
- package/ccw/dist/core/routes/codexlens/index-handlers.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/semantic-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/semantic-handlers.js +308 -0
- package/ccw/dist/core/routes/codexlens/semantic-handlers.js.map +1 -1
- package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/commands-routes.js +399 -1
- package/ccw/dist/core/routes/commands-routes.js.map +1 -1
- package/ccw/dist/core/routes/config-routes.d.ts +22 -0
- package/ccw/dist/core/routes/config-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/config-routes.js +291 -0
- package/ccw/dist/core/routes/config-routes.js.map +1 -0
- package/ccw/dist/core/routes/core-memory-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/core-memory-routes.js +461 -5
- package/ccw/dist/core/routes/core-memory-routes.js.map +1 -1
- package/ccw/dist/core/routes/dashboard-routes.d.ts +15 -0
- package/ccw/dist/core/routes/dashboard-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/dashboard-routes.js +121 -0
- package/ccw/dist/core/routes/dashboard-routes.js.map +1 -0
- package/ccw/dist/core/routes/files-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/files-routes.js +296 -8
- package/ccw/dist/core/routes/files-routes.js.map +1 -1
- package/ccw/dist/core/routes/hooks-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/hooks-routes.js +274 -67
- package/ccw/dist/core/routes/hooks-routes.js.map +1 -1
- package/ccw/dist/core/routes/issue-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/issue-routes.js +399 -27
- package/ccw/dist/core/routes/issue-routes.js.map +1 -1
- package/ccw/dist/core/routes/litellm-api-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/litellm-api-routes.js +74 -135
- package/ccw/dist/core/routes/litellm-api-routes.js.map +1 -1
- package/ccw/dist/core/routes/mcp-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/mcp-routes.js +79 -15
- package/ccw/dist/core/routes/mcp-routes.js.map +1 -1
- package/ccw/dist/core/routes/mcp-templates-db.d.ts.map +1 -1
- package/ccw/dist/core/routes/mcp-templates-db.js +20 -7
- package/ccw/dist/core/routes/mcp-templates-db.js.map +1 -1
- package/ccw/dist/core/routes/memory-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/memory-routes.js +137 -0
- package/ccw/dist/core/routes/memory-routes.js.map +1 -1
- package/ccw/dist/core/routes/notification-routes.d.ts +10 -0
- package/ccw/dist/core/routes/notification-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/notification-routes.js +507 -0
- package/ccw/dist/core/routes/notification-routes.js.map +1 -0
- package/ccw/dist/core/routes/orchestrator-routes.d.ts +282 -0
- package/ccw/dist/core/routes/orchestrator-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/orchestrator-routes.js +1564 -0
- package/ccw/dist/core/routes/orchestrator-routes.js.map +1 -0
- package/ccw/dist/core/routes/provider-routes.d.ts +4 -0
- package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/provider-routes.js +45 -11
- package/ccw/dist/core/routes/provider-routes.js.map +1 -1
- package/ccw/dist/core/routes/queue-routes.d.ts +22 -0
- package/ccw/dist/core/routes/queue-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/queue-routes.js +164 -0
- package/ccw/dist/core/routes/queue-routes.js.map +1 -0
- package/ccw/dist/core/routes/skill-hub-routes.d.ts +77 -0
- package/ccw/dist/core/routes/skill-hub-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/skill-hub-routes.js +988 -0
- package/ccw/dist/core/routes/skill-hub-routes.js.map +1 -0
- package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/skills-routes.js +105 -62
- package/ccw/dist/core/routes/skills-routes.js.map +1 -1
- package/ccw/dist/core/routes/spec-routes.d.ts +7 -0
- package/ccw/dist/core/routes/spec-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/spec-routes.js +266 -0
- package/ccw/dist/core/routes/spec-routes.js.map +1 -0
- package/ccw/dist/core/routes/status-routes.js +4 -4
- package/ccw/dist/core/routes/status-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +537 -6
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/routes/team-routes.d.ts +27 -0
- package/ccw/dist/core/routes/team-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/team-routes.js +557 -0
- package/ccw/dist/core/routes/team-routes.js.map +1 -0
- package/ccw/dist/core/routes/unified-memory-routes.d.ts +16 -0
- package/ccw/dist/core/routes/unified-memory-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/unified-memory-routes.js +135 -0
- package/ccw/dist/core/routes/unified-memory-routes.js.map +1 -0
- package/ccw/dist/core/routes/unsplash-routes.d.ts +4 -0
- package/ccw/dist/core/routes/unsplash-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/unsplash-routes.js +197 -0
- package/ccw/dist/core/routes/unsplash-routes.js.map +1 -0
- package/ccw/dist/core/schemas/issue-schema.d.ts +115 -0
- package/ccw/dist/core/schemas/issue-schema.d.ts.map +1 -0
- package/ccw/dist/core/schemas/issue-schema.js +117 -0
- package/ccw/dist/core/schemas/issue-schema.js.map +1 -0
- package/ccw/dist/core/server.d.ts +1 -0
- package/ccw/dist/core/server.d.ts.map +1 -1
- package/ccw/dist/core/server.js +223 -218
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/core/services/checkpoint-service.d.ts +215 -0
- package/ccw/dist/core/services/checkpoint-service.d.ts.map +1 -0
- package/ccw/dist/core/services/checkpoint-service.js +376 -0
- package/ccw/dist/core/services/checkpoint-service.js.map +1 -0
- package/ccw/dist/core/services/cli-instruction-assembler.d.ts +10 -0
- package/ccw/dist/core/services/cli-instruction-assembler.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-instruction-assembler.js +28 -0
- package/ccw/dist/core/services/cli-instruction-assembler.js.map +1 -0
- package/ccw/dist/core/services/cli-launch-registry.d.ts +9 -0
- package/ccw/dist/core/services/cli-launch-registry.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-launch-registry.js +40 -0
- package/ccw/dist/core/services/cli-launch-registry.js.map +1 -0
- package/ccw/dist/core/services/cli-session-audit.d.ts +15 -0
- package/ccw/dist/core/services/cli-session-audit.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-audit.js +18 -0
- package/ccw/dist/core/services/cli-session-audit.js.map +1 -0
- package/ccw/dist/core/services/cli-session-command-builder.d.ts +20 -0
- package/ccw/dist/core/services/cli-session-command-builder.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-command-builder.js +66 -0
- package/ccw/dist/core/services/cli-session-command-builder.js.map +1 -0
- package/ccw/dist/core/services/cli-session-manager.d.ts +84 -0
- package/ccw/dist/core/services/cli-session-manager.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-manager.js +538 -0
- package/ccw/dist/core/services/cli-session-manager.js.map +1 -0
- package/ccw/dist/core/services/cli-session-mux.d.ts +18 -0
- package/ccw/dist/core/services/cli-session-mux.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-mux.js +18 -0
- package/ccw/dist/core/services/cli-session-mux.js.map +1 -0
- package/ccw/dist/core/services/cli-session-policy.d.ts +15 -0
- package/ccw/dist/core/services/cli-session-policy.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-policy.js +40 -0
- package/ccw/dist/core/services/cli-session-policy.js.map +1 -0
- package/ccw/dist/core/services/cli-session-share.d.ts +27 -0
- package/ccw/dist/core/services/cli-session-share.d.ts.map +1 -0
- package/ccw/dist/core/services/cli-session-share.js +85 -0
- package/ccw/dist/core/services/cli-session-share.js.map +1 -0
- package/ccw/dist/core/services/config-backup.d.ts +69 -0
- package/ccw/dist/core/services/config-backup.d.ts.map +1 -0
- package/ccw/dist/core/services/config-backup.js +171 -0
- package/ccw/dist/core/services/config-backup.js.map +1 -0
- package/ccw/dist/core/services/config-sync.d.ts +73 -0
- package/ccw/dist/core/services/config-sync.d.ts.map +1 -0
- package/ccw/dist/core/services/config-sync.js +235 -0
- package/ccw/dist/core/services/config-sync.js.map +1 -0
- package/ccw/dist/core/services/flow-executor.d.ts +204 -0
- package/ccw/dist/core/services/flow-executor.d.ts.map +1 -0
- package/ccw/dist/core/services/flow-executor.js +775 -0
- package/ccw/dist/core/services/flow-executor.js.map +1 -0
- package/ccw/dist/core/services/hook-context-service.d.ts +139 -0
- package/ccw/dist/core/services/hook-context-service.d.ts.map +1 -0
- package/ccw/dist/core/services/hook-context-service.js +248 -0
- package/ccw/dist/core/services/hook-context-service.js.map +1 -0
- package/ccw/dist/core/services/index.d.ts +22 -0
- package/ccw/dist/core/services/index.d.ts.map +1 -0
- package/ccw/dist/core/services/index.js +22 -0
- package/ccw/dist/core/services/index.js.map +1 -0
- package/ccw/dist/core/services/issue-service.d.ts +54 -0
- package/ccw/dist/core/services/issue-service.d.ts.map +1 -0
- package/ccw/dist/core/services/issue-service.js +107 -0
- package/ccw/dist/core/services/issue-service.js.map +1 -0
- package/ccw/dist/core/services/mode-registry-service.d.ts +254 -0
- package/ccw/dist/core/services/mode-registry-service.d.ts.map +1 -0
- package/ccw/dist/core/services/mode-registry-service.js +587 -0
- package/ccw/dist/core/services/mode-registry-service.js.map +1 -0
- package/ccw/dist/core/services/pending-question-service.d.ts +51 -0
- package/ccw/dist/core/services/pending-question-service.d.ts.map +1 -0
- package/ccw/dist/core/services/pending-question-service.js +201 -0
- package/ccw/dist/core/services/pending-question-service.js.map +1 -0
- package/ccw/dist/core/services/queue-scheduler-service.d.ts +136 -0
- package/ccw/dist/core/services/queue-scheduler-service.d.ts.map +1 -0
- package/ccw/dist/core/services/queue-scheduler-service.js +587 -0
- package/ccw/dist/core/services/queue-scheduler-service.js.map +1 -0
- package/ccw/dist/core/services/rate-limiter.d.ts +20 -0
- package/ccw/dist/core/services/rate-limiter.d.ts.map +1 -0
- package/ccw/dist/core/services/rate-limiter.js +33 -0
- package/ccw/dist/core/services/rate-limiter.js.map +1 -0
- package/ccw/dist/core/services/remote-notification-service.d.ts +132 -0
- package/ccw/dist/core/services/remote-notification-service.d.ts.map +1 -0
- package/ccw/dist/core/services/remote-notification-service.js +953 -0
- package/ccw/dist/core/services/remote-notification-service.js.map +1 -0
- package/ccw/dist/core/services/session-end-service.d.ts +155 -0
- package/ccw/dist/core/services/session-end-service.d.ts.map +1 -0
- package/ccw/dist/core/services/session-end-service.js +302 -0
- package/ccw/dist/core/services/session-end-service.js.map +1 -0
- package/ccw/dist/core/services/session-state-service.d.ts +148 -0
- package/ccw/dist/core/services/session-state-service.d.ts.map +1 -0
- package/ccw/dist/core/services/session-state-service.js +259 -0
- package/ccw/dist/core/services/session-state-service.js.map +1 -0
- package/ccw/dist/core/services/version-checker.d.ts +50 -0
- package/ccw/dist/core/services/version-checker.d.ts.map +1 -0
- package/ccw/dist/core/services/version-checker.js +141 -0
- package/ccw/dist/core/services/version-checker.js.map +1 -0
- package/ccw/dist/core/session-clustering-service.d.ts +43 -2
- package/ccw/dist/core/session-clustering-service.d.ts.map +1 -1
- package/ccw/dist/core/session-clustering-service.js +210 -6
- package/ccw/dist/core/session-clustering-service.js.map +1 -1
- package/ccw/dist/core/types/issue.d.ts +103 -0
- package/ccw/dist/core/types/issue.d.ts.map +1 -0
- package/ccw/dist/core/types/issue.js +6 -0
- package/ccw/dist/core/types/issue.js.map +1 -0
- package/ccw/dist/core/unified-context-builder.d.ts +88 -0
- package/ccw/dist/core/unified-context-builder.d.ts.map +1 -0
- package/ccw/dist/core/unified-context-builder.js +379 -0
- package/ccw/dist/core/unified-context-builder.js.map +1 -0
- package/ccw/dist/core/unified-memory-service.d.ts +142 -0
- package/ccw/dist/core/unified-memory-service.d.ts.map +1 -0
- package/ccw/dist/core/unified-memory-service.js +348 -0
- package/ccw/dist/core/unified-memory-service.js.map +1 -0
- package/ccw/dist/core/unified-vector-index.d.ts +171 -0
- package/ccw/dist/core/unified-vector-index.d.ts.map +1 -0
- package/ccw/dist/core/unified-vector-index.js +332 -0
- package/ccw/dist/core/unified-vector-index.js.map +1 -0
- package/ccw/dist/core/websocket.d.ts +195 -0
- package/ccw/dist/core/websocket.d.ts.map +1 -1
- package/ccw/dist/core/websocket.js +156 -25
- package/ccw/dist/core/websocket.js.map +1 -1
- package/ccw/dist/index.d.ts +0 -1
- package/ccw/dist/index.d.ts.map +1 -1
- package/ccw/dist/index.js +0 -1
- package/ccw/dist/index.js.map +1 -1
- package/ccw/dist/mcp-server/index.js +16 -8
- package/ccw/dist/mcp-server/index.js.map +1 -1
- package/ccw/dist/tools/ask-question.d.ts +43 -0
- package/ccw/dist/tools/ask-question.d.ts.map +1 -0
- package/ccw/dist/tools/ask-question.js +1061 -0
- package/ccw/dist/tools/ask-question.js.map +1 -0
- package/ccw/dist/tools/claude-cli-tools.d.ts +18 -4
- package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.js +44 -37
- package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
- package/ccw/dist/tools/claude-session-parser.d.ts +116 -0
- package/ccw/dist/tools/claude-session-parser.d.ts.map +1 -0
- package/ccw/dist/tools/claude-session-parser.js +364 -0
- package/ccw/dist/tools/claude-session-parser.js.map +1 -0
- package/ccw/dist/tools/cli-config-manager.d.ts +3 -0
- package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
- package/ccw/dist/tools/cli-config-manager.js +4 -1
- package/ccw/dist/tools/cli-config-manager.js.map +1 -1
- package/ccw/dist/tools/cli-executor-core.d.ts +24 -0
- package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-core.js +103 -8
- package/ccw/dist/tools/cli-executor-core.js.map +1 -1
- package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-state.js +4 -4
- package/ccw/dist/tools/cli-executor-state.js.map +1 -1
- package/ccw/dist/tools/cli-executor-utils.d.ts +2 -0
- package/ccw/dist/tools/cli-executor-utils.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-utils.js +14 -5
- package/ccw/dist/tools/cli-executor-utils.js.map +1 -1
- package/ccw/dist/tools/cli-history-store.d.ts +11 -6
- package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
- package/ccw/dist/tools/cli-history-store.js +134 -17
- package/ccw/dist/tools/cli-history-store.js.map +1 -1
- package/ccw/dist/tools/cli-output-converter.d.ts +7 -0
- package/ccw/dist/tools/cli-output-converter.d.ts.map +1 -1
- package/ccw/dist/tools/cli-output-converter.js +166 -16
- package/ccw/dist/tools/cli-output-converter.js.map +1 -1
- package/ccw/dist/tools/codex-lens.d.ts +13 -0
- package/ccw/dist/tools/codex-lens.d.ts.map +1 -1
- package/ccw/dist/tools/codex-lens.js +200 -185
- package/ccw/dist/tools/codex-lens.js.map +1 -1
- package/ccw/dist/tools/command-registry.test.js +727 -0
- package/ccw/dist/tools/core-memory.d.ts +35 -1
- package/ccw/dist/tools/core-memory.d.ts.map +1 -1
- package/ccw/dist/tools/core-memory.js +195 -5
- package/ccw/dist/tools/core-memory.js.map +1 -1
- package/ccw/dist/tools/edit-file.d.ts.map +1 -1
- package/ccw/dist/tools/edit-file.js +69 -31
- package/ccw/dist/tools/edit-file.js.map +1 -1
- package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
- package/ccw/dist/tools/generate-module-docs.js +9 -14
- package/ccw/dist/tools/generate-module-docs.js.map +1 -1
- package/ccw/dist/tools/index.d.ts.map +1 -1
- package/ccw/dist/tools/index.js +8 -2
- package/ccw/dist/tools/index.js.map +1 -1
- package/ccw/dist/tools/native-session-discovery.d.ts +19 -2
- package/ccw/dist/tools/native-session-discovery.d.ts.map +1 -1
- package/ccw/dist/tools/native-session-discovery.js +191 -20
- package/ccw/dist/tools/native-session-discovery.js.map +1 -1
- package/ccw/dist/tools/opencode-session-parser.d.ts +120 -0
- package/ccw/dist/tools/opencode-session-parser.d.ts.map +1 -0
- package/ccw/dist/tools/opencode-session-parser.js +330 -0
- package/ccw/dist/tools/opencode-session-parser.js.map +1 -0
- package/ccw/dist/tools/read-file.d.ts +5 -24
- package/ccw/dist/tools/read-file.d.ts.map +1 -1
- package/ccw/dist/tools/read-file.js +44 -282
- package/ccw/dist/tools/read-file.js.map +1 -1
- package/ccw/dist/tools/read-many-files.d.ts +15 -0
- package/ccw/dist/tools/read-many-files.d.ts.map +1 -0
- package/ccw/dist/tools/read-many-files.js +166 -0
- package/ccw/dist/tools/read-many-files.js.map +1 -0
- package/ccw/dist/tools/read-outline.d.ts +13 -0
- package/ccw/dist/tools/read-outline.d.ts.map +1 -0
- package/ccw/dist/tools/read-outline.js +86 -0
- package/ccw/dist/tools/read-outline.js.map +1 -0
- package/ccw/dist/tools/resume-strategy.d.ts.map +1 -1
- package/ccw/dist/tools/resume-strategy.js +16 -0
- package/ccw/dist/tools/resume-strategy.js.map +1 -1
- package/ccw/dist/tools/session-content-parser.d.ts +3 -3
- package/ccw/dist/tools/session-content-parser.d.ts.map +1 -1
- package/ccw/dist/tools/session-content-parser.js +40 -10
- package/ccw/dist/tools/session-content-parser.js.map +1 -1
- package/ccw/dist/tools/spec-index-builder.d.ts +140 -0
- package/ccw/dist/tools/spec-index-builder.d.ts.map +1 -0
- package/ccw/dist/tools/spec-index-builder.js +340 -0
- package/ccw/dist/tools/spec-index-builder.js.map +1 -0
- package/ccw/dist/tools/spec-init.d.ts +46 -0
- package/ccw/dist/tools/spec-init.d.ts.map +1 -0
- package/ccw/dist/tools/spec-init.js +226 -0
- package/ccw/dist/tools/spec-init.js.map +1 -0
- package/ccw/dist/tools/spec-keyword-extractor.d.ts +52 -0
- package/ccw/dist/tools/spec-keyword-extractor.d.ts.map +1 -0
- package/ccw/dist/tools/spec-keyword-extractor.js +183 -0
- package/ccw/dist/tools/spec-keyword-extractor.js.map +1 -0
- package/ccw/dist/tools/spec-loader.d.ts +119 -0
- package/ccw/dist/tools/spec-loader.d.ts.map +1 -0
- package/ccw/dist/tools/spec-loader.js +326 -0
- package/ccw/dist/tools/spec-loader.js.map +1 -0
- package/ccw/dist/tools/team-msg.d.ts +61 -0
- package/ccw/dist/tools/team-msg.d.ts.map +1 -0
- package/ccw/dist/tools/team-msg.js +331 -0
- package/ccw/dist/tools/team-msg.js.map +1 -0
- package/ccw/dist/tools/template-discovery.d.ts +1 -1
- package/ccw/dist/tools/template-discovery.js +2 -2
- package/ccw/dist/tools/template-discovery.js.map +1 -1
- package/ccw/dist/tools/ui-generate-preview.js +7 -7
- package/ccw/dist/tools/ui-generate-preview.js.map +1 -1
- package/ccw/dist/tools/update-module-claude.d.ts.map +1 -1
- package/ccw/dist/tools/update-module-claude.js +18 -32
- package/ccw/dist/tools/update-module-claude.js.map +1 -1
- package/ccw/dist/types/cli-settings.d.ts +139 -9
- package/ccw/dist/types/cli-settings.d.ts.map +1 -1
- package/ccw/dist/types/cli-settings.js +67 -13
- package/ccw/dist/types/cli-settings.js.map +1 -1
- package/ccw/dist/types/queue-types.d.ts +156 -0
- package/ccw/dist/types/queue-types.d.ts.map +1 -0
- package/ccw/dist/types/queue-types.js +6 -0
- package/ccw/dist/types/queue-types.js.map +1 -0
- package/ccw/dist/types/remote-notification.d.ts +209 -0
- package/ccw/dist/types/remote-notification.d.ts.map +1 -0
- package/ccw/dist/types/remote-notification.js +86 -0
- package/ccw/dist/types/remote-notification.js.map +1 -0
- package/ccw/dist/types/util.d.ts +28 -0
- package/ccw/dist/types/util.d.ts.map +1 -0
- package/ccw/dist/types/util.js +35 -0
- package/ccw/dist/types/util.js.map +1 -0
- package/ccw/dist/utils/dashboard-launcher.d.ts +36 -0
- package/ccw/dist/utils/dashboard-launcher.d.ts.map +1 -0
- package/ccw/dist/utils/dashboard-launcher.js +166 -0
- package/ccw/dist/utils/dashboard-launcher.js.map +1 -0
- package/ccw/dist/utils/db-loader.d.ts +15 -0
- package/ccw/dist/utils/db-loader.d.ts.map +1 -0
- package/ccw/dist/utils/db-loader.js +51 -0
- package/ccw/dist/utils/db-loader.js.map +1 -0
- package/ccw/dist/utils/file-reader.d.ts +73 -0
- package/ccw/dist/utils/file-reader.d.ts.map +1 -0
- package/ccw/dist/utils/file-reader.js +201 -0
- package/ccw/dist/utils/file-reader.js.map +1 -0
- package/ccw/dist/utils/outline-parser.d.ts +28 -0
- package/ccw/dist/utils/outline-parser.d.ts.map +1 -0
- package/ccw/dist/utils/outline-parser.js +273 -0
- package/ccw/dist/utils/outline-parser.js.map +1 -0
- package/ccw/dist/utils/outline-queries.d.ts +15 -0
- package/ccw/dist/utils/outline-queries.d.ts.map +1 -0
- package/ccw/dist/utils/outline-queries.js +141 -0
- package/ccw/dist/utils/outline-queries.js.map +1 -0
- package/ccw/dist/utils/package-discovery.d.ts +69 -0
- package/ccw/dist/utils/package-discovery.d.ts.map +1 -0
- package/ccw/dist/utils/package-discovery.js +258 -0
- package/ccw/dist/utils/package-discovery.js.map +1 -0
- package/ccw/dist/utils/path-validator.d.ts +3 -3
- package/ccw/dist/utils/path-validator.d.ts.map +1 -1
- package/ccw/dist/utils/path-validator.js +12 -12
- package/ccw/dist/utils/path-validator.js.map +1 -1
- package/ccw/dist/utils/react-frontend.d.ts +19 -0
- package/ccw/dist/utils/react-frontend.d.ts.map +1 -0
- package/ccw/dist/utils/react-frontend.js +203 -0
- package/ccw/dist/utils/react-frontend.js.map +1 -0
- package/ccw/dist/utils/secret-redactor.d.ts +23 -0
- package/ccw/dist/utils/secret-redactor.d.ts.map +1 -0
- package/ccw/dist/utils/secret-redactor.js +48 -0
- package/ccw/dist/utils/secret-redactor.js.map +1 -0
- package/ccw/dist/utils/security-validation.d.ts +48 -0
- package/ccw/dist/utils/security-validation.d.ts.map +1 -0
- package/ccw/dist/utils/security-validation.js +117 -0
- package/ccw/dist/utils/security-validation.js.map +1 -0
- package/ccw/dist/utils/uv-manager.d.ts +3 -2
- package/ccw/dist/utils/uv-manager.d.ts.map +1 -1
- package/ccw/dist/utils/uv-manager.js +7 -4
- package/ccw/dist/utils/uv-manager.js.map +1 -1
- package/ccw/scripts/prepublish-clean.mjs +32 -0
- package/ccw/scripts/unified_memory_embedder.py +473 -0
- package/codex-lens/pyproject.toml +37 -46
- package/codex-lens/src/codexlens/api/__init__.py +5 -0
- package/codex-lens/src/codexlens/api/lsp_lifecycle.py +124 -0
- package/codex-lens/src/codexlens/api/semantic.py +33 -22
- package/codex-lens/src/codexlens/cli/commands.py +392 -552
- package/codex-lens/src/codexlens/cli/embedding_manager.py +558 -367
- package/codex-lens/src/codexlens/config.py +525 -129
- package/codex-lens/src/codexlens/env_config.py +21 -1
- package/codex-lens/src/codexlens/lsp/keepalive_bridge.py +135 -0
- package/codex-lens/src/codexlens/lsp/lsp_bridge.py +33 -10
- package/codex-lens/src/codexlens/lsp/lsp_graph_builder.py +12 -4
- package/codex-lens/src/codexlens/lsp/standalone_manager.py +114 -21
- package/codex-lens/src/codexlens/parsers/__init__.py +8 -2
- package/codex-lens/src/codexlens/parsers/astgrep_binding.py +320 -0
- package/codex-lens/src/codexlens/parsers/astgrep_js_ts_processor.py +306 -0
- package/codex-lens/src/codexlens/parsers/astgrep_processor.py +1033 -0
- package/codex-lens/src/codexlens/parsers/factory.py +10 -2
- package/codex-lens/src/codexlens/parsers/patterns/__init__.py +5 -0
- package/codex-lens/src/codexlens/parsers/patterns/javascript/__init__.py +92 -0
- package/codex-lens/src/codexlens/parsers/patterns/python/__init__.py +204 -0
- package/codex-lens/src/codexlens/parsers/patterns/python/call.yaml +87 -0
- package/codex-lens/src/codexlens/parsers/patterns/python/imports.yaml +82 -0
- package/codex-lens/src/codexlens/parsers/patterns/python/inherits.yaml +42 -0
- package/codex-lens/src/codexlens/parsers/patterns/typescript/__init__.py +73 -0
- package/codex-lens/src/codexlens/parsers/treesitter_parser.py +135 -9
- package/codex-lens/src/codexlens/search/__init__.py +2 -0
- package/codex-lens/src/codexlens/search/binary_searcher.py +67 -35
- package/codex-lens/src/codexlens/search/chain_search.py +825 -251
- package/codex-lens/src/codexlens/search/clustering/hdbscan_strategy.py +24 -2
- package/codex-lens/src/codexlens/search/global_graph_expander.py +250 -0
- package/codex-lens/src/codexlens/search/hybrid_search.py +11 -203
- package/codex-lens/src/codexlens/search/ranking.py +8 -35
- package/codex-lens/src/codexlens/semantic/reranker/api_reranker.py +41 -2
- package/codex-lens/src/codexlens/storage/global_index.py +225 -5
- package/codex-lens/src/codexlens/storage/index_tree.py +46 -0
- package/codex-lens/src/codexlens/storage/path_mapper.py +8 -8
- package/codex-lens/src/codexlens/watcher/incremental_indexer.py +55 -1
- package/package.json +22 -12
- package/.claude/CLAUDE.md +0 -44
- package/.claude/commands/ccw-debug.md +0 -832
- package/.claude/commands/codex-coordinator.md +0 -513
- package/.claude/commands/memory/compact.md +0 -383
- package/.claude/commands/memory/docs-full-cli.md +0 -471
- package/.claude/commands/memory/docs-related-cli.md +0 -386
- package/.claude/commands/memory/load.md +0 -240
- package/.claude/commands/memory/tips.md +0 -332
- package/.claude/commands/memory/update-full.md +0 -332
- package/.claude/commands/memory/update-related.md +0 -332
- package/.claude/commands/view.md +0 -367
- package/.claude/commands/workflow/brainstorm/artifacts.md +0 -457
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +0 -433
- package/.claude/commands/workflow/brainstorm/role-analysis.md +0 -705
- package/.claude/commands/workflow/brainstorm/synthesis.md +0 -402
- package/.claude/commands/workflow/execute.md +0 -548
- package/.claude/commands/workflow/lite-execute.md +0 -743
- package/.claude/commands/workflow/lite-fix.md +0 -809
- package/.claude/commands/workflow/lite-lite-lite.md +0 -465
- package/.claude/commands/workflow/lite-plan.md +0 -698
- package/.claude/commands/workflow/multi-cli-plan.md +0 -572
- package/.claude/commands/workflow/plan-verify.md +0 -362
- package/.claude/commands/workflow/plan.md +0 -704
- package/.claude/commands/workflow/replan.md +0 -648
- package/.claude/commands/workflow/review-cycle-fix.md +0 -608
- package/.claude/commands/workflow/review-module-cycle.md +0 -771
- package/.claude/commands/workflow/review-session-cycle.md +0 -782
- package/.claude/commands/workflow/review.md +0 -322
- package/.claude/commands/workflow/tdd-plan.md +0 -630
- package/.claude/commands/workflow/tdd-verify.md +0 -585
- package/.claude/commands/workflow/test-cycle-execute.md +0 -504
- package/.claude/commands/workflow/test-fix-gen.md +0 -699
- package/.claude/commands/workflow/test-gen.md +0 -529
- package/.claude/commands/workflow/tools/conflict-resolution.md +0 -604
- package/.claude/commands/workflow/tools/context-gather.md +0 -404
- package/.claude/commands/workflow/tools/task-generate-agent.md +0 -678
- package/.claude/commands/workflow/tools/task-generate-tdd.md +0 -749
- package/.claude/commands/workflow/tools/tdd-coverage-analysis.md +0 -309
- package/.claude/commands/workflow/tools/test-concept-enhanced.md +0 -164
- package/.claude/commands/workflow/tools/test-context-gather.md +0 -235
- package/.claude/commands/workflow/tools/test-task-generate.md +0 -255
- package/.claude/skills/ccw-loop/SKILL.md +0 -259
- package/.claude/skills/ccw-loop/phases/actions/action-complete.md +0 -320
- package/.claude/skills/ccw-loop/phases/actions/action-debug-with-file.md +0 -485
- package/.claude/skills/ccw-loop/phases/actions/action-develop-with-file.md +0 -365
- package/.claude/skills/ccw-loop/phases/actions/action-init.md +0 -200
- package/.claude/skills/ccw-loop/phases/actions/action-menu.md +0 -192
- package/.claude/skills/ccw-loop/phases/actions/action-validate-with-file.md +0 -307
- package/.claude/skills/ccw-loop/phases/orchestrator.md +0 -486
- package/.claude/skills/ccw-loop/phases/state-schema.md +0 -474
- package/.claude/skills/ccw-loop/specs/action-catalog.md +0 -300
- package/.claude/skills/ccw-loop/specs/loop-requirements.md +0 -192
- package/.claude/skills/ccw-loop/templates/progress-template.md +0 -175
- package/.claude/skills/ccw-loop/templates/understanding-template.md +0 -303
- package/.claude/skills/ccw-loop/templates/validation-template.md +0 -258
- package/.claude/skills/copyright-docs/SKILL.md +0 -132
- package/.claude/skills/copyright-docs/phases/01-metadata-collection.md +0 -78
- package/.claude/skills/copyright-docs/phases/01.5-project-exploration.md +0 -150
- package/.claude/skills/copyright-docs/phases/02-deep-analysis.md +0 -664
- package/.claude/skills/copyright-docs/phases/02.5-consolidation.md +0 -192
- package/.claude/skills/copyright-docs/phases/04-document-assembly.md +0 -261
- package/.claude/skills/copyright-docs/phases/05-compliance-refinement.md +0 -192
- package/.claude/skills/copyright-docs/specs/cpcc-requirements.md +0 -121
- package/.claude/skills/copyright-docs/templates/agent-base.md +0 -200
- package/.claude/skills/flow-coordinator/SKILL.md +0 -394
- package/.claude/skills/flow-coordinator/templates/analyze.json +0 -16
- package/.claude/skills/flow-coordinator/templates/brainstorm-to-issue.json +0 -36
- package/.claude/skills/flow-coordinator/templates/brainstorm.json +0 -16
- package/.claude/skills/flow-coordinator/templates/bugfix-hotfix.json +0 -16
- package/.claude/skills/flow-coordinator/templates/bugfix.json +0 -47
- package/.claude/skills/flow-coordinator/templates/coupled.json +0 -71
- package/.claude/skills/flow-coordinator/templates/debug.json +0 -16
- package/.claude/skills/flow-coordinator/templates/docs.json +0 -27
- package/.claude/skills/flow-coordinator/templates/full.json +0 -61
- package/.claude/skills/flow-coordinator/templates/issue.json +0 -43
- package/.claude/skills/flow-coordinator/templates/lite-lite-lite.json +0 -16
- package/.claude/skills/flow-coordinator/templates/multi-cli-plan.json +0 -47
- package/.claude/skills/flow-coordinator/templates/rapid-to-issue.json +0 -46
- package/.claude/skills/flow-coordinator/templates/rapid.json +0 -47
- package/.claude/skills/flow-coordinator/templates/review.json +0 -43
- package/.claude/skills/flow-coordinator/templates/tdd.json +0 -34
- package/.claude/skills/flow-coordinator/templates/test-fix.json +0 -26
- package/.claude/skills/lite-skill-generator/SKILL.md +0 -650
- package/.claude/skills/lite-skill-generator/templates/simple-skill.md +0 -68
- package/.claude/skills/lite-skill-generator/templates/style-guide.md +0 -64
- package/.claude/skills/project-analyze/SKILL.md +0 -162
- package/.claude/skills/project-analyze/phases/01-requirements-discovery.md +0 -79
- package/.claude/skills/project-analyze/phases/02-project-exploration.md +0 -176
- package/.claude/skills/project-analyze/phases/03-deep-analysis.md +0 -854
- package/.claude/skills/project-analyze/phases/03.5-consolidation.md +0 -233
- package/.claude/skills/project-analyze/phases/04-report-generation.md +0 -217
- package/.claude/skills/project-analyze/phases/05-iterative-refinement.md +0 -124
- package/.claude/skills/project-analyze/specs/quality-standards.md +0 -115
- package/.claude/skills/project-analyze/specs/writing-style.md +0 -152
- package/.claude/skills/prompt-enhancer/SKILL.md +0 -124
- package/.claude/skills/software-manual/SKILL.md +0 -184
- package/.claude/skills/software-manual/phases/01-requirements-discovery.md +0 -162
- package/.claude/skills/software-manual/phases/02-project-exploration.md +0 -101
- package/.claude/skills/software-manual/phases/02.5-api-extraction.md +0 -161
- package/.claude/skills/software-manual/phases/03-parallel-analysis.md +0 -183
- package/.claude/skills/software-manual/phases/03.5-consolidation.md +0 -82
- package/.claude/skills/software-manual/phases/04-screenshot-capture.md +0 -89
- package/.claude/skills/software-manual/phases/05-html-assembly.md +0 -132
- package/.claude/skills/software-manual/phases/06-iterative-refinement.md +0 -259
- package/.claude/skills/software-manual/scripts/api-extractor.md +0 -245
- package/.claude/skills/software-manual/scripts/assemble_docsify.py +0 -584
- package/.claude/skills/software-manual/scripts/bundle-libraries.md +0 -85
- package/.claude/skills/software-manual/scripts/extract_apis.py +0 -270
- package/.claude/skills/software-manual/scripts/screenshot-helper.md +0 -447
- package/.claude/skills/software-manual/scripts/swagger-runner.md +0 -419
- package/.claude/skills/software-manual/scripts/typedoc-runner.md +0 -357
- package/.claude/skills/software-manual/specs/html-template.md +0 -325
- package/.claude/skills/software-manual/specs/quality-standards.md +0 -253
- package/.claude/skills/software-manual/specs/writing-style.md +0 -298
- package/.claude/skills/software-manual/templates/css/docsify-base.css +0 -984
- package/.claude/skills/software-manual/templates/css/wiki-base.css +0 -788
- package/.claude/skills/software-manual/templates/css/wiki-dark.css +0 -278
- package/.claude/skills/software-manual/templates/docsify-shell.html +0 -466
- package/.claude/skills/software-manual/templates/tiddlywiki-shell.html +0 -327
- package/.claude/skills/text-formatter/SKILL.md +0 -196
- package/.claude/skills/text-formatter/phases/01-input-collection.md +0 -111
- package/.claude/skills/text-formatter/phases/02-content-analysis.md +0 -248
- package/.claude/skills/text-formatter/phases/03-format-transform.md +0 -245
- package/.claude/skills/text-formatter/phases/04-output-preview.md +0 -183
- package/.claude/skills/text-formatter/specs/callout-types.md +0 -293
- package/.claude/skills/text-formatter/specs/element-mapping.md +0 -226
- package/.claude/skills/text-formatter/specs/format-rules.md +0 -273
- package/.claude/skills/text-formatter/templates/bbcode-template.md +0 -350
- package/.claude/workflows/_template-compare-matrix.html +0 -692
- package/.claude/workflows/chinese-response.md +0 -25
- package/.claude/workflows/cli-templates/fix-plan-template.json +0 -75
- package/.claude/workflows/cli-templates/fix-progress-template.json +0 -48
- package/.claude/workflows/cli-templates/memory/style-skill-memory/skill-md-template.md +0 -299
- package/.claude/workflows/cli-templates/planning-roles/data-architect.md +0 -120
- package/.claude/workflows/cli-templates/planning-roles/product-manager.md +0 -119
- package/.claude/workflows/cli-templates/planning-roles/product-owner.md +0 -261
- package/.claude/workflows/cli-templates/planning-roles/scrum-master.md +0 -186
- package/.claude/workflows/cli-templates/planning-roles/subject-matter-expert.md +0 -281
- package/.claude/workflows/cli-templates/planning-roles/synthesis-role.md +0 -414
- package/.claude/workflows/cli-templates/planning-roles/system-architect.md +0 -106
- package/.claude/workflows/cli-templates/planning-roles/test-strategist.md +0 -124
- package/.claude/workflows/cli-templates/planning-roles/ui-designer.md +0 -379
- package/.claude/workflows/cli-templates/planning-roles/ux-expert.md +0 -240
- package/.claude/workflows/cli-templates/prompts/analysis-analyze-code-patterns.txt +0 -37
- package/.claude/workflows/cli-templates/prompts/analysis-analyze-performance.txt +0 -29
- package/.claude/workflows/cli-templates/prompts/analysis-analyze-technical-document.txt +0 -33
- package/.claude/workflows/cli-templates/prompts/analysis-assess-security-risks.txt +0 -29
- package/.claude/workflows/cli-templates/prompts/analysis-diagnose-bug-root-cause.txt +0 -127
- package/.claude/workflows/cli-templates/prompts/analysis-review-architecture.txt +0 -29
- package/.claude/workflows/cli-templates/prompts/analysis-review-code-quality.txt +0 -28
- package/.claude/workflows/cli-templates/prompts/analysis-review-quality-standards.txt +0 -29
- package/.claude/workflows/cli-templates/prompts/analysis-trace-code-execution.txt +0 -115
- package/.claude/workflows/cli-templates/prompts/development-debug-runtime-issues.txt +0 -55
- package/.claude/workflows/cli-templates/prompts/development-generate-tests.txt +0 -70
- package/.claude/workflows/cli-templates/prompts/development-implement-component-ui.txt +0 -55
- package/.claude/workflows/cli-templates/prompts/development-implement-feature.txt +0 -58
- package/.claude/workflows/cli-templates/prompts/development-refactor-codebase.txt +0 -55
- package/.claude/workflows/cli-templates/prompts/documentation-api.txt +0 -15
- package/.claude/workflows/cli-templates/prompts/documentation-folder-navigation.txt +0 -27
- package/.claude/workflows/cli-templates/prompts/documentation-module-readme.txt +0 -49
- package/.claude/workflows/cli-templates/prompts/documentation-project-architecture.txt +0 -41
- package/.claude/workflows/cli-templates/prompts/documentation-project-examples.txt +0 -35
- package/.claude/workflows/cli-templates/prompts/documentation-project-readme.txt +0 -35
- package/.claude/workflows/cli-templates/prompts/documentation-swagger-api.txt +0 -266
- package/.claude/workflows/cli-templates/prompts/memory-document-module-structure.txt +0 -165
- package/.claude/workflows/cli-templates/prompts/planning-breakdown-task-steps.txt +0 -30
- package/.claude/workflows/cli-templates/prompts/planning-design-component-spec.txt +0 -28
- package/.claude/workflows/cli-templates/prompts/planning-evaluate-concept-feasibility.txt +0 -127
- package/.claude/workflows/cli-templates/prompts/planning-plan-architecture-design.txt +0 -109
- package/.claude/workflows/cli-templates/prompts/planning-plan-migration-strategy.txt +0 -30
- package/.claude/workflows/cli-templates/prompts/rules-rule-api.txt +0 -122
- package/.claude/workflows/cli-templates/prompts/rules-rule-components.txt +0 -122
- package/.claude/workflows/cli-templates/prompts/rules-rule-config.txt +0 -89
- package/.claude/workflows/cli-templates/prompts/rules-rule-core.txt +0 -60
- package/.claude/workflows/cli-templates/prompts/rules-rule-patterns.txt +0 -70
- package/.claude/workflows/cli-templates/prompts/rules-rule-testing.txt +0 -81
- package/.claude/workflows/cli-templates/prompts/rules-tech-rules-agent-prompt.txt +0 -89
- package/.claude/workflows/cli-templates/prompts/tech-tech-module-format.txt +0 -359
- package/.claude/workflows/cli-templates/prompts/tech-tech-skill-index.txt +0 -185
- package/.claude/workflows/cli-templates/prompts/test-test-concept-analysis.txt +0 -179
- package/.claude/workflows/cli-templates/prompts/universal-universal-creative-style.txt +0 -95
- package/.claude/workflows/cli-templates/prompts/universal-universal-rigorous-style.txt +0 -92
- package/.claude/workflows/cli-templates/prompts/verification-codex-technical.txt +0 -28
- package/.claude/workflows/cli-templates/prompts/verification-cross-validation.txt +0 -28
- package/.claude/workflows/cli-templates/prompts/verification-gemini-strategic.txt +0 -27
- package/.claude/workflows/cli-templates/prompts/workflow-analysis-results-structure.txt +0 -224
- package/.claude/workflows/cli-templates/prompts/workflow-codex-feasibility-validation.txt +0 -176
- package/.claude/workflows/cli-templates/prompts/workflow-gemini-solution-design.txt +0 -131
- package/.claude/workflows/cli-templates/prompts/workflow-impl-plan-template.txt +0 -286
- package/.claude/workflows/cli-templates/prompts/workflow-skill-aggregation.txt +0 -172
- package/.claude/workflows/cli-templates/prompts/workflow-skill-conflict-patterns.txt +0 -94
- package/.claude/workflows/cli-templates/prompts/workflow-skill-index.txt +0 -224
- package/.claude/workflows/cli-templates/prompts/workflow-skill-lessons-learned.txt +0 -94
- package/.claude/workflows/cli-templates/prompts/workflow-skill-sessions-timeline.txt +0 -53
- package/.claude/workflows/cli-templates/prompts/workflow-task-json-agent-mode.txt +0 -123
- package/.claude/workflows/cli-templates/prompts/workflow-task-json-cli-mode.txt +0 -182
- package/.claude/workflows/cli-templates/protocols/analysis-protocol.md +0 -119
- package/.claude/workflows/cli-templates/protocols/write-protocol.md +0 -136
- package/.claude/workflows/cli-templates/schemas/conflict-resolution-schema.json +0 -151
- package/.claude/workflows/cli-templates/schemas/debug-log-json-schema.json +0 -127
- package/.claude/workflows/cli-templates/schemas/diagnosis-json-schema.json +0 -234
- package/.claude/workflows/cli-templates/schemas/discovery-finding-schema.json +0 -219
- package/.claude/workflows/cli-templates/schemas/discovery-state-schema.json +0 -125
- package/.claude/workflows/cli-templates/schemas/explore-json-schema.json +0 -124
- package/.claude/workflows/cli-templates/schemas/fix-plan-json-schema.json +0 -298
- package/.claude/workflows/cli-templates/schemas/issues-jsonl-schema.json +0 -170
- package/.claude/workflows/cli-templates/schemas/multi-cli-discussion-schema.json +0 -421
- package/.claude/workflows/cli-templates/schemas/plan-json-schema.json +0 -444
- package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +0 -47
- package/.claude/workflows/cli-templates/schemas/project-guidelines-schema.json +0 -141
- package/.claude/workflows/cli-templates/schemas/project-tech-schema.json +0 -221
- package/.claude/workflows/cli-templates/schemas/queue-schema.json +0 -248
- package/.claude/workflows/cli-templates/schemas/registry-schema.json +0 -94
- package/.claude/workflows/cli-templates/schemas/review-deep-dive-results-schema.json +0 -82
- package/.claude/workflows/cli-templates/schemas/review-dimension-results-schema.json +0 -51
- package/.claude/workflows/cli-templates/schemas/solution-schema.json +0 -166
- package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +0 -158
- package/.claude/workflows/cli-templates/tech-stacks/go-dev.md +0 -91
- package/.claude/workflows/cli-templates/tech-stacks/java-dev.md +0 -107
- package/.claude/workflows/cli-templates/tech-stacks/javascript-dev.md +0 -58
- package/.claude/workflows/cli-templates/tech-stacks/python-dev.md +0 -79
- package/.claude/workflows/cli-templates/tech-stacks/react-dev.md +0 -103
- package/.claude/workflows/cli-templates/tech-stacks/typescript-dev.md +0 -83
- package/.claude/workflows/cli-templates/ui-design/systems/animation-tokens.json +0 -247
- package/.claude/workflows/cli-templates/ui-design/systems/design-tokens.json +0 -342
- package/.claude/workflows/cli-templates/ui-design/systems/layout-templates.json +0 -145
- package/.claude/workflows/cli-tools-usage.md +0 -538
- package/.claude/workflows/coding-philosophy.md +0 -70
- package/.claude/workflows/context-tools.md +0 -76
- package/.claude/workflows/file-modification.md +0 -64
- package/.claude/workflows/review-directory-specification.md +0 -336
- package/.claude/workflows/task-core.md +0 -214
- package/.claude/workflows/tool-strategy.md +0 -216
- package/.claude/workflows/windows-platform.md +0 -19
- package/.claude/workflows/workflow-architecture.md +0 -942
- package/.codex/agents/ccw-loop-b-complete.md +0 -227
- package/.codex/agents/ccw-loop-b-debug.md +0 -172
- package/.codex/agents/ccw-loop-b-develop.md +0 -147
- package/.codex/agents/ccw-loop-b-init.md +0 -82
- package/.codex/agents/ccw-loop-b-validate.md +0 -204
- package/.codex/agents/ccw-loop-executor.md +0 -260
- package/.codex/prompts/analyze-with-file.md +0 -610
- package/.codex/prompts/brainstorm-to-cycle.md +0 -456
- package/.codex/prompts/brainstorm-with-file.md +0 -1004
- package/.codex/prompts/clean.md +0 -414
- package/.codex/prompts/compact.md +0 -380
- package/.codex/prompts/debug-with-file.md +0 -608
- package/.codex/prompts/execute.md +0 -277
- package/.codex/prompts/issue-discover-by-prompt.md +0 -364
- package/.codex/prompts/issue-discover.md +0 -261
- package/.codex/prompts/issue-execute.md +0 -768
- package/.codex/prompts/issue-new.md +0 -390
- package/.codex/prompts/issue-plan.md +0 -246
- package/.codex/prompts/issue-queue.md +0 -298
- package/.codex/prompts/lite-execute.md +0 -684
- package/.codex/prompts/lite-fix.md +0 -674
- package/.codex/prompts/lite-plan-a.md +0 -341
- package/.codex/prompts/lite-plan-b.md +0 -489
- package/.codex/prompts/lite-plan-c.md +0 -605
- package/.codex/prompts/merge-plans-with-file.md +0 -530
- package/.codex/prompts/unified-execute-with-file.md +0 -722
- package/.codex/skills/ccw-loop/README.md +0 -171
- package/.codex/skills/ccw-loop/SKILL.md +0 -350
- package/.codex/skills/ccw-loop/phases/actions/action-complete.md +0 -269
- package/.codex/skills/ccw-loop/phases/actions/action-debug.md +0 -286
- package/.codex/skills/ccw-loop/phases/actions/action-develop.md +0 -183
- package/.codex/skills/ccw-loop/phases/actions/action-init.md +0 -164
- package/.codex/skills/ccw-loop/phases/actions/action-menu.md +0 -205
- package/.codex/skills/ccw-loop/phases/actions/action-validate.md +0 -250
- package/.codex/skills/ccw-loop/phases/orchestrator.md +0 -416
- package/.codex/skills/ccw-loop/phases/state-schema.md +0 -388
- package/.codex/skills/ccw-loop/specs/action-catalog.md +0 -182
- package/.codex/skills/ccw-loop-b/README.md +0 -301
- package/.codex/skills/ccw-loop-b/SKILL.md +0 -323
- package/.codex/skills/ccw-loop-b/phases/orchestrator.md +0 -257
- package/.codex/skills/ccw-loop-b/phases/state-schema.md +0 -181
- package/.codex/skills/ccw-loop-b/specs/action-catalog.md +0 -383
- package/.codex/skills/codex-issue-plan-execute/SKILL.md +0 -214
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-complete.md +0 -173
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-execute.md +0 -220
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-init.md +0 -86
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-list.md +0 -165
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-plan.md +0 -170
- package/.codex/skills/codex-issue-plan-execute/phases/orchestrator.md +0 -212
- package/.codex/skills/codex-issue-plan-execute/phases/state-schema.md +0 -136
- package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent-system.md +0 -32
- package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent.md +0 -323
- package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent-system.md +0 -32
- package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent.md +0 -224
- package/.codex/skills/codex-issue-plan-execute/specs/agent-roles.md +0 -468
- package/.codex/skills/codex-issue-plan-execute/specs/issue-handling.md +0 -187
- package/.codex/skills/codex-issue-plan-execute/specs/quality-standards.md +0 -231
- package/.codex/skills/codex-issue-plan-execute/specs/solution-schema.md +0 -270
- package/.codex/skills/codex-issue-plan-execute/specs/subagent-roles.md +0 -32
- package/.codex/skills/parallel-dev-cycle/README.md +0 -385
- package/.codex/skills/parallel-dev-cycle/phases/agents/code-developer.md +0 -327
- package/.codex/skills/parallel-dev-cycle/phases/agents/exploration-planner.md +0 -285
- package/.codex/skills/parallel-dev-cycle/phases/agents/requirements-analyst.md +0 -370
- package/.codex/skills/parallel-dev-cycle/phases/agents/validation-archivist.md +0 -381
- package/.codex/skills/parallel-dev-cycle/phases/orchestrator.md +0 -696
- package/.codex/skills/parallel-dev-cycle/phases/state-schema.md +0 -436
- package/.codex/skills/parallel-dev-cycle/skill.md +0 -194
- package/.codex/skills/parallel-dev-cycle/specs/communication-optimization.md +0 -423
- package/.codex/skills/parallel-dev-cycle/specs/coordination-protocol.md +0 -406
- package/.codex/skills/parallel-dev-cycle/specs/versioning-strategy.md +0 -331
- package/ccw/dist/core/dashboard-generator-patch.d.ts +0 -2
- package/ccw/dist/core/dashboard-generator-patch.d.ts.map +0 -1
- package/ccw/dist/core/dashboard-generator-patch.js +0 -48
- package/ccw/dist/core/dashboard-generator-patch.js.map +0 -1
- package/ccw/dist/core/dashboard-generator.d.ts +0 -8
- package/ccw/dist/core/dashboard-generator.d.ts.map +0 -1
- package/ccw/dist/core/dashboard-generator.js +0 -706
- package/ccw/dist/core/dashboard-generator.js.map +0 -1
- package/ccw/dist/core/routes/model-routes.d.ts +0 -11
- package/ccw/dist/core/routes/model-routes.d.ts.map +0 -1
- package/ccw/dist/core/routes/model-routes.js +0 -112
- package/ccw/dist/core/routes/model-routes.js.map +0 -1
- package/ccw/dist/tools/command-registry.test.d.ts +0 -14
- package/ccw/dist/tools/command-registry.test.d.ts.map +0 -1
- package/ccw/dist/tools/command-registry.test.js.map +0 -1
- package/ccw/scripts/__pycache__/memory_embedder.cpython-313.pyc +0 -0
- package/ccw/scripts/__pycache__/test_memory_embedder.cpython-313-pytest-8.4.2.pyc +0 -0
- package/ccw/src/.workflow/.cli-history/history.db +0 -0
- package/ccw/src/.workflow/.cli-history/history.db-shm +0 -0
- package/ccw/src/.workflow/.cli-history/history.db-wal +0 -0
- package/ccw/src/cli.ts +0 -326
- package/ccw/src/commands/cli.ts +0 -1492
- package/ccw/src/commands/core-memory.ts +0 -770
- package/ccw/src/commands/hook.ts +0 -316
- package/ccw/src/commands/install.ts +0 -799
- package/ccw/src/commands/issue.ts +0 -3150
- package/ccw/src/commands/list.ts +0 -37
- package/ccw/src/commands/loop.ts +0 -344
- package/ccw/src/commands/memory.ts +0 -1090
- package/ccw/src/commands/serve.ts +0 -86
- package/ccw/src/commands/session-path-resolver.ts +0 -372
- package/ccw/src/commands/session.ts +0 -1141
- package/ccw/src/commands/stop.ts +0 -138
- package/ccw/src/commands/tool.ts +0 -216
- package/ccw/src/commands/uninstall.ts +0 -309
- package/ccw/src/commands/upgrade.ts +0 -352
- package/ccw/src/commands/view.ts +0 -133
- package/ccw/src/commands/workflow.ts +0 -348
- package/ccw/src/config/.litellm-api-config-manager.ts.2025-12-23T11-57-43-727Z.bak +0 -441
- package/ccw/src/config/cli-settings-manager.ts +0 -460
- package/ccw/src/config/litellm-api-config-manager.ts +0 -1350
- package/ccw/src/config/litellm-provider-models.ts +0 -222
- package/ccw/src/config/provider-models.ts +0 -123
- package/ccw/src/config/storage-paths.ts +0 -685
- package/ccw/src/core/auth/csrf-manager.ts +0 -104
- package/ccw/src/core/auth/csrf-middleware.ts +0 -161
- package/ccw/src/core/auth/middleware.ts +0 -94
- package/ccw/src/core/auth/token-manager.ts +0 -219
- package/ccw/src/core/cache-manager.ts +0 -304
- package/ccw/src/core/claude-freshness.ts +0 -339
- package/ccw/src/core/core-memory-store.ts +0 -1529
- package/ccw/src/core/cors.ts +0 -10
- package/ccw/src/core/dashboard-generator-patch.ts +0 -47
- package/ccw/src/core/dashboard-generator.ts +0 -802
- package/ccw/src/core/data-aggregator.ts +0 -690
- package/ccw/src/core/history-importer.ts +0 -625
- package/ccw/src/core/lite-scanner-complete.ts +0 -473
- package/ccw/src/core/lite-scanner.ts +0 -978
- package/ccw/src/core/manifest.ts +0 -271
- package/ccw/src/core/memory-embedder-bridge.ts +0 -258
- package/ccw/src/core/memory-store.ts +0 -978
- package/ccw/src/core/routes/auth-routes.ts +0 -98
- package/ccw/src/core/routes/ccw-routes.ts +0 -86
- package/ccw/src/core/routes/claude-routes.ts +0 -1512
- package/ccw/src/core/routes/cli-routes.ts +0 -1002
- package/ccw/src/core/routes/cli-settings-routes.ts +0 -279
- package/ccw/src/core/routes/codexlens/README.md +0 -37
- package/ccw/src/core/routes/codexlens/config-handlers.ts +0 -1273
- package/ccw/src/core/routes/codexlens/index-handlers.ts +0 -354
- package/ccw/src/core/routes/codexlens/semantic-handlers.ts +0 -932
- package/ccw/src/core/routes/codexlens/utils.ts +0 -96
- package/ccw/src/core/routes/codexlens/watcher-handlers.ts +0 -265
- package/ccw/src/core/routes/codexlens-routes.ts +0 -23
- package/ccw/src/core/routes/commands-routes.ts +0 -620
- package/ccw/src/core/routes/core-memory-routes.ts +0 -607
- package/ccw/src/core/routes/discovery-routes.ts +0 -664
- package/ccw/src/core/routes/files-routes.ts +0 -502
- package/ccw/src/core/routes/graph-routes.md +0 -164
- package/ccw/src/core/routes/graph-routes.ts +0 -635
- package/ccw/src/core/routes/help-routes.ts +0 -508
- package/ccw/src/core/routes/hooks-routes.ts +0 -473
- package/ccw/src/core/routes/issue-routes.ts +0 -1547
- package/ccw/src/core/routes/litellm-api-routes.ts +0 -1482
- package/ccw/src/core/routes/litellm-routes.ts +0 -115
- package/ccw/src/core/routes/loop-routes.ts +0 -386
- package/ccw/src/core/routes/loop-v2-routes.ts +0 -1470
- package/ccw/src/core/routes/mcp-routes.ts +0 -1372
- package/ccw/src/core/routes/mcp-templates-db.ts +0 -267
- package/ccw/src/core/routes/memory-routes.ts +0 -1345
- package/ccw/src/core/routes/nav-status-routes.ts +0 -325
- package/ccw/src/core/routes/provider-routes.ts +0 -78
- package/ccw/src/core/routes/rules-routes.ts +0 -1064
- package/ccw/src/core/routes/session-routes.ts +0 -649
- package/ccw/src/core/routes/skills-routes.ts +0 -1278
- package/ccw/src/core/routes/status-routes.ts +0 -132
- package/ccw/src/core/routes/system-routes.ts +0 -575
- package/ccw/src/core/routes/task-routes.ts +0 -361
- package/ccw/src/core/routes/test-loop-routes.ts +0 -312
- package/ccw/src/core/routes/types.ts +0 -25
- package/ccw/src/core/server.ts +0 -776
- package/ccw/src/core/services/api-key-tester.ts +0 -166
- package/ccw/src/core/services/health-check-service.ts +0 -366
- package/ccw/src/core/session-clustering-service.ts +0 -1258
- package/ccw/src/core/session-scanner.ts +0 -283
- package/ccw/src/core/websocket.ts +0 -302
- package/ccw/src/index.ts +0 -10
- package/ccw/src/mcp-server/index.ts +0 -191
- package/ccw/src/templates/assets/css/github-dark.min.css +0 -10
- package/ccw/src/templates/assets/css/github.min.css +0 -10
- package/ccw/src/templates/assets/js/cytoscape.min.js +0 -32
- package/ccw/src/templates/assets/js/d3.min.js +0 -2
- package/ccw/src/templates/assets/js/highlight.min.js +0 -1244
- package/ccw/src/templates/assets/js/lucide.min.js +0 -12
- package/ccw/src/templates/assets/js/marked.min.js +0 -69
- package/ccw/src/templates/assets/js/tailwind.js +0 -83
- package/ccw/src/templates/dashboard-css/01-base.css +0 -419
- package/ccw/src/templates/dashboard-css/02-session.css +0 -831
- package/ccw/src/templates/dashboard-css/03-tasks.css +0 -517
- package/ccw/src/templates/dashboard-css/04-lite-tasks.css +0 -4354
- package/ccw/src/templates/dashboard-css/05-context.css +0 -2206
- package/ccw/src/templates/dashboard-css/06-cards.css +0 -1576
- package/ccw/src/templates/dashboard-css/07-managers.css +0 -2107
- package/ccw/src/templates/dashboard-css/08-review.css +0 -1266
- package/ccw/src/templates/dashboard-css/09-explorer.css +0 -1408
- package/ccw/src/templates/dashboard-css/10-cli-status.css +0 -539
- package/ccw/src/templates/dashboard-css/11-cli-history.css +0 -271
- package/ccw/src/templates/dashboard-css/12-cli-legacy.css +0 -896
- package/ccw/src/templates/dashboard-css/13-cli-ccw.css +0 -199
- package/ccw/src/templates/dashboard-css/14-cli-modals.css +0 -258
- package/ccw/src/templates/dashboard-css/15-cli-endpoints.css +0 -305
- package/ccw/src/templates/dashboard-css/16-cli-session.css +0 -241
- package/ccw/src/templates/dashboard-css/17-cli-conversation.css +0 -283
- package/ccw/src/templates/dashboard-css/18-cli-settings.css +0 -229
- package/ccw/src/templates/dashboard-css/19-cli-native-session.css +0 -496
- package/ccw/src/templates/dashboard-css/20-cli-taskqueue.css +0 -188
- package/ccw/src/templates/dashboard-css/21-cli-toolmgmt.css +0 -820
- package/ccw/src/templates/dashboard-css/22-cli-semantic.css +0 -240
- package/ccw/src/templates/dashboard-css/23-memory.css +0 -2390
- package/ccw/src/templates/dashboard-css/24-prompt-history.css +0 -1089
- package/ccw/src/templates/dashboard-css/25-skills-rules.css +0 -326
- package/ccw/src/templates/dashboard-css/26-claude-manager.css +0 -1087
- package/ccw/src/templates/dashboard-css/27-graph-explorer.css +0 -1678
- package/ccw/src/templates/dashboard-css/28-mcp-manager.css +0 -748
- package/ccw/src/templates/dashboard-css/29-help.css +0 -264
- package/ccw/src/templates/dashboard-css/30-core-memory.css +0 -1720
- package/ccw/src/templates/dashboard-css/31-api-settings.css +0 -3002
- package/ccw/src/templates/dashboard-css/32-issue-manager.css +0 -3619
- package/ccw/src/templates/dashboard-css/33-cli-stream-viewer.css +0 -860
- package/ccw/src/templates/dashboard-css/34-discovery.css +0 -783
- package/ccw/src/templates/dashboard-css/36-loop-monitor.css +0 -1896
- package/ccw/src/templates/dashboard-css/36-loop-monitor.css.backup +0 -1877
- package/ccw/src/templates/dashboard-css/37-commands.css +0 -193
- package/ccw/src/templates/dashboard-js/api.js +0 -225
- package/ccw/src/templates/dashboard-js/components/_conflict_tab.js +0 -112
- package/ccw/src/templates/dashboard-js/components/_exp_helpers.js +0 -54
- package/ccw/src/templates/dashboard-js/components/_review_tab.js +0 -640
- package/ccw/src/templates/dashboard-js/components/carousel.js +0 -398
- package/ccw/src/templates/dashboard-js/components/cli-history.js +0 -913
- package/ccw/src/templates/dashboard-js/components/cli-status.js +0 -1617
- package/ccw/src/templates/dashboard-js/components/cli-stream-viewer.js +0 -985
- package/ccw/src/templates/dashboard-js/components/flowchart.js +0 -493
- package/ccw/src/templates/dashboard-js/components/global-notifications.js +0 -508
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +0 -1493
- package/ccw/src/templates/dashboard-js/components/index-manager.js +0 -302
- package/ccw/src/templates/dashboard-js/components/mcp-manager.js +0 -1760
- package/ccw/src/templates/dashboard-js/components/modals.js +0 -326
- package/ccw/src/templates/dashboard-js/components/navigation.js +0 -430
- package/ccw/src/templates/dashboard-js/components/notifications.js +0 -934
- package/ccw/src/templates/dashboard-js/components/sidebar.js +0 -31
- package/ccw/src/templates/dashboard-js/components/storage-manager.js +0 -478
- package/ccw/src/templates/dashboard-js/components/tabs-context.js +0 -1093
- package/ccw/src/templates/dashboard-js/components/tabs-other.js +0 -424
- package/ccw/src/templates/dashboard-js/components/task-drawer-core.js +0 -477
- package/ccw/src/templates/dashboard-js/components/task-drawer-renderers.js +0 -447
- package/ccw/src/templates/dashboard-js/components/task-queue-sidebar.js +0 -716
- package/ccw/src/templates/dashboard-js/components/theme.js +0 -49
- package/ccw/src/templates/dashboard-js/components/version-check.js +0 -339
- package/ccw/src/templates/dashboard-js/help-i18n.js +0 -272
- package/ccw/src/templates/dashboard-js/i18n.js +0 -5558
- package/ccw/src/templates/dashboard-js/main.js +0 -158
- package/ccw/src/templates/dashboard-js/services.js +0 -289
- package/ccw/src/templates/dashboard-js/state.js +0 -245
- package/ccw/src/templates/dashboard-js/utils.js +0 -199
- package/ccw/src/templates/dashboard-js/views/api-settings.js +0 -5646
- package/ccw/src/templates/dashboard-js/views/claude-manager.js +0 -1129
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +0 -3615
- package/ccw/src/templates/dashboard-js/views/codexlens-manager.js +0 -7123
- package/ccw/src/templates/dashboard-js/views/commands-manager.js +0 -503
- package/ccw/src/templates/dashboard-js/views/core-memory-clusters.js +0 -503
- package/ccw/src/templates/dashboard-js/views/core-memory.js +0 -891
- package/ccw/src/templates/dashboard-js/views/explorer.js +0 -888
- package/ccw/src/templates/dashboard-js/views/fix-session.js +0 -180
- package/ccw/src/templates/dashboard-js/views/graph-explorer.js +0 -1157
- package/ccw/src/templates/dashboard-js/views/help.js +0 -1278
- package/ccw/src/templates/dashboard-js/views/history.js +0 -390
- package/ccw/src/templates/dashboard-js/views/home.js +0 -244
- package/ccw/src/templates/dashboard-js/views/hook-manager.js +0 -696
- package/ccw/src/templates/dashboard-js/views/issue-discovery.js +0 -730
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +0 -3248
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +0 -3546
- package/ccw/src/templates/dashboard-js/views/loop-monitor.js +0 -3345
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +0 -2261
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js.backup +0 -1729
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js.new +0 -928
- package/ccw/src/templates/dashboard-js/views/memory.js +0 -1221
- package/ccw/src/templates/dashboard-js/views/project-overview.js +0 -548
- package/ccw/src/templates/dashboard-js/views/prompt-history.js +0 -713
- package/ccw/src/templates/dashboard-js/views/review-session.js +0 -1030
- package/ccw/src/templates/dashboard-js/views/rules-manager.js +0 -880
- package/ccw/src/templates/dashboard-js/views/session-detail.js +0 -781
- package/ccw/src/templates/dashboard-js/views/skills-manager.js +0 -1282
- package/ccw/src/templates/dashboard.html +0 -1104
- package/ccw/src/templates/hooks-config-example.json +0 -60
- package/ccw/src/templates/review-cycle-dashboard.html +0 -1930
- package/ccw/src/templates/workflow-dashboard.html +0 -401
- package/ccw/src/tools/README.md +0 -29
- package/ccw/src/tools/classify-folders.ts +0 -245
- package/ccw/src/tools/claude-cli-tools.ts +0 -1271
- package/ccw/src/tools/cli-config-manager.ts +0 -169
- package/ccw/src/tools/cli-executor-core.ts +0 -1665
- package/ccw/src/tools/cli-executor-state.ts +0 -562
- package/ccw/src/tools/cli-executor-utils.ts +0 -394
- package/ccw/src/tools/cli-executor.ts +0 -7
- package/ccw/src/tools/cli-history-store.ts +0 -1498
- package/ccw/src/tools/cli-output-converter.ts +0 -1301
- package/ccw/src/tools/cli-prompt-builder.ts +0 -487
- package/ccw/src/tools/codex-lens-lsp.ts +0 -402
- package/ccw/src/tools/codex-lens.ts +0 -1863
- package/ccw/src/tools/command-registry.test.ts +0 -669
- package/ccw/src/tools/command-registry.ts +0 -323
- package/ccw/src/tools/context-cache-store.ts +0 -368
- package/ccw/src/tools/context-cache.ts +0 -393
- package/ccw/src/tools/convert-tokens-to-css.ts +0 -300
- package/ccw/src/tools/core-memory.ts +0 -458
- package/ccw/src/tools/detect-changed-modules.ts +0 -343
- package/ccw/src/tools/discover-design-files.ts +0 -184
- package/ccw/src/tools/edit-file.ts +0 -568
- package/ccw/src/tools/generate-module-docs.ts +0 -442
- package/ccw/src/tools/get-modules-by-depth.ts +0 -349
- package/ccw/src/tools/index.ts +0 -384
- package/ccw/src/tools/litellm-client.ts +0 -288
- package/ccw/src/tools/litellm-executor.ts +0 -360
- package/ccw/src/tools/loop-manager.ts +0 -519
- package/ccw/src/tools/loop-state-manager.ts +0 -173
- package/ccw/src/tools/loop-task-manager.ts +0 -391
- package/ccw/src/tools/memory-update-queue.js +0 -493
- package/ccw/src/tools/native-session-discovery.ts +0 -1034
- package/ccw/src/tools/notifier.ts +0 -129
- package/ccw/src/tools/pattern-parser.ts +0 -329
- package/ccw/src/tools/read-file.ts +0 -410
- package/ccw/src/tools/resume-strategy.ts +0 -345
- package/ccw/src/tools/session-content-parser.ts +0 -619
- package/ccw/src/tools/session-manager.ts +0 -1114
- package/ccw/src/tools/skill-context-loader.ts +0 -213
- package/ccw/src/tools/smart-context.ts +0 -228
- package/ccw/src/tools/smart-search.ts +0 -2658
- package/ccw/src/tools/smart-search.ts.backup +0 -1233
- package/ccw/src/tools/storage-manager.ts +0 -455
- package/ccw/src/tools/template-discovery.ts +0 -303
- package/ccw/src/tools/ui-generate-preview.js +0 -350
- package/ccw/src/tools/ui-instantiate-prototypes.js +0 -301
- package/ccw/src/tools/update-module-claude.js +0 -380
- package/ccw/src/tools/vscode-lsp.ts +0 -317
- package/ccw/src/tools/write-file.ts +0 -222
- package/ccw/src/types/cli-settings.ts +0 -137
- package/ccw/src/types/config.ts +0 -11
- package/ccw/src/types/index.ts +0 -4
- package/ccw/src/types/litellm-api-config.ts +0 -456
- package/ccw/src/types/loop.ts +0 -316
- package/ccw/src/types/session.ts +0 -25
- package/ccw/src/types/skill-types.ts +0 -99
- package/ccw/src/types/tool.ts +0 -41
- package/ccw/src/utils/browser-launcher.ts +0 -62
- package/ccw/src/utils/codexlens-path.ts +0 -60
- package/ccw/src/utils/exec-constants.ts +0 -24
- package/ccw/src/utils/file-utils.ts +0 -48
- package/ccw/src/utils/path-resolver.ts +0 -392
- package/ccw/src/utils/path-validator.ts +0 -187
- package/ccw/src/utils/project-root.ts +0 -73
- package/ccw/src/utils/python-utils.ts +0 -140
- package/ccw/src/utils/shell-escape.ts +0 -117
- package/ccw/src/utils/ui.ts +0 -155
- package/ccw/src/utils/update-checker.ts +0 -178
- package/ccw/src/utils/uv-manager.ts +0 -797
- package/ccw-litellm/src/ccw_litellm/__pycache__/__init__.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/__pycache__/__init__.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/__pycache__/__init__.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/__pycache__/cli.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/__init__.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/__init__.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/__init__.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_embedder.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_embedder.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_embedder.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_llm.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_llm.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/clients/__pycache__/litellm_llm.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/__init__.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/__init__.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/__init__.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/loader.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/loader.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/loader.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/models.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/models.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/config/__pycache__/models.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/__init__.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/__init__.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/__init__.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/embedder.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/embedder.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/embedder.cpython-313.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/llm.cpython-310.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/llm.cpython-312.pyc +0 -0
- package/ccw-litellm/src/ccw_litellm/interfaces/__pycache__/llm.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/.workflow/.cli-history/history.db +0 -0
- package/codex-lens/src/codexlens/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__main__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__main__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__main__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/config.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/config.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/config.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/entities.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/entities.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/entities.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/env_config.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/env_config.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/env_config.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/errors.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/errors.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/errors.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/definition.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/definition.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/file_context.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/file_context.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/hover.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/hover.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/models.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/models.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/references.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/references.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/semantic.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/semantic.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/symbols.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/symbols.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/utils.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/api/__pycache__/utils.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/commands.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/commands.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/commands.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/embedding_manager.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/embedding_manager.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/embedding_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/model_manager.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/model_manager.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/model_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/output.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/output.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/output.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/data_structures.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/data_structures.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/hybrid_search/__pycache__/engine.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/indexing/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/indexing/__pycache__/embedding.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/indexing/__pycache__/symbol_extractor.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/handlers.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/lsp_bridge.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/lsp_bridge.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/lsp_graph_builder.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/lsp_graph_builder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/providers.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/server.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/lsp/__pycache__/standalone_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/mcp/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/mcp/__pycache__/hooks.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/mcp/__pycache__/provider.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/mcp/__pycache__/schema.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/encoding.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/factory.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/factory.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/tokenizer.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/tokenizer.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/tokenizer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/treesitter_parser.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/treesitter_parser.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/treesitter_parser.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/binary_searcher.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/chain_search.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/chain_search.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/chain_search.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/enrichment.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/graph_expander.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/hybrid_search.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/hybrid_search.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/hybrid_search.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/query_parser.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/ranking.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/ranking.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/ranking.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/association_tree/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/association_tree/__pycache__/builder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/association_tree/__pycache__/data_structures.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/association_tree/__pycache__/deduplicator.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/base.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/base.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/dbscan_strategy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/factory.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/frequency_strategy.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/frequency_strategy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/hdbscan_strategy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/noop_strategy.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/search/clustering/__pycache__/noop_strategy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/SPLADE_IMPLEMENTATION.md +0 -225
- package/codex-lens/src/codexlens/semantic/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ann_index.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ann_index.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ann_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/base.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/base.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/base.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/chunker.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/chunker.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/chunker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/code_extractor.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/embedder.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/embedder.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/embedder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/factory.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/factory.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/gpu_support.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/gpu_support.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/gpu_support.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/graph_analyzer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/litellm_embedder.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/litellm_embedder.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/litellm_embedder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/llm_enhancer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ollama_backend.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/splade_encoder.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/splade_encoder.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/splade_encoder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/vector_store.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/vector_store.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/vector_store.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/api_reranker.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/api_reranker.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/api_reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/base.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/base.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/base.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/factory.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/factory.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/fastembed_reranker.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/fastembed_reranker.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/fastembed_reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/legacy.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/legacy.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/legacy.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/litellm_reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/onnx_reranker.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/onnx_reranker.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/reranker/__pycache__/onnx_reranker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/splade_encoder.py +0 -567
- package/codex-lens/src/codexlens/storage/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/dir_index.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/dir_index.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/dir_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/file_cache.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/global_index.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/global_index.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/global_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/index_tree.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/index_tree.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/index_tree.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/merkle_tree.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/migration_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/path_mapper.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/path_mapper.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/path_mapper.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/registry.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/registry.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/registry.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/splade_index.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/splade_index.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/splade_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_store.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_store.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_store.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_utils.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_utils.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_utils.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/vector_meta_store.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/vector_meta_store.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/vector_meta_store.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_001_normalize_keywords.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_002_add_token_metadata.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_003_code_relationships.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_004_dual_fts.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_005_cleanup_unused_fields.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_006_enhance_relationships.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_007_add_graph_neighbors.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_007_add_graph_neighbors.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_007_add_graph_neighbors.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_008_add_merkle_hashes.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_009_add_splade.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_010_add_multi_vector_chunks.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/migration_009_add_splade.py +0 -103
- package/codex-lens/src/codexlens/storage/splade_index.py +0 -578
- package/codex-lens/src/codexlens/watcher/__pycache__/__init__.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/__init__.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/events.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/events.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/events.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/file_watcher.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/file_watcher.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/file_watcher.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/incremental_indexer.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/incremental_indexer.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/incremental_indexer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/manager.cpython-310.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/manager.cpython-312.pyc +0 -0
- package/codex-lens/src/codexlens/watcher/__pycache__/manager.cpython-313.pyc +0 -0
|
@@ -1,3345 +0,0 @@
|
|
|
1
|
-
// ==========================================
|
|
2
|
-
// LOOP MONITOR VIEW
|
|
3
|
-
// ==========================================
|
|
4
|
-
|
|
5
|
-
// Loop state store for real-time updates
|
|
6
|
-
window.loopStateStore = {};
|
|
7
|
-
window.selectedLoopId = null;
|
|
8
|
-
window.loopWebSocket = null;
|
|
9
|
-
window.loopReconnectAttempts = 0;
|
|
10
|
-
window.loopMaxReconnectAttempts = 10;
|
|
11
|
-
window.enabledTools = null; // Cache for enabled tools from config
|
|
12
|
-
|
|
13
|
-
// Status icons and keys (will be updated with i18n labels dynamically)
|
|
14
|
-
// Colors are now handled by CSS via semantic class names (.loop-status-indicator.{status})
|
|
15
|
-
const loopStatusConfig = {
|
|
16
|
-
created: { icon: '○', key: 'created' },
|
|
17
|
-
running: { icon: '●', key: 'running' },
|
|
18
|
-
paused: { icon: '⏸', key: 'paused' },
|
|
19
|
-
completed: { icon: '✓', key: 'completed' },
|
|
20
|
-
failed: { icon: '✗', key: 'failed' }
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// Get localized status label
|
|
24
|
-
function getLoopStatusLabel(status) {
|
|
25
|
-
return t('loop.' + status) || status;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Update status config with localized labels
|
|
29
|
-
function updateLoopStatusLabels() {
|
|
30
|
-
for (const status in loopStatusConfig) {
|
|
31
|
-
loopStatusConfig[status].label = getLoopStatusLabel(status);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Get enabled tools from CLI tools config
|
|
37
|
-
* Fetches from /api/cli/tools-config and caches result
|
|
38
|
-
*/
|
|
39
|
-
async function getEnabledTools() {
|
|
40
|
-
if (window.enabledTools) {
|
|
41
|
-
return window.enabledTools;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
try {
|
|
45
|
-
const response = await fetch('/api/cli/tools-config');
|
|
46
|
-
const result = await response.json();
|
|
47
|
-
|
|
48
|
-
if (result.tools && typeof result.tools === 'object') {
|
|
49
|
-
// Filter enabled tools
|
|
50
|
-
window.enabledTools = Object.entries(result.tools)
|
|
51
|
-
.filter(([_, config]) => config.enabled === true)
|
|
52
|
-
.map(([name]) => name);
|
|
53
|
-
|
|
54
|
-
// Fallback to Claude if no tools enabled
|
|
55
|
-
if (window.enabledTools.length === 0) {
|
|
56
|
-
window.enabledTools = ['claude'];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return window.enabledTools;
|
|
60
|
-
}
|
|
61
|
-
} catch (err) {
|
|
62
|
-
console.error('Load tools config error:', err);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Fallback to default tools if API fails
|
|
66
|
-
window.enabledTools = ['claude', 'gemini', 'qwen', 'codex'].filter(t => {
|
|
67
|
-
const defaultTools = { claude: true, gemini: true, qwen: true, codex: true };
|
|
68
|
-
return defaultTools[t];
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
return window.enabledTools;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Render Loop Monitor view
|
|
76
|
-
*/
|
|
77
|
-
async function renderLoopMonitor() {
|
|
78
|
-
try {
|
|
79
|
-
// Update status labels with current language
|
|
80
|
-
updateLoopStatusLabels();
|
|
81
|
-
|
|
82
|
-
// Hide stats and carousel if function exists
|
|
83
|
-
if (typeof hideStatsAndCarousel === 'function') {
|
|
84
|
-
hideStatsAndCarousel();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const container = document.getElementById('mainContent');
|
|
88
|
-
if (!container) {
|
|
89
|
-
console.error('Main content container not found');
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
container.innerHTML = `
|
|
93
|
-
<div class="loop-monitor-container">
|
|
94
|
-
<div class="loop-monitor-layout">
|
|
95
|
-
<!-- Loop List -->
|
|
96
|
-
<div class="loop-list-panel">
|
|
97
|
-
<!-- Row 1: Tabs + New Button -->
|
|
98
|
-
<div class="panel-header-row">
|
|
99
|
-
<div class="view-tabs">
|
|
100
|
-
<button class="tab-button active" data-tab="loops" onclick="switchView('loops')">
|
|
101
|
-
<i data-lucide="activity" class="w-4 h-4"></i> ${t('loop.loops')}
|
|
102
|
-
</button>
|
|
103
|
-
<button class="tab-button" data-tab="tasks" onclick="switchView('tasks')">
|
|
104
|
-
<i data-lucide="list" class="w-4 h-4"></i> ${t('loop.tasks')}
|
|
105
|
-
</button>
|
|
106
|
-
</div>
|
|
107
|
-
<button class="btn btn-primary btn-sm" onclick="showCreateLoopModal()" title="Create new loop task">
|
|
108
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.newLoop')}
|
|
109
|
-
</button>
|
|
110
|
-
</div>
|
|
111
|
-
|
|
112
|
-
<!-- Row 2: Filter -->
|
|
113
|
-
<div class="panel-filter-row">
|
|
114
|
-
<select id="loopFilter" class="filter-select" onchange="filterLoops()">
|
|
115
|
-
<option value="all">${t('loop.all')}</option>
|
|
116
|
-
<option value="running">${t('loop.running')}</option>
|
|
117
|
-
<option value="paused">${t('loop.paused')}</option>
|
|
118
|
-
<option value="completed">${t('loop.completed')}</option>
|
|
119
|
-
<option value="failed">${t('loop.failed')}</option>
|
|
120
|
-
</select>
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
<!-- Row 3: Loop List -->
|
|
124
|
-
<div class="loop-list" id="loopList">
|
|
125
|
-
<div class="loading-spinner">${t('loop.loading')}</div>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<!-- Loop Detail -->
|
|
130
|
-
<div class="loop-detail-panel" id="loopDetailPanel">
|
|
131
|
-
<div class="empty-detail-state">
|
|
132
|
-
<div class="empty-icon-large">
|
|
133
|
-
<i data-lucide="activity" class="w-10 h-10"></i>
|
|
134
|
-
</div>
|
|
135
|
-
<p class="empty-state-title">${t('loop.selectLoop')}</p>
|
|
136
|
-
<p class="empty-state-hint">${t('loop.selectLoopHint')}</p>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
`;
|
|
142
|
-
|
|
143
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
144
|
-
|
|
145
|
-
// Initialize WebSocket connection (with error handling)
|
|
146
|
-
try {
|
|
147
|
-
initLoopWebSocket();
|
|
148
|
-
} catch (err) {
|
|
149
|
-
console.error('Failed to initialize WebSocket:', err);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// Load loops (with error handling)
|
|
153
|
-
try {
|
|
154
|
-
await loadLoops();
|
|
155
|
-
} catch (err) {
|
|
156
|
-
console.error('Failed to load loops:', err);
|
|
157
|
-
showError(t('loop.failedToLoad') + ': ' + (err.message || String(err)));
|
|
158
|
-
}
|
|
159
|
-
} catch (err) {
|
|
160
|
-
console.error('Failed to render Loop Monitor:', err);
|
|
161
|
-
showError('Failed to render Loop Monitor: ' + (err.message || String(err)));
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Initialize WebSocket for real-time updates
|
|
167
|
-
*/
|
|
168
|
-
function initLoopWebSocket() {
|
|
169
|
-
// Check max reconnect attempts
|
|
170
|
-
if (window.loopReconnectAttempts >= window.loopMaxReconnectAttempts) {
|
|
171
|
-
console.warn('Loop WebSocket max reconnection attempts reached, giving up');
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
if (window.loopWebSocket) {
|
|
176
|
-
window.loopWebSocket.close();
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
180
|
-
const wsUrl = `${protocol}//${window.location.host}/ws`;
|
|
181
|
-
|
|
182
|
-
try {
|
|
183
|
-
window.loopWebSocket = new WebSocket(wsUrl);
|
|
184
|
-
|
|
185
|
-
window.loopWebSocket.onmessage = (event) => {
|
|
186
|
-
try {
|
|
187
|
-
const data = JSON.parse(event.data);
|
|
188
|
-
|
|
189
|
-
if (data.type === 'LOOP_STATE_UPDATE' ||
|
|
190
|
-
data.type === 'LOOP_STEP_COMPLETED' ||
|
|
191
|
-
data.type === 'LOOP_COMPLETED') {
|
|
192
|
-
handleLoopUpdate(data);
|
|
193
|
-
}
|
|
194
|
-
} catch (err) {
|
|
195
|
-
console.error('WebSocket message parse error:', err);
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
window.loopWebSocket.onopen = () => {
|
|
200
|
-
console.log('Loop WebSocket connected');
|
|
201
|
-
window.loopReconnectAttempts = 0; // Reset on successful connection
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
window.loopWebSocket.onerror = (err) => {
|
|
205
|
-
console.error('Loop WebSocket error:', err);
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
window.loopWebSocket.onclose = () => {
|
|
209
|
-
window.loopReconnectAttempts++;
|
|
210
|
-
console.log('Loop WebSocket closed, reconnecting in 5s... (attempt ' + window.loopReconnectAttempts + '/' + window.loopMaxReconnectAttempts + ')');
|
|
211
|
-
setTimeout(initLoopWebSocket, 5000);
|
|
212
|
-
};
|
|
213
|
-
} catch (err) {
|
|
214
|
-
console.error('Failed to create WebSocket:', err);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Handle real-time loop update
|
|
220
|
-
*/
|
|
221
|
-
function handleLoopUpdate(data) {
|
|
222
|
-
const loop = data.data;
|
|
223
|
-
if (!loop || !loop.loop_id) return;
|
|
224
|
-
|
|
225
|
-
// Update store
|
|
226
|
-
window.loopStateStore[loop.loop_id] = loop;
|
|
227
|
-
|
|
228
|
-
// Re-render
|
|
229
|
-
renderLoopList();
|
|
230
|
-
if (window.selectedLoopId === loop.loop_id) {
|
|
231
|
-
renderLoopDetail(loop.loop_id);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Load all loops from API (both v1 and v2)
|
|
237
|
-
*/
|
|
238
|
-
async function loadLoops() {
|
|
239
|
-
try {
|
|
240
|
-
// Fetch v2 loops (new simplified format)
|
|
241
|
-
const v2Response = await fetch('/api/loops/v2');
|
|
242
|
-
const v2Result = await v2Response.json();
|
|
243
|
-
|
|
244
|
-
if (v2Result.success && v2Result.data) {
|
|
245
|
-
v2Result.data.forEach(loop => {
|
|
246
|
-
window.loopStateStore[loop.loop_id] = loop;
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// Fetch v1 loops (legacy format with task_id)
|
|
251
|
-
const v1Response = await fetch('/api/loops');
|
|
252
|
-
const v1Result = await v1Response.json();
|
|
253
|
-
|
|
254
|
-
if (v1Result.success && v1Result.data) {
|
|
255
|
-
v1Result.data.forEach(loop => {
|
|
256
|
-
window.loopStateStore[loop.loop_id] = loop;
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
const loopCount = Object.keys(window.loopStateStore).length;
|
|
261
|
-
|
|
262
|
-
// If no active loops, check for tasks and show tasks tab instead
|
|
263
|
-
if (loopCount === 0) {
|
|
264
|
-
await showTasksTabIfAny();
|
|
265
|
-
} else {
|
|
266
|
-
renderLoopList();
|
|
267
|
-
}
|
|
268
|
-
} catch (err) {
|
|
269
|
-
console.error('Load loops error:', err);
|
|
270
|
-
showError(t('loop.failedToLoad') + ': ' + err.message);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Show tasks tab if there are any loop-enabled tasks
|
|
276
|
-
*/
|
|
277
|
-
async function showTasksTabIfAny() {
|
|
278
|
-
try {
|
|
279
|
-
const response = await fetch('/api/tasks');
|
|
280
|
-
const result = await response.json();
|
|
281
|
-
|
|
282
|
-
if (result.success) {
|
|
283
|
-
const tasks = result.data || [];
|
|
284
|
-
const loopEnabledTasks = tasks.filter(t => t.loop_control && t.loop_control.enabled);
|
|
285
|
-
|
|
286
|
-
// Only show tasks tab if there are loop-enabled tasks
|
|
287
|
-
if (loopEnabledTasks.length > 0) {
|
|
288
|
-
await showTasksTab();
|
|
289
|
-
} else {
|
|
290
|
-
// No loops and no tasks, show empty state
|
|
291
|
-
renderLoopList();
|
|
292
|
-
}
|
|
293
|
-
} else {
|
|
294
|
-
renderLoopList();
|
|
295
|
-
}
|
|
296
|
-
} catch (err) {
|
|
297
|
-
console.error('Check tasks error:', err);
|
|
298
|
-
renderLoopList();
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Render loop list
|
|
304
|
-
*/
|
|
305
|
-
function renderLoopList() {
|
|
306
|
-
const container = document.getElementById('loopList');
|
|
307
|
-
if (!container) return;
|
|
308
|
-
|
|
309
|
-
const filter = document.getElementById('loopFilter')?.value || 'all';
|
|
310
|
-
const loops = Object.values(window.loopStateStore);
|
|
311
|
-
|
|
312
|
-
const filteredLoops = loops.filter(loop => {
|
|
313
|
-
if (filter === 'all') return true;
|
|
314
|
-
return loop.status === filter;
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
if (filteredLoops.length === 0) {
|
|
318
|
-
container.innerHTML = `
|
|
319
|
-
<div class="empty-state">
|
|
320
|
-
<div class="empty-state-icon">
|
|
321
|
-
<i data-lucide="inbox" class="w-6 h-6"></i>
|
|
322
|
-
</div>
|
|
323
|
-
<p class="empty-state-title">${t('loop.noLoops')}</p>
|
|
324
|
-
<p class="empty-state-hint">${t('loop.noLoopsHint')}</p>
|
|
325
|
-
</div>
|
|
326
|
-
`;
|
|
327
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
container.innerHTML = filteredLoops.map(loop => renderLoopCard(loop)).join('');
|
|
332
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Render single loop card
|
|
337
|
-
*/
|
|
338
|
-
function renderLoopCard(loop) {
|
|
339
|
-
const config = loopStatusConfig[loop.status] || loopStatusConfig.created;
|
|
340
|
-
const isSelected = window.selectedLoopId === loop.loop_id;
|
|
341
|
-
|
|
342
|
-
const progress = loop.max_iterations > 0
|
|
343
|
-
? Math.round((loop.current_iteration / loop.max_iterations) * 100)
|
|
344
|
-
: 0;
|
|
345
|
-
|
|
346
|
-
// Lucide icons for each status
|
|
347
|
-
const statusIcons = {
|
|
348
|
-
created: 'inbox',
|
|
349
|
-
running: 'zap',
|
|
350
|
-
paused: 'pause',
|
|
351
|
-
completed: 'check',
|
|
352
|
-
failed: 'alert-triangle'
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
// Check if this is a v2 loop (has title field) or v1 loop (has task_id field)
|
|
356
|
-
const isV2 = loop.hasOwnProperty('title');
|
|
357
|
-
const displayTitle = isV2 ? (loop.title || loop.loop_id) : loop.loop_id;
|
|
358
|
-
const displaySubtitle = isV2 ? (loop.description || '') : (loop.task_id || 'N/A');
|
|
359
|
-
|
|
360
|
-
// v1 loops have current_cli_step and cli_sequence, v2 loops don't
|
|
361
|
-
const hasStepInfo = loop.hasOwnProperty('current_cli_step') && loop.cli_sequence;
|
|
362
|
-
const stepInfo = hasStepInfo
|
|
363
|
-
? `<div class="loop-step-info">
|
|
364
|
-
<i data-lucide="git-commit" class="w-3 h-3"></i> ${loop.current_cli_step + 1}/${loop.cli_sequence?.length || 0}
|
|
365
|
-
</div>`
|
|
366
|
-
: '';
|
|
367
|
-
|
|
368
|
-
return `
|
|
369
|
-
<div class="loop-card status-${loop.status} ${isSelected ? 'selected' : ''}"
|
|
370
|
-
onclick="selectLoop('${loop.loop_id}')">
|
|
371
|
-
<div class="loop-card-header">
|
|
372
|
-
<span class="loop-status-indicator ${loop.status}">
|
|
373
|
-
<i data-lucide="${statusIcons[loop.status] || 'circle'}" class="w-4 h-4"></i>
|
|
374
|
-
</span>
|
|
375
|
-
<span class="loop-title">${escapeHtml(displayTitle)}</span>
|
|
376
|
-
</div>
|
|
377
|
-
<div class="loop-card-body">
|
|
378
|
-
${displaySubtitle ? `<div class="loop-description">${escapeHtml(displaySubtitle).substring(0, 60)}${displaySubtitle.length > 60 ? '...' : ''}</div>` : ''}
|
|
379
|
-
<div class="loop-meta">
|
|
380
|
-
<span class="loop-status-text">${config.label}</span>
|
|
381
|
-
</div>
|
|
382
|
-
<div class="loop-progress">
|
|
383
|
-
<div class="progress-bar">
|
|
384
|
-
<div class="progress-fill" style="width: ${progress}%"></div>
|
|
385
|
-
</div>
|
|
386
|
-
<span class="progress-text">${loop.current_iteration}/${loop.max_iterations} (${progress}%)</span>
|
|
387
|
-
</div>
|
|
388
|
-
${stepInfo}
|
|
389
|
-
<div class="loop-time">
|
|
390
|
-
<i data-lucide="clock" class="w-3 h-3"></i> ${formatRelativeTime(loop.updated_at)}
|
|
391
|
-
</div>
|
|
392
|
-
</div>
|
|
393
|
-
</div>
|
|
394
|
-
`;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
* Select and show loop detail
|
|
399
|
-
*/
|
|
400
|
-
function selectLoop(loopId) {
|
|
401
|
-
window.selectedLoopId = loopId;
|
|
402
|
-
renderLoopList(); // Re-render to update selection
|
|
403
|
-
renderLoopDetail(loopId);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Render loop detail panel
|
|
408
|
-
*/
|
|
409
|
-
function renderLoopDetail(loopId) {
|
|
410
|
-
const container = document.getElementById('loopDetailPanel');
|
|
411
|
-
const loop = window.loopStateStore[loopId];
|
|
412
|
-
|
|
413
|
-
if (!loop) {
|
|
414
|
-
container.innerHTML = `
|
|
415
|
-
<div class="empty-detail-state">
|
|
416
|
-
<div class="empty-icon-large">
|
|
417
|
-
<i data-lucide="alert-circle" class="w-10 h-10"></i>
|
|
418
|
-
</div>
|
|
419
|
-
<p class="empty-state-title">${t('loop.loopNotFound')}</p>
|
|
420
|
-
<p class="empty-state-hint">${t('loop.selectAnotherLoop')}</p>
|
|
421
|
-
</div>
|
|
422
|
-
`;
|
|
423
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
const config = loopStatusConfig[loop.status] || loopStatusConfig.created;
|
|
428
|
-
const iterProgress = loop.max_iterations > 0
|
|
429
|
-
? Math.round((loop.current_iteration / loop.max_iterations) * 100)
|
|
430
|
-
: 0;
|
|
431
|
-
|
|
432
|
-
// Check if this is a v2 loop (has title field) or v1 loop (has task_id field)
|
|
433
|
-
const isV2 = loop.hasOwnProperty('title');
|
|
434
|
-
const displayTitle = isV2 ? (loop.title || loop.loop_id) : loop.loop_id;
|
|
435
|
-
const hasStepInfo = loop.hasOwnProperty('current_cli_step') && loop.cli_sequence;
|
|
436
|
-
const stepProgress = hasStepInfo && loop.cli_sequence.length > 0
|
|
437
|
-
? Math.round(((loop.current_cli_step + 1) / loop.cli_sequence.length) * 100)
|
|
438
|
-
: 0;
|
|
439
|
-
|
|
440
|
-
container.innerHTML = `
|
|
441
|
-
<div class="loop-detail">
|
|
442
|
-
<!-- Header -->
|
|
443
|
-
<div class="detail-header">
|
|
444
|
-
<div class="detail-status ${loop.status}">
|
|
445
|
-
<i data-lucide="${getStatusIcon(loop.status)}" class="w-4 h-4"></i>
|
|
446
|
-
<span class="status-label">${config.label}</span>
|
|
447
|
-
${isV2 ? '<span class="version-badge">v2</span>' : '<span class="version-badge">v1</span>'}
|
|
448
|
-
</div>
|
|
449
|
-
<div class="detail-actions">
|
|
450
|
-
${loop.status === 'running' ? `
|
|
451
|
-
<button class="btn btn-warning" onclick="pauseLoop('${loop.loop_id}')">
|
|
452
|
-
<i data-lucide="pause" class="w-4 h-4"></i> ${t('loop.pause')}
|
|
453
|
-
</button>
|
|
454
|
-
` : ''}
|
|
455
|
-
${loop.status === 'paused' ? `
|
|
456
|
-
<button class="btn btn-success" onclick="resumeLoop('${loop.loop_id}')">
|
|
457
|
-
<i data-lucide="play" class="w-4 h-4"></i> ${t('loop.resume')}
|
|
458
|
-
</button>
|
|
459
|
-
` : ''}
|
|
460
|
-
${loop.status === 'created' ? `
|
|
461
|
-
<button class="btn btn-success" onclick="startLoopV2('${loop.loop_id}')">
|
|
462
|
-
<i data-lucide="play" class="w-4 h-4"></i> ${t('loop.start')}
|
|
463
|
-
</button>
|
|
464
|
-
` : ''}
|
|
465
|
-
${(loop.status === 'running' || loop.status === 'paused' || loop.status === 'created') ? `
|
|
466
|
-
<button class="btn btn-danger" onclick="confirmStopLoop('${loop.loop_id}')">
|
|
467
|
-
<i data-lucide="stop-circle" class="w-4 h-4"></i> ${t('loop.stop')}
|
|
468
|
-
</button>
|
|
469
|
-
` : ''}
|
|
470
|
-
</div>
|
|
471
|
-
</div>
|
|
472
|
-
|
|
473
|
-
<!-- Info -->
|
|
474
|
-
<div class="detail-info">
|
|
475
|
-
<h3 class="detail-title">${escapeHtml(displayTitle)}</h3>
|
|
476
|
-
${loop.description ? `<p class="detail-description">${escapeHtml(loop.description)}</p>` : ''}
|
|
477
|
-
<div class="detail-meta">
|
|
478
|
-
<span><i data-lucide="calendar" class="w-4 h-4"></i> ${t('loop.created')}: ${formatDateTime(loop.created_at)}</span>
|
|
479
|
-
<span><i data-lucide="clock" class="w-4 h-4"></i> ${t('loop.updated')}: ${formatRelativeTime(loop.updated_at)}</span>
|
|
480
|
-
${loop.task_id ? `<span><i data-lucide="list-tree" class="w-4 h-4"></i> ${escapeHtml(loop.task_id)}</span>` : ''}
|
|
481
|
-
<span><i data-lucide="hash" class="w-4 h-4"></i> ${escapeHtml(loop.loop_id)}</span>
|
|
482
|
-
</div>
|
|
483
|
-
</div>
|
|
484
|
-
|
|
485
|
-
<!-- Progress -->
|
|
486
|
-
<div class="detail-section">
|
|
487
|
-
<h4><i data-lucide="trending-up" class="w-4 h-4"></i> ${t('loop.progress')}</h4>
|
|
488
|
-
<div class="progress-group">
|
|
489
|
-
<div class="progress-item">
|
|
490
|
-
<label><i data-lucide="repeat" class="w-3 h-3"></i> ${t('loop.iteration')}</label>
|
|
491
|
-
<div class="progress-bar">
|
|
492
|
-
<div class="progress-fill" style="width: ${iterProgress}%"></div>
|
|
493
|
-
</div>
|
|
494
|
-
<span class="progress-text">${loop.current_iteration}/${loop.max_iterations} (${iterProgress}%)</span>
|
|
495
|
-
</div>
|
|
496
|
-
${hasStepInfo ? `
|
|
497
|
-
<div class="progress-item">
|
|
498
|
-
<label><i data-lucide="git-commit" class="w-3 h-3"></i> ${t('loop.currentStep')}</label>
|
|
499
|
-
<div class="progress-bar">
|
|
500
|
-
<div class="progress-fill" style="width: ${stepProgress}%"></div>
|
|
501
|
-
</div>
|
|
502
|
-
<span class="progress-text">${loop.current_cli_step + 1}/${loop.cli_sequence?.length || 0}</span>
|
|
503
|
-
</div>
|
|
504
|
-
` : ''}
|
|
505
|
-
</div>
|
|
506
|
-
</div>
|
|
507
|
-
|
|
508
|
-
${hasStepInfo ? `
|
|
509
|
-
<!-- CLI Sequence (v1 only) -->
|
|
510
|
-
<div class="detail-section">
|
|
511
|
-
<h4><i data-lucide="list-ordered" class="w-4 h-4"></i> ${t('loop.cliSequence')}</h4>
|
|
512
|
-
<div class="cli-sequence">
|
|
513
|
-
${(loop.cli_sequence || []).map((step, index) => {
|
|
514
|
-
const isCurrent = index === loop.current_cli_step;
|
|
515
|
-
const isPast = index < loop.current_cli_step;
|
|
516
|
-
const stepStatus = isCurrent ? 'current' : (isPast ? 'completed' : 'pending');
|
|
517
|
-
|
|
518
|
-
return `
|
|
519
|
-
<div class="cli-step ${stepStatus}">
|
|
520
|
-
<div class="step-marker">${isPast ? '<i data-lucide="check" class="w-3 h-3"></i>' : (isCurrent ? '<i data-lucide="circle-dot" class="w-3 h-3"></i>' : index + 1)}</div>
|
|
521
|
-
<div class="step-content">
|
|
522
|
-
<div class="step-name">${escapeHtml(step.tool || 'unknown')}</div>
|
|
523
|
-
<div class="step-prompt">${escapeHtml(step.prompt?.substring(0, 100) || '')}${step.prompt?.length > 100 ? '...' : ''}</div>
|
|
524
|
-
</div>
|
|
525
|
-
</div>
|
|
526
|
-
`;
|
|
527
|
-
}).join('')}
|
|
528
|
-
</div>
|
|
529
|
-
</div>
|
|
530
|
-
` : `
|
|
531
|
-
<!-- V2 Loop Info -->
|
|
532
|
-
<div class="detail-section">
|
|
533
|
-
<h4><i data-lucide="info" class="w-4 h-4"></i> ${t('loop.loopInfo') || 'Loop Info'}</h4>
|
|
534
|
-
<div class="info-box">
|
|
535
|
-
<p>${t('loop.v2LoopInfo') || 'This is a simplified loop. Tasks are managed independently in the detail view.'}</p>
|
|
536
|
-
<button class="btn btn-primary mt-2" onclick="showLoopTasks('${loop.loop_id}')">
|
|
537
|
-
<i data-lucide="list" class="w-4 h-4"></i> ${t('loop.manageTasks') || 'Manage Tasks'}
|
|
538
|
-
</button>
|
|
539
|
-
</div>
|
|
540
|
-
</div>
|
|
541
|
-
`}
|
|
542
|
-
|
|
543
|
-
<!-- Variables -->
|
|
544
|
-
${Object.keys(loop.state_variables || {}).length > 0 ? `
|
|
545
|
-
<div class="detail-section">
|
|
546
|
-
<h4><i data-lucide="database" class="w-4 h-4"></i> ${t('loop.stateVariables')}</h4>
|
|
547
|
-
<div class="variables-grid">
|
|
548
|
-
${Object.entries(loop.state_variables || {}).map(([key, value]) => `
|
|
549
|
-
<div class="variable-item">
|
|
550
|
-
<span class="variable-key">${escapeHtml(key)}</span>
|
|
551
|
-
<span class="variable-value">${escapeHtml(value)}</span>
|
|
552
|
-
</div>
|
|
553
|
-
`).join('')}
|
|
554
|
-
</div>
|
|
555
|
-
</div>
|
|
556
|
-
` : ''}
|
|
557
|
-
|
|
558
|
-
<!-- Execution History -->
|
|
559
|
-
${(loop.execution_history?.length || 0) > 0 ? `
|
|
560
|
-
<div class="detail-section">
|
|
561
|
-
<h4><i data-lucide="history" class="w-4 h-4"></i> ${t('loop.executionHistory')}</h4>
|
|
562
|
-
<div class="execution-timeline">
|
|
563
|
-
${renderExecutionTimeline(loop)}
|
|
564
|
-
</div>
|
|
565
|
-
</div>
|
|
566
|
-
` : ''}
|
|
567
|
-
|
|
568
|
-
<!-- Error -->
|
|
569
|
-
${loop.failure_reason ? `
|
|
570
|
-
<div class="detail-section error-section">
|
|
571
|
-
<h4><i data-lucide="alert-triangle" class="w-4 h-4"></i> ${t('loop.failureReason')}</h4>
|
|
572
|
-
<div class="error-message">${escapeHtml(loop.failure_reason)}</div>
|
|
573
|
-
</div>
|
|
574
|
-
` : ''}
|
|
575
|
-
</div>
|
|
576
|
-
`;
|
|
577
|
-
|
|
578
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* Render execution timeline
|
|
583
|
-
*/
|
|
584
|
-
function renderExecutionTimeline(loop) {
|
|
585
|
-
const history = loop.execution_history || [];
|
|
586
|
-
const sequence = loop.cli_sequence || [];
|
|
587
|
-
|
|
588
|
-
// Group by iteration
|
|
589
|
-
const iterations = {};
|
|
590
|
-
history.forEach(record => {
|
|
591
|
-
if (!iterations[record.iteration]) {
|
|
592
|
-
iterations[record.iteration] = [];
|
|
593
|
-
}
|
|
594
|
-
iterations[record.iteration].push(record);
|
|
595
|
-
});
|
|
596
|
-
|
|
597
|
-
return Object.entries(iterations)
|
|
598
|
-
.sort(([a], [b]) => parseInt(a) - parseInt(b))
|
|
599
|
-
.map(([iter, records]) => {
|
|
600
|
-
const isCurrent = parseInt(iter) === loop.current_iteration;
|
|
601
|
-
return `
|
|
602
|
-
<div class="timeline-iteration ${isCurrent ? 'current' : 'completed'}">
|
|
603
|
-
<div class="iteration-header">
|
|
604
|
-
<span class="iteration-marker">${isCurrent ? '<i data-lucide="circle-dot" class="w-4 h-4"></i>' : '<i data-lucide="check-circle-2" class="w-4 h-4"></i>'}</span>
|
|
605
|
-
<span>${t('loop.iteration')} ${iter}</span>
|
|
606
|
-
</div>
|
|
607
|
-
<div class="iteration-steps">
|
|
608
|
-
${records.map(record => `
|
|
609
|
-
<div class="timeline-step">
|
|
610
|
-
<div class="step-status ${record.success ? 'success' : 'failed'}">
|
|
611
|
-
${record.success ? '<i data-lucide="check" class="w-3 h-3"></i>' : '<i data-lucide="x" class="w-3 h-3"></i>'}
|
|
612
|
-
</div>
|
|
613
|
-
<div class="step-info">
|
|
614
|
-
<div class="step-tool">${escapeHtml(sequence[record.step_index]?.tool || 'unknown')}</div>
|
|
615
|
-
<div class="step-time"><i data-lucide="clock" class="w-3 h-3"></i> ${formatDateTime(record.started_at)}</div>
|
|
616
|
-
<div class="step-duration"><i data-lucide="timer" class="w-3 h-3"></i> ${record.duration_ms}ms</div>
|
|
617
|
-
${!record.success && record.error ? `
|
|
618
|
-
<div class="step-error"><i data-lucide="alert-circle" class="w-3 h-3"></i> ${escapeHtml(record.error)}</div>
|
|
619
|
-
` : ''}
|
|
620
|
-
</div>
|
|
621
|
-
</div>
|
|
622
|
-
`).join('')}
|
|
623
|
-
</div>
|
|
624
|
-
</div>
|
|
625
|
-
`;
|
|
626
|
-
}).join('');
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* Filter loops by status
|
|
631
|
-
*/
|
|
632
|
-
function filterLoops() {
|
|
633
|
-
renderLoopList();
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* Pause loop (v1 or v2)
|
|
638
|
-
*/
|
|
639
|
-
async function pauseLoop(loopId) {
|
|
640
|
-
const loop = window.loopStateStore[loopId];
|
|
641
|
-
const isV2 = loop && loop.hasOwnProperty('title');
|
|
642
|
-
const endpoint = isV2 ? `/api/loops/v2/${loopId}/pause` : `/api/loops/${loopId}/pause`;
|
|
643
|
-
|
|
644
|
-
try {
|
|
645
|
-
const response = await fetch(endpoint, { method: 'POST' });
|
|
646
|
-
const result = await response.json();
|
|
647
|
-
|
|
648
|
-
if (result.success) {
|
|
649
|
-
showNotification(t('loop.loopPaused'), 'success');
|
|
650
|
-
await loadLoops();
|
|
651
|
-
} else {
|
|
652
|
-
showError(t('loop.failedToPause') + ': ' + (result.error || t('common.error')));
|
|
653
|
-
}
|
|
654
|
-
} catch (err) {
|
|
655
|
-
console.error('Pause loop error:', err);
|
|
656
|
-
showError(t('loop.failedToPause') + ': ' + err.message);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
/**
|
|
661
|
-
* Resume loop (v1 or v2)
|
|
662
|
-
*/
|
|
663
|
-
async function resumeLoop(loopId) {
|
|
664
|
-
const loop = window.loopStateStore[loopId];
|
|
665
|
-
const isV2 = loop && loop.hasOwnProperty('title');
|
|
666
|
-
const endpoint = isV2 ? `/api/loops/v2/${loopId}/resume` : `/api/loops/${loopId}/resume`;
|
|
667
|
-
|
|
668
|
-
try {
|
|
669
|
-
const response = await fetch(endpoint, { method: 'POST' });
|
|
670
|
-
const result = await response.json();
|
|
671
|
-
|
|
672
|
-
if (result.success) {
|
|
673
|
-
showNotification(t('loop.loopResumed'), 'success');
|
|
674
|
-
await loadLoops();
|
|
675
|
-
} else {
|
|
676
|
-
showError(t('loop.failedToResume') + ': ' + (result.error || t('common.error')));
|
|
677
|
-
}
|
|
678
|
-
} catch (err) {
|
|
679
|
-
console.error('Resume loop error:', err);
|
|
680
|
-
showError(t('loop.failedToResume') + ': ' + err.message);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* Confirm and stop loop
|
|
686
|
-
*/
|
|
687
|
-
function confirmStopLoop(loopId) {
|
|
688
|
-
const loop = window.loopStateStore[loopId];
|
|
689
|
-
if (!loop) return;
|
|
690
|
-
|
|
691
|
-
const message = t('loop.confirmStop', {
|
|
692
|
-
loopId: loopId,
|
|
693
|
-
currentIteration: loop.current_iteration,
|
|
694
|
-
maxIterations: loop.max_iterations
|
|
695
|
-
});
|
|
696
|
-
|
|
697
|
-
if (confirm(message)) {
|
|
698
|
-
stopLoop(loopId);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/**
|
|
703
|
-
* Stop loop (v1 or v2)
|
|
704
|
-
*/
|
|
705
|
-
async function stopLoop(loopId) {
|
|
706
|
-
const loop = window.loopStateStore[loopId];
|
|
707
|
-
const isV2 = loop && loop.hasOwnProperty('title');
|
|
708
|
-
const endpoint = isV2 ? `/api/loops/v2/${loopId}/stop` : `/api/loops/${loopId}/stop`;
|
|
709
|
-
|
|
710
|
-
try {
|
|
711
|
-
const response = await fetch(endpoint, { method: 'POST' });
|
|
712
|
-
const result = await response.json();
|
|
713
|
-
|
|
714
|
-
if (result.success) {
|
|
715
|
-
showNotification(t('loop.loopStopped'), 'success');
|
|
716
|
-
await loadLoops();
|
|
717
|
-
} else {
|
|
718
|
-
showError(t('loop.failedToStop') + ': ' + (result.error || t('common.error')));
|
|
719
|
-
}
|
|
720
|
-
} catch (err) {
|
|
721
|
-
console.error('Stop loop error:', err);
|
|
722
|
-
showError(t('loop.failedToStop') + ': ' + err.message);
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Start loop (v2 only)
|
|
728
|
-
*/
|
|
729
|
-
async function startLoopV2(loopId) {
|
|
730
|
-
try {
|
|
731
|
-
const response = await fetch(`/api/loops/v2/${loopId}/start`, { method: 'POST' });
|
|
732
|
-
const result = await response.json();
|
|
733
|
-
|
|
734
|
-
if (result.success) {
|
|
735
|
-
showNotification(t('loop.loopStarted') || 'Loop started', 'success');
|
|
736
|
-
await loadLoops();
|
|
737
|
-
} else {
|
|
738
|
-
showError(t('loop.failedToStart') + ': ' + (result.error || t('common.error')));
|
|
739
|
-
}
|
|
740
|
-
} catch (err) {
|
|
741
|
-
console.error('Start loop error:', err);
|
|
742
|
-
showError(t('loop.failedToStart') + ': ' + err.message);
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
// ==========================================
|
|
747
|
-
// TASK MANAGEMENT FOR V2 LOOPS
|
|
748
|
-
// ==========================================
|
|
749
|
-
|
|
750
|
-
// Task drag state
|
|
751
|
-
const taskDragState = {
|
|
752
|
-
dragging: null,
|
|
753
|
-
loopId: null
|
|
754
|
-
};
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* Show loop tasks (v2 task management)
|
|
758
|
-
* Displays the task list for a v2 loop with add/edit/delete/reorder functionality
|
|
759
|
-
*/
|
|
760
|
-
async function showLoopTasks(loopId) {
|
|
761
|
-
const container = document.getElementById('loopDetailPanel');
|
|
762
|
-
const loop = window.loopStateStore[loopId];
|
|
763
|
-
|
|
764
|
-
if (!loop) return;
|
|
765
|
-
|
|
766
|
-
// Set current loop ID for task operations
|
|
767
|
-
window.currentLoopId = loopId;
|
|
768
|
-
|
|
769
|
-
container.innerHTML = `
|
|
770
|
-
<div class="loop-detail">
|
|
771
|
-
<div class="detail-header">
|
|
772
|
-
<div class="detail-status active">
|
|
773
|
-
<i data-lucide="list" class="w-4 h-4"></i>
|
|
774
|
-
<span class="status-label">${t('loop.tasks') || 'Tasks'}</span>
|
|
775
|
-
</div>
|
|
776
|
-
<div class="detail-actions">
|
|
777
|
-
<button class="btn btn-success" onclick="showAddTaskModal('${loopId}')" title="${t('loop.addTask') || 'Add Task'}">
|
|
778
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.addTask') || 'Add Task'}
|
|
779
|
-
</button>
|
|
780
|
-
<button class="btn btn-secondary" onclick="selectLoop('${loopId}')">
|
|
781
|
-
<i data-lucide="arrow-left" class="w-4 h-4"></i> ${t('loop.back') || 'Back'}
|
|
782
|
-
</button>
|
|
783
|
-
</div>
|
|
784
|
-
</div>
|
|
785
|
-
<div class="detail-section">
|
|
786
|
-
<div class="tasks-list-header">
|
|
787
|
-
<h4><i data-lucide="layers" class="w-4 h-4"></i> ${t('loop.taskList') || 'Task List'}</h4>
|
|
788
|
-
<span class="text-sm text-gray-500" id="taskCount">${t('loop.loading') || 'Loading...'}</span>
|
|
789
|
-
</div>
|
|
790
|
-
<div id="loopTasksList" class="task-list">
|
|
791
|
-
<div class="loading-spinner">${t('loop.loading') || 'Loading...'}</div>
|
|
792
|
-
</div>
|
|
793
|
-
</div>
|
|
794
|
-
</div>
|
|
795
|
-
`;
|
|
796
|
-
|
|
797
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
798
|
-
|
|
799
|
-
// Load tasks
|
|
800
|
-
await loadLoopTasks(loopId);
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* Load tasks for a loop from the v2 API
|
|
805
|
-
*/
|
|
806
|
-
async function loadLoopTasks(loopId) {
|
|
807
|
-
const container = document.getElementById('loopTasksList');
|
|
808
|
-
const countEl = document.getElementById('taskCount');
|
|
809
|
-
|
|
810
|
-
if (!container) return;
|
|
811
|
-
|
|
812
|
-
try {
|
|
813
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}/tasks`);
|
|
814
|
-
const result = await response.json();
|
|
815
|
-
|
|
816
|
-
if (!result.success) {
|
|
817
|
-
container.innerHTML = `
|
|
818
|
-
<div class="task-list-empty">
|
|
819
|
-
<i data-lucide="alert-circle" class="w-8 h-8"></i>
|
|
820
|
-
<p>${t('loop.loadTasksFailed') || 'Failed to load tasks'}</p>
|
|
821
|
-
<p class="text-sm text-gray-500">${result.error || ''}</p>
|
|
822
|
-
</div>
|
|
823
|
-
`;
|
|
824
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
825
|
-
return;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
const tasks = result.data || [];
|
|
829
|
-
|
|
830
|
-
// Update count
|
|
831
|
-
if (countEl) {
|
|
832
|
-
countEl.textContent = `${tasks.length} ${t('loop.tasks') || 'tasks'}`;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
if (tasks.length === 0) {
|
|
836
|
-
container.innerHTML = `
|
|
837
|
-
<div class="task-list-empty">
|
|
838
|
-
<i data-lucide="layers" class="w-8 h-8"></i>
|
|
839
|
-
<p class="empty-state-title">${t('loop.noTasksYet') || 'No tasks yet'}</p>
|
|
840
|
-
<p class="empty-state-hint">${t('loop.noTasksHint') || 'Add your first task to get started'}</p>
|
|
841
|
-
<button class="btn btn-primary mt-3" onclick="showAddTaskModal('${loopId}')">
|
|
842
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.addTask') || 'Add Task'}
|
|
843
|
-
</button>
|
|
844
|
-
</div>
|
|
845
|
-
`;
|
|
846
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
847
|
-
return;
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
// Render tasks
|
|
851
|
-
container.innerHTML = tasks.map(task => renderTaskItem(task)).join('');
|
|
852
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
853
|
-
|
|
854
|
-
// Initialize drag-drop
|
|
855
|
-
initTaskDragDrop();
|
|
856
|
-
|
|
857
|
-
} catch (err) {
|
|
858
|
-
console.error('Load loop tasks error:', err);
|
|
859
|
-
container.innerHTML = `
|
|
860
|
-
<div class="task-list-empty">
|
|
861
|
-
<i data-lucide="alert-circle" class="w-8 h-8"></i>
|
|
862
|
-
<p>${t('loop.loadTasksError') || 'Error loading tasks'}</p>
|
|
863
|
-
<p class="text-sm text-gray-500">${err.message}</p>
|
|
864
|
-
</div>
|
|
865
|
-
`;
|
|
866
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
/**
|
|
871
|
-
* Render a single task item in the list
|
|
872
|
-
*/
|
|
873
|
-
function renderTaskItem(task) {
|
|
874
|
-
const statusBadges = {
|
|
875
|
-
analysis: '<span class="task-status-badge status-analysis">analysis</span>',
|
|
876
|
-
write: '<span class="task-status-badge status-write">write</span>',
|
|
877
|
-
review: '<span class="task-status-badge status-review">review</span>'
|
|
878
|
-
};
|
|
879
|
-
|
|
880
|
-
const modeBadge = statusBadges[task.mode] || `<span class="task-status-badge">${task.mode || 'unknown'}</span>`;
|
|
881
|
-
const toolBadge = `<span class="task-tool-badge">${task.tool || 'gemini'}</span>`;
|
|
882
|
-
|
|
883
|
-
return `
|
|
884
|
-
<div class="task-item" draggable="true" data-task-id="${task.task_id || task.id}">
|
|
885
|
-
<div class="task-item-drag">
|
|
886
|
-
<i data-lucide="grip-vertical" class="w-4 h-4"></i>
|
|
887
|
-
</div>
|
|
888
|
-
<div class="task-item-content">
|
|
889
|
-
<div class="task-item-header">
|
|
890
|
-
<span class="task-item-description">${escapeHtml(task.description || t('loop.noDescription') || 'No description')}</span>
|
|
891
|
-
</div>
|
|
892
|
-
<div class="task-item-meta">
|
|
893
|
-
${toolBadge}
|
|
894
|
-
${modeBadge}
|
|
895
|
-
</div>
|
|
896
|
-
</div>
|
|
897
|
-
<div class="task-item-actions">
|
|
898
|
-
<button class="btn btn-sm btn-secondary" onclick="editTask('${task.task_id || task.id}')" title="${t('loop.edit') || 'Edit'}">
|
|
899
|
-
<i data-lucide="edit-2" class="w-3 h-3"></i>
|
|
900
|
-
</button>
|
|
901
|
-
<button class="btn btn-sm btn-danger" onclick="confirmDeleteTask('${task.task_id || task.id}')" title="${t('loop.delete') || 'Delete'}">
|
|
902
|
-
<i data-lucide="trash-2" class="w-3 h-3"></i>
|
|
903
|
-
</button>
|
|
904
|
-
</div>
|
|
905
|
-
</div>
|
|
906
|
-
`;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* Initialize drag-drop for task list
|
|
911
|
-
*/
|
|
912
|
-
function initTaskDragDrop() {
|
|
913
|
-
const items = document.querySelectorAll('.task-item[draggable="true"]');
|
|
914
|
-
|
|
915
|
-
items.forEach(item => {
|
|
916
|
-
item.addEventListener('dragstart', handleTaskDragStart);
|
|
917
|
-
item.addEventListener('dragend', handleTaskDragEnd);
|
|
918
|
-
item.addEventListener('dragover', handleTaskDragOver);
|
|
919
|
-
item.addEventListener('drop', handleTaskDrop);
|
|
920
|
-
});
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
function handleTaskDragStart(e) {
|
|
924
|
-
const item = e.target.closest('.task-item');
|
|
925
|
-
if (!item) return;
|
|
926
|
-
|
|
927
|
-
taskDragState.dragging = item.dataset.taskId;
|
|
928
|
-
taskDragState.loopId = window.currentLoopId;
|
|
929
|
-
|
|
930
|
-
item.classList.add('dragging');
|
|
931
|
-
e.dataTransfer.effectAllowed = 'move';
|
|
932
|
-
e.dataTransfer.setData('text/plain', item.dataset.taskId);
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
function handleTaskDragEnd(e) {
|
|
936
|
-
const item = e.target.closest('.task-item');
|
|
937
|
-
if (item) {
|
|
938
|
-
item.classList.remove('dragging');
|
|
939
|
-
}
|
|
940
|
-
taskDragState.dragging = null;
|
|
941
|
-
taskDragState.loopId = null;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
function handleTaskDragOver(e) {
|
|
945
|
-
e.preventDefault();
|
|
946
|
-
|
|
947
|
-
const target = e.target.closest('.task-item');
|
|
948
|
-
if (!target || target.dataset.taskId === taskDragState.dragging) return;
|
|
949
|
-
|
|
950
|
-
e.dataTransfer.dropEffect = 'move';
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
function handleTaskDrop(e) {
|
|
954
|
-
e.preventDefault();
|
|
955
|
-
|
|
956
|
-
const target = e.target.closest('.task-item');
|
|
957
|
-
if (!target || !taskDragState.dragging) return;
|
|
958
|
-
|
|
959
|
-
const container = target.closest('.task-list');
|
|
960
|
-
if (!container) return;
|
|
961
|
-
|
|
962
|
-
// Get new order
|
|
963
|
-
const items = Array.from(container.querySelectorAll('.task-item'));
|
|
964
|
-
const draggedItem = items.find(i => i.dataset.taskId === taskDragState.dragging);
|
|
965
|
-
const targetIndex = items.indexOf(target);
|
|
966
|
-
const draggedIndex = items.indexOf(draggedItem);
|
|
967
|
-
|
|
968
|
-
if (draggedIndex === targetIndex) return;
|
|
969
|
-
|
|
970
|
-
// Reorder in DOM
|
|
971
|
-
if (draggedIndex < targetIndex) {
|
|
972
|
-
target.after(draggedItem);
|
|
973
|
-
} else {
|
|
974
|
-
target.before(draggedItem);
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
// Get new order and save
|
|
978
|
-
const newOrder = Array.from(container.querySelectorAll('.task-item')).map(i => i.dataset.taskId);
|
|
979
|
-
saveTaskOrder(taskDragState.loopId, newOrder);
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
/**
|
|
983
|
-
* Save new task order to the API
|
|
984
|
-
*/
|
|
985
|
-
async function saveTaskOrder(loopId, newOrder) {
|
|
986
|
-
try {
|
|
987
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}/tasks/reorder`, {
|
|
988
|
-
method: 'PUT',
|
|
989
|
-
headers: { 'Content-Type': 'application/json' },
|
|
990
|
-
body: JSON.stringify({ ordered_task_ids: newOrder })
|
|
991
|
-
});
|
|
992
|
-
|
|
993
|
-
if (!response.ok) {
|
|
994
|
-
throw new Error('Failed to save task order');
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
const result = await response.json();
|
|
998
|
-
if (result.error) {
|
|
999
|
-
showNotification(result.error, 'error');
|
|
1000
|
-
} else {
|
|
1001
|
-
showNotification(t('loop.tasksReordered') || 'Tasks reordered', 'success');
|
|
1002
|
-
// Reload to reflect changes
|
|
1003
|
-
await loadLoopTasks(loopId);
|
|
1004
|
-
}
|
|
1005
|
-
} catch (err) {
|
|
1006
|
-
console.error('Failed to save task order:', err);
|
|
1007
|
-
showNotification(t('loop.saveOrderFailed') || 'Failed to save order', 'error');
|
|
1008
|
-
// Reload to restore original order
|
|
1009
|
-
await loadLoopTasks(loopId);
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* Show add task modal
|
|
1015
|
-
* Loads enabled tools before displaying modal to prevent race conditions
|
|
1016
|
-
*/
|
|
1017
|
-
async function showAddTaskModal(loopId) {
|
|
1018
|
-
// Find and disable the "Add Task" button to prevent multiple clicks during loading
|
|
1019
|
-
const addTaskButton = event?.target;
|
|
1020
|
-
if (addTaskButton) {
|
|
1021
|
-
addTaskButton.disabled = true;
|
|
1022
|
-
const originalText = addTaskButton.innerHTML;
|
|
1023
|
-
addTaskButton.innerHTML = '<i class="spinner"></i> ' + (t('common.loading') || 'Loading...');
|
|
1024
|
-
|
|
1025
|
-
try {
|
|
1026
|
-
// Get enabled tools (this ensures tools are loaded before modal opens)
|
|
1027
|
-
const enabledTools = await getEnabledTools();
|
|
1028
|
-
|
|
1029
|
-
// Build tool options HTML
|
|
1030
|
-
const toolOptions = enabledTools.map(tool =>
|
|
1031
|
-
`<option value="${tool}">${tool.charAt(0).toUpperCase() + tool.slice(1)}</option>`
|
|
1032
|
-
).join('');
|
|
1033
|
-
|
|
1034
|
-
const modal = document.createElement('div');
|
|
1035
|
-
modal.id = 'addTaskModal';
|
|
1036
|
-
modal.className = 'modal-overlay';
|
|
1037
|
-
modal.innerHTML = `
|
|
1038
|
-
<div class="modal-content">
|
|
1039
|
-
<div class="modal-header">
|
|
1040
|
-
<h3><i data-lucide="plus-circle" class="w-5 h-5"></i> ${t('loop.addTask') || 'Add Task'}</h3>
|
|
1041
|
-
<button class="modal-close" onclick="closeTaskModal()">
|
|
1042
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
1043
|
-
</button>
|
|
1044
|
-
</div>
|
|
1045
|
-
<div class="modal-body">
|
|
1046
|
-
<form id="addTaskForm" onsubmit="handleAddTask(event, '${loopId}')">
|
|
1047
|
-
<div id="addTaskError" class="alert alert-error" style="display: none;"></div>
|
|
1048
|
-
|
|
1049
|
-
<!-- Description -->
|
|
1050
|
-
<div class="form-group">
|
|
1051
|
-
<label for="taskDescription">${t('loop.taskDescription') || 'Task Description'} <span class="required">*</span></label>
|
|
1052
|
-
<textarea id="taskDescription" name="description" rows="3" required
|
|
1053
|
-
placeholder="${t('loop.taskDescriptionPlaceholder') || 'Describe what this task should do...'}"
|
|
1054
|
-
class="form-control"></textarea>
|
|
1055
|
-
</div>
|
|
1056
|
-
|
|
1057
|
-
<!-- Tool -->
|
|
1058
|
-
<div class="form-group">
|
|
1059
|
-
<label for="taskTool">${t('loop.tool') || 'Tool'}</label>
|
|
1060
|
-
<select id="taskTool" name="tool" class="form-control">
|
|
1061
|
-
${toolOptions}
|
|
1062
|
-
</select>
|
|
1063
|
-
</div>
|
|
1064
|
-
|
|
1065
|
-
<!-- Mode -->
|
|
1066
|
-
<div class="form-group">
|
|
1067
|
-
<label for="taskMode">${t('loop.mode') || 'Mode'}</label>
|
|
1068
|
-
<select id="taskMode" name="mode" class="form-control">
|
|
1069
|
-
<option value="analysis">${t('loop.modeAnalysis') || 'Analysis'}</option>
|
|
1070
|
-
<option value="write">${t('loop.modeWrite') || 'Write'}</option>
|
|
1071
|
-
<option value="review">${t('loop.modeReview') || 'Review'}</option>
|
|
1072
|
-
</select>
|
|
1073
|
-
</div>
|
|
1074
|
-
|
|
1075
|
-
<!-- Form Actions -->
|
|
1076
|
-
<div class="modal-footer">
|
|
1077
|
-
<button type="button" class="btn btn-secondary" onclick="closeTaskModal()">${t('loop.cancel') || 'Cancel'}</button>
|
|
1078
|
-
<button type="submit" class="btn btn-primary">
|
|
1079
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.add') || 'Add'}
|
|
1080
|
-
</button>
|
|
1081
|
-
</div>
|
|
1082
|
-
</form>
|
|
1083
|
-
</div>
|
|
1084
|
-
</div>
|
|
1085
|
-
`;
|
|
1086
|
-
|
|
1087
|
-
document.body.appendChild(modal);
|
|
1088
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1089
|
-
|
|
1090
|
-
// Focus on description field
|
|
1091
|
-
setTimeout(() => document.getElementById('taskDescription').focus(), 100);
|
|
1092
|
-
|
|
1093
|
-
} catch (err) {
|
|
1094
|
-
console.error('Failed to show add task modal:', err);
|
|
1095
|
-
alert(t('loop.loadToolsError') || 'Failed to load available tools. Please try again.');
|
|
1096
|
-
} finally {
|
|
1097
|
-
// Restore button state
|
|
1098
|
-
if (addTaskButton) {
|
|
1099
|
-
addTaskButton.disabled = false;
|
|
1100
|
-
addTaskButton.innerHTML = originalText;
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
} else {
|
|
1104
|
-
// Fallback if event is not available (shouldn't happen normally)
|
|
1105
|
-
const enabledTools = await getEnabledTools();
|
|
1106
|
-
const toolOptions = enabledTools.map(tool =>
|
|
1107
|
-
`<option value="${tool}">${tool.charAt(0).toUpperCase() + tool.slice(1)}</option>`
|
|
1108
|
-
).join('');
|
|
1109
|
-
|
|
1110
|
-
const modal = document.createElement('div');
|
|
1111
|
-
modal.id = 'addTaskModal';
|
|
1112
|
-
modal.className = 'modal-overlay';
|
|
1113
|
-
modal.innerHTML = `
|
|
1114
|
-
<div class="modal-content">
|
|
1115
|
-
<div class="modal-header">
|
|
1116
|
-
<h3><i data-lucide="plus-circle" class="w-5 h-5"></i> ${t('loop.addTask') || 'Add Task'}</h3>
|
|
1117
|
-
<button class="modal-close" onclick="closeTaskModal()">
|
|
1118
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
1119
|
-
</button>
|
|
1120
|
-
</div>
|
|
1121
|
-
<div class="modal-body">
|
|
1122
|
-
<form id="addTaskForm" onsubmit="handleAddTask(event, '${loopId}')">
|
|
1123
|
-
<div id="addTaskError" class="alert alert-error" style="display: none;"></div>
|
|
1124
|
-
|
|
1125
|
-
<!-- Description -->
|
|
1126
|
-
<div class="form-group">
|
|
1127
|
-
<label for="taskDescription">${t('loop.taskDescription') || 'Task Description'} <span class="required">*</span></label>
|
|
1128
|
-
<textarea id="taskDescription" name="description" rows="3" required
|
|
1129
|
-
placeholder="${t('loop.taskDescriptionPlaceholder') || 'Describe what this task should do...'}"
|
|
1130
|
-
class="form-control"></textarea>
|
|
1131
|
-
</div>
|
|
1132
|
-
|
|
1133
|
-
<!-- Tool -->
|
|
1134
|
-
<div class="form-group">
|
|
1135
|
-
<label for="taskTool">${t('loop.tool') || 'Tool'}</label>
|
|
1136
|
-
<select id="taskTool" name="tool" class="form-control">
|
|
1137
|
-
${toolOptions}
|
|
1138
|
-
</select>
|
|
1139
|
-
</div>
|
|
1140
|
-
|
|
1141
|
-
<!-- Mode -->
|
|
1142
|
-
<div class="form-group">
|
|
1143
|
-
<label for="taskMode">${t('loop.mode') || 'Mode'}</label>
|
|
1144
|
-
<select id="taskMode" name="mode" class="form-control">
|
|
1145
|
-
<option value="analysis">${t('loop.modeAnalysis') || 'Analysis'}</option>
|
|
1146
|
-
<option value="write">${t('loop.modeWrite') || 'Write'}</option>
|
|
1147
|
-
<option value="review">${t('loop.modeReview') || 'Review'}</option>
|
|
1148
|
-
</select>
|
|
1149
|
-
</div>
|
|
1150
|
-
|
|
1151
|
-
<!-- Prompt Template -->
|
|
1152
|
-
<div class="form-group">
|
|
1153
|
-
<label for="taskPrompt">${t('loop.promptTemplate') || 'Prompt Template'} <span class="required">*</span></label>
|
|
1154
|
-
<textarea id="taskPrompt" name="prompt_template" rows="5" required
|
|
1155
|
-
placeholder="${t('loop.promptPlaceholder') || 'Enter the prompt to execute...'}"
|
|
1156
|
-
class="form-control"></textarea>
|
|
1157
|
-
<small class="form-help">${t('loop.promptHelp') || 'Variables: {iteration}, {output_prev}'}</small>
|
|
1158
|
-
</div>
|
|
1159
|
-
|
|
1160
|
-
<!-- Error Handling -->
|
|
1161
|
-
<div class="form-group">
|
|
1162
|
-
<label for="taskOnError">${t('loop.onError') || 'On Error'}</label>
|
|
1163
|
-
<select id="taskOnError" name="on_error" class="form-control">
|
|
1164
|
-
<option value="continue">${t('loop.errorContinue') || 'Continue'}</option>
|
|
1165
|
-
<option value="pause">${t('loop.errorPause') || 'Pause'}</option>
|
|
1166
|
-
<option value="fail_fast">${t('loop.errorFailFast') || 'Fail Fast'}</option>
|
|
1167
|
-
</select>
|
|
1168
|
-
</div>
|
|
1169
|
-
|
|
1170
|
-
<!-- Form Actions -->
|
|
1171
|
-
<div class="modal-footer">
|
|
1172
|
-
<button type="button" class="btn btn-secondary" onclick="closeTaskModal()">${t('loop.cancel') || 'Cancel'}</button>
|
|
1173
|
-
<button type="submit" class="btn btn-primary">${t('loop.add') || 'Add'}</button>
|
|
1174
|
-
</div>
|
|
1175
|
-
</form>
|
|
1176
|
-
</div>
|
|
1177
|
-
</div>
|
|
1178
|
-
`;
|
|
1179
|
-
|
|
1180
|
-
document.body.appendChild(modal);
|
|
1181
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1182
|
-
setTimeout(() => document.getElementById('taskDescription').focus(), 100);
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
/**
|
|
1187
|
-
* Close task modal
|
|
1188
|
-
*/
|
|
1189
|
-
function closeTaskModal() {
|
|
1190
|
-
const modal = document.getElementById('addTaskModal') || document.getElementById('editTaskModal');
|
|
1191
|
-
if (modal) {
|
|
1192
|
-
modal.remove();
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
/**
|
|
1197
|
-
* Handle add task form submission
|
|
1198
|
-
*/
|
|
1199
|
-
async function handleAddTask(event, loopId) {
|
|
1200
|
-
event.preventDefault();
|
|
1201
|
-
|
|
1202
|
-
const form = event.target;
|
|
1203
|
-
const errorDiv = document.getElementById('addTaskError');
|
|
1204
|
-
|
|
1205
|
-
// Clear previous errors
|
|
1206
|
-
if (errorDiv) {
|
|
1207
|
-
errorDiv.style.display = 'none';
|
|
1208
|
-
errorDiv.textContent = '';
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
// Get form values
|
|
1212
|
-
const description = form.description.value.trim();
|
|
1213
|
-
const tool = form.tool.value;
|
|
1214
|
-
const mode = form.mode.value;
|
|
1215
|
-
|
|
1216
|
-
// Client-side validation
|
|
1217
|
-
if (!description) {
|
|
1218
|
-
if (errorDiv) {
|
|
1219
|
-
errorDiv.textContent = t('loop.descriptionRequired') || 'Description is required';
|
|
1220
|
-
errorDiv.style.display = 'block';
|
|
1221
|
-
}
|
|
1222
|
-
return;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
try {
|
|
1226
|
-
// Call POST /api/loops/v2/:loopId/tasks
|
|
1227
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}/tasks`, {
|
|
1228
|
-
method: 'POST',
|
|
1229
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1230
|
-
body: JSON.stringify({
|
|
1231
|
-
description: description,
|
|
1232
|
-
tool: tool,
|
|
1233
|
-
mode: mode
|
|
1234
|
-
})
|
|
1235
|
-
});
|
|
1236
|
-
|
|
1237
|
-
const result = await response.json();
|
|
1238
|
-
|
|
1239
|
-
if (result.success) {
|
|
1240
|
-
showNotification(t('loop.taskAdded') || 'Task added successfully', 'success');
|
|
1241
|
-
closeTaskModal();
|
|
1242
|
-
// Reload tasks
|
|
1243
|
-
await loadLoopTasks(loopId);
|
|
1244
|
-
} else {
|
|
1245
|
-
if (errorDiv) {
|
|
1246
|
-
errorDiv.textContent = result.error || (t('loop.addTaskFailed') || 'Failed to add task');
|
|
1247
|
-
errorDiv.style.display = 'block';
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
} catch (err) {
|
|
1251
|
-
console.error('Add task error:', err);
|
|
1252
|
-
if (errorDiv) {
|
|
1253
|
-
errorDiv.textContent = err.message || (t('loop.addTaskFailed') || 'Failed to add task');
|
|
1254
|
-
errorDiv.style.display = 'block';
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
/**
|
|
1260
|
-
* Edit existing task
|
|
1261
|
-
*/
|
|
1262
|
-
async function editTask(taskId) {
|
|
1263
|
-
const loopId = window.currentLoopId;
|
|
1264
|
-
if (!loopId) return;
|
|
1265
|
-
|
|
1266
|
-
// Fetch task details
|
|
1267
|
-
try {
|
|
1268
|
-
const response = await fetch(`/api/loops/v2/tasks/${encodeURIComponent(taskId)}`);
|
|
1269
|
-
const result = await response.json();
|
|
1270
|
-
|
|
1271
|
-
if (!result.success || !result.data) {
|
|
1272
|
-
showNotification(t('loop.loadTaskFailed') || 'Failed to load task', 'error');
|
|
1273
|
-
return;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
const task = result.data;
|
|
1277
|
-
await showEditTaskModal(loopId, task);
|
|
1278
|
-
} catch (err) {
|
|
1279
|
-
console.error('Load task error:', err);
|
|
1280
|
-
showNotification(t('loop.loadTaskError') || 'Error loading task', 'error');
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
/**
|
|
1285
|
-
* Show edit task modal
|
|
1286
|
-
*/
|
|
1287
|
-
async function showEditTaskModal(loopId, task) {
|
|
1288
|
-
// Get enabled tools
|
|
1289
|
-
const enabledTools = await getEnabledTools();
|
|
1290
|
-
|
|
1291
|
-
// Build tool options HTML
|
|
1292
|
-
const toolOptions = enabledTools.map(tool =>
|
|
1293
|
-
`<option value="${tool}" ${task.tool === tool ? 'selected' : ''}>${tool.charAt(0).toUpperCase() + tool.slice(1)}</option>`
|
|
1294
|
-
).join('');
|
|
1295
|
-
|
|
1296
|
-
const modal = document.createElement('div');
|
|
1297
|
-
modal.id = 'editTaskModal';
|
|
1298
|
-
modal.className = 'modal-overlay';
|
|
1299
|
-
modal.innerHTML = `
|
|
1300
|
-
<div class="modal-content">
|
|
1301
|
-
<div class="modal-header">
|
|
1302
|
-
<h3><i data-lucide="edit-2" class="w-5 h-5"></i> ${t('loop.editTask') || 'Edit Task'}</h3>
|
|
1303
|
-
<button class="modal-close" onclick="closeTaskModal()">
|
|
1304
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
1305
|
-
</button>
|
|
1306
|
-
</div>
|
|
1307
|
-
<div class="modal-body">
|
|
1308
|
-
<form id="editTaskForm" onsubmit="handleEditTask(event, '${loopId}', '${task.task_id || task.id}')">
|
|
1309
|
-
<div id="editTaskError" class="alert alert-error" style="display: none;"></div>
|
|
1310
|
-
|
|
1311
|
-
<!-- Description -->
|
|
1312
|
-
<div class="form-group">
|
|
1313
|
-
<label for="editTaskDescription">${t('loop.taskDescription') || 'Task Description'} <span class="required">*</span></label>
|
|
1314
|
-
<textarea id="editTaskDescription" name="description" rows="3" required
|
|
1315
|
-
class="form-control">${escapeHtml(task.description || '')}</textarea>
|
|
1316
|
-
</div>
|
|
1317
|
-
|
|
1318
|
-
<!-- Tool -->
|
|
1319
|
-
<div class="form-group">
|
|
1320
|
-
<label for="editTaskTool">${t('loop.tool') || 'Tool'}</label>
|
|
1321
|
-
<select id="editTaskTool" name="tool" class="form-control">
|
|
1322
|
-
${toolOptions}
|
|
1323
|
-
</select>
|
|
1324
|
-
</div>
|
|
1325
|
-
|
|
1326
|
-
<!-- Mode -->
|
|
1327
|
-
<div class="form-group">
|
|
1328
|
-
<label for="editTaskMode">${t('loop.mode') || 'Mode'}</label>
|
|
1329
|
-
<select id="editTaskMode" name="mode" class="form-control">
|
|
1330
|
-
<option value="analysis" ${task.mode === 'analysis' ? 'selected' : ''}>${t('loop.modeAnalysis') || 'Analysis'}</option>
|
|
1331
|
-
<option value="write" ${task.mode === 'write' ? 'selected' : ''}>${t('loop.modeWrite') || 'Write'}</option>
|
|
1332
|
-
<option value="review" ${task.mode === 'review' ? 'selected' : ''}>${t('loop.modeReview') || 'Review'}</option>
|
|
1333
|
-
</select>
|
|
1334
|
-
</div>
|
|
1335
|
-
|
|
1336
|
-
<!-- Form Actions -->
|
|
1337
|
-
<div class="modal-footer">
|
|
1338
|
-
<button type="button" class="btn btn-secondary" onclick="closeTaskModal()">${t('loop.cancel') || 'Cancel'}</button>
|
|
1339
|
-
<button type="submit" class="btn btn-primary">
|
|
1340
|
-
<i data-lucide="save" class="w-4 h-4"></i> ${t('loop.save') || 'Save'}
|
|
1341
|
-
</button>
|
|
1342
|
-
</div>
|
|
1343
|
-
</form>
|
|
1344
|
-
</div>
|
|
1345
|
-
</div>
|
|
1346
|
-
`;
|
|
1347
|
-
|
|
1348
|
-
document.body.appendChild(modal);
|
|
1349
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1350
|
-
|
|
1351
|
-
// Focus on description field
|
|
1352
|
-
setTimeout(() => document.getElementById('editTaskDescription').focus(), 100);
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
/**
|
|
1356
|
-
* Handle edit task form submission
|
|
1357
|
-
*/
|
|
1358
|
-
async function handleEditTask(event, loopId, taskId) {
|
|
1359
|
-
event.preventDefault();
|
|
1360
|
-
|
|
1361
|
-
const form = event.target;
|
|
1362
|
-
const errorDiv = document.getElementById('editTaskError');
|
|
1363
|
-
|
|
1364
|
-
// Clear previous errors
|
|
1365
|
-
if (errorDiv) {
|
|
1366
|
-
errorDiv.style.display = 'none';
|
|
1367
|
-
errorDiv.textContent = '';
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
// Get form values
|
|
1371
|
-
const description = form.description.value.trim();
|
|
1372
|
-
const tool = form.tool.value;
|
|
1373
|
-
const mode = form.mode.value;
|
|
1374
|
-
|
|
1375
|
-
// Client-side validation
|
|
1376
|
-
if (!description) {
|
|
1377
|
-
if (errorDiv) {
|
|
1378
|
-
errorDiv.textContent = t('loop.descriptionRequired') || 'Description is required';
|
|
1379
|
-
errorDiv.style.display = 'block';
|
|
1380
|
-
}
|
|
1381
|
-
return;
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
try {
|
|
1385
|
-
// Call PUT /api/loops/v2/:loopId/tasks/:taskId
|
|
1386
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}/tasks/${encodeURIComponent(taskId)}`, {
|
|
1387
|
-
method: 'PUT',
|
|
1388
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1389
|
-
body: JSON.stringify({
|
|
1390
|
-
description: description,
|
|
1391
|
-
tool: tool,
|
|
1392
|
-
mode: mode
|
|
1393
|
-
})
|
|
1394
|
-
});
|
|
1395
|
-
|
|
1396
|
-
const result = await response.json();
|
|
1397
|
-
|
|
1398
|
-
if (result.success) {
|
|
1399
|
-
showNotification(t('loop.taskUpdated') || 'Task updated successfully', 'success');
|
|
1400
|
-
closeTaskModal();
|
|
1401
|
-
// Reload tasks
|
|
1402
|
-
await loadLoopTasks(loopId);
|
|
1403
|
-
} else {
|
|
1404
|
-
if (errorDiv) {
|
|
1405
|
-
errorDiv.textContent = result.error || (t('loop.updateTaskFailed') || 'Failed to update task');
|
|
1406
|
-
errorDiv.style.display = 'block';
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
} catch (err) {
|
|
1410
|
-
console.error('Update task error:', err);
|
|
1411
|
-
if (errorDiv) {
|
|
1412
|
-
errorDiv.textContent = err.message || (t('loop.updateTaskFailed') || 'Failed to update task');
|
|
1413
|
-
errorDiv.style.display = 'block';
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
/**
|
|
1419
|
-
* Confirm delete task
|
|
1420
|
-
*/
|
|
1421
|
-
function confirmDeleteTask(taskId) {
|
|
1422
|
-
const message = t('loop.confirmDeleteTask') || 'Are you sure you want to delete this task? This action cannot be undone.';
|
|
1423
|
-
|
|
1424
|
-
if (confirm(message)) {
|
|
1425
|
-
deleteTask(taskId);
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
/**
|
|
1430
|
-
* Delete task
|
|
1431
|
-
*/
|
|
1432
|
-
async function deleteTask(taskId) {
|
|
1433
|
-
const loopId = window.currentLoopId;
|
|
1434
|
-
if (!loopId) return;
|
|
1435
|
-
|
|
1436
|
-
try {
|
|
1437
|
-
// Call DELETE /api/loops/v2/:loopId/tasks/:taskId
|
|
1438
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}/tasks/${encodeURIComponent(taskId)}`, {
|
|
1439
|
-
method: 'DELETE'
|
|
1440
|
-
});
|
|
1441
|
-
|
|
1442
|
-
const result = await response.json();
|
|
1443
|
-
|
|
1444
|
-
if (result.success) {
|
|
1445
|
-
showNotification(t('loop.taskDeleted') || 'Task deleted successfully', 'success');
|
|
1446
|
-
// Reload tasks
|
|
1447
|
-
await loadLoopTasks(loopId);
|
|
1448
|
-
} else {
|
|
1449
|
-
showNotification(t('loop.deleteTaskFailed') || 'Failed to delete task: ' + (result.error || ''), 'error');
|
|
1450
|
-
}
|
|
1451
|
-
} catch (err) {
|
|
1452
|
-
console.error('Delete task error:', err);
|
|
1453
|
-
showNotification(t('loop.deleteTaskError') || 'Error deleting task: ' + err.message, 'error');
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
/**
|
|
1458
|
-
* Cleanup function for view transition
|
|
1459
|
-
*/
|
|
1460
|
-
window.destroyLoopMonitor = function() {
|
|
1461
|
-
if (window.loopWebSocket) {
|
|
1462
|
-
window.loopWebSocket.close();
|
|
1463
|
-
window.loopWebSocket = null;
|
|
1464
|
-
}
|
|
1465
|
-
window.selectedLoopId = null;
|
|
1466
|
-
window.loopReconnectAttempts = 0; // Reset reconnect counter
|
|
1467
|
-
};
|
|
1468
|
-
|
|
1469
|
-
// Helper functions
|
|
1470
|
-
function getStatusIcon(status) {
|
|
1471
|
-
const icons = {
|
|
1472
|
-
created: 'inbox',
|
|
1473
|
-
running: 'zap',
|
|
1474
|
-
paused: 'pause',
|
|
1475
|
-
completed: 'check',
|
|
1476
|
-
failed: 'alert-triangle'
|
|
1477
|
-
};
|
|
1478
|
-
return icons[status] || 'inbox';
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
function escapeHtml(text) {
|
|
1482
|
-
if (text == null) return '';
|
|
1483
|
-
const div = document.createElement('div');
|
|
1484
|
-
div.textContent = String(text);
|
|
1485
|
-
return div.innerHTML;
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
function formatDateTime(isoString) {
|
|
1489
|
-
if (!isoString) return 'N/A';
|
|
1490
|
-
const date = new Date(isoString);
|
|
1491
|
-
return date.toLocaleString();
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
function formatRelativeTime(isoString) {
|
|
1495
|
-
if (!isoString) return 'N/A';
|
|
1496
|
-
const date = new Date(isoString);
|
|
1497
|
-
const now = new Date();
|
|
1498
|
-
const diff = Math.floor((now - date) / 1000);
|
|
1499
|
-
|
|
1500
|
-
if (diff < 60) return t('loop.justNow');
|
|
1501
|
-
if (diff < 3600) return t('loop.minutesAgo', { m: Math.floor(diff / 60) });
|
|
1502
|
-
if (diff < 86400) return t('loop.hoursAgo', { h: Math.floor(diff / 3600) });
|
|
1503
|
-
return t('loop.daysAgo', { d: Math.floor(diff / 86400) });
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
function showNotification(message, type) {
|
|
1507
|
-
const toast = document.createElement('div');
|
|
1508
|
-
toast.className = `notification ${type}`;
|
|
1509
|
-
toast.textContent = message;
|
|
1510
|
-
document.body.appendChild(toast);
|
|
1511
|
-
setTimeout(() => toast.remove(), 3000);
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
function showError(message) {
|
|
1515
|
-
showNotification(message, 'error');
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
|
-
// ==========================================
|
|
1519
|
-
// VIEW SWITCHING AND KANBAN BOARD
|
|
1520
|
-
// ==========================================
|
|
1521
|
-
|
|
1522
|
-
// Current view state
|
|
1523
|
-
window.currentLoopView = 'loops'; // 'loops' | 'kanban'
|
|
1524
|
-
|
|
1525
|
-
/**
|
|
1526
|
-
* Switch between loops list view and kanban board view
|
|
1527
|
-
* @param {string} view - 'loops' or 'kanban'
|
|
1528
|
-
*/
|
|
1529
|
-
function switchView(view) {
|
|
1530
|
-
window.currentLoopView = view;
|
|
1531
|
-
|
|
1532
|
-
// Update tab buttons
|
|
1533
|
-
const tabs = document.querySelectorAll('.view-tabs .tab-button');
|
|
1534
|
-
tabs.forEach(tab => {
|
|
1535
|
-
const tabView = tab.dataset.tab;
|
|
1536
|
-
const isActive = tabView === view;
|
|
1537
|
-
tab.classList.toggle('active', isActive);
|
|
1538
|
-
// Add ARIA attributes for accessibility
|
|
1539
|
-
tab.setAttribute('aria-selected', isActive ? 'true' : 'false');
|
|
1540
|
-
tab.setAttribute('aria-pressed', isActive ? 'true' : 'false');
|
|
1541
|
-
});
|
|
1542
|
-
|
|
1543
|
-
// Announce view change for screen readers
|
|
1544
|
-
const viewLabel = view === 'loops' ? 'Loops list view' : 'Tasks kanban board view';
|
|
1545
|
-
announceToScreenReader(viewLabel);
|
|
1546
|
-
|
|
1547
|
-
// Render appropriate view
|
|
1548
|
-
if (view === 'loops') {
|
|
1549
|
-
renderLoopList();
|
|
1550
|
-
// Show loop detail if one is selected
|
|
1551
|
-
if (window.selectedLoopId) {
|
|
1552
|
-
renderLoopDetail(window.selectedLoopId);
|
|
1553
|
-
}
|
|
1554
|
-
} else if (view === 'tasks' || view === 'kanban') {
|
|
1555
|
-
if (window.selectedLoopId) {
|
|
1556
|
-
renderKanbanBoard(window.selectedLoopId);
|
|
1557
|
-
} else {
|
|
1558
|
-
// No loop selected, show instruction
|
|
1559
|
-
const detailPanel = document.getElementById('loopDetailPanel');
|
|
1560
|
-
if (detailPanel) {
|
|
1561
|
-
detailPanel.innerHTML = `
|
|
1562
|
-
<div class="empty-detail-state" role="status" aria-label="No loop selected">
|
|
1563
|
-
<div class="empty-icon-large">
|
|
1564
|
-
<i data-lucide="layout-grid" class="w-10 h-10"></i>
|
|
1565
|
-
</div>
|
|
1566
|
-
<p class="empty-state-title">${t('loop.selectLoopForKanban') || 'Select a Loop'}</p>
|
|
1567
|
-
<p class="empty-state-hint">${t('loop.selectLoopForKanbanHint') || 'Select a loop from the list to view its task board'}</p>
|
|
1568
|
-
</div>
|
|
1569
|
-
`;
|
|
1570
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
/**
|
|
1577
|
-
* Render kanban board for a loop's tasks
|
|
1578
|
-
* Displays tasks grouped by status in columns
|
|
1579
|
-
*/
|
|
1580
|
-
async function renderKanbanBoard(loopId) {
|
|
1581
|
-
const container = document.getElementById('loopDetailPanel');
|
|
1582
|
-
const loop = window.loopStateStore[loopId];
|
|
1583
|
-
|
|
1584
|
-
if (!container) return;
|
|
1585
|
-
|
|
1586
|
-
if (!loop) {
|
|
1587
|
-
container.innerHTML = `
|
|
1588
|
-
<div class="empty-detail-state">
|
|
1589
|
-
<div class="empty-icon-large">
|
|
1590
|
-
<i data-lucide="alert-circle" class="w-10 h-10"></i>
|
|
1591
|
-
</div>
|
|
1592
|
-
<p class="empty-state-title">${t('loop.loopNotFound')}</p>
|
|
1593
|
-
</div>
|
|
1594
|
-
`;
|
|
1595
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1596
|
-
return;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
// Show loading state
|
|
1600
|
-
container.innerHTML = `
|
|
1601
|
-
<div class="loop-detail">
|
|
1602
|
-
<div class="detail-header">
|
|
1603
|
-
<div class="detail-status ${loop.status}">
|
|
1604
|
-
<i data-lucide="layout-grid" class="w-4 h-4"></i>
|
|
1605
|
-
<span class="status-label">${t('loop.kanban.title') || 'Tasks Board'}</span>
|
|
1606
|
-
</div>
|
|
1607
|
-
<div class="detail-actions">
|
|
1608
|
-
<button class="btn btn-success" onclick="showAddTaskModal('${loopId}')" title="${t('loop.addTask') || 'Add Task'}">
|
|
1609
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.addTask') || 'Add Task'}
|
|
1610
|
-
</button>
|
|
1611
|
-
<button class="btn btn-secondary" onclick="selectLoop('${loopId}')">
|
|
1612
|
-
<i data-lucide="list" class="w-4 h-4"></i> ${t('loop.listView') || 'List View'}
|
|
1613
|
-
</button>
|
|
1614
|
-
</div>
|
|
1615
|
-
</div>
|
|
1616
|
-
<div class="kanban-loading">
|
|
1617
|
-
<div class="loading-spinner">${t('loop.loading') || 'Loading...'}</div>
|
|
1618
|
-
</div>
|
|
1619
|
-
</div>
|
|
1620
|
-
`;
|
|
1621
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1622
|
-
|
|
1623
|
-
// Fetch tasks
|
|
1624
|
-
try {
|
|
1625
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}/tasks`);
|
|
1626
|
-
const result = await response.json();
|
|
1627
|
-
|
|
1628
|
-
if (!result.success) {
|
|
1629
|
-
container.innerHTML = `
|
|
1630
|
-
<div class="empty-detail-state">
|
|
1631
|
-
<div class="empty-icon-large">
|
|
1632
|
-
<i data-lucide="alert-circle" class="w-10 h-10"></i>
|
|
1633
|
-
</div>
|
|
1634
|
-
<p class="empty-state-title">${t('loop.loadTasksFailed') || 'Failed to load tasks'}</p>
|
|
1635
|
-
<p class="empty-state-hint">${result.error || ''}</p>
|
|
1636
|
-
</div>
|
|
1637
|
-
`;
|
|
1638
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1639
|
-
return;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
const tasks = result.data || [];
|
|
1643
|
-
|
|
1644
|
-
// Group tasks by status
|
|
1645
|
-
const tasksByStatus = groupTasksByStatus(tasks);
|
|
1646
|
-
|
|
1647
|
-
// Render kanban board
|
|
1648
|
-
renderKanbanBoardContent(container, loop, loopId, tasksByStatus);
|
|
1649
|
-
|
|
1650
|
-
} catch (err) {
|
|
1651
|
-
console.error('Load tasks for kanban error:', err);
|
|
1652
|
-
container.innerHTML = `
|
|
1653
|
-
<div class="empty-detail-state">
|
|
1654
|
-
<div class="empty-icon-large">
|
|
1655
|
-
<i data-lucide="alert-circle" class="w-10 h-10"></i>
|
|
1656
|
-
</div>
|
|
1657
|
-
<p class="empty-state-title">${t('loop.loadTasksError') || 'Error loading tasks'}</p>
|
|
1658
|
-
<p class="empty-state-hint">${err.message}</p>
|
|
1659
|
-
</div>
|
|
1660
|
-
`;
|
|
1661
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
/**
|
|
1666
|
-
* Group tasks by their status
|
|
1667
|
-
*/
|
|
1668
|
-
function groupTasksByStatus(tasks) {
|
|
1669
|
-
const statuses = ['pending', 'in_progress', 'blocked', 'done'];
|
|
1670
|
-
const grouped = {};
|
|
1671
|
-
|
|
1672
|
-
statuses.forEach(status => {
|
|
1673
|
-
grouped[status] = [];
|
|
1674
|
-
});
|
|
1675
|
-
|
|
1676
|
-
tasks.forEach(task => {
|
|
1677
|
-
const status = task.status || 'pending';
|
|
1678
|
-
if (!grouped[status]) {
|
|
1679
|
-
grouped[status] = [];
|
|
1680
|
-
}
|
|
1681
|
-
grouped[status].push(task);
|
|
1682
|
-
});
|
|
1683
|
-
|
|
1684
|
-
return grouped;
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Render the actual kanban board content
|
|
1689
|
-
*/
|
|
1690
|
-
function renderKanbanBoardContent(container, loop, loopId, tasksByStatus) {
|
|
1691
|
-
const statusConfig = {
|
|
1692
|
-
pending: {
|
|
1693
|
-
label: t('loop.taskStatus.pending') || 'Pending',
|
|
1694
|
-
icon: 'circle',
|
|
1695
|
-
color: 'muted'
|
|
1696
|
-
},
|
|
1697
|
-
in_progress: {
|
|
1698
|
-
label: t('loop.taskStatus.inProgress') || 'In Progress',
|
|
1699
|
-
icon: 'loader',
|
|
1700
|
-
color: 'info'
|
|
1701
|
-
},
|
|
1702
|
-
blocked: {
|
|
1703
|
-
label: t('loop.taskStatus.blocked') || 'Blocked',
|
|
1704
|
-
icon: 'octagon',
|
|
1705
|
-
color: 'warning'
|
|
1706
|
-
},
|
|
1707
|
-
done: {
|
|
1708
|
-
label: t('loop.taskStatus.done') || 'Done',
|
|
1709
|
-
icon: 'check-circle-2',
|
|
1710
|
-
color: 'success'
|
|
1711
|
-
}
|
|
1712
|
-
};
|
|
1713
|
-
|
|
1714
|
-
const columns = Object.entries(statusConfig).map(([status, config]) => {
|
|
1715
|
-
const tasks = tasksByStatus[status] || [];
|
|
1716
|
-
return `
|
|
1717
|
-
<div class="loop-kanban-column" data-status="${status}" role="region" aria-label="${config.label} column with ${tasks.length} tasks">
|
|
1718
|
-
<div class="loop-kanban-column-header">
|
|
1719
|
-
<div class="column-title">
|
|
1720
|
-
<i data-lucide="${config.icon}" class="w-4 h-4" aria-hidden="true"></i>
|
|
1721
|
-
<span>${config.label}</span>
|
|
1722
|
-
</div>
|
|
1723
|
-
<span class="column-count" aria-label="${tasks.length} tasks">${tasks.length}</span>
|
|
1724
|
-
</div>
|
|
1725
|
-
<div class="loop-kanban-column-body" data-status="${status}"
|
|
1726
|
-
role="list"
|
|
1727
|
-
aria-label="${config.label} tasks"
|
|
1728
|
-
ondragover="handleKanbanDragOver(event)" ondrop="handleKanbanDrop(event, '${loopId}', '${status}')">
|
|
1729
|
-
${tasks.length > 0 ? tasks.map(task => renderKanbanTaskCard(task, loopId)).join('') : `
|
|
1730
|
-
<div class="kanban-empty-column" role="status" aria-label="No ${config.label} tasks">
|
|
1731
|
-
<p>${t('loop.kanban.noBoardData') || 'No tasks'}</p>
|
|
1732
|
-
</div>
|
|
1733
|
-
`}
|
|
1734
|
-
</div>
|
|
1735
|
-
</div>
|
|
1736
|
-
`;
|
|
1737
|
-
}).join('');
|
|
1738
|
-
|
|
1739
|
-
container.innerHTML = `
|
|
1740
|
-
<div class="loop-detail">
|
|
1741
|
-
<div class="detail-header">
|
|
1742
|
-
<div class="kanban-header-left">
|
|
1743
|
-
<div class="detail-status ${loop.status}">
|
|
1744
|
-
<i data-lucide="layout-grid" class="w-4 h-4"></i>
|
|
1745
|
-
<span class="status-label">${t('loop.kanban.title') || 'Tasks Board'}</span>
|
|
1746
|
-
</div>
|
|
1747
|
-
<span class="kanban-loop-title">${escapeHtml(loop.title || loop.loop_id)}</span>
|
|
1748
|
-
</div>
|
|
1749
|
-
<div class="detail-actions">
|
|
1750
|
-
<button class="btn btn-success" onclick="showAddTaskModal('${loopId}')" title="${t('loop.addTask') || 'Add Task'}">
|
|
1751
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.addTask') || 'Add Task'}
|
|
1752
|
-
</button>
|
|
1753
|
-
<button class="btn btn-secondary" onclick="selectLoop('${loopId}')">
|
|
1754
|
-
<i data-lucide="list" class="w-4 h-4"></i> ${t('loop.listView') || 'List View'}
|
|
1755
|
-
</button>
|
|
1756
|
-
</div>
|
|
1757
|
-
</div>
|
|
1758
|
-
<div class="loop-kanban-wrapper">
|
|
1759
|
-
<div class="loop-kanban-board">
|
|
1760
|
-
${columns}
|
|
1761
|
-
</div>
|
|
1762
|
-
</div>
|
|
1763
|
-
</div>
|
|
1764
|
-
`;
|
|
1765
|
-
|
|
1766
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
1767
|
-
|
|
1768
|
-
// Initialize drag and drop for kanban cards
|
|
1769
|
-
initKanbanDragDrop();
|
|
1770
|
-
|
|
1771
|
-
// Initialize keyboard navigation for accessibility
|
|
1772
|
-
initializeKeyboardNavigation();
|
|
1773
|
-
|
|
1774
|
-
// Announce to screen reader
|
|
1775
|
-
const totalTasks = Object.values(tasksByStatus).reduce((sum, tasks) => sum + tasks.length, 0);
|
|
1776
|
-
announceToScreenReader(`Kanban board loaded with ${totalTasks} tasks across 4 columns`);
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
/**
|
|
1780
|
-
* Render a single task card for the kanban board
|
|
1781
|
-
*/
|
|
1782
|
-
function renderKanbanTaskCard(task, loopId) {
|
|
1783
|
-
const priorityClass = task.priority || 'medium';
|
|
1784
|
-
const priorityLabel = t(`loop.priority.${priorityClass}`) || priorityClass;
|
|
1785
|
-
const taskDescription = escapeHtml(task.description || t('loop.noDescription') || 'No description');
|
|
1786
|
-
const taskTool = task.tool || 'gemini';
|
|
1787
|
-
const taskMode = task.mode || 'analysis';
|
|
1788
|
-
|
|
1789
|
-
return `
|
|
1790
|
-
<div class="loop-task-card"
|
|
1791
|
-
draggable="true"
|
|
1792
|
-
data-task-id="${task.task_id || task.id}"
|
|
1793
|
-
data-loop-id="${loopId}"
|
|
1794
|
-
role="listitem"
|
|
1795
|
-
aria-label="Task: ${taskDescription}, Tool: ${taskTool}, Mode: ${taskMode}, Priority: ${priorityLabel}"
|
|
1796
|
-
ondragstart="handleKanbanDragStart(event)">
|
|
1797
|
-
<div class="loop-task-card-header">
|
|
1798
|
-
<span class="task-card-title">${taskDescription}</span>
|
|
1799
|
-
<button class="task-card-menu" onclick="showTaskContextMenu(event, '${task.task_id || task.id}', '${loopId}')" aria-label="Task options menu" title="Task options">
|
|
1800
|
-
<i data-lucide="more-vertical" class="w-3 h-3" aria-hidden="true"></i>
|
|
1801
|
-
</button>
|
|
1802
|
-
</div>
|
|
1803
|
-
<div class="loop-task-card-body">
|
|
1804
|
-
<div class="loop-task-card-meta">
|
|
1805
|
-
<span class="task-tool-badge">${task.tool || 'gemini'}</span>
|
|
1806
|
-
<span class="task-mode-badge mode-${task.mode || 'analysis'}">${task.mode || 'analysis'}</span>
|
|
1807
|
-
</div>
|
|
1808
|
-
${task.priority ? `
|
|
1809
|
-
<div class="loop-task-card-priority">
|
|
1810
|
-
<span class="priority-badge ${priorityClass}">${priorityLabel}</span>
|
|
1811
|
-
</div>
|
|
1812
|
-
` : ''}
|
|
1813
|
-
</div>
|
|
1814
|
-
<div class="loop-task-card-footer">
|
|
1815
|
-
<div class="task-card-actions">
|
|
1816
|
-
<button class="btn btn-xs btn-ghost" onclick="editTask('${task.task_id || task.id}')" title="${t('loop.edit') || 'Edit'}">
|
|
1817
|
-
<i data-lucide="edit-2" class="w-3 h-3"></i>
|
|
1818
|
-
</button>
|
|
1819
|
-
<button class="btn btn-xs btn-ghost" onclick="showTaskStatusUpdate('${task.task_id || task.id}', '${loopId}')" title="${t('loop.updateStatus') || 'Update Status'}">
|
|
1820
|
-
<i data-lucide="arrow-right-circle" class="w-3 h-3"></i>
|
|
1821
|
-
</button>
|
|
1822
|
-
</div>
|
|
1823
|
-
</div>
|
|
1824
|
-
</div>
|
|
1825
|
-
`;
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
/**
|
|
1829
|
-
* Initialize drag and drop for kanban board
|
|
1830
|
-
*/
|
|
1831
|
-
function initKanbanDragDrop() {
|
|
1832
|
-
const cards = document.querySelectorAll('.loop-task-card[draggable="true"]');
|
|
1833
|
-
cards.forEach(card => {
|
|
1834
|
-
card.addEventListener('dragend', handleKanbanDragEnd);
|
|
1835
|
-
});
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
/**
|
|
1839
|
-
* Handle drag start for kanban card
|
|
1840
|
-
*/
|
|
1841
|
-
function handleKanbanDragStart(event) {
|
|
1842
|
-
const card = event.target.closest('.loop-task-card');
|
|
1843
|
-
if (!card) return;
|
|
1844
|
-
|
|
1845
|
-
card.classList.add('dragging');
|
|
1846
|
-
event.dataTransfer.effectAllowed = 'move';
|
|
1847
|
-
event.dataTransfer.setData('text/plain', JSON.stringify({
|
|
1848
|
-
taskId: card.dataset.taskId,
|
|
1849
|
-
loopId: card.dataset.loopId
|
|
1850
|
-
}));
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
/**
|
|
1854
|
-
* Handle drag end for kanban card
|
|
1855
|
-
*/
|
|
1856
|
-
function handleKanbanDragEnd(event) {
|
|
1857
|
-
const card = event.target.closest('.loop-task-card');
|
|
1858
|
-
if (card) {
|
|
1859
|
-
card.classList.remove('dragging');
|
|
1860
|
-
}
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
/**
|
|
1864
|
-
* Handle drag over for kanban column
|
|
1865
|
-
*/
|
|
1866
|
-
function handleKanbanDragOver(event) {
|
|
1867
|
-
event.preventDefault();
|
|
1868
|
-
event.dataTransfer.dropEffect = 'move';
|
|
1869
|
-
|
|
1870
|
-
const column = event.target.closest('.loop-kanban-column-body');
|
|
1871
|
-
if (column) {
|
|
1872
|
-
column.classList.add('drag-over');
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* Handle drop for kanban column
|
|
1878
|
-
*/
|
|
1879
|
-
async function handleKanbanDrop(event, loopId, newStatus) {
|
|
1880
|
-
event.preventDefault();
|
|
1881
|
-
|
|
1882
|
-
// Remove drag-over style
|
|
1883
|
-
document.querySelectorAll('.loop-kanban-column-body').forEach(col => {
|
|
1884
|
-
col.classList.remove('drag-over');
|
|
1885
|
-
});
|
|
1886
|
-
|
|
1887
|
-
try {
|
|
1888
|
-
const data = JSON.parse(event.dataTransfer.getData('text/plain'));
|
|
1889
|
-
const taskId = data.taskId;
|
|
1890
|
-
|
|
1891
|
-
if (!taskId) return;
|
|
1892
|
-
|
|
1893
|
-
// Update task status
|
|
1894
|
-
await updateTaskStatus(loopId, taskId, newStatus);
|
|
1895
|
-
|
|
1896
|
-
// Refresh kanban board
|
|
1897
|
-
await renderKanbanBoard(loopId);
|
|
1898
|
-
|
|
1899
|
-
} catch (err) {
|
|
1900
|
-
console.error('Kanban drop error:', err);
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
// ==========================================
|
|
1905
|
-
// STATUS UPDATE FUNCTIONS
|
|
1906
|
-
// ==========================================
|
|
1907
|
-
|
|
1908
|
-
/**
|
|
1909
|
-
* Update loop status via PATCH endpoint
|
|
1910
|
-
* @param {string} loopId - The loop ID
|
|
1911
|
-
* @param {string} status - New status (created, running, paused, completed, failed)
|
|
1912
|
-
*/
|
|
1913
|
-
async function updateLoopStatus(loopId, status) {
|
|
1914
|
-
try {
|
|
1915
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}/status`, {
|
|
1916
|
-
method: 'PATCH',
|
|
1917
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1918
|
-
body: JSON.stringify({ status })
|
|
1919
|
-
});
|
|
1920
|
-
|
|
1921
|
-
const result = await response.json();
|
|
1922
|
-
|
|
1923
|
-
if (result.success) {
|
|
1924
|
-
showNotification(t('loop.updateSuccess') || 'Status updated successfully', 'success');
|
|
1925
|
-
|
|
1926
|
-
// Update local store
|
|
1927
|
-
if (window.loopStateStore[loopId]) {
|
|
1928
|
-
window.loopStateStore[loopId] = result.data;
|
|
1929
|
-
}
|
|
1930
|
-
|
|
1931
|
-
// Refresh UI
|
|
1932
|
-
renderLoopList();
|
|
1933
|
-
if (window.selectedLoopId === loopId) {
|
|
1934
|
-
renderLoopDetail(loopId);
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
return result.data;
|
|
1938
|
-
} else {
|
|
1939
|
-
showNotification(t('loop.updateError') || 'Failed to update status: ' + (result.error || ''), 'error');
|
|
1940
|
-
return null;
|
|
1941
|
-
}
|
|
1942
|
-
} catch (err) {
|
|
1943
|
-
console.error('Update loop status error:', err);
|
|
1944
|
-
showNotification(t('loop.updateError') || 'Failed to update status: ' + err.message, 'error');
|
|
1945
|
-
return null;
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
/**
|
|
1950
|
-
* Update loop metadata via PUT endpoint
|
|
1951
|
-
* @param {string} loopId - The loop ID
|
|
1952
|
-
* @param {object} metadata - Metadata to update (title, description, tags, priority, notes, etc.)
|
|
1953
|
-
*/
|
|
1954
|
-
async function updateLoopMetadata(loopId, metadata) {
|
|
1955
|
-
try {
|
|
1956
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}`, {
|
|
1957
|
-
method: 'PUT',
|
|
1958
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1959
|
-
body: JSON.stringify(metadata)
|
|
1960
|
-
});
|
|
1961
|
-
|
|
1962
|
-
const result = await response.json();
|
|
1963
|
-
|
|
1964
|
-
if (result.success) {
|
|
1965
|
-
showNotification(t('loop.updateSuccess') || 'Loop updated successfully', 'success');
|
|
1966
|
-
|
|
1967
|
-
// Update local store
|
|
1968
|
-
if (window.loopStateStore[loopId]) {
|
|
1969
|
-
window.loopStateStore[loopId] = result.data;
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
// Refresh UI
|
|
1973
|
-
renderLoopList();
|
|
1974
|
-
if (window.selectedLoopId === loopId) {
|
|
1975
|
-
renderLoopDetail(loopId);
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
return result.data;
|
|
1979
|
-
} else {
|
|
1980
|
-
showNotification(t('loop.updateError') || 'Failed to update loop: ' + (result.error || ''), 'error');
|
|
1981
|
-
return null;
|
|
1982
|
-
}
|
|
1983
|
-
} catch (err) {
|
|
1984
|
-
console.error('Update loop metadata error:', err);
|
|
1985
|
-
showNotification(t('loop.updateError') || 'Failed to update loop: ' + err.message, 'error');
|
|
1986
|
-
return null;
|
|
1987
|
-
}
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
/**
|
|
1991
|
-
* Update task status within a loop
|
|
1992
|
-
* @param {string} loopId - The loop ID
|
|
1993
|
-
* @param {string} taskId - The task ID
|
|
1994
|
-
* @param {string} newStatus - New status (pending, in_progress, blocked, done)
|
|
1995
|
-
*/
|
|
1996
|
-
async function updateTaskStatus(loopId, taskId, newStatus) {
|
|
1997
|
-
try {
|
|
1998
|
-
const response = await fetch(`/api/loops/v2/${encodeURIComponent(loopId)}/tasks/${encodeURIComponent(taskId)}`, {
|
|
1999
|
-
method: 'PUT',
|
|
2000
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2001
|
-
body: JSON.stringify({ status: newStatus })
|
|
2002
|
-
});
|
|
2003
|
-
|
|
2004
|
-
const result = await response.json();
|
|
2005
|
-
|
|
2006
|
-
if (result.success) {
|
|
2007
|
-
showNotification(t('loop.updateSuccess') || 'Task status updated', 'success');
|
|
2008
|
-
return result.data;
|
|
2009
|
-
} else {
|
|
2010
|
-
showNotification(t('loop.updateError') || 'Failed to update task: ' + (result.error || ''), 'error');
|
|
2011
|
-
return null;
|
|
2012
|
-
}
|
|
2013
|
-
} catch (err) {
|
|
2014
|
-
console.error('Update task status error:', err);
|
|
2015
|
-
showNotification(t('loop.updateError') || 'Failed to update task: ' + err.message, 'error');
|
|
2016
|
-
return null;
|
|
2017
|
-
}
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
/**
|
|
2021
|
-
* Show status update panel for a task
|
|
2022
|
-
*/
|
|
2023
|
-
function showTaskStatusUpdate(taskId, loopId) {
|
|
2024
|
-
const statuses = [
|
|
2025
|
-
{ value: 'pending', label: t('loop.taskStatus.pending') || 'Pending', icon: 'circle' },
|
|
2026
|
-
{ value: 'in_progress', label: t('loop.taskStatus.inProgress') || 'In Progress', icon: 'loader' },
|
|
2027
|
-
{ value: 'blocked', label: t('loop.taskStatus.blocked') || 'Blocked', icon: 'octagon' },
|
|
2028
|
-
{ value: 'done', label: t('loop.taskStatus.done') || 'Done', icon: 'check-circle-2' }
|
|
2029
|
-
];
|
|
2030
|
-
|
|
2031
|
-
const modal = document.createElement('div');
|
|
2032
|
-
modal.id = 'statusUpdateModal';
|
|
2033
|
-
modal.className = 'modal-overlay';
|
|
2034
|
-
modal.innerHTML = `
|
|
2035
|
-
<div class="modal-content modal-sm">
|
|
2036
|
-
<div class="modal-header">
|
|
2037
|
-
<h3><i data-lucide="arrow-right-circle" class="w-5 h-5"></i> ${t('loop.updateStatus') || 'Update Status'}</h3>
|
|
2038
|
-
<button class="modal-close" onclick="closeStatusUpdateModal()">
|
|
2039
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
2040
|
-
</button>
|
|
2041
|
-
</div>
|
|
2042
|
-
<div class="modal-body">
|
|
2043
|
-
<div class="status-update-panel">
|
|
2044
|
-
${statuses.map(status => `
|
|
2045
|
-
<button class="status-option" onclick="applyTaskStatus('${taskId}', '${loopId}', '${status.value}')">
|
|
2046
|
-
<i data-lucide="${status.icon}" class="w-4 h-4"></i>
|
|
2047
|
-
<span>${status.label}</span>
|
|
2048
|
-
</button>
|
|
2049
|
-
`).join('')}
|
|
2050
|
-
</div>
|
|
2051
|
-
</div>
|
|
2052
|
-
</div>
|
|
2053
|
-
`;
|
|
2054
|
-
|
|
2055
|
-
document.body.appendChild(modal);
|
|
2056
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
/**
|
|
2060
|
-
* Close status update modal
|
|
2061
|
-
*/
|
|
2062
|
-
function closeStatusUpdateModal() {
|
|
2063
|
-
const modal = document.getElementById('statusUpdateModal');
|
|
2064
|
-
if (modal) modal.remove();
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
/**
|
|
2068
|
-
* Apply task status and close modal
|
|
2069
|
-
*/
|
|
2070
|
-
async function applyTaskStatus(taskId, loopId, newStatus) {
|
|
2071
|
-
closeStatusUpdateModal();
|
|
2072
|
-
await updateTaskStatus(loopId, taskId, newStatus);
|
|
2073
|
-
|
|
2074
|
-
// Refresh the appropriate view
|
|
2075
|
-
if (window.currentLoopView === 'kanban' || window.currentLoopView === 'tasks') {
|
|
2076
|
-
await renderKanbanBoard(loopId);
|
|
2077
|
-
} else {
|
|
2078
|
-
await loadLoopTasks(loopId);
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
|
|
2082
|
-
/**
|
|
2083
|
-
* Show task context menu
|
|
2084
|
-
*/
|
|
2085
|
-
function showTaskContextMenu(event, taskId, loopId) {
|
|
2086
|
-
event.stopPropagation();
|
|
2087
|
-
|
|
2088
|
-
// Remove existing menu if any
|
|
2089
|
-
const existing = document.getElementById('taskContextMenu');
|
|
2090
|
-
if (existing) existing.remove();
|
|
2091
|
-
|
|
2092
|
-
const menu = document.createElement('div');
|
|
2093
|
-
menu.id = 'taskContextMenu';
|
|
2094
|
-
menu.className = 'context-menu';
|
|
2095
|
-
menu.style.cssText = `
|
|
2096
|
-
position: fixed;
|
|
2097
|
-
left: ${event.clientX}px;
|
|
2098
|
-
top: ${event.clientY}px;
|
|
2099
|
-
z-index: 10000;
|
|
2100
|
-
background: hsl(var(--card));
|
|
2101
|
-
border: 1px solid hsl(var(--border));
|
|
2102
|
-
border-radius: 0.5rem;
|
|
2103
|
-
padding: 0.25rem;
|
|
2104
|
-
box-shadow: 0 4px 12px hsl(var(--foreground) / 0.15);
|
|
2105
|
-
min-width: 150px;
|
|
2106
|
-
`;
|
|
2107
|
-
|
|
2108
|
-
menu.innerHTML = `
|
|
2109
|
-
<button class="context-menu-item" onclick="editTask('${taskId}'); closeTaskContextMenu();">
|
|
2110
|
-
<i data-lucide="edit-2" class="w-4 h-4"></i>
|
|
2111
|
-
<span>${t('loop.edit') || 'Edit'}</span>
|
|
2112
|
-
</button>
|
|
2113
|
-
<button class="context-menu-item" onclick="showTaskStatusUpdate('${taskId}', '${loopId}'); closeTaskContextMenu();">
|
|
2114
|
-
<i data-lucide="arrow-right-circle" class="w-4 h-4"></i>
|
|
2115
|
-
<span>${t('loop.updateStatus') || 'Update Status'}</span>
|
|
2116
|
-
</button>
|
|
2117
|
-
<hr class="context-menu-divider">
|
|
2118
|
-
<button class="context-menu-item danger" onclick="confirmDeleteTask('${taskId}'); closeTaskContextMenu();">
|
|
2119
|
-
<i data-lucide="trash-2" class="w-4 h-4"></i>
|
|
2120
|
-
<span>${t('loop.delete') || 'Delete'}</span>
|
|
2121
|
-
</button>
|
|
2122
|
-
`;
|
|
2123
|
-
|
|
2124
|
-
document.body.appendChild(menu);
|
|
2125
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2126
|
-
|
|
2127
|
-
// Close on click outside
|
|
2128
|
-
setTimeout(() => {
|
|
2129
|
-
document.addEventListener('click', closeTaskContextMenu, { once: true });
|
|
2130
|
-
}, 10);
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
/**
|
|
2134
|
-
* Close task context menu
|
|
2135
|
-
*/
|
|
2136
|
-
function closeTaskContextMenu() {
|
|
2137
|
-
const menu = document.getElementById('taskContextMenu');
|
|
2138
|
-
if (menu) menu.remove();
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
|
-
// ==========================================
|
|
2142
|
-
// ACCESSIBILITY UTILITIES
|
|
2143
|
-
// ==========================================
|
|
2144
|
-
|
|
2145
|
-
/**
|
|
2146
|
-
* Announce message to screen readers using ARIA live region
|
|
2147
|
-
* @param {string} message - Message to announce
|
|
2148
|
-
* @param {string} priority - 'polite' or 'assertive' (default: 'polite')
|
|
2149
|
-
*/
|
|
2150
|
-
function announceToScreenReader(message, priority = 'polite') {
|
|
2151
|
-
// Create or get existing live region
|
|
2152
|
-
let liveRegion = document.getElementById('screen-reader-announcements');
|
|
2153
|
-
if (!liveRegion) {
|
|
2154
|
-
liveRegion = document.createElement('div');
|
|
2155
|
-
liveRegion.id = 'screen-reader-announcements';
|
|
2156
|
-
liveRegion.className = 'sr-only';
|
|
2157
|
-
liveRegion.setAttribute('role', 'status');
|
|
2158
|
-
liveRegion.setAttribute('aria-live', priority);
|
|
2159
|
-
liveRegion.setAttribute('aria-atomic', 'true');
|
|
2160
|
-
liveRegion.style.cssText = 'position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden;';
|
|
2161
|
-
document.body.appendChild(liveRegion);
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
// Update aria-live if priority changes
|
|
2165
|
-
if (liveRegion.getAttribute('aria-live') !== priority) {
|
|
2166
|
-
liveRegion.setAttribute('aria-live', priority);
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
// Clear and set message
|
|
2170
|
-
liveRegion.textContent = '';
|
|
2171
|
-
setTimeout(() => {
|
|
2172
|
-
liveRegion.textContent = message;
|
|
2173
|
-
}, 100);
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
/**
|
|
2177
|
-
* Add keyboard navigation for task cards
|
|
2178
|
-
* @param {HTMLElement} card - Task card element
|
|
2179
|
-
*/
|
|
2180
|
-
function addTaskCardKeyboardSupport(card) {
|
|
2181
|
-
if (!card) return;
|
|
2182
|
-
|
|
2183
|
-
// Make card focusable
|
|
2184
|
-
card.setAttribute('tabindex', '0');
|
|
2185
|
-
card.setAttribute('role', 'button');
|
|
2186
|
-
card.setAttribute('aria-label', `Task: ${card.querySelector('.task-card-title')?.textContent || 'Unnamed task'}`);
|
|
2187
|
-
|
|
2188
|
-
// Add keyboard event listener
|
|
2189
|
-
card.addEventListener('keydown', (event) => {
|
|
2190
|
-
const taskId = card.dataset.taskId;
|
|
2191
|
-
const loopId = card.dataset.loopId;
|
|
2192
|
-
|
|
2193
|
-
if (!taskId || !loopId) return;
|
|
2194
|
-
|
|
2195
|
-
// Enter or Space to open task context menu or edit
|
|
2196
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
2197
|
-
event.preventDefault();
|
|
2198
|
-
showTaskContextMenu(event, taskId, loopId);
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
// Arrow keys for navigation between cards
|
|
2202
|
-
if (event.key === 'ArrowDown') {
|
|
2203
|
-
event.preventDefault();
|
|
2204
|
-
const nextCard = card.nextElementSibling;
|
|
2205
|
-
if (nextCard && nextCard.classList.contains('loop-task-card')) {
|
|
2206
|
-
nextCard.focus();
|
|
2207
|
-
}
|
|
2208
|
-
} else if (event.key === 'ArrowUp') {
|
|
2209
|
-
event.preventDefault();
|
|
2210
|
-
const prevCard = card.previousElementSibling;
|
|
2211
|
-
if (prevCard && prevCard.classList.contains('loop-task-card')) {
|
|
2212
|
-
prevCard.focus();
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
// Arrow Left/Right to move between columns (in kanban view)
|
|
2217
|
-
else if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
|
|
2218
|
-
event.preventDefault();
|
|
2219
|
-
const currentColumn = card.closest('.loop-kanban-column-body');
|
|
2220
|
-
if (!currentColumn) return;
|
|
2221
|
-
|
|
2222
|
-
const parentColumn = currentColumn.closest('.loop-kanban-column');
|
|
2223
|
-
const siblingColumn = event.key === 'ArrowLeft'
|
|
2224
|
-
? parentColumn.previousElementSibling
|
|
2225
|
-
: parentColumn.nextElementSibling;
|
|
2226
|
-
|
|
2227
|
-
if (siblingColumn) {
|
|
2228
|
-
const siblingBody = siblingColumn.querySelector('.loop-kanban-column-body');
|
|
2229
|
-
const firstCard = siblingBody?.querySelector('.loop-task-card');
|
|
2230
|
-
if (firstCard) {
|
|
2231
|
-
firstCard.focus();
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
}
|
|
2235
|
-
});
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
/**
|
|
2239
|
-
* Initialize keyboard navigation for all task cards
|
|
2240
|
-
*/
|
|
2241
|
-
function initializeKeyboardNavigation() {
|
|
2242
|
-
const cards = document.querySelectorAll('.loop-task-card');
|
|
2243
|
-
cards.forEach(card => addTaskCardKeyboardSupport(card));
|
|
2244
|
-
|
|
2245
|
-
// Add keyboard shortcut hints
|
|
2246
|
-
document.addEventListener('keydown', (event) => {
|
|
2247
|
-
// Ctrl+K or Cmd+K to focus search/filter
|
|
2248
|
-
if ((event.ctrlKey || event.metaKey) && event.key === 'k') {
|
|
2249
|
-
event.preventDefault();
|
|
2250
|
-
const filterSelect = document.getElementById('loopFilter');
|
|
2251
|
-
if (filterSelect) {
|
|
2252
|
-
filterSelect.focus();
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
// ? to show keyboard shortcuts help
|
|
2257
|
-
if (event.key === '?' && !event.ctrlKey && !event.metaKey && !event.altKey) {
|
|
2258
|
-
const activeElement = document.activeElement;
|
|
2259
|
-
const isTyping = activeElement && (
|
|
2260
|
-
activeElement.tagName === 'INPUT' ||
|
|
2261
|
-
activeElement.tagName === 'TEXTAREA' ||
|
|
2262
|
-
activeElement.isContentEditable
|
|
2263
|
-
);
|
|
2264
|
-
|
|
2265
|
-
if (!isTyping) {
|
|
2266
|
-
event.preventDefault();
|
|
2267
|
-
showKeyboardShortcutsHelp();
|
|
2268
|
-
}
|
|
2269
|
-
}
|
|
2270
|
-
});
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
/**
|
|
2274
|
-
* Show keyboard shortcuts help dialog
|
|
2275
|
-
*/
|
|
2276
|
-
function showKeyboardShortcutsHelp() {
|
|
2277
|
-
const modal = document.createElement('div');
|
|
2278
|
-
modal.id = 'keyboardShortcutsModal';
|
|
2279
|
-
modal.className = 'modal-overlay';
|
|
2280
|
-
modal.innerHTML = `
|
|
2281
|
-
<div class="modal-content modal-sm" role="dialog" aria-labelledby="shortcuts-title" aria-modal="true">
|
|
2282
|
-
<div class="modal-header">
|
|
2283
|
-
<h3 id="shortcuts-title"><i data-lucide="keyboard" class="w-5 h-5"></i> ${t('common.keyboardShortcuts') || 'Keyboard Shortcuts'}</h3>
|
|
2284
|
-
<button class="modal-close" onclick="closeKeyboardShortcutsHelp()" aria-label="Close">
|
|
2285
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
2286
|
-
</button>
|
|
2287
|
-
</div>
|
|
2288
|
-
<div class="modal-body">
|
|
2289
|
-
<div style="display: flex; flex-direction: column; gap: 0.75rem;">
|
|
2290
|
-
<div style="display: flex; justify-content: space-between; padding: 0.5rem; border-bottom: 1px solid hsl(var(--border));">
|
|
2291
|
-
<span><kbd>?</kbd></span>
|
|
2292
|
-
<span style="color: hsl(var(--muted-foreground));">Show shortcuts</span>
|
|
2293
|
-
</div>
|
|
2294
|
-
<div style="display: flex; justify-content: space-between; padding: 0.5rem; border-bottom: 1px solid hsl(var(--border));">
|
|
2295
|
-
<span><kbd>Ctrl</kbd> + <kbd>K</kbd></span>
|
|
2296
|
-
<span style="color: hsl(var(--muted-foreground));">Focus filter</span>
|
|
2297
|
-
</div>
|
|
2298
|
-
<div style="display: flex; justify-content: space-between; padding: 0.5rem; border-bottom: 1px solid hsl(var(--border));">
|
|
2299
|
-
<span><kbd>Enter</kbd> / <kbd>Space</kbd></span>
|
|
2300
|
-
<span style="color: hsl(var(--muted-foreground));">Open task menu</span>
|
|
2301
|
-
</div>
|
|
2302
|
-
<div style="display: flex; justify-content: space-between; padding: 0.5rem; border-bottom: 1px solid hsl(var(--border));">
|
|
2303
|
-
<span><kbd>↑</kbd> / <kbd>↓</kbd></span>
|
|
2304
|
-
<span style="color: hsl(var(--muted-foreground));">Navigate tasks</span>
|
|
2305
|
-
</div>
|
|
2306
|
-
<div style="display: flex; justify-content: space-between; padding: 0.5rem; border-bottom: 1px solid hsl(var(--border));">
|
|
2307
|
-
<span><kbd>←</kbd> / <kbd>→</kbd></span>
|
|
2308
|
-
<span style="color: hsl(var(--muted-foreground));">Switch columns</span>
|
|
2309
|
-
</div>
|
|
2310
|
-
<div style="display: flex; justify-content: space-between; padding: 0.5rem;">
|
|
2311
|
-
<span><kbd>Esc</kbd></span>
|
|
2312
|
-
<span style="color: hsl(var(--muted-foreground));">Close dialog</span>
|
|
2313
|
-
</div>
|
|
2314
|
-
</div>
|
|
2315
|
-
</div>
|
|
2316
|
-
</div>
|
|
2317
|
-
`;
|
|
2318
|
-
|
|
2319
|
-
document.body.appendChild(modal);
|
|
2320
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2321
|
-
|
|
2322
|
-
// Focus on close button
|
|
2323
|
-
setTimeout(() => {
|
|
2324
|
-
const closeBtn = modal.querySelector('.modal-close');
|
|
2325
|
-
if (closeBtn) closeBtn.focus();
|
|
2326
|
-
}, 100);
|
|
2327
|
-
|
|
2328
|
-
// Close on Escape
|
|
2329
|
-
const handleEscape = (event) => {
|
|
2330
|
-
if (event.key === 'Escape') {
|
|
2331
|
-
closeKeyboardShortcutsHelp();
|
|
2332
|
-
document.removeEventListener('keydown', handleEscape);
|
|
2333
|
-
}
|
|
2334
|
-
};
|
|
2335
|
-
document.addEventListener('keydown', handleEscape);
|
|
2336
|
-
}
|
|
2337
|
-
|
|
2338
|
-
/**
|
|
2339
|
-
* Close keyboard shortcuts help
|
|
2340
|
-
*/
|
|
2341
|
-
function closeKeyboardShortcutsHelp() {
|
|
2342
|
-
const modal = document.getElementById('keyboardShortcutsModal');
|
|
2343
|
-
if (modal) modal.remove();
|
|
2344
|
-
}
|
|
2345
|
-
|
|
2346
|
-
// ==========================================
|
|
2347
|
-
// PERFORMANCE OPTIMIZATIONS
|
|
2348
|
-
// ==========================================
|
|
2349
|
-
|
|
2350
|
-
/**
|
|
2351
|
-
* Debounce function to limit how often a function is called
|
|
2352
|
-
* @param {Function} func - Function to debounce
|
|
2353
|
-
* @param {number} wait - Wait time in milliseconds
|
|
2354
|
-
* @returns {Function} Debounced function
|
|
2355
|
-
*/
|
|
2356
|
-
function debounce(func, wait) {
|
|
2357
|
-
let timeout;
|
|
2358
|
-
return function executedFunction(...args) {
|
|
2359
|
-
const later = () => {
|
|
2360
|
-
clearTimeout(timeout);
|
|
2361
|
-
func(...args);
|
|
2362
|
-
};
|
|
2363
|
-
clearTimeout(timeout);
|
|
2364
|
-
timeout = setTimeout(later, wait);
|
|
2365
|
-
};
|
|
2366
|
-
}
|
|
2367
|
-
|
|
2368
|
-
/**
|
|
2369
|
-
* Throttle function to limit execution frequency
|
|
2370
|
-
* @param {Function} func - Function to throttle
|
|
2371
|
-
* @param {number} limit - Minimum time between executions in ms
|
|
2372
|
-
* @returns {Function} Throttled function
|
|
2373
|
-
*/
|
|
2374
|
-
function throttle(func, limit) {
|
|
2375
|
-
let inThrottle;
|
|
2376
|
-
return function(...args) {
|
|
2377
|
-
if (!inThrottle) {
|
|
2378
|
-
func.apply(this, args);
|
|
2379
|
-
inThrottle = true;
|
|
2380
|
-
setTimeout(() => inThrottle = false, limit);
|
|
2381
|
-
}
|
|
2382
|
-
};
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
// Debounced versions of frequently called functions
|
|
2386
|
-
const debouncedRenderLoopList = debounce(renderLoopList, 300);
|
|
2387
|
-
const debouncedRenderKanbanBoard = debounce(renderKanbanBoard, 300);
|
|
2388
|
-
|
|
2389
|
-
// ==========================================
|
|
2390
|
-
// NAVIGATION GROUPING
|
|
2391
|
-
// ==========================================
|
|
2392
|
-
|
|
2393
|
-
/**
|
|
2394
|
-
* Group loops by their status for navigation display
|
|
2395
|
-
* @returns {object} Loops grouped by status with counts
|
|
2396
|
-
*/
|
|
2397
|
-
function groupLoopsByStatus() {
|
|
2398
|
-
const loops = Object.values(window.loopStateStore);
|
|
2399
|
-
const groups = {
|
|
2400
|
-
all: { loops: loops, count: loops.length },
|
|
2401
|
-
running: { loops: [], count: 0 },
|
|
2402
|
-
paused: { loops: [], count: 0 },
|
|
2403
|
-
completed: { loops: [], count: 0 },
|
|
2404
|
-
failed: { loops: [], count: 0 },
|
|
2405
|
-
created: { loops: [], count: 0 }
|
|
2406
|
-
};
|
|
2407
|
-
|
|
2408
|
-
loops.forEach(loop => {
|
|
2409
|
-
const status = loop.status || 'created';
|
|
2410
|
-
if (groups[status]) {
|
|
2411
|
-
groups[status].loops.push(loop);
|
|
2412
|
-
groups[status].count++;
|
|
2413
|
-
}
|
|
2414
|
-
});
|
|
2415
|
-
|
|
2416
|
-
return groups;
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
/**
|
|
2420
|
-
* Render loop list with status grouping
|
|
2421
|
-
*/
|
|
2422
|
-
function renderGroupedLoopList() {
|
|
2423
|
-
const container = document.getElementById('loopList');
|
|
2424
|
-
if (!container) return;
|
|
2425
|
-
|
|
2426
|
-
const groups = groupLoopsByStatus();
|
|
2427
|
-
const filter = document.getElementById('loopFilter')?.value || 'all';
|
|
2428
|
-
|
|
2429
|
-
// Get loops based on filter
|
|
2430
|
-
let loops;
|
|
2431
|
-
if (filter === 'all') {
|
|
2432
|
-
loops = groups.all.loops;
|
|
2433
|
-
} else {
|
|
2434
|
-
loops = groups[filter]?.loops || [];
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
// Sort by updated_at descending
|
|
2438
|
-
loops.sort((a, b) => new Date(b.updated_at) - new Date(a.updated_at));
|
|
2439
|
-
|
|
2440
|
-
if (loops.length === 0) {
|
|
2441
|
-
container.innerHTML = `
|
|
2442
|
-
<div class="empty-state">
|
|
2443
|
-
<div class="empty-state-icon">
|
|
2444
|
-
<i data-lucide="inbox" class="w-6 h-6"></i>
|
|
2445
|
-
</div>
|
|
2446
|
-
<p class="empty-state-title">${t('loop.noLoops')}</p>
|
|
2447
|
-
<p class="empty-state-hint">${t('loop.noLoopsHint')}</p>
|
|
2448
|
-
</div>
|
|
2449
|
-
`;
|
|
2450
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2451
|
-
return;
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
// Render grouped navigation
|
|
2455
|
-
const statusGroups = ['running', 'paused', 'created', 'completed', 'failed'];
|
|
2456
|
-
const groupHeaders = [];
|
|
2457
|
-
|
|
2458
|
-
statusGroups.forEach(status => {
|
|
2459
|
-
const group = groups[status];
|
|
2460
|
-
if (group.count > 0 && (filter === 'all' || filter === status)) {
|
|
2461
|
-
const statusLabel = t(`loop.${status}`) || status;
|
|
2462
|
-
const groupLoops = group.loops.map(loop => renderLoopCard(loop)).join('');
|
|
2463
|
-
groupHeaders.push(`
|
|
2464
|
-
<div class="loop-group">
|
|
2465
|
-
<div class="loop-group-header">
|
|
2466
|
-
<span class="group-label">${statusLabel}</span>
|
|
2467
|
-
<span class="group-count">${group.count}</span>
|
|
2468
|
-
</div>
|
|
2469
|
-
<div class="loop-group-items">
|
|
2470
|
-
${groupLoops}
|
|
2471
|
-
</div>
|
|
2472
|
-
</div>
|
|
2473
|
-
`);
|
|
2474
|
-
}
|
|
2475
|
-
});
|
|
2476
|
-
|
|
2477
|
-
// If filter is not 'all', just show filtered list without group headers
|
|
2478
|
-
if (filter !== 'all') {
|
|
2479
|
-
container.innerHTML = loops.map(loop => renderLoopCard(loop)).join('');
|
|
2480
|
-
} else {
|
|
2481
|
-
container.innerHTML = groupHeaders.join('');
|
|
2482
|
-
}
|
|
2483
|
-
|
|
2484
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
|
-
// ==========================================
|
|
2488
|
-
// LOOP TASK CREATION
|
|
2489
|
-
// ==========================================
|
|
2490
|
-
|
|
2491
|
-
/**
|
|
2492
|
-
* Show tasks tab with loop-enabled tasks
|
|
2493
|
-
*/
|
|
2494
|
-
async function showTasksTab() {
|
|
2495
|
-
try {
|
|
2496
|
-
const response = await fetch('/api/tasks');
|
|
2497
|
-
const result = await response.json();
|
|
2498
|
-
|
|
2499
|
-
if (!result.success) {
|
|
2500
|
-
showError(t('loop.failedToLoad') + ': ' + (result.error || t('common.error')));
|
|
2501
|
-
return;
|
|
2502
|
-
}
|
|
2503
|
-
|
|
2504
|
-
const tasks = result.data || [];
|
|
2505
|
-
const loopEnabledTasks = tasks.filter(t => t.loop_control && t.loop_control.enabled);
|
|
2506
|
-
|
|
2507
|
-
renderTasksList(loopEnabledTasks);
|
|
2508
|
-
} catch (err) {
|
|
2509
|
-
console.error('Load tasks error:', err);
|
|
2510
|
-
showError(t('loop.failedToLoad') + ': ' + err.message);
|
|
2511
|
-
}
|
|
2512
|
-
}
|
|
2513
|
-
|
|
2514
|
-
/**
|
|
2515
|
-
* Render tasks list with start button
|
|
2516
|
-
*/
|
|
2517
|
-
function renderTasksList(tasks) {
|
|
2518
|
-
const listContainer = document.getElementById('loopList');
|
|
2519
|
-
|
|
2520
|
-
if (tasks.length === 0) {
|
|
2521
|
-
listContainer.innerHTML = `
|
|
2522
|
-
<div class="empty-state">
|
|
2523
|
-
<i data-lucide="folder-open" class="w-10 h-10"></i>
|
|
2524
|
-
<p>${t('loop.noLoopTasks')}</p>
|
|
2525
|
-
<button class="btn btn-primary mt-4" onclick="showCreateLoopModal()">
|
|
2526
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.createLoopTask')}
|
|
2527
|
-
</button>
|
|
2528
|
-
</div>
|
|
2529
|
-
`;
|
|
2530
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2531
|
-
return;
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
listContainer.innerHTML = `
|
|
2535
|
-
<div class="tasks-list-header">
|
|
2536
|
-
<p class="text-sm text-gray-500">${t('loop.tasksCount', { count: tasks.length })}</p>
|
|
2537
|
-
<button class="btn btn-sm btn-secondary" onclick="loadLoops()">
|
|
2538
|
-
<i data-lucide="arrow-left" class="w-4 h-4"></i> ${t('loop.backToLoops')}
|
|
2539
|
-
</button>
|
|
2540
|
-
</div>
|
|
2541
|
-
<div class="tasks-list">
|
|
2542
|
-
${tasks.map(task => renderTaskCard(task)).join('')}
|
|
2543
|
-
</div>
|
|
2544
|
-
`;
|
|
2545
|
-
|
|
2546
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2547
|
-
}
|
|
2548
|
-
|
|
2549
|
-
/**
|
|
2550
|
-
* Render single task card
|
|
2551
|
-
*/
|
|
2552
|
-
function renderTaskCard(task) {
|
|
2553
|
-
const config = task.loop_control || {};
|
|
2554
|
-
const stepCount = config.cli_sequence ? config.cli_sequence.length : 0;
|
|
2555
|
-
|
|
2556
|
-
return `
|
|
2557
|
-
<div class="task-card" onclick="showTaskDetail('${task.id}')" style="cursor: pointer;">
|
|
2558
|
-
<div class="task-card-header">
|
|
2559
|
-
<span class="task-title">${escapeHtml(task.title || task.id)}</span>
|
|
2560
|
-
<span class="task-id">${escapeHtml(task.id)}</span>
|
|
2561
|
-
</div>
|
|
2562
|
-
<div class="task-card-body">
|
|
2563
|
-
<p class="task-description">${escapeHtml(config.description || t('common.na'))}</p>
|
|
2564
|
-
<div class="task-meta">
|
|
2565
|
-
<span><i data-lucide="repeat" class="w-4 h-4"></i> Max: ${config.max_iterations || 10}</span>
|
|
2566
|
-
<span><i data-lucide="list" class="w-4 h-4"></i> Steps: ${stepCount}</span>
|
|
2567
|
-
</div>
|
|
2568
|
-
<button class="btn btn-primary w-full mt-3" onclick="event.stopPropagation(); startLoopFromTask('${task.id}')">
|
|
2569
|
-
<i data-lucide="play" class="w-4 h-4"></i> ${t('loop.startLoop')}
|
|
2570
|
-
</button>
|
|
2571
|
-
</div>
|
|
2572
|
-
</div>
|
|
2573
|
-
`;
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
/**
|
|
2577
|
-
* Start loop from task
|
|
2578
|
-
*/
|
|
2579
|
-
async function startLoopFromTask(taskId) {
|
|
2580
|
-
try {
|
|
2581
|
-
const response = await fetch('/api/loops', {
|
|
2582
|
-
method: 'POST',
|
|
2583
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2584
|
-
body: JSON.stringify({ taskId })
|
|
2585
|
-
});
|
|
2586
|
-
const result = await response.json();
|
|
2587
|
-
|
|
2588
|
-
if (result.success) {
|
|
2589
|
-
showNotification(t('loop.loopStarted') + ': ' + result.data.loopId, 'success');
|
|
2590
|
-
await loadLoops(); // Refresh to show new loop
|
|
2591
|
-
} else {
|
|
2592
|
-
showError(t('loop.failedToStart') + ': ' + (result.error || t('common.error')));
|
|
2593
|
-
}
|
|
2594
|
-
} catch (err) {
|
|
2595
|
-
console.error('Start loop error:', err);
|
|
2596
|
-
showError(t('loop.failedToStart') + ': ' + err.message);
|
|
2597
|
-
}
|
|
2598
|
-
}
|
|
2599
|
-
|
|
2600
|
-
/**
|
|
2601
|
-
* Show task detail in detail panel
|
|
2602
|
-
*/
|
|
2603
|
-
async function showTaskDetail(taskId) {
|
|
2604
|
-
try {
|
|
2605
|
-
const response = await fetch(`/api/tasks/${encodeURIComponent(taskId)}`);
|
|
2606
|
-
const result = await response.json();
|
|
2607
|
-
|
|
2608
|
-
if (!result.success) {
|
|
2609
|
-
showError('Failed to load task: ' + (result.error || 'Unknown error'));
|
|
2610
|
-
return;
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
|
-
const task = result.data?.task || result.data;
|
|
2614
|
-
renderTaskDetail(task);
|
|
2615
|
-
} catch (err) {
|
|
2616
|
-
console.error('Load task error:', err);
|
|
2617
|
-
showError('Failed to load task: ' + err.message);
|
|
2618
|
-
}
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
|
-
/**
|
|
2622
|
-
* Render task detail panel
|
|
2623
|
-
*/
|
|
2624
|
-
function renderTaskDetail(task) {
|
|
2625
|
-
const container = document.getElementById('loopDetailPanel');
|
|
2626
|
-
if (!container) return;
|
|
2627
|
-
|
|
2628
|
-
const config = task.loop_control || {};
|
|
2629
|
-
const cliSequence = config.cli_sequence || [];
|
|
2630
|
-
const stepCount = cliSequence.length;
|
|
2631
|
-
|
|
2632
|
-
container.innerHTML = `
|
|
2633
|
-
<div class="loop-detail">
|
|
2634
|
-
<!-- Header -->
|
|
2635
|
-
<div class="detail-header">
|
|
2636
|
-
<div class="detail-status active">
|
|
2637
|
-
<i data-lucide="file-text" class="w-4 h-4"></i>
|
|
2638
|
-
<span class="status-label">${t('loop.task')}</span>
|
|
2639
|
-
</div>
|
|
2640
|
-
<div class="detail-actions">
|
|
2641
|
-
<button class="btn btn-primary" onclick="startLoopFromTask('${task.id}')">
|
|
2642
|
-
<i data-lucide="play" class="w-4 h-4"></i> ${t('loop.startLoop')}
|
|
2643
|
-
</button>
|
|
2644
|
-
<button class="btn btn-secondary" onclick="showCreateLoopModal('${task.id}')">
|
|
2645
|
-
<i data-lucide="edit" class="w-4 h-4"></i> ${t('loop.edit')}
|
|
2646
|
-
</button>
|
|
2647
|
-
</div>
|
|
2648
|
-
</div>
|
|
2649
|
-
|
|
2650
|
-
<!-- Title & Description -->
|
|
2651
|
-
<div class="detail-section">
|
|
2652
|
-
<h3 class="detail-title">${escapeHtml(task.title || task.id)}</h3>
|
|
2653
|
-
<p class="detail-description">${escapeHtml(config.description || task.description || '')}</p>
|
|
2654
|
-
</div>
|
|
2655
|
-
|
|
2656
|
-
<!-- Configuration -->
|
|
2657
|
-
<div class="detail-section">
|
|
2658
|
-
<h4><i data-lucide="settings" class="w-4 h-4"></i> ${t('loop.loopConfig')}</h4>
|
|
2659
|
-
<div class="config-grid">
|
|
2660
|
-
<div class="config-item">
|
|
2661
|
-
<span class="config-label">${t('loop.maxIterations')}</span>
|
|
2662
|
-
<span class="config-value">${config.max_iterations || 10}</span>
|
|
2663
|
-
</div>
|
|
2664
|
-
<div class="config-item">
|
|
2665
|
-
<span class="config-label">${t('loop.errorPolicy')}</span>
|
|
2666
|
-
<span class="config-value">${config.error_policy?.on_failure || 'pause'}</span>
|
|
2667
|
-
</div>
|
|
2668
|
-
<div class="config-item">
|
|
2669
|
-
<span class="config-label">${t('loop.maxRetries')}</span>
|
|
2670
|
-
<span class="config-value">${config.error_policy?.max_retries || 3}</span>
|
|
2671
|
-
</div>
|
|
2672
|
-
<div class="config-item">
|
|
2673
|
-
<span class="config-label">${t('loop.cliSequence')}</span>
|
|
2674
|
-
<span class="config-value">${stepCount} ${t('loop.steps')}</span>
|
|
2675
|
-
</div>
|
|
2676
|
-
</div>
|
|
2677
|
-
${config.success_condition ? `
|
|
2678
|
-
<div class="config-item-full">
|
|
2679
|
-
<span class="config-label">${t('loop.successCondition')}</span>
|
|
2680
|
-
<code class="config-code">${escapeHtml(config.success_condition)}</code>
|
|
2681
|
-
</div>
|
|
2682
|
-
` : ''}
|
|
2683
|
-
</div>
|
|
2684
|
-
|
|
2685
|
-
<!-- CLI Sequence -->
|
|
2686
|
-
<div class="detail-section">
|
|
2687
|
-
<h4><i data-lucide="terminal" class="w-4 h-4"></i> ${t('loop.cliSequence')}</h4>
|
|
2688
|
-
<div class="steps-list">
|
|
2689
|
-
${cliSequence.map((step, index) => `
|
|
2690
|
-
<div class="step-item">
|
|
2691
|
-
<div class="step-number">${index + 1}</div>
|
|
2692
|
-
<div class="step-content">
|
|
2693
|
-
<div class="step-header">
|
|
2694
|
-
<span class="step-id">${escapeHtml(step.step_id || `Step ${index + 1}`)}</span>
|
|
2695
|
-
<span class="step-tool">${step.tool}</span>
|
|
2696
|
-
</div>
|
|
2697
|
-
<div class="step-details">
|
|
2698
|
-
<span class="step-mode">${step.mode}</span>
|
|
2699
|
-
${step.on_error ? `<span class="step-error">On error: ${step.on_error}</span>` : ''}
|
|
2700
|
-
</div>
|
|
2701
|
-
${step.prompt_template ? `
|
|
2702
|
-
<div class="step-prompt">
|
|
2703
|
-
<small>${t('loop.promptTemplate')}:</small>
|
|
2704
|
-
<p>${escapeHtml(step.prompt_template.substring(0, 100))}${step.prompt_template.length > 100 ? '...' : ''}</p>
|
|
2705
|
-
</div>
|
|
2706
|
-
` : ''}
|
|
2707
|
-
${step.command ? `
|
|
2708
|
-
<div class="step-command">
|
|
2709
|
-
<small>${t('loop.command')}:</small>
|
|
2710
|
-
<code>${escapeHtml(step.command)}</code>
|
|
2711
|
-
</div>
|
|
2712
|
-
` : ''}
|
|
2713
|
-
</div>
|
|
2714
|
-
</div>
|
|
2715
|
-
`).join('')}
|
|
2716
|
-
</div>
|
|
2717
|
-
</div>
|
|
2718
|
-
|
|
2719
|
-
<!-- Task Info -->
|
|
2720
|
-
<div class="detail-section">
|
|
2721
|
-
<h4><i data-lucide="info" class="w-4 h-4"></i> ${t('loop.taskInfo')}</h4>
|
|
2722
|
-
<div class="config-grid">
|
|
2723
|
-
<div class="config-item">
|
|
2724
|
-
<span class="config-label">${t('loop.taskId')}</span>
|
|
2725
|
-
<span class="config-value">${escapeHtml(task.id)}</span>
|
|
2726
|
-
</div>
|
|
2727
|
-
<div class="config-item">
|
|
2728
|
-
<span class="config-label">${t('loop.status')}</span>
|
|
2729
|
-
<span class="config-value">${task.status || 'active'}</span>
|
|
2730
|
-
</div>
|
|
2731
|
-
${task.meta?.created_by ? `
|
|
2732
|
-
<div class="config-item">
|
|
2733
|
-
<span class="config-label">${t('loop.createdBy')}</span>
|
|
2734
|
-
<span class="config-value">${task.meta.created_by}</span>
|
|
2735
|
-
</div>
|
|
2736
|
-
` : ''}
|
|
2737
|
-
</div>
|
|
2738
|
-
</div>
|
|
2739
|
-
</div>
|
|
2740
|
-
`;
|
|
2741
|
-
|
|
2742
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2743
|
-
}
|
|
2744
|
-
|
|
2745
|
-
// Global store for available CLI tools
|
|
2746
|
-
window.availableCliTools = [];
|
|
2747
|
-
|
|
2748
|
-
/**
|
|
2749
|
-
* Fetch available CLI tools from API
|
|
2750
|
-
*/
|
|
2751
|
-
async function fetchAvailableCliTools() {
|
|
2752
|
-
try {
|
|
2753
|
-
const response = await fetch('/api/cli/status');
|
|
2754
|
-
const data = await response.json();
|
|
2755
|
-
// Return only available tools (where available: true)
|
|
2756
|
-
return Object.entries(data)
|
|
2757
|
-
.filter(([_, status]) => status.available)
|
|
2758
|
-
.map(([name, _]) => name);
|
|
2759
|
-
} catch (err) {
|
|
2760
|
-
console.error('Failed to fetch CLI tools:', err);
|
|
2761
|
-
// Fallback to default tools
|
|
2762
|
-
return ['gemini', 'qwen', 'codex', 'claude'];
|
|
2763
|
-
}
|
|
2764
|
-
}
|
|
2765
|
-
|
|
2766
|
-
/**
|
|
2767
|
-
* Show create loop modal (backup - complex version with CLI sequence)
|
|
2768
|
-
* @deprecated Use showSimpleCreateLoopModal instead
|
|
2769
|
-
*/
|
|
2770
|
-
async function showCreateLoopModal_backup() {
|
|
2771
|
-
// Fetch available CLI tools first
|
|
2772
|
-
window.availableCliTools = await fetchAvailableCliTools();
|
|
2773
|
-
|
|
2774
|
-
const modal = document.createElement('div');
|
|
2775
|
-
modal.id = 'createLoopModal';
|
|
2776
|
-
modal.className = 'modal-overlay';
|
|
2777
|
-
modal.innerHTML = `
|
|
2778
|
-
<div class="modal-content modal-lg">
|
|
2779
|
-
<div class="modal-header">
|
|
2780
|
-
<h3>${t('loop.createLoopModal')}</h3>
|
|
2781
|
-
<button class="modal-close" onclick="closeCreateLoopModal()">
|
|
2782
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
2783
|
-
</button>
|
|
2784
|
-
</div>
|
|
2785
|
-
<div class="modal-body">
|
|
2786
|
-
<form id="createLoopForm" onsubmit="handleCreateLoopSubmit(event)">
|
|
2787
|
-
<!-- Basic Info -->
|
|
2788
|
-
<div class="form-section section-basic">
|
|
2789
|
-
<div class="section-header-with-action">
|
|
2790
|
-
<h4><i data-lucide="info" class="w-4 h-4"></i> ${t('loop.basicInfo')}</h4>
|
|
2791
|
-
<button type="button" class="btn btn-sm btn-outline" onclick="importFromIssue()" title="${t('loop.importFromIssue')}">
|
|
2792
|
-
<i data-lucide="download" class="w-3 h-3"></i> ${t('loop.importFromIssue')}
|
|
2793
|
-
</button>
|
|
2794
|
-
</div>
|
|
2795
|
-
<div class="form-group">
|
|
2796
|
-
<label for="taskTitle">${t('loop.taskTitle')}</label>
|
|
2797
|
-
<input type="text" id="taskTitle" name="title" required
|
|
2798
|
-
placeholder="${t('loop.taskTitlePlaceholder')}"
|
|
2799
|
-
class="form-control">
|
|
2800
|
-
</div>
|
|
2801
|
-
<div class="form-group">
|
|
2802
|
-
<label for="taskDescription">${t('loop.description')}</label>
|
|
2803
|
-
<textarea id="taskDescription" name="description" rows="2"
|
|
2804
|
-
placeholder="${t('loop.descriptionPlaceholder')}"
|
|
2805
|
-
class="form-control"></textarea>
|
|
2806
|
-
</div>
|
|
2807
|
-
</div>
|
|
2808
|
-
|
|
2809
|
-
<!-- Loop Configuration -->
|
|
2810
|
-
<div class="form-section section-config">
|
|
2811
|
-
<h4><i data-lucide="settings" class="w-4 h-4"></i> ${t('loop.loopConfig')}</h4>
|
|
2812
|
-
<div class="form-row">
|
|
2813
|
-
<div class="form-group flex-1">
|
|
2814
|
-
<label for="maxIterations">${t('loop.maxIterations')}</label>
|
|
2815
|
-
<input type="number" id="maxIterations" name="max_iterations" value="10" min="1" max="100"
|
|
2816
|
-
class="form-control">
|
|
2817
|
-
</div>
|
|
2818
|
-
<div class="form-group flex-1">
|
|
2819
|
-
<label for="errorPolicy">${t('loop.errorPolicy')}</label>
|
|
2820
|
-
<select id="errorPolicy" name="error_policy" class="form-control">
|
|
2821
|
-
<option value="pause">${t('loop.pauseOnError')}</option>
|
|
2822
|
-
<option value="retry">${t('loop.retryAutomatically')}</option>
|
|
2823
|
-
<option value="fail_fast">${t('loop.failImmediately')}</option>
|
|
2824
|
-
</select>
|
|
2825
|
-
</div>
|
|
2826
|
-
</div>
|
|
2827
|
-
<div class="form-group">
|
|
2828
|
-
<label for="maxRetries">${t('loop.maxRetries')}</label>
|
|
2829
|
-
<input type="number" id="maxRetries" name="max_retries" value="3" min="0" max="10"
|
|
2830
|
-
class="form-control">
|
|
2831
|
-
</div>
|
|
2832
|
-
<div class="form-group">
|
|
2833
|
-
<label for="successCondition">${t('loop.successCondition')}</label>
|
|
2834
|
-
<input type="text" id="successCondition" name="success_condition"
|
|
2835
|
-
placeholder="${t('loop.successConditionPlaceholder')}"
|
|
2836
|
-
class="form-control">
|
|
2837
|
-
<small class="text-gray-500">
|
|
2838
|
-
${t('loop.availableVars')}
|
|
2839
|
-
</small>
|
|
2840
|
-
</div>
|
|
2841
|
-
</div>
|
|
2842
|
-
|
|
2843
|
-
<!-- CLI Sequence -->
|
|
2844
|
-
<div class="form-section section-cli">
|
|
2845
|
-
<div class="flex justify-between items-center mb-3">
|
|
2846
|
-
<h4><i data-lucide="list-ordered" class="w-4 h-4"></i> ${t('loop.cliSequence')}</h4>
|
|
2847
|
-
<button type="button" class="btn btn-sm btn-info-light" onclick="addCliStep()">
|
|
2848
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.addStep')}
|
|
2849
|
-
</button>
|
|
2850
|
-
</div>
|
|
2851
|
-
<div id="cliStepsContainer">
|
|
2852
|
-
<!-- Steps will be added here -->
|
|
2853
|
-
</div>
|
|
2854
|
-
</div>
|
|
2855
|
-
|
|
2856
|
-
<!-- Form Actions -->
|
|
2857
|
-
<div class="modal-footer">
|
|
2858
|
-
<button type="button" class="btn btn-secondary" onclick="closeCreateLoopModal()">${t('loop.cancel')}</button>
|
|
2859
|
-
<button type="submit" class="btn btn-primary">
|
|
2860
|
-
<i data-lucide="check" class="w-4 h-4"></i> ${t('loop.createAndStart')}
|
|
2861
|
-
</button>
|
|
2862
|
-
</div>
|
|
2863
|
-
</form>
|
|
2864
|
-
</div>
|
|
2865
|
-
</div>
|
|
2866
|
-
`;
|
|
2867
|
-
|
|
2868
|
-
document.body.appendChild(modal);
|
|
2869
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2870
|
-
|
|
2871
|
-
// Add first step by default
|
|
2872
|
-
addCliStep();
|
|
2873
|
-
|
|
2874
|
-
// Focus on title
|
|
2875
|
-
setTimeout(() => document.getElementById('taskTitle').focus(), 100);
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2878
|
-
/**
|
|
2879
|
-
* Show simplified create loop modal (v2)
|
|
2880
|
-
* Only 3 fields: title, description, max_iterations
|
|
2881
|
-
*/
|
|
2882
|
-
async function showSimpleCreateLoopModal() {
|
|
2883
|
-
const modal = document.createElement('div');
|
|
2884
|
-
modal.id = 'createLoopModal';
|
|
2885
|
-
modal.className = 'modal-overlay';
|
|
2886
|
-
modal.innerHTML = `
|
|
2887
|
-
<div class="modal-content">
|
|
2888
|
-
<div class="modal-header">
|
|
2889
|
-
<h3><i data-lucide="plus-circle" class="w-5 h-5"></i> ${t('loop.newLoop')}</h3>
|
|
2890
|
-
<button class="modal-close" onclick="closeSimpleCreateLoopModal()">
|
|
2891
|
-
<i data-lucide="x" class="w-5 h-5"></i>
|
|
2892
|
-
</button>
|
|
2893
|
-
</div>
|
|
2894
|
-
<div class="modal-body">
|
|
2895
|
-
<form id="simpleCreateLoopForm" onsubmit="handleSimpleCreateLoop(event)">
|
|
2896
|
-
<div id="simpleCreateError" class="alert alert-error" style="display: none;"></div>
|
|
2897
|
-
|
|
2898
|
-
<!-- Title -->
|
|
2899
|
-
<div class="form-group">
|
|
2900
|
-
<label for="simpleLoopTitle">${t('loop.taskTitle')} <span class="required">*</span></label>
|
|
2901
|
-
<input type="text" id="simpleLoopTitle" name="title" required
|
|
2902
|
-
placeholder="${t('loop.taskTitlePlaceholder')}"
|
|
2903
|
-
class="form-control"
|
|
2904
|
-
minlength="1" maxlength="100">
|
|
2905
|
-
<small class="text-gray-500">${t('loop.taskTitleHint') || 'Enter a descriptive title for your loop'}</small>
|
|
2906
|
-
</div>
|
|
2907
|
-
|
|
2908
|
-
<!-- Description -->
|
|
2909
|
-
<div class="form-group">
|
|
2910
|
-
<label for="simpleLoopDescription">${t('loop.description')}</label>
|
|
2911
|
-
<textarea id="simpleLoopDescription" name="description" rows="3"
|
|
2912
|
-
placeholder="${t('loop.descriptionPlaceholder')}"
|
|
2913
|
-
class="form-control"
|
|
2914
|
-
maxlength="500"></textarea>
|
|
2915
|
-
<small class="text-gray-500">${t('loop.descriptionHint') || 'Optional context about what this loop does'}</small>
|
|
2916
|
-
</div>
|
|
2917
|
-
|
|
2918
|
-
<!-- Max Iterations -->
|
|
2919
|
-
<div class="form-group">
|
|
2920
|
-
<label for="simpleLoopMaxIter">${t('loop.maxIterations')} <span class="required">*</span></label>
|
|
2921
|
-
<input type="number" id="simpleLoopMaxIter" name="max_iterations" value="10" min="1" max="100"
|
|
2922
|
-
class="form-control">
|
|
2923
|
-
<small class="text-gray-500">${t('loop.maxIterationsHint') || 'Maximum number of iterations to run (1-100)'}</small>
|
|
2924
|
-
</div>
|
|
2925
|
-
|
|
2926
|
-
<!-- Form Actions -->
|
|
2927
|
-
<div class="modal-footer">
|
|
2928
|
-
<button type="button" class="btn btn-secondary" onclick="closeSimpleCreateLoopModal()">${t('loop.cancel')}</button>
|
|
2929
|
-
<button type="submit" class="btn btn-primary">
|
|
2930
|
-
<i data-lucide="plus" class="w-4 h-4"></i> ${t('loop.create') || 'Create'}
|
|
2931
|
-
</button>
|
|
2932
|
-
</div>
|
|
2933
|
-
</form>
|
|
2934
|
-
</div>
|
|
2935
|
-
</div>
|
|
2936
|
-
`;
|
|
2937
|
-
|
|
2938
|
-
document.body.appendChild(modal);
|
|
2939
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
2940
|
-
|
|
2941
|
-
// Focus on title field
|
|
2942
|
-
setTimeout(() => document.getElementById('simpleLoopTitle').focus(), 100);
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
/**
|
|
2946
|
-
* Close simplified create loop modal
|
|
2947
|
-
*/
|
|
2948
|
-
function closeSimpleCreateLoopModal() {
|
|
2949
|
-
const modal = document.getElementById('createLoopModal');
|
|
2950
|
-
if (modal) {
|
|
2951
|
-
modal.remove();
|
|
2952
|
-
}
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
/**
|
|
2956
|
-
* Handle simplified create loop form submission
|
|
2957
|
-
* Calls POST /api/loops/v2
|
|
2958
|
-
*/
|
|
2959
|
-
async function handleSimpleCreateLoop(event) {
|
|
2960
|
-
event.preventDefault();
|
|
2961
|
-
|
|
2962
|
-
const form = event.target;
|
|
2963
|
-
const errorDiv = document.getElementById('simpleCreateError');
|
|
2964
|
-
|
|
2965
|
-
// Clear previous errors
|
|
2966
|
-
if (errorDiv) {
|
|
2967
|
-
errorDiv.style.display = 'none';
|
|
2968
|
-
errorDiv.textContent = '';
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
|
-
// Get form values
|
|
2972
|
-
const title = form.title.value.trim();
|
|
2973
|
-
const description = form.description.value.trim();
|
|
2974
|
-
const maxIterations = parseInt(form.max_iterations.value, 10);
|
|
2975
|
-
|
|
2976
|
-
// Client-side validation
|
|
2977
|
-
if (!title) {
|
|
2978
|
-
if (errorDiv) {
|
|
2979
|
-
errorDiv.textContent = t('loop.titleRequired') || 'Title is required';
|
|
2980
|
-
errorDiv.style.display = 'block';
|
|
2981
|
-
}
|
|
2982
|
-
return;
|
|
2983
|
-
}
|
|
2984
|
-
|
|
2985
|
-
if (maxIterations < 1 || maxIterations > 100) {
|
|
2986
|
-
if (errorDiv) {
|
|
2987
|
-
errorDiv.textContent = t('loop.invalidMaxIterations') || 'Max iterations must be between 1 and 100';
|
|
2988
|
-
errorDiv.style.display = 'block';
|
|
2989
|
-
}
|
|
2990
|
-
return;
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
try {
|
|
2994
|
-
// Call POST /api/loops/v2
|
|
2995
|
-
const response = await fetch('/api/loops/v2', {
|
|
2996
|
-
method: 'POST',
|
|
2997
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2998
|
-
body: JSON.stringify({
|
|
2999
|
-
title: title,
|
|
3000
|
-
description: description,
|
|
3001
|
-
max_iterations: maxIterations
|
|
3002
|
-
})
|
|
3003
|
-
});
|
|
3004
|
-
|
|
3005
|
-
const result = await response.json();
|
|
3006
|
-
|
|
3007
|
-
if (result.success) {
|
|
3008
|
-
showNotification(t('loop.loopCreated') || 'Loop created successfully', 'success');
|
|
3009
|
-
closeSimpleCreateLoopModal();
|
|
3010
|
-
// Reload loops to show the new loop
|
|
3011
|
-
await loadLoops();
|
|
3012
|
-
} else {
|
|
3013
|
-
if (errorDiv) {
|
|
3014
|
-
errorDiv.textContent = result.error || (t('loop.createFailed') || 'Failed to create loop');
|
|
3015
|
-
errorDiv.style.display = 'block';
|
|
3016
|
-
}
|
|
3017
|
-
}
|
|
3018
|
-
} catch (err) {
|
|
3019
|
-
console.error('Create loop error:', err);
|
|
3020
|
-
if (errorDiv) {
|
|
3021
|
-
errorDiv.textContent = err.message || (t('loop.createFailed') || 'Failed to create loop');
|
|
3022
|
-
errorDiv.style.display = 'block';
|
|
3023
|
-
}
|
|
3024
|
-
}
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
/**
|
|
3028
|
-
* Show create loop modal (simplified v2)
|
|
3029
|
-
*/
|
|
3030
|
-
async function showCreateLoopModal() {
|
|
3031
|
-
await showSimpleCreateLoopModal();
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
/**
|
|
3035
|
-
* Close create loop modal
|
|
3036
|
-
*/
|
|
3037
|
-
function closeCreateLoopModal() {
|
|
3038
|
-
const modal = document.getElementById('createLoopModal');
|
|
3039
|
-
if (modal) {
|
|
3040
|
-
modal.remove();
|
|
3041
|
-
}
|
|
3042
|
-
}
|
|
3043
|
-
|
|
3044
|
-
/**
|
|
3045
|
-
* Import task data from issue
|
|
3046
|
-
*/
|
|
3047
|
-
async function importFromIssue() {
|
|
3048
|
-
try {
|
|
3049
|
-
const response = await fetch('/api/issues');
|
|
3050
|
-
const data = await response.json();
|
|
3051
|
-
|
|
3052
|
-
if (!data.issues || data.issues.length === 0) {
|
|
3053
|
-
showNotification(t('loop.noIssuesFound'), 'warning');
|
|
3054
|
-
return;
|
|
3055
|
-
}
|
|
3056
|
-
|
|
3057
|
-
// Show issue selection modal
|
|
3058
|
-
showIssueSelector(data.issues);
|
|
3059
|
-
} catch (err) {
|
|
3060
|
-
console.error('Failed to fetch issues:', err);
|
|
3061
|
-
showError(t('loop.fetchIssuesFailed') + ': ' + err.message);
|
|
3062
|
-
}
|
|
3063
|
-
}
|
|
3064
|
-
|
|
3065
|
-
/**
|
|
3066
|
-
* Show issue selector modal
|
|
3067
|
-
*/
|
|
3068
|
-
function showIssueSelector(issues) {
|
|
3069
|
-
// Remove existing selector if any
|
|
3070
|
-
const existing = document.getElementById('issueSelectorModal');
|
|
3071
|
-
if (existing) existing.remove();
|
|
3072
|
-
|
|
3073
|
-
const modal = document.createElement('div');
|
|
3074
|
-
modal.id = 'issueSelectorModal';
|
|
3075
|
-
modal.className = 'modal-overlay';
|
|
3076
|
-
modal.innerHTML = `
|
|
3077
|
-
<div class="modal-content" style="max-width: 600px;">
|
|
3078
|
-
<div class="modal-header">
|
|
3079
|
-
<h3><i data-lucide="download" class="w-4 h-4"></i> ${t('loop.selectIssue')}</h3>
|
|
3080
|
-
<button class="btn-close" onclick="closeIssueSelector()">
|
|
3081
|
-
<i data-lucide="x" class="w-4 h-4"></i>
|
|
3082
|
-
</button>
|
|
3083
|
-
</div>
|
|
3084
|
-
<div class="modal-body" style="max-height: 400px; overflow-y: auto;">
|
|
3085
|
-
<div class="issue-list">
|
|
3086
|
-
${issues.map(issue => `
|
|
3087
|
-
<div class="issue-item" onclick="selectIssue('${issue.id}')" style="cursor: pointer; padding: 0.75rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; margin-bottom: 0.5rem; transition: all 0.2s;">
|
|
3088
|
-
<div style="display: flex; justify-content: space-between; align-items: start;">
|
|
3089
|
-
<div style="flex: 1;">
|
|
3090
|
-
<div style="font-weight: 600; color: hsl(var(--foreground)); margin-bottom: 0.25rem;">
|
|
3091
|
-
${issue.id}: ${escapeHtml(issue.title)}
|
|
3092
|
-
</div>
|
|
3093
|
-
<div style="font-size: 0.875rem; color: hsl(var(--muted-foreground));">
|
|
3094
|
-
${escapeHtml(issue.context || '').substring(0, 100)}${issue.context?.length > 100 ? '...' : ''}
|
|
3095
|
-
</div>
|
|
3096
|
-
</div>
|
|
3097
|
-
<span class="status-badge status-${issue.status}" style="font-size: 0.75rem;">
|
|
3098
|
-
${t('issue.status.' + issue.status, issue.status)}
|
|
3099
|
-
</span>
|
|
3100
|
-
</div>
|
|
3101
|
-
</div>
|
|
3102
|
-
`).join('')}
|
|
3103
|
-
</div>
|
|
3104
|
-
</div>
|
|
3105
|
-
</div>
|
|
3106
|
-
`;
|
|
3107
|
-
|
|
3108
|
-
document.body.appendChild(modal);
|
|
3109
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
3110
|
-
|
|
3111
|
-
// Add hover effect
|
|
3112
|
-
modal.querySelectorAll('.issue-item').forEach(item => {
|
|
3113
|
-
item.addEventListener('mouseenter', () => {
|
|
3114
|
-
item.style.background = 'hsl(var(--accent) / 0.1)';
|
|
3115
|
-
item.style.borderColor = 'hsl(var(--primary))';
|
|
3116
|
-
});
|
|
3117
|
-
item.addEventListener('mouseleave', () => {
|
|
3118
|
-
item.style.background = '';
|
|
3119
|
-
item.style.borderColor = '';
|
|
3120
|
-
});
|
|
3121
|
-
});
|
|
3122
|
-
}
|
|
3123
|
-
|
|
3124
|
-
/**
|
|
3125
|
-
* Close issue selector
|
|
3126
|
-
*/
|
|
3127
|
-
function closeIssueSelector() {
|
|
3128
|
-
const modal = document.getElementById('issueSelectorModal');
|
|
3129
|
-
if (modal) modal.remove();
|
|
3130
|
-
}
|
|
3131
|
-
|
|
3132
|
-
/**
|
|
3133
|
-
* Select issue and populate form
|
|
3134
|
-
*/
|
|
3135
|
-
async function selectIssue(issueId) {
|
|
3136
|
-
try {
|
|
3137
|
-
const response = await fetch(`/api/issues/${encodeURIComponent(issueId)}`);
|
|
3138
|
-
const data = await response.json();
|
|
3139
|
-
|
|
3140
|
-
if (data.error) {
|
|
3141
|
-
showError(t('loop.fetchIssueFailed') + ': ' + data.error);
|
|
3142
|
-
return;
|
|
3143
|
-
}
|
|
3144
|
-
|
|
3145
|
-
const issue = data;
|
|
3146
|
-
|
|
3147
|
-
// Populate form fields
|
|
3148
|
-
const titleInput = document.getElementById('taskTitle');
|
|
3149
|
-
const descInput = document.getElementById('taskDescription');
|
|
3150
|
-
|
|
3151
|
-
if (titleInput) titleInput.value = issue.title || '';
|
|
3152
|
-
if (descInput) descInput.value = issue.context || '';
|
|
3153
|
-
|
|
3154
|
-
closeIssueSelector();
|
|
3155
|
-
showNotification(t('loop.issueImported') + ': ' + issueId, 'success');
|
|
3156
|
-
} catch (err) {
|
|
3157
|
-
console.error('Failed to fetch issue:', err);
|
|
3158
|
-
showError(t('loop.fetchIssueFailed') + ': ' + err.message);
|
|
3159
|
-
}
|
|
3160
|
-
}
|
|
3161
|
-
|
|
3162
|
-
/**
|
|
3163
|
-
* Add CLI step to form
|
|
3164
|
-
*/
|
|
3165
|
-
let stepCounter = 0;
|
|
3166
|
-
function addCliStep() {
|
|
3167
|
-
const container = document.getElementById('cliStepsContainer');
|
|
3168
|
-
const stepIndex = stepCounter++;
|
|
3169
|
-
|
|
3170
|
-
// Generate tool options dynamically
|
|
3171
|
-
const toolOptions = window.availableCliTools.map(tool => {
|
|
3172
|
-
const displayName = tool.charAt(0).toUpperCase() + tool.slice(1);
|
|
3173
|
-
return `<option value="${tool}">${displayName}</option>`;
|
|
3174
|
-
}).join('');
|
|
3175
|
-
|
|
3176
|
-
const stepHtml = `
|
|
3177
|
-
<div class="cli-step-card" data-step="${stepIndex}">
|
|
3178
|
-
<div class="cli-step-header">
|
|
3179
|
-
<span class="step-number">
|
|
3180
|
-
<i data-lucide="hash" class="w-4 h-4"></i>
|
|
3181
|
-
<span class="step-text">${t('loop.stepLabel')} ${stepIndex + 1}</span>
|
|
3182
|
-
</span>
|
|
3183
|
-
<button type="button" class="btn btn-sm btn-text" onclick="removeCliStep(${stepIndex})" title="${t('loop.removeStep')}">
|
|
3184
|
-
<i data-lucide="trash-2" class="w-4 h-4"></i>
|
|
3185
|
-
</button>
|
|
3186
|
-
</div>
|
|
3187
|
-
<div class="form-group">
|
|
3188
|
-
<label><i data-lucide="tag" class="w-3 h-3"></i> ${t('loop.stepId')}</label>
|
|
3189
|
-
<input type="text" name="step_${stepIndex}_id" required
|
|
3190
|
-
placeholder="${t('loop.stepIdPlaceholder')}"
|
|
3191
|
-
class="form-control">
|
|
3192
|
-
</div>
|
|
3193
|
-
<div class="form-row">
|
|
3194
|
-
<div class="form-group flex-1">
|
|
3195
|
-
<label><i data-lucide="wrench" class="w-3 h-3"></i> ${t('loop.tool')}</label>
|
|
3196
|
-
<select name="step_${stepIndex}_tool" class="form-control" onchange="updateStepFields(${stepIndex})">
|
|
3197
|
-
${toolOptions}
|
|
3198
|
-
</select>
|
|
3199
|
-
</div>
|
|
3200
|
-
<div class="form-group flex-1">
|
|
3201
|
-
<label><i data-lucide="sliders-horizontal" class="w-3 h-3"></i> ${t('loop.mode')}</label>
|
|
3202
|
-
<select name="step_${stepIndex}_mode" class="form-control">
|
|
3203
|
-
<option value="analysis">Analysis</option>
|
|
3204
|
-
<option value="write">Write</option>
|
|
3205
|
-
<option value="review">Review</option>
|
|
3206
|
-
</select>
|
|
3207
|
-
</div>
|
|
3208
|
-
</div>
|
|
3209
|
-
<div class="form-group bash-only">
|
|
3210
|
-
<label><i data-lucide="terminal" class="w-3 h-3"></i> ${t('loop.command')}</label>
|
|
3211
|
-
<input type="text" name="step_${stepIndex}_command"
|
|
3212
|
-
placeholder="${t('loop.commandPlaceholder')}"
|
|
3213
|
-
class="form-control">
|
|
3214
|
-
</div>
|
|
3215
|
-
<div class="form-group">
|
|
3216
|
-
<label><i data-lucide="message-square" class="w-3 h-3"></i> ${t('loop.promptTemplate')}</label>
|
|
3217
|
-
<textarea name="step_${stepIndex}_prompt" rows="3"
|
|
3218
|
-
placeholder="${t('loop.promptPlaceholder')}"
|
|
3219
|
-
class="form-control"></textarea>
|
|
3220
|
-
</div>
|
|
3221
|
-
<div class="form-group">
|
|
3222
|
-
<label><i data-lucide="alert-triangle" class="w-3 h-3"></i> ${t('loop.onError')}</label>
|
|
3223
|
-
<select name="step_${stepIndex}_on_error" class="form-control">
|
|
3224
|
-
<option value="continue">${t('loop.continue')}</option>
|
|
3225
|
-
<option value="pause">${t('loop.pause')}</option>
|
|
3226
|
-
<option value="fail_fast">${t('loop.failFast')}</option>
|
|
3227
|
-
</select>
|
|
3228
|
-
</div>
|
|
3229
|
-
</div>
|
|
3230
|
-
`;
|
|
3231
|
-
|
|
3232
|
-
container.insertAdjacentHTML('beforeend', stepHtml);
|
|
3233
|
-
if (typeof lucide !== 'undefined') lucide.createIcons();
|
|
3234
|
-
}
|
|
3235
|
-
|
|
3236
|
-
/**
|
|
3237
|
-
* Remove CLI step
|
|
3238
|
-
*/
|
|
3239
|
-
function removeCliStep(stepIndex) {
|
|
3240
|
-
const step = document.querySelector(`.cli-step-card[data-step="${stepIndex}"]`);
|
|
3241
|
-
if (step) {
|
|
3242
|
-
step.remove();
|
|
3243
|
-
}
|
|
3244
|
-
}
|
|
3245
|
-
|
|
3246
|
-
/**
|
|
3247
|
-
* Update step fields based on tool selection
|
|
3248
|
-
*/
|
|
3249
|
-
function updateStepFields(stepIndex) {
|
|
3250
|
-
const toolSelect = document.querySelector(`select[name="step_${stepIndex}_tool"]`);
|
|
3251
|
-
const bashField = document.querySelector(`.cli-step-card[data-step="${stepIndex}"] .bash-only`);
|
|
3252
|
-
|
|
3253
|
-
if (toolSelect && bashField) {
|
|
3254
|
-
if (toolSelect.value === 'bash') {
|
|
3255
|
-
bashField.style.display = 'block';
|
|
3256
|
-
} else {
|
|
3257
|
-
bashField.style.display = 'none';
|
|
3258
|
-
}
|
|
3259
|
-
}
|
|
3260
|
-
}
|
|
3261
|
-
|
|
3262
|
-
/**
|
|
3263
|
-
* Handle create loop form submission
|
|
3264
|
-
*/
|
|
3265
|
-
async function handleCreateLoopSubmit(event) {
|
|
3266
|
-
event.preventDefault();
|
|
3267
|
-
|
|
3268
|
-
const form = event.target;
|
|
3269
|
-
const formData = new FormData(form);
|
|
3270
|
-
|
|
3271
|
-
// Collect CLI steps
|
|
3272
|
-
const cliSequence = [];
|
|
3273
|
-
const stepCards = document.querySelectorAll('.cli-step-card');
|
|
3274
|
-
|
|
3275
|
-
stepCards.forEach(card => {
|
|
3276
|
-
const stepIndex = card.dataset.step;
|
|
3277
|
-
const tool = formData.get(`step_${stepIndex}_tool`);
|
|
3278
|
-
|
|
3279
|
-
const step = {
|
|
3280
|
-
step_id: formData.get(`step_${stepIndex}_id`),
|
|
3281
|
-
tool: tool,
|
|
3282
|
-
mode: formData.get(`step_${stepIndex}_mode`),
|
|
3283
|
-
on_error: formData.get(`step_${stepIndex}_on_error`)
|
|
3284
|
-
};
|
|
3285
|
-
|
|
3286
|
-
if (tool === 'bash') {
|
|
3287
|
-
step.command = formData.get(`step_${stepIndex}_command`);
|
|
3288
|
-
}
|
|
3289
|
-
if (formData.get(`step_${stepIndex}_prompt`)) {
|
|
3290
|
-
step.prompt_template = formData.get(`step_${stepIndex}_prompt`);
|
|
3291
|
-
}
|
|
3292
|
-
|
|
3293
|
-
cliSequence.push(step);
|
|
3294
|
-
});
|
|
3295
|
-
|
|
3296
|
-
// Build task object
|
|
3297
|
-
const task = {
|
|
3298
|
-
id: 'LOOP-' + Date.now(),
|
|
3299
|
-
title: formData.get('title'),
|
|
3300
|
-
status: 'active',
|
|
3301
|
-
meta: {
|
|
3302
|
-
type: 'loop',
|
|
3303
|
-
created_by: 'dashboard'
|
|
3304
|
-
},
|
|
3305
|
-
context: {
|
|
3306
|
-
requirements: [formData.get('description')],
|
|
3307
|
-
acceptance: []
|
|
3308
|
-
},
|
|
3309
|
-
loop_control: {
|
|
3310
|
-
enabled: true,
|
|
3311
|
-
description: formData.get('description'),
|
|
3312
|
-
max_iterations: parseInt(formData.get('max_iterations')),
|
|
3313
|
-
success_condition: formData.get('success_condition'),
|
|
3314
|
-
error_policy: {
|
|
3315
|
-
on_failure: formData.get('error_policy'),
|
|
3316
|
-
max_retries: parseInt(formData.get('max_retries'))
|
|
3317
|
-
},
|
|
3318
|
-
cli_sequence: cliSequence
|
|
3319
|
-
}
|
|
3320
|
-
};
|
|
3321
|
-
|
|
3322
|
-
try {
|
|
3323
|
-
// Create task only (don't auto-start)
|
|
3324
|
-
const createResponse = await fetch('/api/tasks', {
|
|
3325
|
-
method: 'POST',
|
|
3326
|
-
headers: { 'Content-Type': 'application/json' },
|
|
3327
|
-
body: JSON.stringify(task)
|
|
3328
|
-
});
|
|
3329
|
-
const createResult = await createResponse.json();
|
|
3330
|
-
|
|
3331
|
-
if (!createResult.success) {
|
|
3332
|
-
showError(t('loop.createTaskFailed') + ': ' + (createResult.error || t('common.error')));
|
|
3333
|
-
return;
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3336
|
-
// Task created successfully
|
|
3337
|
-
showNotification(t('loop.taskCreated') + ': ' + task.id, 'success');
|
|
3338
|
-
closeCreateLoopModal();
|
|
3339
|
-
// Refresh tasks list to show the new task
|
|
3340
|
-
await showTasksTab();
|
|
3341
|
-
} catch (err) {
|
|
3342
|
-
console.error('Create loop error:', err);
|
|
3343
|
-
showError(t('loop.createFailed') + ': ' + err.message);
|
|
3344
|
-
}
|
|
3345
|
-
}
|