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,1863 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CodexLens Tool - Bridge between CCW and CodexLens Python package
|
|
3
|
-
* Provides code indexing and semantic search via spawned Python process
|
|
4
|
-
*
|
|
5
|
-
* Features:
|
|
6
|
-
* - Automatic venv bootstrap at ~/.codexlens/venv
|
|
7
|
-
* - JSON protocol communication
|
|
8
|
-
* - Symbol extraction and semantic search
|
|
9
|
-
* - FTS5 full-text search
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { z } from 'zod';
|
|
13
|
-
import type { ToolSchema, ToolResult } from '../types/tool.js';
|
|
14
|
-
import { spawn, execSync, exec } from 'child_process';
|
|
15
|
-
import { existsSync, mkdirSync } from 'fs';
|
|
16
|
-
import { join, dirname } from 'path';
|
|
17
|
-
import { homedir } from 'os';
|
|
18
|
-
import { fileURLToPath } from 'url';
|
|
19
|
-
import { getSystemPython } from '../utils/python-utils.js';
|
|
20
|
-
import { EXEC_TIMEOUTS } from '../utils/exec-constants.js';
|
|
21
|
-
import {
|
|
22
|
-
UvManager,
|
|
23
|
-
ensureUvInstalled,
|
|
24
|
-
isUvAvailable,
|
|
25
|
-
createCodexLensUvManager,
|
|
26
|
-
} from '../utils/uv-manager.js';
|
|
27
|
-
import {
|
|
28
|
-
getCodexLensDataDir,
|
|
29
|
-
getCodexLensVenvDir,
|
|
30
|
-
getCodexLensPython,
|
|
31
|
-
getCodexLensPip,
|
|
32
|
-
} from '../utils/codexlens-path.js';
|
|
33
|
-
|
|
34
|
-
// Get directory of this module
|
|
35
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
36
|
-
const __dirname = dirname(__filename);
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Check if a path is inside node_modules (unstable for editable installs)
|
|
40
|
-
* Paths inside node_modules will change when npm reinstalls packages,
|
|
41
|
-
* breaking editable (-e) pip installs that reference them.
|
|
42
|
-
*/
|
|
43
|
-
function isInsideNodeModules(pathToCheck: string): boolean {
|
|
44
|
-
const normalizedPath = pathToCheck.replace(/\\/g, '/').toLowerCase();
|
|
45
|
-
return normalizedPath.includes('/node_modules/');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Check if we're running in a development environment (not from node_modules)
|
|
50
|
-
* Also detects Yarn PnP (Plug'n'Play) which doesn't use node_modules.
|
|
51
|
-
*/
|
|
52
|
-
function isDevEnvironment(): boolean {
|
|
53
|
-
// Yarn PnP detection: if pnp version exists, it's a managed production environment
|
|
54
|
-
if ((process.versions as any).pnp) {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
return !isInsideNodeModules(__dirname);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Find valid local package path for development installs.
|
|
62
|
-
* Returns null if running from node_modules (should use PyPI instead).
|
|
63
|
-
*
|
|
64
|
-
* IMPORTANT: When running from node_modules, local paths are unstable
|
|
65
|
-
* because npm reinstall will delete and recreate the node_modules directory,
|
|
66
|
-
* breaking any editable (-e) pip installs that reference them.
|
|
67
|
-
*/
|
|
68
|
-
function findLocalPackagePath(packageName: string): string | null {
|
|
69
|
-
// Always try to find local paths first, even when running from node_modules.
|
|
70
|
-
// codex-lens is a local development package not published to PyPI,
|
|
71
|
-
// so we must find it locally regardless of execution context.
|
|
72
|
-
|
|
73
|
-
const possiblePaths = [
|
|
74
|
-
join(process.cwd(), packageName),
|
|
75
|
-
join(__dirname, '..', '..', '..', packageName), // ccw/src/tools -> project root
|
|
76
|
-
join(homedir(), packageName),
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
// Also check common workspace locations
|
|
80
|
-
const cwd = process.cwd();
|
|
81
|
-
const cwdParent = dirname(cwd);
|
|
82
|
-
if (cwdParent !== cwd) {
|
|
83
|
-
possiblePaths.push(join(cwdParent, packageName));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// First pass: prefer non-node_modules paths (development environment)
|
|
87
|
-
for (const localPath of possiblePaths) {
|
|
88
|
-
if (isInsideNodeModules(localPath)) {
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
if (existsSync(join(localPath, 'pyproject.toml'))) {
|
|
92
|
-
console.log(`[CodexLens] Found local ${packageName} at: ${localPath}`);
|
|
93
|
-
return localPath;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Second pass: allow node_modules paths (NPM global install)
|
|
98
|
-
for (const localPath of possiblePaths) {
|
|
99
|
-
if (existsSync(join(localPath, 'pyproject.toml'))) {
|
|
100
|
-
console.log(`[CodexLens] Found ${packageName} in node_modules at: ${localPath}`);
|
|
101
|
-
return localPath;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return null;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Find valid local codex-lens package path for development installs.
|
|
110
|
-
*/
|
|
111
|
-
function findLocalCodexLensPath(): string | null {
|
|
112
|
-
return findLocalPackagePath('codex-lens');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Find valid local ccw-litellm package path for development installs.
|
|
117
|
-
*/
|
|
118
|
-
function findLocalCcwLitellmPath(): string | null {
|
|
119
|
-
return findLocalPackagePath('ccw-litellm');
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Bootstrap status cache
|
|
123
|
-
let bootstrapChecked = false;
|
|
124
|
-
let bootstrapReady = false;
|
|
125
|
-
|
|
126
|
-
// Venv status cache with TTL
|
|
127
|
-
interface VenvStatusCache {
|
|
128
|
-
status: ReadyStatus;
|
|
129
|
-
timestamp: number;
|
|
130
|
-
}
|
|
131
|
-
let venvStatusCache: VenvStatusCache | null = null;
|
|
132
|
-
const VENV_STATUS_TTL = 5 * 60 * 1000; // 5 minutes TTL
|
|
133
|
-
|
|
134
|
-
// Semantic status cache with TTL (same as venv cache)
|
|
135
|
-
interface SemanticStatusCache {
|
|
136
|
-
status: SemanticStatus;
|
|
137
|
-
timestamp: number;
|
|
138
|
-
}
|
|
139
|
-
let semanticStatusCache: SemanticStatusCache | null = null;
|
|
140
|
-
const SEMANTIC_STATUS_TTL = 5 * 60 * 1000; // 5 minutes TTL
|
|
141
|
-
|
|
142
|
-
// Track running indexing process for cancellation
|
|
143
|
-
let currentIndexingProcess: ReturnType<typeof spawn> | null = null;
|
|
144
|
-
let currentIndexingAborted = false;
|
|
145
|
-
|
|
146
|
-
// Define Zod schema for validation
|
|
147
|
-
const ParamsSchema = z.object({
|
|
148
|
-
action: z.enum([
|
|
149
|
-
'init',
|
|
150
|
-
'search',
|
|
151
|
-
'search_files',
|
|
152
|
-
'status',
|
|
153
|
-
'symbol',
|
|
154
|
-
'check',
|
|
155
|
-
'update',
|
|
156
|
-
'bootstrap',
|
|
157
|
-
]),
|
|
158
|
-
path: z.string().optional(),
|
|
159
|
-
query: z.string().optional(),
|
|
160
|
-
mode: z.enum(['auto', 'text', 'semantic', 'exact', 'fuzzy', 'hybrid', 'vector', 'pure-vector']).default('auto'),
|
|
161
|
-
format: z.enum(['json', 'text', 'pretty']).default('json'),
|
|
162
|
-
languages: z.array(z.string()).optional(),
|
|
163
|
-
limit: z.number().default(20),
|
|
164
|
-
enrich: z.boolean().default(false),
|
|
165
|
-
// Additional fields for internal functions
|
|
166
|
-
file: z.string().optional(),
|
|
167
|
-
key: z.string().optional(),
|
|
168
|
-
value: z.string().optional(),
|
|
169
|
-
newPath: z.string().optional(),
|
|
170
|
-
all: z.boolean().optional(),
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
type Params = z.infer<typeof ParamsSchema>;
|
|
174
|
-
|
|
175
|
-
interface ReadyStatus {
|
|
176
|
-
ready: boolean;
|
|
177
|
-
error?: string;
|
|
178
|
-
version?: string;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
interface SemanticStatus {
|
|
182
|
-
available: boolean;
|
|
183
|
-
backend?: string;
|
|
184
|
-
accelerator?: string;
|
|
185
|
-
providers?: string[];
|
|
186
|
-
litellmAvailable?: boolean;
|
|
187
|
-
error?: string;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
interface BootstrapResult {
|
|
191
|
-
success: boolean;
|
|
192
|
-
error?: string;
|
|
193
|
-
message?: string;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
interface ExecuteResult {
|
|
197
|
-
success: boolean;
|
|
198
|
-
output?: string;
|
|
199
|
-
error?: string;
|
|
200
|
-
message?: string;
|
|
201
|
-
results?: unknown;
|
|
202
|
-
files?: unknown;
|
|
203
|
-
symbols?: unknown;
|
|
204
|
-
status?: unknown;
|
|
205
|
-
config?: unknown;
|
|
206
|
-
cleanResult?: unknown;
|
|
207
|
-
ready?: boolean;
|
|
208
|
-
version?: string;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
interface ExecuteOptions {
|
|
212
|
-
timeout?: number;
|
|
213
|
-
cwd?: string;
|
|
214
|
-
onProgress?: (progress: ProgressInfo) => void;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
interface ProgressInfo {
|
|
218
|
-
stage: string;
|
|
219
|
-
message: string;
|
|
220
|
-
percent: number;
|
|
221
|
-
filesProcessed?: number;
|
|
222
|
-
totalFiles?: number;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Clear venv status cache (call after install/uninstall operations)
|
|
227
|
-
*/
|
|
228
|
-
function clearVenvStatusCache(): void {
|
|
229
|
-
venvStatusCache = null;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// Python detection functions imported from ../utils/python-utils.js
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Check if CodexLens venv exists and has required packages
|
|
236
|
-
* @param force - Force refresh cache (default: false)
|
|
237
|
-
* @returns Ready status
|
|
238
|
-
*/
|
|
239
|
-
async function checkVenvStatus(force = false): Promise<ReadyStatus> {
|
|
240
|
-
const funcStart = Date.now();
|
|
241
|
-
console.log('[PERF][CodexLens] checkVenvStatus START');
|
|
242
|
-
|
|
243
|
-
// Use cached result if available and not expired
|
|
244
|
-
if (!force && venvStatusCache && (Date.now() - venvStatusCache.timestamp < VENV_STATUS_TTL)) {
|
|
245
|
-
console.log(`[PERF][CodexLens] checkVenvStatus CACHE HIT: ${Date.now() - funcStart}ms`);
|
|
246
|
-
return venvStatusCache.status;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// Check venv exists
|
|
250
|
-
if (!existsSync(getCodexLensVenvDir())) {
|
|
251
|
-
const result = { ready: false, error: 'Venv not found' };
|
|
252
|
-
venvStatusCache = { status: result, timestamp: Date.now() };
|
|
253
|
-
console.log(`[PERF][CodexLens] checkVenvStatus (no venv): ${Date.now() - funcStart}ms`);
|
|
254
|
-
return result;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Check python executable exists
|
|
258
|
-
if (!existsSync(getCodexLensPython())) {
|
|
259
|
-
const result = { ready: false, error: 'Python executable not found in venv' };
|
|
260
|
-
venvStatusCache = { status: result, timestamp: Date.now() };
|
|
261
|
-
console.log(`[PERF][CodexLens] checkVenvStatus (no python): ${Date.now() - funcStart}ms`);
|
|
262
|
-
return result;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// Check codexlens and core dependencies are importable
|
|
266
|
-
const spawnStart = Date.now();
|
|
267
|
-
console.log('[PERF][CodexLens] checkVenvStatus spawning Python...');
|
|
268
|
-
|
|
269
|
-
return new Promise((resolve) => {
|
|
270
|
-
const child = spawn(getCodexLensPython(), ['-c', 'import codexlens; import watchdog; print(codexlens.__version__)'], {
|
|
271
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
272
|
-
timeout: 10000,
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
let stdout = '';
|
|
276
|
-
let stderr = '';
|
|
277
|
-
|
|
278
|
-
child.stdout.on('data', (data) => {
|
|
279
|
-
stdout += data.toString();
|
|
280
|
-
});
|
|
281
|
-
child.stderr.on('data', (data) => {
|
|
282
|
-
stderr += data.toString();
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
child.on('close', (code) => {
|
|
286
|
-
let result: ReadyStatus;
|
|
287
|
-
if (code === 0) {
|
|
288
|
-
result = { ready: true, version: stdout.trim() };
|
|
289
|
-
} else {
|
|
290
|
-
result = { ready: false, error: `CodexLens not installed: ${stderr}` };
|
|
291
|
-
}
|
|
292
|
-
// Cache the result
|
|
293
|
-
venvStatusCache = { status: result, timestamp: Date.now() };
|
|
294
|
-
console.log(`[PERF][CodexLens] checkVenvStatus Python spawn: ${Date.now() - spawnStart}ms | TOTAL: ${Date.now() - funcStart}ms | ready: ${result.ready}`);
|
|
295
|
-
resolve(result);
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
child.on('error', (err) => {
|
|
299
|
-
const result = { ready: false, error: `Failed to check venv: ${err.message}` };
|
|
300
|
-
venvStatusCache = { status: result, timestamp: Date.now() };
|
|
301
|
-
console.log(`[PERF][CodexLens] checkVenvStatus ERROR: ${Date.now() - funcStart}ms`);
|
|
302
|
-
resolve(result);
|
|
303
|
-
});
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Clear semantic status cache (call after install/uninstall operations)
|
|
309
|
-
*/
|
|
310
|
-
function clearSemanticStatusCache(): void {
|
|
311
|
-
semanticStatusCache = null;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Check if semantic search dependencies are installed
|
|
316
|
-
* @param force - Force refresh cache (default: false)
|
|
317
|
-
* @returns Semantic status
|
|
318
|
-
*/
|
|
319
|
-
async function checkSemanticStatus(force = false): Promise<SemanticStatus> {
|
|
320
|
-
const funcStart = Date.now();
|
|
321
|
-
console.log('[PERF][CodexLens] checkSemanticStatus START');
|
|
322
|
-
|
|
323
|
-
// Use cached result if available and not expired
|
|
324
|
-
if (!force && semanticStatusCache && (Date.now() - semanticStatusCache.timestamp < SEMANTIC_STATUS_TTL)) {
|
|
325
|
-
console.log(`[PERF][CodexLens] checkSemanticStatus CACHE HIT: ${Date.now() - funcStart}ms`);
|
|
326
|
-
return semanticStatusCache.status;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// First check if CodexLens is installed
|
|
330
|
-
const venvStatus = await checkVenvStatus();
|
|
331
|
-
if (!venvStatus.ready) {
|
|
332
|
-
const result: SemanticStatus = { available: false, error: 'CodexLens not installed' };
|
|
333
|
-
semanticStatusCache = { status: result, timestamp: Date.now() };
|
|
334
|
-
console.log(`[PERF][CodexLens] checkSemanticStatus (no venv): ${Date.now() - funcStart}ms`);
|
|
335
|
-
return result;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
// Check semantic module availability and accelerator info
|
|
339
|
-
const spawnStart = Date.now();
|
|
340
|
-
console.log('[PERF][CodexLens] checkSemanticStatus spawning Python...');
|
|
341
|
-
|
|
342
|
-
return new Promise((resolve) => {
|
|
343
|
-
const checkCode = `
|
|
344
|
-
import sys
|
|
345
|
-
import json
|
|
346
|
-
try:
|
|
347
|
-
import codexlens.semantic as semantic
|
|
348
|
-
SEMANTIC_AVAILABLE = bool(getattr(semantic, "SEMANTIC_AVAILABLE", False))
|
|
349
|
-
SEMANTIC_BACKEND = getattr(semantic, "SEMANTIC_BACKEND", None)
|
|
350
|
-
LITELLM_AVAILABLE = bool(getattr(semantic, "LITELLM_AVAILABLE", False))
|
|
351
|
-
result = {
|
|
352
|
-
"available": SEMANTIC_AVAILABLE,
|
|
353
|
-
"backend": SEMANTIC_BACKEND if SEMANTIC_AVAILABLE else None,
|
|
354
|
-
"litellm_available": LITELLM_AVAILABLE,
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
# Get ONNX providers for accelerator info
|
|
358
|
-
try:
|
|
359
|
-
import onnxruntime
|
|
360
|
-
providers = onnxruntime.get_available_providers()
|
|
361
|
-
result["providers"] = providers
|
|
362
|
-
|
|
363
|
-
# Determine accelerator type
|
|
364
|
-
if "CUDAExecutionProvider" in providers or "TensorrtExecutionProvider" in providers:
|
|
365
|
-
result["accelerator"] = "CUDA"
|
|
366
|
-
elif "DmlExecutionProvider" in providers:
|
|
367
|
-
result["accelerator"] = "DirectML"
|
|
368
|
-
elif "CoreMLExecutionProvider" in providers:
|
|
369
|
-
result["accelerator"] = "CoreML"
|
|
370
|
-
elif "ROCMExecutionProvider" in providers:
|
|
371
|
-
result["accelerator"] = "ROCm"
|
|
372
|
-
else:
|
|
373
|
-
result["accelerator"] = "CPU"
|
|
374
|
-
except:
|
|
375
|
-
result["providers"] = []
|
|
376
|
-
result["accelerator"] = "CPU"
|
|
377
|
-
|
|
378
|
-
print(json.dumps(result))
|
|
379
|
-
except Exception as e:
|
|
380
|
-
print(json.dumps({"available": False, "error": str(e)}))
|
|
381
|
-
`;
|
|
382
|
-
const child = spawn(getCodexLensPython(), ['-c', checkCode], {
|
|
383
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
384
|
-
timeout: 15000,
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
let stdout = '';
|
|
388
|
-
let stderr = '';
|
|
389
|
-
|
|
390
|
-
child.stdout.on('data', (data) => {
|
|
391
|
-
stdout += data.toString();
|
|
392
|
-
});
|
|
393
|
-
child.stderr.on('data', (data) => {
|
|
394
|
-
stderr += data.toString();
|
|
395
|
-
});
|
|
396
|
-
|
|
397
|
-
child.on('close', (code) => {
|
|
398
|
-
const output = stdout.trim();
|
|
399
|
-
try {
|
|
400
|
-
const result = JSON.parse(output);
|
|
401
|
-
console.log(`[PERF][CodexLens] checkSemanticStatus Python spawn: ${Date.now() - spawnStart}ms | TOTAL: ${Date.now() - funcStart}ms | available: ${result.available}`);
|
|
402
|
-
const status: SemanticStatus = {
|
|
403
|
-
available: result.available || false,
|
|
404
|
-
backend: result.backend,
|
|
405
|
-
accelerator: result.accelerator || 'CPU',
|
|
406
|
-
providers: result.providers || [],
|
|
407
|
-
litellmAvailable: result.litellm_available || false,
|
|
408
|
-
error: result.error
|
|
409
|
-
};
|
|
410
|
-
// Cache the result
|
|
411
|
-
semanticStatusCache = { status, timestamp: Date.now() };
|
|
412
|
-
resolve(status);
|
|
413
|
-
} catch {
|
|
414
|
-
console.log(`[PERF][CodexLens] checkSemanticStatus PARSE ERROR: ${Date.now() - funcStart}ms`);
|
|
415
|
-
const errorStatus: SemanticStatus = { available: false, error: output || stderr || 'Unknown error' };
|
|
416
|
-
semanticStatusCache = { status: errorStatus, timestamp: Date.now() };
|
|
417
|
-
resolve(errorStatus);
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
child.on('error', (err) => {
|
|
422
|
-
console.log(`[PERF][CodexLens] checkSemanticStatus ERROR: ${Date.now() - funcStart}ms`);
|
|
423
|
-
const errorStatus: SemanticStatus = { available: false, error: `Check failed: ${err.message}` };
|
|
424
|
-
semanticStatusCache = { status: errorStatus, timestamp: Date.now() };
|
|
425
|
-
resolve(errorStatus);
|
|
426
|
-
});
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Ensure LiteLLM embedder dependencies are available in the CodexLens venv.
|
|
432
|
-
* Installs ccw-litellm into the venv if needed.
|
|
433
|
-
*/
|
|
434
|
-
async function ensureLiteLLMEmbedderReady(): Promise<BootstrapResult> {
|
|
435
|
-
// Ensure CodexLens venv exists and CodexLens is installed.
|
|
436
|
-
const readyStatus = await ensureReady();
|
|
437
|
-
if (!readyStatus.ready) {
|
|
438
|
-
return { success: false, error: readyStatus.error || 'CodexLens not ready' };
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
// Check if ccw_litellm can be imported
|
|
442
|
-
const importStatus = await new Promise<{ ok: boolean; error?: string }>((resolve) => {
|
|
443
|
-
const child = spawn(getCodexLensPython(), ['-c', 'import ccw_litellm; print("OK")'], {
|
|
444
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
445
|
-
timeout: 15000,
|
|
446
|
-
});
|
|
447
|
-
|
|
448
|
-
let stderr = '';
|
|
449
|
-
child.stderr.on('data', (data) => {
|
|
450
|
-
stderr += data.toString();
|
|
451
|
-
});
|
|
452
|
-
|
|
453
|
-
child.on('close', (code) => {
|
|
454
|
-
resolve({ ok: code === 0, error: stderr.trim() || undefined });
|
|
455
|
-
});
|
|
456
|
-
|
|
457
|
-
child.on('error', (err) => {
|
|
458
|
-
resolve({ ok: false, error: err.message });
|
|
459
|
-
});
|
|
460
|
-
});
|
|
461
|
-
|
|
462
|
-
if (importStatus.ok) {
|
|
463
|
-
return { success: true };
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
console.log('[CodexLens] Installing ccw-litellm for LiteLLM embedding backend...');
|
|
467
|
-
|
|
468
|
-
// Find local ccw-litellm package path (only in development, not from node_modules)
|
|
469
|
-
const localPath = findLocalCcwLitellmPath();
|
|
470
|
-
|
|
471
|
-
// Priority: Use UV if available (faster, better dependency resolution)
|
|
472
|
-
if (await isUvAvailable()) {
|
|
473
|
-
console.log('[CodexLens] Using UV for ccw-litellm installation...');
|
|
474
|
-
try {
|
|
475
|
-
const uv = createCodexLensUvManager();
|
|
476
|
-
|
|
477
|
-
// Ensure venv exists
|
|
478
|
-
if (!uv.isVenvValid()) {
|
|
479
|
-
const venvResult = await uv.createVenv();
|
|
480
|
-
if (!venvResult.success) {
|
|
481
|
-
console.log('[CodexLens] UV venv creation failed, falling back to pip:', venvResult.error);
|
|
482
|
-
// Fall through to pip fallback
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
if (uv.isVenvValid()) {
|
|
487
|
-
let uvResult;
|
|
488
|
-
if (localPath) {
|
|
489
|
-
console.log(`[CodexLens] Installing ccw-litellm from local path with UV: ${localPath}`);
|
|
490
|
-
uvResult = await uv.installFromProject(localPath);
|
|
491
|
-
} else {
|
|
492
|
-
console.log('[CodexLens] Installing ccw-litellm from PyPI with UV...');
|
|
493
|
-
uvResult = await uv.install(['ccw-litellm']);
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
if (uvResult.success) {
|
|
497
|
-
return { success: true };
|
|
498
|
-
}
|
|
499
|
-
console.log('[CodexLens] UV install failed, falling back to pip:', uvResult.error);
|
|
500
|
-
}
|
|
501
|
-
} catch (uvErr) {
|
|
502
|
-
console.log('[CodexLens] UV error, falling back to pip:', (uvErr as Error).message);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
// Fallback: Use pip for installation
|
|
507
|
-
const pipPath = getCodexLensPip();
|
|
508
|
-
|
|
509
|
-
try {
|
|
510
|
-
if (localPath) {
|
|
511
|
-
console.log(`[CodexLens] Installing ccw-litellm from local path with pip: ${localPath}`);
|
|
512
|
-
execSync(`"${pipPath}" install -e "${localPath}"`, { stdio: 'inherit', timeout: EXEC_TIMEOUTS.PACKAGE_INSTALL });
|
|
513
|
-
} else {
|
|
514
|
-
console.log('[CodexLens] Installing ccw-litellm from PyPI with pip...');
|
|
515
|
-
execSync(`"${pipPath}" install ccw-litellm`, { stdio: 'inherit', timeout: EXEC_TIMEOUTS.PACKAGE_INSTALL });
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
return { success: true };
|
|
519
|
-
} catch (err) {
|
|
520
|
-
return { success: false, error: `Failed to install ccw-litellm: ${(err as Error).message}` };
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* GPU acceleration mode for semantic search
|
|
526
|
-
*/
|
|
527
|
-
type GpuMode = 'cpu' | 'cuda' | 'directml';
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* Mapping from GPU mode to codexlens extras for UV installation
|
|
531
|
-
*/
|
|
532
|
-
const GPU_MODE_EXTRAS: Record<GpuMode, string[]> = {
|
|
533
|
-
cpu: ['semantic'],
|
|
534
|
-
cuda: ['semantic-gpu'],
|
|
535
|
-
directml: ['semantic-directml'],
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* Python environment info for compatibility checks
|
|
540
|
-
*/
|
|
541
|
-
interface PythonEnvInfo {
|
|
542
|
-
version: string; // e.g., "3.11.5"
|
|
543
|
-
majorMinor: string; // e.g., "3.11"
|
|
544
|
-
architecture: number; // 32 or 64
|
|
545
|
-
compatible: boolean; // true if 64-bit and Python 3.8-3.12
|
|
546
|
-
error?: string;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Check Python environment in venv for DirectML compatibility
|
|
551
|
-
* DirectML requires: 64-bit Python, version 3.8-3.12
|
|
552
|
-
*/
|
|
553
|
-
async function checkPythonEnvForDirectML(): Promise<PythonEnvInfo> {
|
|
554
|
-
const pythonPath = getCodexLensPython();
|
|
555
|
-
|
|
556
|
-
if (!existsSync(pythonPath)) {
|
|
557
|
-
return { version: '', majorMinor: '', architecture: 0, compatible: false, error: 'Python not found in venv' };
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
try {
|
|
561
|
-
// Get Python version and architecture in one call
|
|
562
|
-
// Use % formatting instead of f-string to avoid Windows shell escaping issues with curly braces
|
|
563
|
-
const checkScript = `import sys, struct; print('%d.%d.%d|%d' % (sys.version_info.major, sys.version_info.minor, sys.version_info.micro, struct.calcsize('P') * 8))`;
|
|
564
|
-
const result = execSync(`"${pythonPath}" -c "${checkScript}"`, { encoding: 'utf-8', timeout: 10000 }).trim();
|
|
565
|
-
const [version, archStr] = result.split('|');
|
|
566
|
-
const architecture = parseInt(archStr, 10);
|
|
567
|
-
const [major, minor] = version.split('.').map(Number);
|
|
568
|
-
const majorMinor = `${major}.${minor}`;
|
|
569
|
-
|
|
570
|
-
// DirectML wheels available for Python 3.8-3.12, 64-bit only
|
|
571
|
-
const versionCompatible = major === 3 && minor >= 8 && minor <= 12;
|
|
572
|
-
const archCompatible = architecture === 64;
|
|
573
|
-
const compatible = versionCompatible && archCompatible;
|
|
574
|
-
|
|
575
|
-
let error: string | undefined;
|
|
576
|
-
if (!archCompatible) {
|
|
577
|
-
error = `Python is ${architecture}-bit. onnxruntime-directml requires 64-bit Python. Please reinstall Python as 64-bit.`;
|
|
578
|
-
} else if (!versionCompatible) {
|
|
579
|
-
error = `Python ${majorMinor} is not supported. onnxruntime-directml requires Python 3.8-3.12.`;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
return { version, majorMinor, architecture, compatible, error };
|
|
583
|
-
} catch (e) {
|
|
584
|
-
return { version: '', majorMinor: '', architecture: 0, compatible: false, error: `Failed to check Python: ${(e as Error).message}` };
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Detect available GPU acceleration
|
|
590
|
-
* @returns Detected GPU mode and info
|
|
591
|
-
*/
|
|
592
|
-
async function detectGpuSupport(): Promise<{ mode: GpuMode; available: GpuMode[]; info: string; pythonEnv?: PythonEnvInfo }> {
|
|
593
|
-
const available: GpuMode[] = ['cpu'];
|
|
594
|
-
let detectedInfo = 'CPU only';
|
|
595
|
-
|
|
596
|
-
// Check for NVIDIA GPU (CUDA)
|
|
597
|
-
try {
|
|
598
|
-
if (process.platform === 'win32') {
|
|
599
|
-
execSync('nvidia-smi', { stdio: 'pipe', timeout: EXEC_TIMEOUTS.SYSTEM_INFO });
|
|
600
|
-
available.push('cuda');
|
|
601
|
-
detectedInfo = 'NVIDIA GPU detected (CUDA available)';
|
|
602
|
-
} else {
|
|
603
|
-
execSync('which nvidia-smi', { stdio: 'pipe', timeout: EXEC_TIMEOUTS.SYSTEM_INFO });
|
|
604
|
-
available.push('cuda');
|
|
605
|
-
detectedInfo = 'NVIDIA GPU detected (CUDA available)';
|
|
606
|
-
}
|
|
607
|
-
} catch {
|
|
608
|
-
// NVIDIA not available
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
// On Windows, DirectML requires 64-bit Python 3.8-3.12
|
|
612
|
-
let pythonEnv: PythonEnvInfo | undefined;
|
|
613
|
-
if (process.platform === 'win32') {
|
|
614
|
-
pythonEnv = await checkPythonEnvForDirectML();
|
|
615
|
-
if (pythonEnv.compatible) {
|
|
616
|
-
available.push('directml');
|
|
617
|
-
if (available.includes('cuda')) {
|
|
618
|
-
detectedInfo = 'NVIDIA GPU detected (CUDA & DirectML available)';
|
|
619
|
-
} else {
|
|
620
|
-
detectedInfo = 'DirectML available (Windows GPU acceleration)';
|
|
621
|
-
}
|
|
622
|
-
} else if (pythonEnv.error) {
|
|
623
|
-
// DirectML not available due to Python environment
|
|
624
|
-
console.log(`[CodexLens] DirectML unavailable: ${pythonEnv.error}`);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
// Recommend best available mode
|
|
629
|
-
let recommendedMode: GpuMode = 'cpu';
|
|
630
|
-
if (process.platform === 'win32' && available.includes('directml')) {
|
|
631
|
-
recommendedMode = 'directml'; // DirectML is easier on Windows (no CUDA toolkit needed)
|
|
632
|
-
} else if (available.includes('cuda')) {
|
|
633
|
-
recommendedMode = 'cuda';
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
return { mode: recommendedMode, available, info: detectedInfo, pythonEnv };
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
/**
|
|
640
|
-
* Bootstrap CodexLens venv using UV (fast package manager)
|
|
641
|
-
* @param gpuMode - GPU acceleration mode for semantic search
|
|
642
|
-
* @returns Bootstrap result
|
|
643
|
-
*/
|
|
644
|
-
async function bootstrapWithUv(gpuMode: GpuMode = 'cpu'): Promise<BootstrapResult> {
|
|
645
|
-
console.log('[CodexLens] Bootstrapping with UV package manager...');
|
|
646
|
-
|
|
647
|
-
// Ensure UV is installed
|
|
648
|
-
const uvInstalled = await ensureUvInstalled();
|
|
649
|
-
if (!uvInstalled) {
|
|
650
|
-
return { success: false, error: 'Failed to install UV package manager' };
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
// Create UV manager for CodexLens
|
|
654
|
-
const uv = createCodexLensUvManager();
|
|
655
|
-
|
|
656
|
-
// Create venv if not exists
|
|
657
|
-
if (!uv.isVenvValid()) {
|
|
658
|
-
console.log('[CodexLens] Creating virtual environment with UV...');
|
|
659
|
-
const createResult = await uv.createVenv();
|
|
660
|
-
if (!createResult.success) {
|
|
661
|
-
return { success: false, error: `Failed to create venv: ${createResult.error}` };
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
// Find local codex-lens package (only in development, not from node_modules)
|
|
666
|
-
const codexLensPath = findLocalCodexLensPath();
|
|
667
|
-
|
|
668
|
-
// Determine extras based on GPU mode
|
|
669
|
-
const extras = GPU_MODE_EXTRAS[gpuMode];
|
|
670
|
-
|
|
671
|
-
if (!codexLensPath) {
|
|
672
|
-
// codex-lens is a local-only package, not published to PyPI
|
|
673
|
-
// Generate dynamic paths for error message (cross-platform)
|
|
674
|
-
const possiblePaths = [
|
|
675
|
-
join(process.cwd(), 'codex-lens'),
|
|
676
|
-
join(__dirname, '..', '..', '..', 'codex-lens'),
|
|
677
|
-
join(homedir(), 'codex-lens'),
|
|
678
|
-
];
|
|
679
|
-
const cwd = process.cwd();
|
|
680
|
-
const cwdParent = dirname(cwd);
|
|
681
|
-
if (cwdParent !== cwd) {
|
|
682
|
-
possiblePaths.push(join(cwdParent, 'codex-lens'));
|
|
683
|
-
}
|
|
684
|
-
const pathsList = possiblePaths.map(p => ` - ${p}`).join('\n');
|
|
685
|
-
|
|
686
|
-
const errorMsg = `Cannot find codex-lens directory for local installation.\n\n` +
|
|
687
|
-
`codex-lens is a local development package (not published to PyPI) and must be installed from local files.\n\n` +
|
|
688
|
-
`To fix this:\n` +
|
|
689
|
-
`1. Ensure 'codex-lens' directory exists at one of these locations:\n${pathsList}\n` +
|
|
690
|
-
`2. Verify pyproject.toml exists in the codex-lens directory\n` +
|
|
691
|
-
`3. Run ccw from the correct working directory\n` +
|
|
692
|
-
`4. Or manually install: cd /path/to/codex-lens && pip install -e .[${extras.join(',')}]`;
|
|
693
|
-
return { success: false, error: errorMsg };
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
console.log(`[CodexLens] Installing from local path with UV: ${codexLensPath}`);
|
|
697
|
-
console.log(`[CodexLens] Extras: ${extras.join(', ')}`);
|
|
698
|
-
const installResult = await uv.installFromProject(codexLensPath, extras);
|
|
699
|
-
if (!installResult.success) {
|
|
700
|
-
return { success: false, error: `Failed to install codex-lens: ${installResult.error}` };
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
// Clear cache after successful installation
|
|
704
|
-
clearVenvStatusCache();
|
|
705
|
-
clearSemanticStatusCache();
|
|
706
|
-
console.log(`[CodexLens] Bootstrap with UV complete (${gpuMode} mode)`);
|
|
707
|
-
return { success: true, message: `Installed with UV (${gpuMode} mode)` };
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Install semantic search dependencies using UV (fast package manager)
|
|
712
|
-
* UV automatically handles ONNX Runtime conflicts
|
|
713
|
-
* @param gpuMode - GPU acceleration mode: 'cpu', 'cuda', or 'directml'
|
|
714
|
-
* @returns Bootstrap result
|
|
715
|
-
*/
|
|
716
|
-
async function installSemanticWithUv(gpuMode: GpuMode = 'cpu'): Promise<BootstrapResult> {
|
|
717
|
-
console.log('[CodexLens] Installing semantic dependencies with UV...');
|
|
718
|
-
|
|
719
|
-
// First check if CodexLens is installed
|
|
720
|
-
const venvStatus = await checkVenvStatus();
|
|
721
|
-
if (!venvStatus.ready) {
|
|
722
|
-
return { success: false, error: 'CodexLens not installed. Install CodexLens first.' };
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
// Check Python environment compatibility for DirectML
|
|
726
|
-
if (gpuMode === 'directml') {
|
|
727
|
-
const pythonEnv = await checkPythonEnvForDirectML();
|
|
728
|
-
if (!pythonEnv.compatible) {
|
|
729
|
-
const errorDetails = pythonEnv.error || 'Unknown compatibility issue';
|
|
730
|
-
return {
|
|
731
|
-
success: false,
|
|
732
|
-
error: `DirectML installation failed: ${errorDetails}\n\nTo fix this:\n1. Uninstall current Python\n2. Install 64-bit Python 3.10, 3.11, or 3.12 from python.org\n3. Delete ~/.codexlens/venv folder\n4. Reinstall CodexLens`,
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
console.log(`[CodexLens] Python ${pythonEnv.version} (${pythonEnv.architecture}-bit) - DirectML compatible`);
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
// Create UV manager
|
|
739
|
-
const uv = createCodexLensUvManager();
|
|
740
|
-
|
|
741
|
-
// Find local codex-lens package (only in development, not from node_modules)
|
|
742
|
-
const codexLensPath = findLocalCodexLensPath();
|
|
743
|
-
|
|
744
|
-
// Determine extras based on GPU mode
|
|
745
|
-
const extras = GPU_MODE_EXTRAS[gpuMode];
|
|
746
|
-
const modeDescription =
|
|
747
|
-
gpuMode === 'cuda'
|
|
748
|
-
? 'NVIDIA CUDA GPU acceleration'
|
|
749
|
-
: gpuMode === 'directml'
|
|
750
|
-
? 'Windows DirectML GPU acceleration'
|
|
751
|
-
: 'CPU (ONNX Runtime)';
|
|
752
|
-
|
|
753
|
-
console.log(`[CodexLens] Mode: ${modeDescription}`);
|
|
754
|
-
console.log(`[CodexLens] Extras: ${extras.join(', ')}`);
|
|
755
|
-
|
|
756
|
-
// Install with extras - UV handles dependency conflicts automatically
|
|
757
|
-
if (!codexLensPath) {
|
|
758
|
-
// codex-lens is a local-only package, not published to PyPI
|
|
759
|
-
// Generate dynamic paths for error message (cross-platform)
|
|
760
|
-
const possiblePaths = [
|
|
761
|
-
join(process.cwd(), 'codex-lens'),
|
|
762
|
-
join(__dirname, '..', '..', '..', 'codex-lens'),
|
|
763
|
-
join(homedir(), 'codex-lens'),
|
|
764
|
-
];
|
|
765
|
-
const cwd = process.cwd();
|
|
766
|
-
const cwdParent = dirname(cwd);
|
|
767
|
-
if (cwdParent !== cwd) {
|
|
768
|
-
possiblePaths.push(join(cwdParent, 'codex-lens'));
|
|
769
|
-
}
|
|
770
|
-
const pathsList = possiblePaths.map(p => ` - ${p}`).join('\n');
|
|
771
|
-
|
|
772
|
-
const errorMsg = `Cannot find codex-lens directory for local installation.\n\n` +
|
|
773
|
-
`codex-lens is a local development package (not published to PyPI) and must be installed from local files.\n\n` +
|
|
774
|
-
`To fix this:\n` +
|
|
775
|
-
`1. Ensure 'codex-lens' directory exists at one of these locations:\n${pathsList}\n` +
|
|
776
|
-
`2. Verify pyproject.toml exists in the codex-lens directory\n` +
|
|
777
|
-
`3. Run ccw from the correct working directory\n` +
|
|
778
|
-
`4. Or manually install: cd /path/to/codex-lens && pip install -e .[${extras.join(',')}]`;
|
|
779
|
-
return { success: false, error: errorMsg };
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
console.log(`[CodexLens] Reinstalling from local path with semantic extras...`);
|
|
783
|
-
const installResult = await uv.installFromProject(codexLensPath, extras);
|
|
784
|
-
if (!installResult.success) {
|
|
785
|
-
return { success: false, error: `Installation failed: ${installResult.error}` };
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
console.log(`[CodexLens] Semantic dependencies installed successfully (${gpuMode} mode)`);
|
|
789
|
-
return { success: true, message: `Installed with ${modeDescription}` };
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Install semantic search dependencies with optional GPU acceleration
|
|
794
|
-
* @param gpuMode - GPU acceleration mode: 'cpu', 'cuda', or 'directml'
|
|
795
|
-
* @returns Bootstrap result
|
|
796
|
-
*/
|
|
797
|
-
async function installSemantic(gpuMode: GpuMode = 'cpu'): Promise<BootstrapResult> {
|
|
798
|
-
// Prefer UV if available
|
|
799
|
-
if (await isUvAvailable()) {
|
|
800
|
-
console.log('[CodexLens] Using UV for semantic installation...');
|
|
801
|
-
return installSemanticWithUv(gpuMode);
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
// Fall back to pip logic...
|
|
805
|
-
// First ensure CodexLens is installed
|
|
806
|
-
const venvStatus = await checkVenvStatus();
|
|
807
|
-
if (!venvStatus.ready) {
|
|
808
|
-
return { success: false, error: 'CodexLens not installed. Install CodexLens first.' };
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
// Check Python environment compatibility for DirectML
|
|
812
|
-
if (gpuMode === 'directml') {
|
|
813
|
-
const pythonEnv = await checkPythonEnvForDirectML();
|
|
814
|
-
if (!pythonEnv.compatible) {
|
|
815
|
-
const errorDetails = pythonEnv.error || 'Unknown compatibility issue';
|
|
816
|
-
return {
|
|
817
|
-
success: false,
|
|
818
|
-
error: `DirectML installation failed: ${errorDetails}\n\nTo fix this:\n1. Uninstall current Python\n2. Install 64-bit Python 3.10, 3.11, or 3.12 from python.org\n3. Delete ~/.codexlens/venv folder\n4. Reinstall CodexLens`
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
console.log(`[CodexLens] Python ${pythonEnv.version} (${pythonEnv.architecture}-bit) - DirectML compatible`);
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
const pipPath = getCodexLensPip();
|
|
825
|
-
|
|
826
|
-
// IMPORTANT: Uninstall all onnxruntime variants first to prevent conflicts
|
|
827
|
-
// Having multiple onnxruntime packages causes provider detection issues
|
|
828
|
-
const onnxVariants = ['onnxruntime', 'onnxruntime-gpu', 'onnxruntime-directml'];
|
|
829
|
-
console.log(`[CodexLens] Cleaning up existing ONNX Runtime packages...`);
|
|
830
|
-
|
|
831
|
-
for (const pkg of onnxVariants) {
|
|
832
|
-
try {
|
|
833
|
-
execSync(`"${pipPath}" uninstall ${pkg} -y`, { stdio: 'pipe', timeout: EXEC_TIMEOUTS.PACKAGE_INSTALL });
|
|
834
|
-
console.log(`[CodexLens] Removed ${pkg}`);
|
|
835
|
-
} catch {
|
|
836
|
-
// Package not installed, ignore
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
// Build package list based on GPU mode
|
|
841
|
-
const packages = ['numpy>=1.24', 'fastembed>=0.5', 'hnswlib>=0.8.0'];
|
|
842
|
-
|
|
843
|
-
let modeDescription = 'CPU (ONNX Runtime)';
|
|
844
|
-
let onnxPackage = 'onnxruntime>=1.18.0'; // Default CPU
|
|
845
|
-
|
|
846
|
-
if (gpuMode === 'cuda') {
|
|
847
|
-
onnxPackage = 'onnxruntime-gpu>=1.18.0';
|
|
848
|
-
modeDescription = 'NVIDIA CUDA GPU acceleration';
|
|
849
|
-
} else if (gpuMode === 'directml') {
|
|
850
|
-
onnxPackage = 'onnxruntime-directml>=1.18.0';
|
|
851
|
-
modeDescription = 'Windows DirectML GPU acceleration';
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
return new Promise((resolve) => {
|
|
855
|
-
console.log(`[CodexLens] Installing semantic search dependencies...`);
|
|
856
|
-
console.log(`[CodexLens] Mode: ${modeDescription}`);
|
|
857
|
-
console.log(`[CodexLens] ONNX Runtime: ${onnxPackage}`);
|
|
858
|
-
console.log(`[CodexLens] Packages: ${packages.join(', ')}`);
|
|
859
|
-
|
|
860
|
-
// Install ONNX Runtime first with force-reinstall to ensure clean state
|
|
861
|
-
const installOnnx = spawn(pipPath, ['install', '--force-reinstall', onnxPackage], {
|
|
862
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
863
|
-
timeout: 600000, // 10 minutes for GPU packages
|
|
864
|
-
});
|
|
865
|
-
|
|
866
|
-
let onnxStdout = '';
|
|
867
|
-
let onnxStderr = '';
|
|
868
|
-
|
|
869
|
-
installOnnx.stdout.on('data', (data) => {
|
|
870
|
-
onnxStdout += data.toString();
|
|
871
|
-
const line = data.toString().trim();
|
|
872
|
-
if (line.includes('Downloading') || line.includes('Installing')) {
|
|
873
|
-
console.log(`[CodexLens] ${line}`);
|
|
874
|
-
}
|
|
875
|
-
});
|
|
876
|
-
|
|
877
|
-
installOnnx.stderr.on('data', (data) => {
|
|
878
|
-
onnxStderr += data.toString();
|
|
879
|
-
});
|
|
880
|
-
|
|
881
|
-
installOnnx.on('close', (onnxCode) => {
|
|
882
|
-
if (onnxCode !== 0) {
|
|
883
|
-
resolve({ success: false, error: `Failed to install ${onnxPackage}: ${onnxStderr || onnxStdout}` });
|
|
884
|
-
return;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
console.log(`[CodexLens] ${onnxPackage} installed successfully`);
|
|
888
|
-
|
|
889
|
-
// Now install remaining packages
|
|
890
|
-
const child = spawn(pipPath, ['install', ...packages], {
|
|
891
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
892
|
-
timeout: 600000,
|
|
893
|
-
});
|
|
894
|
-
|
|
895
|
-
let stdout = '';
|
|
896
|
-
let stderr = '';
|
|
897
|
-
|
|
898
|
-
child.stdout.on('data', (data) => {
|
|
899
|
-
stdout += data.toString();
|
|
900
|
-
const line = data.toString().trim();
|
|
901
|
-
if (line.includes('Downloading') || line.includes('Installing') || line.includes('Collecting')) {
|
|
902
|
-
console.log(`[CodexLens] ${line}`);
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
|
|
906
|
-
child.stderr.on('data', (data) => {
|
|
907
|
-
stderr += data.toString();
|
|
908
|
-
});
|
|
909
|
-
|
|
910
|
-
child.on('close', (code) => {
|
|
911
|
-
if (code === 0) {
|
|
912
|
-
// IMPORTANT: fastembed installs onnxruntime (CPU) as dependency, which conflicts
|
|
913
|
-
// with onnxruntime-directml/gpu. Reinstall the GPU version to ensure it takes precedence.
|
|
914
|
-
if (gpuMode !== 'cpu') {
|
|
915
|
-
try {
|
|
916
|
-
console.log(`[CodexLens] Reinstalling ${onnxPackage} to ensure GPU provider works...`);
|
|
917
|
-
execSync(`"${pipPath}" install --force-reinstall ${onnxPackage}`, { stdio: 'pipe', timeout: EXEC_TIMEOUTS.PACKAGE_INSTALL });
|
|
918
|
-
console.log(`[CodexLens] ${onnxPackage} reinstalled successfully`);
|
|
919
|
-
} catch (e) {
|
|
920
|
-
console.warn(`[CodexLens] Warning: Failed to reinstall ${onnxPackage}: ${(e as Error).message}`);
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
console.log(`[CodexLens] Semantic dependencies installed successfully (${gpuMode} mode)`);
|
|
924
|
-
resolve({ success: true, message: `Installed with ${modeDescription}` });
|
|
925
|
-
} else {
|
|
926
|
-
resolve({ success: false, error: `Installation failed: ${stderr || stdout}` });
|
|
927
|
-
}
|
|
928
|
-
});
|
|
929
|
-
|
|
930
|
-
child.on('error', (err) => {
|
|
931
|
-
resolve({ success: false, error: `Failed to run pip: ${err.message}` });
|
|
932
|
-
});
|
|
933
|
-
});
|
|
934
|
-
|
|
935
|
-
installOnnx.on('error', (err) => {
|
|
936
|
-
resolve({ success: false, error: `Failed to install ONNX Runtime: ${err.message}` });
|
|
937
|
-
});
|
|
938
|
-
});
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
/**
|
|
942
|
-
* Bootstrap CodexLens venv with required packages
|
|
943
|
-
* @returns Bootstrap result
|
|
944
|
-
*/
|
|
945
|
-
async function bootstrapVenv(): Promise<BootstrapResult> {
|
|
946
|
-
// Prefer UV if available (faster package resolution and installation)
|
|
947
|
-
if (await isUvAvailable()) {
|
|
948
|
-
console.log('[CodexLens] Using UV for bootstrap...');
|
|
949
|
-
return bootstrapWithUv();
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
// Fall back to pip logic...
|
|
953
|
-
// Ensure data directory exists
|
|
954
|
-
const dataDir = getCodexLensDataDir();
|
|
955
|
-
const venvDir = getCodexLensVenvDir();
|
|
956
|
-
if (!existsSync(dataDir)) {
|
|
957
|
-
mkdirSync(dataDir, { recursive: true });
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
// Create venv if not exists
|
|
961
|
-
if (!existsSync(venvDir)) {
|
|
962
|
-
try {
|
|
963
|
-
console.log('[CodexLens] Creating virtual environment...');
|
|
964
|
-
const pythonCmd = getSystemPython();
|
|
965
|
-
execSync(`${pythonCmd} -m venv "${venvDir}"`, { stdio: 'inherit', timeout: EXEC_TIMEOUTS.PROCESS_SPAWN });
|
|
966
|
-
} catch (err) {
|
|
967
|
-
return { success: false, error: `Failed to create venv: ${(err as Error).message}` };
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
// Install codex-lens
|
|
972
|
-
try {
|
|
973
|
-
console.log('[CodexLens] Installing codex-lens package...');
|
|
974
|
-
const pipPath = getCodexLensPip();
|
|
975
|
-
|
|
976
|
-
// Try local path - codex-lens is local-only, not published to PyPI
|
|
977
|
-
const codexLensPath = findLocalCodexLensPath();
|
|
978
|
-
|
|
979
|
-
if (!codexLensPath) {
|
|
980
|
-
// codex-lens is a local-only package, not published to PyPI
|
|
981
|
-
const errorMsg = `Cannot find codex-lens directory for local installation.\n\n` +
|
|
982
|
-
`codex-lens is a local development package (not published to PyPI) and must be installed from local files.\n\n` +
|
|
983
|
-
`To fix this:\n` +
|
|
984
|
-
`1. Ensure the 'codex-lens' directory exists in your project root\n` +
|
|
985
|
-
`2. Verify pyproject.toml exists in codex-lens directory\n` +
|
|
986
|
-
`3. Run ccw from the correct working directory\n` +
|
|
987
|
-
`4. Or manually install: cd codex-lens && pip install -e .`;
|
|
988
|
-
throw new Error(errorMsg);
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
console.log(`[CodexLens] Installing from local path: ${codexLensPath}`);
|
|
992
|
-
execSync(`"${pipPath}" install -e "${codexLensPath}"`, { stdio: 'inherit', timeout: EXEC_TIMEOUTS.PACKAGE_INSTALL });
|
|
993
|
-
|
|
994
|
-
// Clear cache after successful installation
|
|
995
|
-
clearVenvStatusCache();
|
|
996
|
-
clearSemanticStatusCache();
|
|
997
|
-
return { success: true };
|
|
998
|
-
} catch (err) {
|
|
999
|
-
const errorMsg = `Failed to install codex-lens: ${(err as Error).message}\n\n` +
|
|
1000
|
-
`codex-lens is a local development package. To fix this:\n` +
|
|
1001
|
-
`1. Ensure the 'codex-lens' directory exists in your project root\n` +
|
|
1002
|
-
`2. Run the installation from the correct working directory\n` +
|
|
1003
|
-
`3. Or manually install: cd codex-lens && pip install -e .`;
|
|
1004
|
-
return { success: false, error: errorMsg };
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
* Ensure CodexLens is ready to use
|
|
1010
|
-
* @returns Ready status
|
|
1011
|
-
*/
|
|
1012
|
-
async function ensureReady(): Promise<ReadyStatus> {
|
|
1013
|
-
// Use cached result if already checked
|
|
1014
|
-
if (bootstrapChecked && bootstrapReady) {
|
|
1015
|
-
return { ready: true };
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
// Check current status
|
|
1019
|
-
const status = await checkVenvStatus();
|
|
1020
|
-
if (status.ready) {
|
|
1021
|
-
bootstrapChecked = true;
|
|
1022
|
-
bootstrapReady = true;
|
|
1023
|
-
return { ready: true, version: status.version };
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
// Attempt bootstrap
|
|
1027
|
-
const bootstrap = await bootstrapVenv();
|
|
1028
|
-
if (!bootstrap.success) {
|
|
1029
|
-
return { ready: false, error: bootstrap.error };
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
// Verify after bootstrap
|
|
1033
|
-
const recheck = await checkVenvStatus();
|
|
1034
|
-
bootstrapChecked = true;
|
|
1035
|
-
bootstrapReady = recheck.ready;
|
|
1036
|
-
|
|
1037
|
-
return recheck;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
/**
|
|
1041
|
-
* Parse progress info from CodexLens output
|
|
1042
|
-
* @param line - Output line to parse
|
|
1043
|
-
* @returns Progress info or null
|
|
1044
|
-
*/
|
|
1045
|
-
function parseProgressLine(line: string): ProgressInfo | null {
|
|
1046
|
-
// Parse file processing progress: "Processing file X/Y: path"
|
|
1047
|
-
const fileMatch = line.match(/Processing file (\d+)\/(\d+):\s*(.+)/i);
|
|
1048
|
-
if (fileMatch) {
|
|
1049
|
-
const current = parseInt(fileMatch[1], 10);
|
|
1050
|
-
const total = parseInt(fileMatch[2], 10);
|
|
1051
|
-
return {
|
|
1052
|
-
stage: 'indexing',
|
|
1053
|
-
message: `Processing ${fileMatch[3]}`,
|
|
1054
|
-
percent: Math.round((current / total) * 80) + 10, // 10-90%
|
|
1055
|
-
filesProcessed: current,
|
|
1056
|
-
totalFiles: total,
|
|
1057
|
-
};
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
// Parse stage messages
|
|
1061
|
-
if (line.includes('Discovering files')) {
|
|
1062
|
-
return { stage: 'discover', message: 'Discovering files...', percent: 5 };
|
|
1063
|
-
}
|
|
1064
|
-
if (line.includes('Building index')) {
|
|
1065
|
-
return { stage: 'build', message: 'Building index...', percent: 10 };
|
|
1066
|
-
}
|
|
1067
|
-
if (line.includes('Extracting symbols')) {
|
|
1068
|
-
return { stage: 'symbols', message: 'Extracting symbols...', percent: 50 };
|
|
1069
|
-
}
|
|
1070
|
-
if (line.includes('Generating embeddings') || line.includes('Creating embeddings')) {
|
|
1071
|
-
return { stage: 'embeddings', message: 'Generating embeddings...', percent: 70 };
|
|
1072
|
-
}
|
|
1073
|
-
// Note: "Finalizing index" and "Building ANN" are handled separately below
|
|
1074
|
-
// Only match generic "Complete" here (not "Finalizing" which has specific handlers)
|
|
1075
|
-
|
|
1076
|
-
// Parse indexed count: "Indexed X files" - FTS complete, but embeddings may follow
|
|
1077
|
-
const indexedMatch = line.match(/Indexed (\d+) files/i);
|
|
1078
|
-
if (indexedMatch) {
|
|
1079
|
-
return {
|
|
1080
|
-
stage: 'fts_complete', // Not 'complete' - embeddings generation may still be pending
|
|
1081
|
-
message: `Indexed ${indexedMatch[1]} files, generating embeddings...`,
|
|
1082
|
-
percent: 60, // FTS done, embeddings starting
|
|
1083
|
-
filesProcessed: parseInt(indexedMatch[1], 10),
|
|
1084
|
-
};
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
// Parse embedding batch progress: "Batch X: N files, M chunks"
|
|
1088
|
-
const batchMatch = line.match(/Batch (\d+):\s*(\d+) files,\s*(\d+) chunks/i);
|
|
1089
|
-
if (batchMatch) {
|
|
1090
|
-
return {
|
|
1091
|
-
stage: 'embeddings',
|
|
1092
|
-
message: `Embedding batch ${batchMatch[1]}: ${batchMatch[3]} chunks`,
|
|
1093
|
-
percent: 70, // Stay at 70% during embedding batches
|
|
1094
|
-
};
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
// Parse embedding progress with file count
|
|
1098
|
-
const embedProgressMatch = line.match(/Processing (\d+) files/i);
|
|
1099
|
-
if (embedProgressMatch && line.toLowerCase().includes('embed')) {
|
|
1100
|
-
return {
|
|
1101
|
-
stage: 'embeddings',
|
|
1102
|
-
message: `Processing ${embedProgressMatch[1]} files for embeddings`,
|
|
1103
|
-
percent: 75,
|
|
1104
|
-
};
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
// Parse finalizing ANN index
|
|
1108
|
-
if (line.includes('Finalizing index') || line.includes('Building ANN')) {
|
|
1109
|
-
return { stage: 'finalizing', message: 'Finalizing vector index...', percent: 90 };
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
// Parse embeddings complete message
|
|
1113
|
-
const embedCompleteMatch = line.match(/Embeddings complete:\s*(\d+)\s*chunks/i);
|
|
1114
|
-
if (embedCompleteMatch) {
|
|
1115
|
-
return {
|
|
1116
|
-
stage: 'embeddings_complete',
|
|
1117
|
-
message: `Embeddings complete: ${embedCompleteMatch[1]} chunks`,
|
|
1118
|
-
percent: 95,
|
|
1119
|
-
};
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
// Parse generic completion (but not "Embeddings complete" which is handled above)
|
|
1123
|
-
if (line.includes('Complete') && !line.toLowerCase().includes('embeddings complete')) {
|
|
1124
|
-
return { stage: 'complete', message: 'Complete', percent: 98 };
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
return null;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
/**
|
|
1131
|
-
* Execute CodexLens CLI command with real-time progress updates
|
|
1132
|
-
* @param args - CLI arguments
|
|
1133
|
-
* @param options - Execution options
|
|
1134
|
-
* @returns Execution result
|
|
1135
|
-
*/
|
|
1136
|
-
async function executeCodexLens(args: string[], options: ExecuteOptions = {}): Promise<ExecuteResult> {
|
|
1137
|
-
const { timeout = 300000, cwd = process.cwd(), onProgress } = options; // Default 5 min
|
|
1138
|
-
|
|
1139
|
-
// Ensure ready
|
|
1140
|
-
const readyStatus = await ensureReady();
|
|
1141
|
-
if (!readyStatus.ready) {
|
|
1142
|
-
return { success: false, error: readyStatus.error };
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
return new Promise((resolve) => {
|
|
1146
|
-
// SECURITY: Use spawn without shell to prevent command injection
|
|
1147
|
-
// Pass arguments directly - no manual quoting needed
|
|
1148
|
-
// spawn's cwd option handles drive changes correctly on Windows
|
|
1149
|
-
const spawnArgs = ['-m', 'codexlens', ...args];
|
|
1150
|
-
|
|
1151
|
-
const child = spawn(getCodexLensPython(), spawnArgs, {
|
|
1152
|
-
cwd,
|
|
1153
|
-
shell: false, // CRITICAL: Prevent command injection
|
|
1154
|
-
timeout,
|
|
1155
|
-
// Ensure proper encoding on Windows
|
|
1156
|
-
env: { ...process.env, PYTHONIOENCODING: 'utf-8' },
|
|
1157
|
-
});
|
|
1158
|
-
|
|
1159
|
-
// Track indexing process for cancellation (only for init commands)
|
|
1160
|
-
const isIndexingCommand = args.includes('init');
|
|
1161
|
-
if (isIndexingCommand) {
|
|
1162
|
-
currentIndexingProcess = child;
|
|
1163
|
-
currentIndexingAborted = false;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
let stdout = '';
|
|
1167
|
-
let stderr = '';
|
|
1168
|
-
let stdoutLineBuffer = '';
|
|
1169
|
-
let stderrLineBuffer = '';
|
|
1170
|
-
let timeoutHandle: NodeJS.Timeout | null = null;
|
|
1171
|
-
let resolved = false;
|
|
1172
|
-
|
|
1173
|
-
// Helper to safely resolve only once
|
|
1174
|
-
const safeResolve = (result: ExecuteResult) => {
|
|
1175
|
-
if (resolved) return;
|
|
1176
|
-
resolved = true;
|
|
1177
|
-
if (timeoutHandle) {
|
|
1178
|
-
clearTimeout(timeoutHandle);
|
|
1179
|
-
timeoutHandle = null;
|
|
1180
|
-
}
|
|
1181
|
-
// Clear indexing process tracking
|
|
1182
|
-
if (isIndexingCommand) {
|
|
1183
|
-
currentIndexingProcess = null;
|
|
1184
|
-
}
|
|
1185
|
-
resolve(result);
|
|
1186
|
-
};
|
|
1187
|
-
|
|
1188
|
-
// Set up timeout handler
|
|
1189
|
-
if (timeout > 0) {
|
|
1190
|
-
timeoutHandle = setTimeout(() => {
|
|
1191
|
-
if (!resolved) {
|
|
1192
|
-
child.kill('SIGTERM');
|
|
1193
|
-
// Give it a moment to die gracefully, then force kill
|
|
1194
|
-
setTimeout(() => {
|
|
1195
|
-
if (!resolved) {
|
|
1196
|
-
child.kill('SIGKILL');
|
|
1197
|
-
}
|
|
1198
|
-
}, 5000);
|
|
1199
|
-
safeResolve({ success: false, error: 'Command timed out' });
|
|
1200
|
-
}
|
|
1201
|
-
}, timeout);
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
// Process stdout line by line for real-time progress
|
|
1205
|
-
child.stdout?.on('data', (data: Buffer) => {
|
|
1206
|
-
const chunk = data.toString();
|
|
1207
|
-
stdoutLineBuffer += chunk;
|
|
1208
|
-
stdout += chunk;
|
|
1209
|
-
|
|
1210
|
-
// Process complete lines
|
|
1211
|
-
const lines = stdoutLineBuffer.split('\n');
|
|
1212
|
-
stdoutLineBuffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
1213
|
-
|
|
1214
|
-
for (const line of lines) {
|
|
1215
|
-
const trimmedLine = line.trim();
|
|
1216
|
-
if (trimmedLine && onProgress) {
|
|
1217
|
-
const progress = parseProgressLine(trimmedLine);
|
|
1218
|
-
if (progress) {
|
|
1219
|
-
onProgress(progress);
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
});
|
|
1224
|
-
|
|
1225
|
-
// Collect stderr
|
|
1226
|
-
child.stderr?.on('data', (data: Buffer) => {
|
|
1227
|
-
const chunk = data.toString();
|
|
1228
|
-
stderrLineBuffer += chunk;
|
|
1229
|
-
stderr += chunk;
|
|
1230
|
-
|
|
1231
|
-
// Also check stderr for progress (some tools output progress to stderr)
|
|
1232
|
-
const lines = stderrLineBuffer.split('\n');
|
|
1233
|
-
stderrLineBuffer = lines.pop() || '';
|
|
1234
|
-
|
|
1235
|
-
for (const line of lines) {
|
|
1236
|
-
const trimmedLine = line.trim();
|
|
1237
|
-
if (trimmedLine && onProgress) {
|
|
1238
|
-
const progress = parseProgressLine(trimmedLine);
|
|
1239
|
-
if (progress) {
|
|
1240
|
-
onProgress(progress);
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
});
|
|
1245
|
-
|
|
1246
|
-
// Handle process errors (spawn failure)
|
|
1247
|
-
child.on('error', (err) => {
|
|
1248
|
-
safeResolve({ success: false, error: `Failed to start process: ${err.message}` });
|
|
1249
|
-
});
|
|
1250
|
-
|
|
1251
|
-
// Handle process completion
|
|
1252
|
-
child.on('close', (code) => {
|
|
1253
|
-
// Process any remaining buffered content
|
|
1254
|
-
if (stdoutLineBuffer.trim() && onProgress) {
|
|
1255
|
-
const progress = parseProgressLine(stdoutLineBuffer.trim());
|
|
1256
|
-
if (progress) {
|
|
1257
|
-
onProgress(progress);
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
if (code === 0) {
|
|
1262
|
-
safeResolve({ success: true, output: stdout.trim() });
|
|
1263
|
-
} else {
|
|
1264
|
-
safeResolve({ success: false, error: stderr.trim() || `Process exited with code ${code}` });
|
|
1265
|
-
}
|
|
1266
|
-
});
|
|
1267
|
-
});
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
/**
|
|
1271
|
-
* Initialize CodexLens index for a directory
|
|
1272
|
-
* @param params - Parameters
|
|
1273
|
-
* @returns Execution result
|
|
1274
|
-
*/
|
|
1275
|
-
async function initIndex(params: Params): Promise<ExecuteResult> {
|
|
1276
|
-
const { path = '.', languages } = params;
|
|
1277
|
-
|
|
1278
|
-
// Use 'index init' subcommand (new CLI structure)
|
|
1279
|
-
const args = ['index', 'init', path];
|
|
1280
|
-
if (languages && languages.length > 0) {
|
|
1281
|
-
args.push('--language', languages.join(','));
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
return executeCodexLens(args, { cwd: path });
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
/**
|
|
1288
|
-
* Search code using CodexLens
|
|
1289
|
-
* @param params - Search parameters
|
|
1290
|
-
* @returns Execution result
|
|
1291
|
-
*/
|
|
1292
|
-
async function searchCode(params: Params): Promise<ExecuteResult> {
|
|
1293
|
-
const { query, path = '.', limit = 20, mode = 'auto', enrich = false } = params;
|
|
1294
|
-
|
|
1295
|
-
if (!query) {
|
|
1296
|
-
return { success: false, error: 'Query is required for search action' };
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
// Map MCP mode names to CLI mode names
|
|
1300
|
-
const modeMap: Record<string, string> = {
|
|
1301
|
-
'text': 'exact',
|
|
1302
|
-
'semantic': 'pure-vector',
|
|
1303
|
-
'auto': 'auto',
|
|
1304
|
-
'exact': 'exact',
|
|
1305
|
-
'fuzzy': 'fuzzy',
|
|
1306
|
-
'hybrid': 'hybrid',
|
|
1307
|
-
'vector': 'vector',
|
|
1308
|
-
'pure-vector': 'pure-vector',
|
|
1309
|
-
};
|
|
1310
|
-
|
|
1311
|
-
const cliMode = modeMap[mode] || 'auto';
|
|
1312
|
-
const args = ['search', query, '--limit', limit.toString(), '--mode', cliMode, '--json'];
|
|
1313
|
-
|
|
1314
|
-
if (enrich) {
|
|
1315
|
-
args.push('--enrich');
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
const result = await executeCodexLens(args, { cwd: path });
|
|
1319
|
-
|
|
1320
|
-
if (result.success && result.output) {
|
|
1321
|
-
try {
|
|
1322
|
-
result.results = JSON.parse(result.output);
|
|
1323
|
-
delete result.output;
|
|
1324
|
-
} catch {
|
|
1325
|
-
// Keep raw output if JSON parse fails
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
return result;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
/**
|
|
1333
|
-
* Search code and return only file paths
|
|
1334
|
-
* @param params - Search parameters
|
|
1335
|
-
* @returns Execution result
|
|
1336
|
-
*/
|
|
1337
|
-
async function searchFiles(params: Params): Promise<ExecuteResult> {
|
|
1338
|
-
const { query, path = '.', limit = 20, mode = 'auto', enrich = false } = params;
|
|
1339
|
-
|
|
1340
|
-
if (!query) {
|
|
1341
|
-
return { success: false, error: 'Query is required for search_files action' };
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
// Map MCP mode names to CLI mode names
|
|
1345
|
-
const modeMap: Record<string, string> = {
|
|
1346
|
-
'text': 'exact',
|
|
1347
|
-
'semantic': 'pure-vector',
|
|
1348
|
-
'auto': 'auto',
|
|
1349
|
-
'exact': 'exact',
|
|
1350
|
-
'fuzzy': 'fuzzy',
|
|
1351
|
-
'hybrid': 'hybrid',
|
|
1352
|
-
'vector': 'vector',
|
|
1353
|
-
'pure-vector': 'pure-vector',
|
|
1354
|
-
};
|
|
1355
|
-
|
|
1356
|
-
const cliMode = modeMap[mode] || 'auto';
|
|
1357
|
-
const args = ['search', query, '--files-only', '--limit', limit.toString(), '--mode', cliMode, '--json'];
|
|
1358
|
-
|
|
1359
|
-
if (enrich) {
|
|
1360
|
-
args.push('--enrich');
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
const result = await executeCodexLens(args, { cwd: path });
|
|
1364
|
-
|
|
1365
|
-
if (result.success && result.output) {
|
|
1366
|
-
try {
|
|
1367
|
-
result.files = JSON.parse(result.output);
|
|
1368
|
-
delete result.output;
|
|
1369
|
-
} catch {
|
|
1370
|
-
// Keep raw output if JSON parse fails
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
return result;
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
/**
|
|
1378
|
-
* Extract symbols from a file
|
|
1379
|
-
* @param params - Parameters
|
|
1380
|
-
* @returns Execution result
|
|
1381
|
-
*/
|
|
1382
|
-
async function extractSymbols(params: Params): Promise<ExecuteResult> {
|
|
1383
|
-
const { file } = params;
|
|
1384
|
-
|
|
1385
|
-
if (!file) {
|
|
1386
|
-
return { success: false, error: 'File is required for symbol action' };
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
const args = ['symbol', file, '--json'];
|
|
1390
|
-
|
|
1391
|
-
const result = await executeCodexLens(args);
|
|
1392
|
-
|
|
1393
|
-
if (result.success && result.output) {
|
|
1394
|
-
try {
|
|
1395
|
-
result.symbols = JSON.parse(result.output);
|
|
1396
|
-
delete result.output;
|
|
1397
|
-
} catch {
|
|
1398
|
-
// Keep raw output if JSON parse fails
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
return result;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* Get index status
|
|
1407
|
-
* @param params - Parameters
|
|
1408
|
-
* @returns Execution result
|
|
1409
|
-
*/
|
|
1410
|
-
async function getStatus(params: Params): Promise<ExecuteResult> {
|
|
1411
|
-
const { path = '.' } = params;
|
|
1412
|
-
|
|
1413
|
-
const args = ['status', '--json'];
|
|
1414
|
-
|
|
1415
|
-
const result = await executeCodexLens(args, { cwd: path });
|
|
1416
|
-
|
|
1417
|
-
if (result.success && result.output) {
|
|
1418
|
-
try {
|
|
1419
|
-
result.status = JSON.parse(result.output);
|
|
1420
|
-
delete result.output;
|
|
1421
|
-
} catch {
|
|
1422
|
-
// Keep raw output if JSON parse fails
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
return result;
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
/**
|
|
1430
|
-
* Show configuration
|
|
1431
|
-
* @param params - Parameters
|
|
1432
|
-
* @returns Execution result
|
|
1433
|
-
*/
|
|
1434
|
-
async function configShow(): Promise<ExecuteResult> {
|
|
1435
|
-
const args = ['config', 'show', '--json'];
|
|
1436
|
-
const result = await executeCodexLens(args);
|
|
1437
|
-
|
|
1438
|
-
if (result.success && result.output) {
|
|
1439
|
-
try {
|
|
1440
|
-
result.config = JSON.parse(result.output);
|
|
1441
|
-
delete result.output;
|
|
1442
|
-
} catch {
|
|
1443
|
-
// Keep raw output if JSON parse fails
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
return result;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
/**
|
|
1451
|
-
* Set configuration value
|
|
1452
|
-
* @param params - Parameters
|
|
1453
|
-
* @returns Execution result
|
|
1454
|
-
*/
|
|
1455
|
-
async function configSet(params: Params): Promise<ExecuteResult> {
|
|
1456
|
-
const { key, value } = params;
|
|
1457
|
-
|
|
1458
|
-
if (!key) {
|
|
1459
|
-
return { success: false, error: 'key is required for config_set action' };
|
|
1460
|
-
}
|
|
1461
|
-
if (!value) {
|
|
1462
|
-
return { success: false, error: 'value is required for config_set action' };
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
const args = ['config', 'set', key, value, '--json'];
|
|
1466
|
-
const result = await executeCodexLens(args);
|
|
1467
|
-
|
|
1468
|
-
if (result.success && result.output) {
|
|
1469
|
-
try {
|
|
1470
|
-
result.config = JSON.parse(result.output);
|
|
1471
|
-
delete result.output;
|
|
1472
|
-
} catch {
|
|
1473
|
-
// Keep raw output if JSON parse fails
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
return result;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
/**
|
|
1481
|
-
* Migrate indexes to new location
|
|
1482
|
-
* @param params - Parameters
|
|
1483
|
-
* @returns Execution result
|
|
1484
|
-
*/
|
|
1485
|
-
async function configMigrate(params: Params): Promise<ExecuteResult> {
|
|
1486
|
-
const { newPath } = params;
|
|
1487
|
-
|
|
1488
|
-
if (!newPath) {
|
|
1489
|
-
return { success: false, error: 'newPath is required for config_migrate action' };
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
const args = ['config', 'migrate', newPath, '--json'];
|
|
1493
|
-
const result = await executeCodexLens(args, { timeout: 300000 }); // 5 min for migration
|
|
1494
|
-
|
|
1495
|
-
if (result.success && result.output) {
|
|
1496
|
-
try {
|
|
1497
|
-
result.config = JSON.parse(result.output);
|
|
1498
|
-
delete result.output;
|
|
1499
|
-
} catch {
|
|
1500
|
-
// Keep raw output if JSON parse fails
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
return result;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
/**
|
|
1508
|
-
* Clean indexes
|
|
1509
|
-
* @param params - Parameters
|
|
1510
|
-
* @returns Execution result
|
|
1511
|
-
*/
|
|
1512
|
-
async function cleanIndexes(params: Params): Promise<ExecuteResult> {
|
|
1513
|
-
const { path, all } = params;
|
|
1514
|
-
|
|
1515
|
-
const args = ['clean'];
|
|
1516
|
-
|
|
1517
|
-
if (all) {
|
|
1518
|
-
args.push('--all');
|
|
1519
|
-
} else if (path) {
|
|
1520
|
-
args.push(path);
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
args.push('--json');
|
|
1524
|
-
const result = await executeCodexLens(args);
|
|
1525
|
-
|
|
1526
|
-
if (result.success && result.output) {
|
|
1527
|
-
try {
|
|
1528
|
-
result.cleanResult = JSON.parse(result.output);
|
|
1529
|
-
delete result.output;
|
|
1530
|
-
} catch {
|
|
1531
|
-
// Keep raw output if JSON parse fails
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
return result;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
// Tool schema for MCP
|
|
1539
|
-
export const schema: ToolSchema = {
|
|
1540
|
-
name: 'codex_lens',
|
|
1541
|
-
description: `CodexLens - Code indexing and semantic search.
|
|
1542
|
-
|
|
1543
|
-
Usage:
|
|
1544
|
-
codex_lens(action="init", path=".") # Index directory (auto-generates embeddings if available)
|
|
1545
|
-
codex_lens(action="search", query="func") # Search code (auto: hybrid if embeddings exist, else exact)
|
|
1546
|
-
codex_lens(action="search", query="func", mode="hybrid") # Force hybrid search
|
|
1547
|
-
codex_lens(action="search_files", query="x") # Search, return paths only
|
|
1548
|
-
|
|
1549
|
-
Graph Enrichment:
|
|
1550
|
-
codex_lens(action="search", query="func", enrich=true) # Enrich results with code relationships
|
|
1551
|
-
|
|
1552
|
-
Search Modes:
|
|
1553
|
-
- auto: Auto-detect (hybrid if embeddings exist, exact otherwise) [default]
|
|
1554
|
-
- exact/text: Exact FTS for code identifiers
|
|
1555
|
-
- hybrid: Exact + Fuzzy + Vector fusion (best results, requires embeddings)
|
|
1556
|
-
- fuzzy: Typo-tolerant search
|
|
1557
|
-
- vector: Semantic + keyword
|
|
1558
|
-
- pure-vector/semantic: Pure semantic search
|
|
1559
|
-
|
|
1560
|
-
Note: For advanced operations (config, status, clean), use CLI directly: codexlens --help`,
|
|
1561
|
-
inputSchema: {
|
|
1562
|
-
type: 'object',
|
|
1563
|
-
properties: {
|
|
1564
|
-
action: {
|
|
1565
|
-
type: 'string',
|
|
1566
|
-
enum: [
|
|
1567
|
-
'init',
|
|
1568
|
-
'search',
|
|
1569
|
-
'search_files',
|
|
1570
|
-
'status',
|
|
1571
|
-
'symbol',
|
|
1572
|
-
'check',
|
|
1573
|
-
'update',
|
|
1574
|
-
'bootstrap',
|
|
1575
|
-
],
|
|
1576
|
-
description: 'Action to perform: init/update (index directory), search (search code), search_files (search files only), status (index status), symbol (extract symbols), check (check if ready), bootstrap (setup venv)',
|
|
1577
|
-
},
|
|
1578
|
-
path: {
|
|
1579
|
-
type: 'string',
|
|
1580
|
-
description: 'Target directory path (for init, search, search_files). Defaults to current directory.',
|
|
1581
|
-
},
|
|
1582
|
-
query: {
|
|
1583
|
-
type: 'string',
|
|
1584
|
-
description: 'Search query (required for search and search_files actions)',
|
|
1585
|
-
},
|
|
1586
|
-
mode: {
|
|
1587
|
-
type: 'string',
|
|
1588
|
-
enum: ['auto', 'text', 'semantic', 'exact', 'fuzzy', 'hybrid', 'vector', 'pure-vector'],
|
|
1589
|
-
description: 'Search mode: auto (default, hybrid if embeddings exist), text/exact (FTS), hybrid (best), fuzzy, vector, semantic/pure-vector',
|
|
1590
|
-
default: 'auto',
|
|
1591
|
-
},
|
|
1592
|
-
format: {
|
|
1593
|
-
type: 'string',
|
|
1594
|
-
enum: ['json', 'text', 'pretty'],
|
|
1595
|
-
description: 'Output format: json (default), text, pretty',
|
|
1596
|
-
default: 'json',
|
|
1597
|
-
},
|
|
1598
|
-
languages: {
|
|
1599
|
-
type: 'array',
|
|
1600
|
-
items: { type: 'string' },
|
|
1601
|
-
description: 'Languages to index (for init action). Example: ["javascript", "typescript", "python"]',
|
|
1602
|
-
},
|
|
1603
|
-
limit: {
|
|
1604
|
-
type: 'number',
|
|
1605
|
-
description: 'Maximum number of search results (for search and search_files actions)',
|
|
1606
|
-
default: 20,
|
|
1607
|
-
},
|
|
1608
|
-
enrich: {
|
|
1609
|
-
type: 'boolean',
|
|
1610
|
-
description: 'Enrich search results with code graph relationships (calls, imports)',
|
|
1611
|
-
default: false,
|
|
1612
|
-
},
|
|
1613
|
-
},
|
|
1614
|
-
required: ['action'],
|
|
1615
|
-
},
|
|
1616
|
-
};
|
|
1617
|
-
|
|
1618
|
-
// Handler function
|
|
1619
|
-
export async function handler(params: Record<string, unknown>): Promise<ToolResult<ExecuteResult>> {
|
|
1620
|
-
const parsed = ParamsSchema.safeParse(params);
|
|
1621
|
-
if (!parsed.success) {
|
|
1622
|
-
return { success: false, error: `Invalid params: ${parsed.error.message}` };
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
const { action } = parsed.data;
|
|
1626
|
-
|
|
1627
|
-
try {
|
|
1628
|
-
let result: ExecuteResult;
|
|
1629
|
-
|
|
1630
|
-
switch (action) {
|
|
1631
|
-
case 'init':
|
|
1632
|
-
result = await initIndex(parsed.data);
|
|
1633
|
-
break;
|
|
1634
|
-
|
|
1635
|
-
case 'search':
|
|
1636
|
-
result = await searchCode(parsed.data);
|
|
1637
|
-
break;
|
|
1638
|
-
|
|
1639
|
-
case 'search_files':
|
|
1640
|
-
result = await searchFiles(parsed.data);
|
|
1641
|
-
break;
|
|
1642
|
-
|
|
1643
|
-
case 'status':
|
|
1644
|
-
result = await getStatus(parsed.data);
|
|
1645
|
-
break;
|
|
1646
|
-
|
|
1647
|
-
case 'symbol':
|
|
1648
|
-
result = await extractSymbols(parsed.data);
|
|
1649
|
-
break;
|
|
1650
|
-
|
|
1651
|
-
case 'check':
|
|
1652
|
-
const checkStatus = await ensureReady();
|
|
1653
|
-
result = {
|
|
1654
|
-
success: checkStatus.ready,
|
|
1655
|
-
ready: checkStatus.ready,
|
|
1656
|
-
version: checkStatus.version,
|
|
1657
|
-
error: checkStatus.error,
|
|
1658
|
-
};
|
|
1659
|
-
break;
|
|
1660
|
-
|
|
1661
|
-
case 'update':
|
|
1662
|
-
// Update is an alias for init (incremental update)
|
|
1663
|
-
result = await initIndex(parsed.data);
|
|
1664
|
-
break;
|
|
1665
|
-
|
|
1666
|
-
case 'bootstrap':
|
|
1667
|
-
const bootstrapResult = await bootstrapVenv();
|
|
1668
|
-
result = {
|
|
1669
|
-
success: bootstrapResult.success,
|
|
1670
|
-
message: bootstrapResult.message,
|
|
1671
|
-
error: bootstrapResult.error,
|
|
1672
|
-
};
|
|
1673
|
-
break;
|
|
1674
|
-
|
|
1675
|
-
default:
|
|
1676
|
-
throw new Error(
|
|
1677
|
-
`Unknown action: ${action}. Valid actions: init, search, search_files, status, symbol, check, update, bootstrap`
|
|
1678
|
-
);
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
return result.success ? { success: true, result } : { success: false, error: result.error };
|
|
1682
|
-
} catch (error) {
|
|
1683
|
-
return { success: false, error: (error as Error).message };
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Uninstall CodexLens by removing the venv directory
|
|
1689
|
-
* @returns Uninstall result
|
|
1690
|
-
*/
|
|
1691
|
-
async function uninstallCodexLens(): Promise<BootstrapResult> {
|
|
1692
|
-
try {
|
|
1693
|
-
// Check if venv exists
|
|
1694
|
-
if (!existsSync(getCodexLensVenvDir())) {
|
|
1695
|
-
return { success: false, error: 'CodexLens not installed (venv not found)' };
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
console.log('[CodexLens] Uninstalling CodexLens...');
|
|
1699
|
-
|
|
1700
|
-
// On Windows, kill any Python processes that might be holding locks on .db files
|
|
1701
|
-
if (process.platform === 'win32') {
|
|
1702
|
-
console.log('[CodexLens] Killing any CodexLens Python processes...');
|
|
1703
|
-
const { execSync } = await import('child_process');
|
|
1704
|
-
try {
|
|
1705
|
-
// Kill any python processes from our venv that might be holding file locks
|
|
1706
|
-
execSync(`taskkill /F /IM python.exe /FI "MODULES eq sqlite3" 2>nul`, { stdio: 'ignore', timeout: EXEC_TIMEOUTS.SYSTEM_INFO });
|
|
1707
|
-
} catch {
|
|
1708
|
-
// Ignore errors - no processes to kill
|
|
1709
|
-
}
|
|
1710
|
-
// Small delay to allow file handles to be released
|
|
1711
|
-
await new Promise(resolve => setTimeout(resolve, 500));
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
|
-
const dataDir = getCodexLensDataDir();
|
|
1715
|
-
console.log(`[CodexLens] Removing directory: ${dataDir}`);
|
|
1716
|
-
|
|
1717
|
-
// Remove the entire .codexlens directory with retry logic for locked files
|
|
1718
|
-
const fs = await import('fs');
|
|
1719
|
-
const path = await import('path');
|
|
1720
|
-
|
|
1721
|
-
// Helper function to remove directory with retries (Windows EBUSY workaround)
|
|
1722
|
-
const removeWithRetry = async (dirPath: string, maxRetries = 3, delay = 1000): Promise<void> => {
|
|
1723
|
-
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
1724
|
-
try {
|
|
1725
|
-
fs.rmSync(dirPath, { recursive: true, force: true, maxRetries: 3, retryDelay: 500 });
|
|
1726
|
-
return;
|
|
1727
|
-
} catch (err: any) {
|
|
1728
|
-
if (err.code === 'EBUSY' || err.code === 'EPERM' || err.code === 'ENOTEMPTY') {
|
|
1729
|
-
console.log(`[CodexLens] Retry ${attempt}/${maxRetries} - file locked, waiting...`);
|
|
1730
|
-
if (attempt < maxRetries) {
|
|
1731
|
-
// On Windows, try to forcefully release file handles
|
|
1732
|
-
if (process.platform === 'win32' && err.path) {
|
|
1733
|
-
try {
|
|
1734
|
-
const { execSync } = await import('child_process');
|
|
1735
|
-
// Try to close handles on the specific file
|
|
1736
|
-
execSync(`handle -c ${err.path} -y 2>nul`, { stdio: 'ignore', timeout: EXEC_TIMEOUTS.SYSTEM_INFO });
|
|
1737
|
-
} catch {
|
|
1738
|
-
// handle.exe may not be installed, ignore
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1742
|
-
continue;
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
throw err;
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
};
|
|
1749
|
-
|
|
1750
|
-
await removeWithRetry(dataDir);
|
|
1751
|
-
|
|
1752
|
-
// Reset bootstrap cache
|
|
1753
|
-
bootstrapChecked = false;
|
|
1754
|
-
bootstrapReady = false;
|
|
1755
|
-
clearVenvStatusCache();
|
|
1756
|
-
clearSemanticStatusCache();
|
|
1757
|
-
|
|
1758
|
-
console.log('[CodexLens] CodexLens uninstalled successfully');
|
|
1759
|
-
return { success: true, message: 'CodexLens uninstalled successfully' };
|
|
1760
|
-
} catch (err) {
|
|
1761
|
-
const errorMsg = (err as Error).message;
|
|
1762
|
-
// Provide helpful message for Windows users with locked files
|
|
1763
|
-
if (errorMsg.includes('EBUSY') || errorMsg.includes('resource busy')) {
|
|
1764
|
-
return {
|
|
1765
|
-
success: false,
|
|
1766
|
-
error: `Failed to uninstall CodexLens: Files are locked. Please close any applications using CodexLens indexes (e.g., Claude Code, VS Code) and try again. Details: ${errorMsg}`
|
|
1767
|
-
};
|
|
1768
|
-
}
|
|
1769
|
-
return { success: false, error: `Failed to uninstall CodexLens: ${errorMsg}` };
|
|
1770
|
-
}
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
/**
|
|
1774
|
-
* Cancel the currently running indexing process
|
|
1775
|
-
* @returns Result indicating if cancellation was successful
|
|
1776
|
-
*/
|
|
1777
|
-
function cancelIndexing(): { success: boolean; message?: string; error?: string } {
|
|
1778
|
-
if (!currentIndexingProcess) {
|
|
1779
|
-
return { success: false, error: 'No indexing process is currently running' };
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
if (currentIndexingAborted) {
|
|
1783
|
-
return { success: false, error: 'Indexing process is already being cancelled' };
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
try {
|
|
1787
|
-
currentIndexingAborted = true;
|
|
1788
|
-
|
|
1789
|
-
// Send SIGTERM first for graceful shutdown
|
|
1790
|
-
if (process.platform === 'win32') {
|
|
1791
|
-
// On Windows, use taskkill to kill the process tree
|
|
1792
|
-
const { execSync } = require('child_process');
|
|
1793
|
-
try {
|
|
1794
|
-
execSync(`taskkill /pid ${currentIndexingProcess.pid} /T /F`, { stdio: 'ignore', timeout: EXEC_TIMEOUTS.SYSTEM_INFO });
|
|
1795
|
-
} catch {
|
|
1796
|
-
// Process may have already exited
|
|
1797
|
-
}
|
|
1798
|
-
} else {
|
|
1799
|
-
// On Unix, send SIGTERM
|
|
1800
|
-
currentIndexingProcess.kill('SIGTERM');
|
|
1801
|
-
|
|
1802
|
-
// Force kill after 3 seconds if still running
|
|
1803
|
-
setTimeout(() => {
|
|
1804
|
-
if (currentIndexingProcess) {
|
|
1805
|
-
currentIndexingProcess.kill('SIGKILL');
|
|
1806
|
-
}
|
|
1807
|
-
}, 3000);
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
console.log('[CodexLens] Indexing process cancelled');
|
|
1811
|
-
return { success: true, message: 'Indexing cancelled successfully' };
|
|
1812
|
-
} catch (err) {
|
|
1813
|
-
return { success: false, error: `Failed to cancel indexing: ${(err as Error).message}` };
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
/**
|
|
1818
|
-
* Check if an indexing process is currently running
|
|
1819
|
-
* @returns True if indexing is in progress
|
|
1820
|
-
*/
|
|
1821
|
-
function isIndexingInProgress(): boolean {
|
|
1822
|
-
return currentIndexingProcess !== null && !currentIndexingAborted;
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
// Export types
|
|
1826
|
-
export type { ProgressInfo, ExecuteOptions };
|
|
1827
|
-
|
|
1828
|
-
// Export for direct usage
|
|
1829
|
-
export {
|
|
1830
|
-
ensureReady,
|
|
1831
|
-
executeCodexLens,
|
|
1832
|
-
checkVenvStatus,
|
|
1833
|
-
bootstrapVenv,
|
|
1834
|
-
checkSemanticStatus,
|
|
1835
|
-
ensureLiteLLMEmbedderReady,
|
|
1836
|
-
installSemantic,
|
|
1837
|
-
detectGpuSupport,
|
|
1838
|
-
uninstallCodexLens,
|
|
1839
|
-
cancelIndexing,
|
|
1840
|
-
isIndexingInProgress,
|
|
1841
|
-
// UV-based installation functions
|
|
1842
|
-
bootstrapWithUv,
|
|
1843
|
-
installSemanticWithUv,
|
|
1844
|
-
};
|
|
1845
|
-
|
|
1846
|
-
// Export Python path for direct spawn usage (e.g., watcher)
|
|
1847
|
-
export function getVenvPythonPath(): string {
|
|
1848
|
-
return getCodexLensPython();
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
export type { GpuMode, PythonEnvInfo };
|
|
1852
|
-
|
|
1853
|
-
// Backward-compatible export for tests
|
|
1854
|
-
export const codexLensTool = {
|
|
1855
|
-
name: schema.name,
|
|
1856
|
-
description: schema.description,
|
|
1857
|
-
parameters: schema.inputSchema,
|
|
1858
|
-
execute: async (params: Record<string, unknown>) => {
|
|
1859
|
-
const result = await handler(params);
|
|
1860
|
-
// Return the result directly - tests expect {success: boolean, ...} format
|
|
1861
|
-
return result.success ? result.result : { success: false, error: result.error };
|
|
1862
|
-
}
|
|
1863
|
-
};
|