claude-code-workflow 6.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 +778 -0
- package/.claude/agents/cli-execution-agent.md +270 -0
- package/.claude/agents/cli-explore-agent.md +182 -0
- package/.claude/agents/cli-lite-planning-agent.md +396 -0
- package/.claude/agents/cli-planning-agent.md +558 -0
- package/.claude/agents/code-developer.md +310 -0
- package/.claude/agents/conceptual-planning-agent.md +308 -0
- package/.claude/agents/context-search-agent.md +582 -0
- package/.claude/agents/doc-generator.md +330 -0
- package/.claude/agents/memory-bridge.md +94 -0
- package/.claude/agents/test-context-search-agent.md +399 -0
- package/.claude/agents/test-fix-agent.md +343 -0
- package/.claude/agents/ui-design-agent.md +593 -0
- package/.claude/agents/universal-executor.md +131 -0
- package/.claude/commands/cli/cli-init.md +440 -0
- package/.claude/commands/enhance-prompt.md +93 -0
- package/.claude/commands/memory/code-map-memory.md +687 -0
- package/.claude/commands/memory/docs-full-cli.md +471 -0
- package/.claude/commands/memory/docs-related-cli.md +386 -0
- package/.claude/commands/memory/docs.md +615 -0
- package/.claude/commands/memory/load-skill-memory.md +182 -0
- package/.claude/commands/memory/load.md +240 -0
- package/.claude/commands/memory/skill-memory.md +525 -0
- package/.claude/commands/memory/style-skill-memory.md +396 -0
- package/.claude/commands/memory/tech-research.md +477 -0
- package/.claude/commands/memory/update-full.md +332 -0
- package/.claude/commands/memory/update-related.md +332 -0
- package/.claude/commands/memory/workflow-skill-memory.md +517 -0
- package/.claude/commands/task/breakdown.md +204 -0
- package/.claude/commands/task/create.md +152 -0
- package/.claude/commands/task/execute.md +270 -0
- package/.claude/commands/task/replan.md +437 -0
- package/.claude/commands/version.md +254 -0
- package/.claude/commands/workflow/action-plan-verify.md +447 -0
- package/.claude/commands/workflow/brainstorm/api-designer.md +585 -0
- package/.claude/commands/workflow/brainstorm/artifacts.md +452 -0
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +443 -0
- package/.claude/commands/workflow/brainstorm/data-architect.md +220 -0
- package/.claude/commands/workflow/brainstorm/product-manager.md +200 -0
- package/.claude/commands/workflow/brainstorm/product-owner.md +200 -0
- package/.claude/commands/workflow/brainstorm/scrum-master.md +200 -0
- package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +200 -0
- package/.claude/commands/workflow/brainstorm/synthesis.md +398 -0
- package/.claude/commands/workflow/brainstorm/system-architect.md +387 -0
- package/.claude/commands/workflow/brainstorm/ui-designer.md +221 -0
- package/.claude/commands/workflow/brainstorm/ux-expert.md +221 -0
- package/.claude/commands/workflow/execute.md +460 -0
- package/.claude/commands/workflow/init.md +164 -0
- package/.claude/commands/workflow/lite-execute.md +686 -0
- package/.claude/commands/workflow/lite-fix.md +621 -0
- package/.claude/commands/workflow/lite-plan.md +592 -0
- package/.claude/commands/workflow/plan.md +551 -0
- package/.claude/commands/workflow/replan.md +515 -0
- package/.claude/commands/workflow/review-fix.md +646 -0
- package/.claude/commands/workflow/review-module-cycle.md +795 -0
- package/.claude/commands/workflow/review-session-cycle.md +805 -0
- package/.claude/commands/workflow/review.md +291 -0
- package/.claude/commands/workflow/session/complete.md +500 -0
- package/.claude/commands/workflow/session/list.md +96 -0
- package/.claude/commands/workflow/session/resume.md +61 -0
- package/.claude/commands/workflow/session/start.md +200 -0
- package/.claude/commands/workflow/status.md +352 -0
- package/.claude/commands/workflow/tdd-plan.md +460 -0
- package/.claude/commands/workflow/tdd-verify.md +386 -0
- package/.claude/commands/workflow/test-cycle-execute.md +498 -0
- package/.claude/commands/workflow/test-fix-gen.md +699 -0
- package/.claude/commands/workflow/test-gen.md +529 -0
- package/.claude/commands/workflow/tools/conflict-resolution.md +680 -0
- package/.claude/commands/workflow/tools/context-gather.md +434 -0
- package/.claude/commands/workflow/tools/task-generate-agent.md +291 -0
- package/.claude/commands/workflow/tools/task-generate-tdd.md +518 -0
- package/.claude/commands/workflow/tools/tdd-coverage-analysis.md +309 -0
- package/.claude/commands/workflow/tools/test-concept-enhanced.md +163 -0
- package/.claude/commands/workflow/tools/test-context-gather.md +235 -0
- package/.claude/commands/workflow/tools/test-task-generate.md +256 -0
- package/.claude/commands/workflow/ui-design/animation-extract.md +1150 -0
- package/.claude/commands/workflow/ui-design/codify-style.md +652 -0
- package/.claude/commands/workflow/ui-design/design-sync.md +454 -0
- package/.claude/commands/workflow/ui-design/explore-auto.md +678 -0
- package/.claude/commands/workflow/ui-design/generate.md +504 -0
- package/.claude/commands/workflow/ui-design/imitate-auto.md +745 -0
- package/.claude/commands/workflow/ui-design/import-from-code.md +537 -0
- package/.claude/commands/workflow/ui-design/layout-extract.md +788 -0
- package/.claude/commands/workflow/ui-design/reference-page-generator.md +356 -0
- package/.claude/commands/workflow/ui-design/style-extract.md +773 -0
- package/.claude/scripts/classify-folders.sh +35 -0
- package/.claude/scripts/convert_tokens_to_css.sh +225 -0
- package/.claude/scripts/detect_changed_modules.sh +157 -0
- package/.claude/scripts/discover-design-files.sh +83 -0
- package/.claude/scripts/extract-animations.js +243 -0
- package/.claude/scripts/extract-computed-styles.js +118 -0
- package/.claude/scripts/extract-layout-structure.js +411 -0
- package/.claude/scripts/generate_module_docs.sh +713 -0
- package/.claude/scripts/get_modules_by_depth.sh +166 -0
- package/.claude/scripts/ui-generate-preview.sh +391 -0
- package/.claude/scripts/ui-instantiate-prototypes.sh +811 -0
- package/.claude/scripts/update_module_claude.sh +333 -0
- package/.claude/skills/command-guide/SKILL.md +388 -0
- package/.claude/skills/command-guide/UPDATE-GUIDELINE.md +592 -0
- package/.claude/skills/command-guide/guides/cli-tools-guide.md +410 -0
- package/.claude/skills/command-guide/guides/examples.md +537 -0
- package/.claude/skills/command-guide/guides/getting-started.md +242 -0
- package/.claude/skills/command-guide/guides/implementation-details.md +1010 -0
- package/.claude/skills/command-guide/guides/index-structure.md +326 -0
- package/.claude/skills/command-guide/guides/troubleshooting.md +92 -0
- package/.claude/skills/command-guide/guides/ui-design-workflow-guide.md +316 -0
- package/.claude/skills/command-guide/guides/workflow-patterns.md +662 -0
- package/.claude/skills/command-guide/index/all-commands.json +783 -0
- package/.claude/skills/command-guide/index/by-category.json +811 -0
- package/.claude/skills/command-guide/index/by-use-case.json +797 -0
- package/.claude/skills/command-guide/index/command-relationships.json +307 -0
- package/.claude/skills/command-guide/index/essential-commands.json +123 -0
- package/.claude/skills/command-guide/reference/agents/action-planning-agent.md +722 -0
- package/.claude/skills/command-guide/reference/agents/cli-execution-agent.md +270 -0
- package/.claude/skills/command-guide/reference/agents/cli-explore-agent.md +182 -0
- package/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md +396 -0
- package/.claude/skills/command-guide/reference/agents/cli-planning-agent.md +558 -0
- package/.claude/skills/command-guide/reference/agents/code-developer.md +310 -0
- package/.claude/skills/command-guide/reference/agents/conceptual-planning-agent.md +328 -0
- package/.claude/skills/command-guide/reference/agents/context-search-agent.md +577 -0
- package/.claude/skills/command-guide/reference/agents/doc-generator.md +330 -0
- package/.claude/skills/command-guide/reference/agents/memory-bridge.md +94 -0
- package/.claude/skills/command-guide/reference/agents/test-context-search-agent.md +399 -0
- package/.claude/skills/command-guide/reference/agents/test-fix-agent.md +343 -0
- package/.claude/skills/command-guide/reference/agents/ui-design-agent.md +593 -0
- package/.claude/skills/command-guide/reference/agents/universal-executor.md +131 -0
- package/.claude/skills/command-guide/reference/commands/cli/cli-init.md +440 -0
- package/.claude/skills/command-guide/reference/commands/enhance-prompt.md +93 -0
- package/.claude/skills/command-guide/reference/commands/memory/code-map-memory.md +687 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs-full-cli.md +471 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs-related-cli.md +386 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs.md +610 -0
- package/.claude/skills/command-guide/reference/commands/memory/load-skill-memory.md +182 -0
- package/.claude/skills/command-guide/reference/commands/memory/load.md +240 -0
- package/.claude/skills/command-guide/reference/commands/memory/skill-memory.md +525 -0
- package/.claude/skills/command-guide/reference/commands/memory/style-skill-memory.md +396 -0
- package/.claude/skills/command-guide/reference/commands/memory/tech-research.md +477 -0
- package/.claude/skills/command-guide/reference/commands/memory/update-full.md +332 -0
- package/.claude/skills/command-guide/reference/commands/memory/update-related.md +332 -0
- package/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md +517 -0
- package/.claude/skills/command-guide/reference/commands/task/breakdown.md +204 -0
- package/.claude/skills/command-guide/reference/commands/task/create.md +152 -0
- package/.claude/skills/command-guide/reference/commands/task/execute.md +270 -0
- package/.claude/skills/command-guide/reference/commands/task/replan.md +437 -0
- package/.claude/skills/command-guide/reference/commands/version.md +254 -0
- package/.claude/skills/command-guide/reference/commands/workflow/action-plan-verify.md +447 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/api-designer.md +585 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/artifacts.md +604 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/auto-parallel.md +466 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/data-architect.md +220 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-manager.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-owner.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/scrum-master.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/subject-matter-expert.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/synthesis.md +496 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/system-architect.md +387 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ui-designer.md +221 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ux-expert.md +221 -0
- package/.claude/skills/command-guide/reference/commands/workflow/execute.md +460 -0
- package/.claude/skills/command-guide/reference/commands/workflow/init.md +164 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md +634 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-fix.md +602 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-plan.md +582 -0
- package/.claude/skills/command-guide/reference/commands/workflow/plan.md +551 -0
- package/.claude/skills/command-guide/reference/commands/workflow/replan.md +515 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-fix.md +646 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-module-cycle.md +795 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-session-cycle.md +805 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review.md +291 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/complete.md +500 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/list.md +96 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/resume.md +61 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/start.md +180 -0
- package/.claude/skills/command-guide/reference/commands/workflow/status.md +352 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tdd-plan.md +460 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md +386 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-cycle-execute.md +498 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md +699 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-gen.md +529 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md +680 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md +434 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md +151 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md +518 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/tdd-coverage-analysis.md +309 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md +163 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-context-gather.md +235 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md +256 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/animation-extract.md +1150 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/codify-style.md +652 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/design-sync.md +454 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/explore-auto.md +678 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/generate.md +504 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/imitate-auto.md +745 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md +537 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/layout-extract.md +788 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/reference-page-generator.md +356 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/style-extract.md +773 -0
- package/.claude/skills/command-guide/scripts/analyze_commands.py +502 -0
- package/.claude/skills/command-guide/scripts/update-index.sh +130 -0
- package/.claude/skills/command-guide/templates/issue-bug.md +104 -0
- package/.claude/skills/command-guide/templates/issue-diagnosis.md +275 -0
- package/.claude/skills/command-guide/templates/issue-feature.md +97 -0
- package/.claude/skills/command-guide/templates/issue-question.md +141 -0
- package/.claude/skills/prompt-enhancer/SKILL.md +124 -0
- package/.claude/workflows/_template-compare-matrix.html +692 -0
- package/.claude/workflows/cli-templates/fix-plan-template.json +75 -0
- package/.claude/workflows/cli-templates/fix-progress-template.json +48 -0
- package/.claude/workflows/cli-templates/memory/style-skill-memory/skill-md-template.md +299 -0
- package/.claude/workflows/cli-templates/planning-roles/data-architect.md +120 -0
- package/.claude/workflows/cli-templates/planning-roles/product-manager.md +119 -0
- package/.claude/workflows/cli-templates/planning-roles/product-owner.md +261 -0
- package/.claude/workflows/cli-templates/planning-roles/scrum-master.md +186 -0
- package/.claude/workflows/cli-templates/planning-roles/subject-matter-expert.md +281 -0
- package/.claude/workflows/cli-templates/planning-roles/synthesis-role.md +414 -0
- package/.claude/workflows/cli-templates/planning-roles/system-architect.md +106 -0
- package/.claude/workflows/cli-templates/planning-roles/test-strategist.md +124 -0
- package/.claude/workflows/cli-templates/planning-roles/ui-designer.md +379 -0
- package/.claude/workflows/cli-templates/planning-roles/ux-expert.md +240 -0
- package/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt +127 -0
- package/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt +115 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-patterns.txt +37 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-analyze-technical-document.txt +33 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-review-architecture.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-review-code-quality.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-analyze-performance.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-assess-security-risks.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-review-quality-standards.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/development/02-generate-tests.txt +70 -0
- package/.claude/workflows/cli-templates/prompts/development/02-implement-component-ui.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/development/02-implement-feature.txt +58 -0
- package/.claude/workflows/cli-templates/prompts/development/02-refactor-codebase.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/development/03-debug-runtime-issues.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/documentation/api.txt +15 -0
- package/.claude/workflows/cli-templates/prompts/documentation/folder-navigation.txt +27 -0
- package/.claude/workflows/cli-templates/prompts/documentation/module-readme.txt +49 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-architecture.txt +41 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-examples.txt +35 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-readme.txt +35 -0
- package/.claude/workflows/cli-templates/prompts/memory/02-document-module-structure.txt +165 -0
- package/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt +109 -0
- package/.claude/workflows/cli-templates/prompts/planning/02-breakdown-task-steps.txt +30 -0
- package/.claude/workflows/cli-templates/prompts/planning/02-design-component-spec.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/planning/03-evaluate-concept-feasibility.txt +127 -0
- package/.claude/workflows/cli-templates/prompts/planning/03-plan-migration-strategy.txt +30 -0
- package/.claude/workflows/cli-templates/prompts/tech/tech-module-format.txt +359 -0
- package/.claude/workflows/cli-templates/prompts/tech/tech-skill-index.txt +185 -0
- package/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt +179 -0
- package/.claude/workflows/cli-templates/prompts/universal/00-universal-creative-style.txt +95 -0
- package/.claude/workflows/cli-templates/prompts/universal/00-universal-rigorous-style.txt +92 -0
- package/.claude/workflows/cli-templates/prompts/verification/codex-technical.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/verification/cross-validation.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/verification/gemini-strategic.txt +27 -0
- package/.claude/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt +224 -0
- package/.claude/workflows/cli-templates/prompts/workflow/codex-feasibility-validation.txt +176 -0
- package/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt +131 -0
- package/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt +286 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-aggregation.txt +172 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt +98 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-index.txt +224 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt +98 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-sessions-timeline.txt +53 -0
- package/.claude/workflows/cli-templates/prompts/workflow/task-json-agent-mode.txt +123 -0
- package/.claude/workflows/cli-templates/prompts/workflow/task-json-cli-mode.txt +182 -0
- package/.claude/workflows/cli-templates/schemas/diagnosis-json-schema.json +234 -0
- package/.claude/workflows/cli-templates/schemas/explore-json-schema.json +124 -0
- package/.claude/workflows/cli-templates/schemas/fix-plan-json-schema.json +273 -0
- package/.claude/workflows/cli-templates/schemas/plan-json-schema.json +219 -0
- package/.claude/workflows/cli-templates/schemas/project-json-schema.json +221 -0
- package/.claude/workflows/cli-templates/schemas/review-deep-dive-results-schema.json +82 -0
- package/.claude/workflows/cli-templates/schemas/review-dimension-results-schema.json +51 -0
- package/.claude/workflows/cli-templates/tech-stacks/go-dev.md +91 -0
- package/.claude/workflows/cli-templates/tech-stacks/java-dev.md +107 -0
- package/.claude/workflows/cli-templates/tech-stacks/javascript-dev.md +58 -0
- package/.claude/workflows/cli-templates/tech-stacks/python-dev.md +79 -0
- package/.claude/workflows/cli-templates/tech-stacks/react-dev.md +103 -0
- package/.claude/workflows/cli-templates/tech-stacks/typescript-dev.md +83 -0
- package/.claude/workflows/cli-templates/ui-design/systems/animation-tokens.json +247 -0
- package/.claude/workflows/cli-templates/ui-design/systems/design-tokens.json +342 -0
- package/.claude/workflows/cli-templates/ui-design/systems/layout-templates.json +145 -0
- package/.claude/workflows/context-search-strategy.md +77 -0
- package/.claude/workflows/intelligent-tools-strategy.md +662 -0
- package/.claude/workflows/review-directory-specification.md +336 -0
- package/.claude/workflows/task-core.md +214 -0
- package/.claude/workflows/tool-strategy.md +71 -0
- package/.claude/workflows/workflow-architecture.md +942 -0
- package/.codex/AGENTS.md +330 -0
- package/.gemini/GEMINI.md +164 -0
- package/.qwen/QWEN.md +164 -0
- package/CLAUDE.md +91 -0
- package/LICENSE +21 -0
- package/README.md +219 -0
- package/ccw/README.md +121 -0
- package/ccw/bin/ccw.js +10 -0
- package/ccw/src/cli.js +100 -0
- package/ccw/src/commands/install.js +324 -0
- package/ccw/src/commands/list.js +37 -0
- package/ccw/src/commands/serve.js +67 -0
- package/ccw/src/commands/uninstall.js +238 -0
- package/ccw/src/commands/upgrade.js +307 -0
- package/ccw/src/commands/view.js +14 -0
- package/ccw/src/core/dashboard-generator-patch.js +29 -0
- package/ccw/src/core/dashboard-generator.js +667 -0
- package/ccw/src/core/data-aggregator.js +409 -0
- package/ccw/src/core/lite-scanner.js +290 -0
- package/ccw/src/core/manifest.js +201 -0
- package/ccw/src/core/server.js +1327 -0
- package/ccw/src/core/server.js.bak +385 -0
- package/ccw/src/core/server_original.bak +385 -0
- package/ccw/src/core/session-scanner.js +235 -0
- package/ccw/src/index.js +9 -0
- package/ccw/src/templates/dashboard-js/api.js +200 -0
- package/ccw/src/templates/dashboard-js/components/_conflict_tab.js +112 -0
- package/ccw/src/templates/dashboard-js/components/_exp_helpers.js +54 -0
- package/ccw/src/templates/dashboard-js/components/_review_tab.js +640 -0
- package/ccw/src/templates/dashboard-js/components/carousel.js +398 -0
- package/ccw/src/templates/dashboard-js/components/flowchart.js +493 -0
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +273 -0
- package/ccw/src/templates/dashboard-js/components/mcp-manager.js +506 -0
- package/ccw/src/templates/dashboard-js/components/modals.js +260 -0
- package/ccw/src/templates/dashboard-js/components/navigation.js +239 -0
- package/ccw/src/templates/dashboard-js/components/notifications.js +194 -0
- package/ccw/src/templates/dashboard-js/components/sidebar.js +31 -0
- package/ccw/src/templates/dashboard-js/components/tabs-context.js +1093 -0
- package/ccw/src/templates/dashboard-js/components/tabs-other.js +273 -0
- package/ccw/src/templates/dashboard-js/components/task-drawer-core.js +477 -0
- package/ccw/src/templates/dashboard-js/components/task-drawer-renderers.js +447 -0
- package/ccw/src/templates/dashboard-js/components/theme.js +21 -0
- package/ccw/src/templates/dashboard-js/main.js +57 -0
- package/ccw/src/templates/dashboard-js/state.js +37 -0
- package/ccw/src/templates/dashboard-js/utils.js +153 -0
- package/ccw/src/templates/dashboard-js/views/fix-session.js +180 -0
- package/ccw/src/templates/dashboard-js/views/home.js +193 -0
- package/ccw/src/templates/dashboard-js/views/hook-manager.js +387 -0
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +390 -0
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +271 -0
- package/ccw/src/templates/dashboard-js/views/project-overview.js +246 -0
- package/ccw/src/templates/dashboard-js/views/review-session.js +711 -0
- package/ccw/src/templates/dashboard-js/views/session-detail.js +770 -0
- package/ccw/src/templates/dashboard.css +7660 -0
- package/ccw/src/templates/dashboard.html +630 -0
- package/ccw/src/templates/dashboard_tailwind.html +42 -0
- package/ccw/src/templates/dashboard_test.html +37 -0
- package/ccw/src/templates/review-cycle-dashboard.html +1930 -0
- package/ccw/src/templates/tailwind-base.css +212 -0
- package/ccw/src/templates/workflow-dashboard.html +401 -0
- package/ccw/src/utils/browser-launcher.js +49 -0
- package/ccw/src/utils/file-utils.js +48 -0
- package/ccw/src/utils/path-resolver.js +279 -0
- package/ccw/src/utils/ui.js +148 -0
- package/package.json +66 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
// ============================================
|
|
2
|
+
// LITE TASKS VIEW
|
|
3
|
+
// ============================================
|
|
4
|
+
// Lite-plan and lite-fix task list and detail rendering
|
|
5
|
+
|
|
6
|
+
function renderLiteTasks() {
|
|
7
|
+
const container = document.getElementById('mainContent');
|
|
8
|
+
|
|
9
|
+
const liteTasks = workflowData.liteTasks || {};
|
|
10
|
+
const sessions = currentLiteType === 'lite-plan'
|
|
11
|
+
? liteTasks.litePlan || []
|
|
12
|
+
: liteTasks.liteFix || [];
|
|
13
|
+
|
|
14
|
+
if (sessions.length === 0) {
|
|
15
|
+
container.innerHTML = `
|
|
16
|
+
<div class="empty-state">
|
|
17
|
+
<div class="empty-icon">⚡</div>
|
|
18
|
+
<div class="empty-title">No ${currentLiteType} Sessions</div>
|
|
19
|
+
<div class="empty-text">No sessions found in .workflow/.${currentLiteType}/</div>
|
|
20
|
+
</div>
|
|
21
|
+
`;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
container.innerHTML = `<div class="sessions-grid">${sessions.map(session => renderLiteTaskCard(session)).join('')}</div>`;
|
|
26
|
+
|
|
27
|
+
// Initialize collapsible sections
|
|
28
|
+
document.querySelectorAll('.collapsible-header').forEach(header => {
|
|
29
|
+
header.addEventListener('click', () => toggleSection(header));
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Render flowcharts for expanded tasks
|
|
33
|
+
sessions.forEach(session => {
|
|
34
|
+
session.tasks?.forEach(task => {
|
|
35
|
+
if (task.flow_control?.implementation_approach) {
|
|
36
|
+
renderFlowchartForTask(session.id, task);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function renderLiteTaskCard(session) {
|
|
43
|
+
const tasks = session.tasks || [];
|
|
44
|
+
|
|
45
|
+
// Store session data for detail page
|
|
46
|
+
const sessionKey = `lite-${session.type}-${session.id}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
47
|
+
liteTaskDataStore[sessionKey] = session;
|
|
48
|
+
|
|
49
|
+
return `
|
|
50
|
+
<div class="session-card lite-task-card" onclick="showLiteTaskDetailPage('${sessionKey}')" style="cursor: pointer;">
|
|
51
|
+
<div class="session-header">
|
|
52
|
+
<div class="session-title">${escapeHtml(session.id)}</div>
|
|
53
|
+
<span class="session-status ${session.type}">
|
|
54
|
+
${session.type === 'lite-plan' ? '📝 PLAN' : '🔧 FIX'}
|
|
55
|
+
</span>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="session-body">
|
|
58
|
+
<div class="session-meta">
|
|
59
|
+
<span class="session-meta-item">📅 ${formatDate(session.createdAt)}</span>
|
|
60
|
+
<span class="session-meta-item">📋 ${tasks.length} tasks</span>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Lite Task Detail Page
|
|
68
|
+
function showLiteTaskDetailPage(sessionKey) {
|
|
69
|
+
const session = liteTaskDataStore[sessionKey];
|
|
70
|
+
if (!session) return;
|
|
71
|
+
|
|
72
|
+
currentView = 'liteTaskDetail';
|
|
73
|
+
currentSessionDetailKey = sessionKey;
|
|
74
|
+
|
|
75
|
+
// Hide stats grid and carousel on detail pages
|
|
76
|
+
hideStatsAndCarousel();
|
|
77
|
+
|
|
78
|
+
// Also store in sessionDataStore for tab switching compatibility
|
|
79
|
+
sessionDataStore[sessionKey] = {
|
|
80
|
+
...session,
|
|
81
|
+
session_id: session.id,
|
|
82
|
+
created_at: session.createdAt,
|
|
83
|
+
path: session.path,
|
|
84
|
+
type: session.type
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const container = document.getElementById('mainContent');
|
|
88
|
+
const tasks = session.tasks || [];
|
|
89
|
+
const plan = session.plan || {};
|
|
90
|
+
const progress = session.progress || { total: 0, completed: 0, percentage: 0 };
|
|
91
|
+
|
|
92
|
+
const completed = tasks.filter(t => t.status === 'completed').length;
|
|
93
|
+
const inProgress = tasks.filter(t => t.status === 'in_progress').length;
|
|
94
|
+
const pending = tasks.filter(t => t.status === 'pending').length;
|
|
95
|
+
|
|
96
|
+
container.innerHTML = `
|
|
97
|
+
<div class="session-detail-page lite-task-detail-page">
|
|
98
|
+
<!-- Header -->
|
|
99
|
+
<div class="detail-header">
|
|
100
|
+
<button class="btn-back" onclick="goBackToLiteTasks()">
|
|
101
|
+
<span class="back-icon">←</span>
|
|
102
|
+
<span>Back to ${session.type === 'lite-plan' ? 'Lite Plan' : 'Lite Fix'}</span>
|
|
103
|
+
</button>
|
|
104
|
+
<div class="detail-title-row">
|
|
105
|
+
<h2 class="detail-session-id">${session.type === 'lite-plan' ? '📝' : '🔧'} ${escapeHtml(session.id)}</h2>
|
|
106
|
+
<div class="detail-badges">
|
|
107
|
+
<span class="session-type-badge ${session.type}">${session.type}</span>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<!-- Session Info Bar -->
|
|
113
|
+
<div class="detail-info-bar">
|
|
114
|
+
<div class="info-item">
|
|
115
|
+
<span class="info-label">Created:</span>
|
|
116
|
+
<span class="info-value">${formatDate(session.createdAt)}</span>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="info-item">
|
|
119
|
+
<span class="info-label">Tasks:</span>
|
|
120
|
+
<span class="info-value">${tasks.length} tasks</span>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<!-- Tab Navigation -->
|
|
125
|
+
<div class="detail-tabs">
|
|
126
|
+
<button class="detail-tab active" data-tab="tasks" onclick="switchLiteDetailTab('tasks')">
|
|
127
|
+
<span class="tab-icon">📋</span>
|
|
128
|
+
<span class="tab-text">Tasks</span>
|
|
129
|
+
<span class="tab-count">${tasks.length}</span>
|
|
130
|
+
</button>
|
|
131
|
+
<button class="detail-tab" data-tab="plan" onclick="switchLiteDetailTab('plan')">
|
|
132
|
+
<span class="tab-icon">📐</span>
|
|
133
|
+
<span class="tab-text">Plan</span>
|
|
134
|
+
</button>
|
|
135
|
+
<button class="detail-tab" data-tab="context" onclick="switchLiteDetailTab('context')">
|
|
136
|
+
<span class="tab-icon">📦</span>
|
|
137
|
+
<span class="tab-text">Context</span>
|
|
138
|
+
</button>
|
|
139
|
+
<button class="detail-tab" data-tab="summary" onclick="switchLiteDetailTab('summary')">
|
|
140
|
+
<span class="tab-icon">📝</span>
|
|
141
|
+
<span class="tab-text">Summary</span>
|
|
142
|
+
</button>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<!-- Tab Content -->
|
|
146
|
+
<div class="detail-tab-content" id="liteDetailTabContent">
|
|
147
|
+
${renderLiteTasksTab(session, tasks, completed, inProgress, pending)}
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
// Initialize collapsible sections
|
|
153
|
+
setTimeout(() => {
|
|
154
|
+
document.querySelectorAll('.collapsible-header').forEach(header => {
|
|
155
|
+
header.addEventListener('click', () => toggleSection(header));
|
|
156
|
+
});
|
|
157
|
+
}, 50);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function goBackToLiteTasks() {
|
|
161
|
+
currentView = 'liteTasks';
|
|
162
|
+
currentSessionDetailKey = null;
|
|
163
|
+
updateContentTitle();
|
|
164
|
+
showStatsAndSearch();
|
|
165
|
+
renderLiteTasks();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function switchLiteDetailTab(tabName) {
|
|
169
|
+
// Update active tab
|
|
170
|
+
document.querySelectorAll('.detail-tab').forEach(tab => {
|
|
171
|
+
tab.classList.toggle('active', tab.dataset.tab === tabName);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
175
|
+
if (!session) return;
|
|
176
|
+
|
|
177
|
+
const contentArea = document.getElementById('liteDetailTabContent');
|
|
178
|
+
const tasks = session.tasks || [];
|
|
179
|
+
const completed = tasks.filter(t => t.status === 'completed').length;
|
|
180
|
+
const inProgress = tasks.filter(t => t.status === 'in_progress').length;
|
|
181
|
+
const pending = tasks.filter(t => t.status === 'pending').length;
|
|
182
|
+
|
|
183
|
+
switch (tabName) {
|
|
184
|
+
case 'tasks':
|
|
185
|
+
contentArea.innerHTML = renderLiteTasksTab(session, tasks, completed, inProgress, pending);
|
|
186
|
+
// Re-initialize collapsible sections
|
|
187
|
+
setTimeout(() => {
|
|
188
|
+
document.querySelectorAll('.collapsible-header').forEach(header => {
|
|
189
|
+
header.addEventListener('click', () => toggleSection(header));
|
|
190
|
+
});
|
|
191
|
+
}, 50);
|
|
192
|
+
break;
|
|
193
|
+
case 'plan':
|
|
194
|
+
contentArea.innerHTML = renderLitePlanTab(session);
|
|
195
|
+
break;
|
|
196
|
+
case 'context':
|
|
197
|
+
loadAndRenderLiteContextTab(session, contentArea);
|
|
198
|
+
break;
|
|
199
|
+
case 'summary':
|
|
200
|
+
loadAndRenderLiteSummaryTab(session, contentArea);
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function renderLiteTasksTab(session, tasks, completed, inProgress, pending) {
|
|
206
|
+
// Populate drawer tasks for click-to-open functionality
|
|
207
|
+
currentDrawerTasks = tasks;
|
|
208
|
+
|
|
209
|
+
if (tasks.length === 0) {
|
|
210
|
+
return `
|
|
211
|
+
<div class="tab-empty-state">
|
|
212
|
+
<div class="empty-icon">📋</div>
|
|
213
|
+
<div class="empty-title">No Tasks</div>
|
|
214
|
+
<div class="empty-text">This session has no tasks defined.</div>
|
|
215
|
+
</div>
|
|
216
|
+
`;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return `
|
|
220
|
+
<div class="tasks-tab-content">
|
|
221
|
+
<div class="tasks-list" id="liteTasksListContent">
|
|
222
|
+
${tasks.map(task => renderLiteTaskDetailItem(session.id, task)).join('')}
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
`;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function renderLiteTaskDetailItem(sessionId, task) {
|
|
229
|
+
const rawTask = task._raw || task;
|
|
230
|
+
const taskJsonId = `task-json-${sessionId}-${task.id}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
231
|
+
taskJsonStore[taskJsonId] = rawTask;
|
|
232
|
+
|
|
233
|
+
// Get preview info for lite tasks
|
|
234
|
+
const action = rawTask.action || '';
|
|
235
|
+
const scope = rawTask.scope || '';
|
|
236
|
+
const modCount = rawTask.modification_points?.length || 0;
|
|
237
|
+
const implCount = rawTask.implementation?.length || 0;
|
|
238
|
+
const acceptCount = rawTask.acceptance?.length || 0;
|
|
239
|
+
|
|
240
|
+
return `
|
|
241
|
+
<div class="detail-task-item-full lite-task-item" onclick="openTaskDrawerForLite('${sessionId}', '${escapeHtml(task.id)}')" style="cursor: pointer;" title="Click to view details">
|
|
242
|
+
<div class="task-item-header-lite">
|
|
243
|
+
<span class="task-id-badge">${escapeHtml(task.id)}</span>
|
|
244
|
+
<span class="task-title">${escapeHtml(task.title || 'Untitled')}</span>
|
|
245
|
+
<button class="btn-view-json" onclick="event.stopPropagation(); showJsonModal('${taskJsonId}', '${escapeHtml(task.id)}')">{ } JSON</button>
|
|
246
|
+
</div>
|
|
247
|
+
<div class="task-item-meta-lite">
|
|
248
|
+
${action ? `<span class="meta-badge action">${escapeHtml(action)}</span>` : ''}
|
|
249
|
+
${scope ? `<span class="meta-badge scope">${escapeHtml(scope)}</span>` : ''}
|
|
250
|
+
${modCount > 0 ? `<span class="meta-badge mods">${modCount} mods</span>` : ''}
|
|
251
|
+
${implCount > 0 ? `<span class="meta-badge impl">${implCount} steps</span>` : ''}
|
|
252
|
+
${acceptCount > 0 ? `<span class="meta-badge accept">${acceptCount} acceptance</span>` : ''}
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
`;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function getMetaPreviewForLite(task, rawTask) {
|
|
259
|
+
const meta = task.meta || {};
|
|
260
|
+
const parts = [];
|
|
261
|
+
if (meta.type || rawTask.action) parts.push(meta.type || rawTask.action);
|
|
262
|
+
if (meta.scope || rawTask.scope) parts.push(meta.scope || rawTask.scope);
|
|
263
|
+
return parts.join(' | ') || 'No meta';
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function openTaskDrawerForLite(sessionId, taskId) {
|
|
267
|
+
const session = liteTaskDataStore[currentSessionDetailKey];
|
|
268
|
+
if (!session) return;
|
|
269
|
+
|
|
270
|
+
const task = session.tasks?.find(t => t.id === taskId);
|
|
271
|
+
if (!task) return;
|
|
272
|
+
|
|
273
|
+
// Set current drawer tasks and session context
|
|
274
|
+
currentDrawerTasks = session.tasks || [];
|
|
275
|
+
window._currentDrawerSession = session;
|
|
276
|
+
|
|
277
|
+
document.getElementById('drawerTaskTitle').textContent = task.title || taskId;
|
|
278
|
+
// Use dedicated lite task drawer renderer
|
|
279
|
+
document.getElementById('drawerContent').innerHTML = renderLiteTaskDrawerContent(task, session);
|
|
280
|
+
document.getElementById('taskDetailDrawer').classList.add('open');
|
|
281
|
+
document.getElementById('drawerOverlay').classList.add('active');
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function renderLitePlanTab(session) {
|
|
285
|
+
const plan = session.plan;
|
|
286
|
+
|
|
287
|
+
if (!plan) {
|
|
288
|
+
return `
|
|
289
|
+
<div class="tab-empty-state">
|
|
290
|
+
<div class="empty-icon">📐</div>
|
|
291
|
+
<div class="empty-title">No Plan Data</div>
|
|
292
|
+
<div class="empty-text">No plan.json found for this session.</div>
|
|
293
|
+
</div>
|
|
294
|
+
`;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return `
|
|
298
|
+
<div class="plan-tab-content">
|
|
299
|
+
<!-- Summary -->
|
|
300
|
+
${plan.summary ? `
|
|
301
|
+
<div class="plan-section">
|
|
302
|
+
<h4 class="plan-section-title">📋 Summary</h4>
|
|
303
|
+
<p class="plan-summary-text">${escapeHtml(plan.summary)}</p>
|
|
304
|
+
</div>
|
|
305
|
+
` : ''}
|
|
306
|
+
|
|
307
|
+
<!-- Approach -->
|
|
308
|
+
${plan.approach ? `
|
|
309
|
+
<div class="plan-section">
|
|
310
|
+
<h4 class="plan-section-title">🎯 Approach</h4>
|
|
311
|
+
<p class="plan-approach-text">${escapeHtml(plan.approach)}</p>
|
|
312
|
+
</div>
|
|
313
|
+
` : ''}
|
|
314
|
+
|
|
315
|
+
<!-- Focus Paths -->
|
|
316
|
+
${plan.focus_paths?.length ? `
|
|
317
|
+
<div class="plan-section">
|
|
318
|
+
<h4 class="plan-section-title">📁 Focus Paths</h4>
|
|
319
|
+
<div class="path-tags">
|
|
320
|
+
${plan.focus_paths.map(p => `<span class="path-tag">${escapeHtml(p)}</span>`).join('')}
|
|
321
|
+
</div>
|
|
322
|
+
</div>
|
|
323
|
+
` : ''}
|
|
324
|
+
|
|
325
|
+
<!-- Metadata -->
|
|
326
|
+
<div class="plan-section">
|
|
327
|
+
<h4 class="plan-section-title">ℹ️ Metadata</h4>
|
|
328
|
+
<div class="plan-meta-grid">
|
|
329
|
+
${plan.estimated_time ? `<div class="meta-item"><span class="meta-label">Estimated Time:</span> ${escapeHtml(plan.estimated_time)}</div>` : ''}
|
|
330
|
+
${plan.complexity ? `<div class="meta-item"><span class="meta-label">Complexity:</span> ${escapeHtml(plan.complexity)}</div>` : ''}
|
|
331
|
+
${plan.recommended_execution ? `<div class="meta-item"><span class="meta-label">Execution:</span> ${escapeHtml(plan.recommended_execution)}</div>` : ''}
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
|
|
335
|
+
<!-- Raw JSON -->
|
|
336
|
+
<div class="plan-section">
|
|
337
|
+
<h4 class="plan-section-title">{ } Raw JSON</h4>
|
|
338
|
+
<pre class="json-content">${escapeHtml(JSON.stringify(plan, null, 2))}</pre>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
`;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
async function loadAndRenderLiteContextTab(session, contentArea) {
|
|
345
|
+
contentArea.innerHTML = '<div class="tab-loading">Loading context data...</div>';
|
|
346
|
+
|
|
347
|
+
try {
|
|
348
|
+
if (window.SERVER_MODE && session.path) {
|
|
349
|
+
const response = await fetch(`/api/session-detail?path=${encodeURIComponent(session.path)}&type=context`);
|
|
350
|
+
if (response.ok) {
|
|
351
|
+
const data = await response.json();
|
|
352
|
+
contentArea.innerHTML = renderLiteContextContent(data.context, data.explorations, session);
|
|
353
|
+
|
|
354
|
+
// Re-initialize collapsible sections for explorations (scoped to contentArea)
|
|
355
|
+
initCollapsibleSections(contentArea);
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
// Fallback: show plan context if available
|
|
360
|
+
contentArea.innerHTML = renderLiteContextContent(null, null, session);
|
|
361
|
+
initCollapsibleSections(contentArea);
|
|
362
|
+
} catch (err) {
|
|
363
|
+
contentArea.innerHTML = `<div class="tab-error">Failed to load context: ${err.message}</div>`;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
async function loadAndRenderLiteSummaryTab(session, contentArea) {
|
|
368
|
+
contentArea.innerHTML = '<div class="tab-loading">Loading summaries...</div>';
|
|
369
|
+
|
|
370
|
+
try {
|
|
371
|
+
if (window.SERVER_MODE && session.path) {
|
|
372
|
+
const response = await fetch(`/api/session-detail?path=${encodeURIComponent(session.path)}&type=summary`);
|
|
373
|
+
if (response.ok) {
|
|
374
|
+
const data = await response.json();
|
|
375
|
+
contentArea.innerHTML = renderSummaryContent(data.summaries);
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
// Fallback
|
|
380
|
+
contentArea.innerHTML = `
|
|
381
|
+
<div class="tab-empty-state">
|
|
382
|
+
<div class="empty-icon">📝</div>
|
|
383
|
+
<div class="empty-title">No Summaries</div>
|
|
384
|
+
<div class="empty-text">No summaries found in .summaries/</div>
|
|
385
|
+
</div>
|
|
386
|
+
`;
|
|
387
|
+
} catch (err) {
|
|
388
|
+
contentArea.innerHTML = `<div class="tab-error">Failed to load summaries: ${err.message}</div>`;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
// MCP Manager View
|
|
2
|
+
// Renders the MCP server management interface
|
|
3
|
+
|
|
4
|
+
async function renderMcpManager() {
|
|
5
|
+
const container = document.getElementById('mainContent');
|
|
6
|
+
if (!container) return;
|
|
7
|
+
|
|
8
|
+
// Hide stats grid and search for MCP view
|
|
9
|
+
const statsGrid = document.getElementById('statsGrid');
|
|
10
|
+
const searchInput = document.getElementById('searchInput');
|
|
11
|
+
if (statsGrid) statsGrid.style.display = 'none';
|
|
12
|
+
if (searchInput) searchInput.parentElement.style.display = 'none';
|
|
13
|
+
|
|
14
|
+
// Load MCP config if not already loaded
|
|
15
|
+
if (!mcpConfig) {
|
|
16
|
+
await loadMcpConfig();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const currentPath = projectPath.replace(/\//g, '\\');
|
|
20
|
+
const projectData = mcpAllProjects[currentPath] || {};
|
|
21
|
+
const projectServers = projectData.mcpServers || {};
|
|
22
|
+
const disabledServers = projectData.disabledMcpServers || [];
|
|
23
|
+
|
|
24
|
+
// Get all available servers from all projects
|
|
25
|
+
const allAvailableServers = getAllAvailableMcpServers();
|
|
26
|
+
|
|
27
|
+
// Separate current project servers and available servers
|
|
28
|
+
const currentProjectServerNames = Object.keys(projectServers);
|
|
29
|
+
const otherAvailableServers = Object.entries(allAvailableServers)
|
|
30
|
+
.filter(([name]) => !currentProjectServerNames.includes(name));
|
|
31
|
+
|
|
32
|
+
container.innerHTML = `
|
|
33
|
+
<div class="mcp-manager">
|
|
34
|
+
<!-- Current Project MCP Servers -->
|
|
35
|
+
<div class="mcp-section mb-6">
|
|
36
|
+
<div class="flex items-center justify-between mb-4">
|
|
37
|
+
<div class="flex items-center gap-3">
|
|
38
|
+
<h3 class="text-lg font-semibold text-foreground">Current Project MCP Servers</h3>
|
|
39
|
+
<button class="px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-lg hover:opacity-90 transition-opacity flex items-center gap-1"
|
|
40
|
+
onclick="openMcpCreateModal()">
|
|
41
|
+
<span>+</span> New Server
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
<span class="text-sm text-muted-foreground">${currentProjectServerNames.length} servers configured</span>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
${currentProjectServerNames.length === 0 ? `
|
|
48
|
+
<div class="mcp-empty-state bg-card border border-border rounded-lg p-6 text-center">
|
|
49
|
+
<div class="text-3xl mb-3">🔌</div>
|
|
50
|
+
<p class="text-muted-foreground">No MCP servers configured for this project</p>
|
|
51
|
+
<p class="text-sm text-muted-foreground mt-1">Add servers from the available list below</p>
|
|
52
|
+
</div>
|
|
53
|
+
` : `
|
|
54
|
+
<div class="mcp-server-grid grid gap-3">
|
|
55
|
+
${currentProjectServerNames.map(serverName => {
|
|
56
|
+
const serverConfig = projectServers[serverName];
|
|
57
|
+
const isEnabled = !disabledServers.includes(serverName);
|
|
58
|
+
return renderMcpServerCard(serverName, serverConfig, isEnabled, true);
|
|
59
|
+
}).join('')}
|
|
60
|
+
</div>
|
|
61
|
+
`}
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<!-- Available MCP Servers from Other Projects -->
|
|
65
|
+
<div class="mcp-section">
|
|
66
|
+
<div class="flex items-center justify-between mb-4">
|
|
67
|
+
<h3 class="text-lg font-semibold text-foreground">Available from Other Projects</h3>
|
|
68
|
+
<span class="text-sm text-muted-foreground">${otherAvailableServers.length} servers available</span>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
${otherAvailableServers.length === 0 ? `
|
|
72
|
+
<div class="mcp-empty-state bg-card border border-border rounded-lg p-6 text-center">
|
|
73
|
+
<p class="text-muted-foreground">No additional MCP servers found in other projects</p>
|
|
74
|
+
</div>
|
|
75
|
+
` : `
|
|
76
|
+
<div class="mcp-server-grid grid gap-3">
|
|
77
|
+
${otherAvailableServers.map(([serverName, serverInfo]) => {
|
|
78
|
+
return renderAvailableServerCard(serverName, serverInfo);
|
|
79
|
+
}).join('')}
|
|
80
|
+
</div>
|
|
81
|
+
`}
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<!-- All Projects MCP Overview Table -->
|
|
85
|
+
<div class="mcp-section mt-6">
|
|
86
|
+
<div class="flex items-center justify-between mb-4">
|
|
87
|
+
<h3 class="text-lg font-semibold text-foreground">All Projects MCP Overview</h3>
|
|
88
|
+
<span class="text-sm text-muted-foreground">${Object.keys(mcpAllProjects).length} projects</span>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div class="mcp-projects-table bg-card border border-border rounded-lg overflow-hidden">
|
|
92
|
+
<table class="w-full">
|
|
93
|
+
<thead class="bg-muted/50">
|
|
94
|
+
<tr>
|
|
95
|
+
<th class="text-left px-4 py-3 text-sm font-semibold text-foreground border-b border-border">Project</th>
|
|
96
|
+
<th class="text-left px-4 py-3 text-sm font-semibold text-foreground border-b border-border">MCP Servers</th>
|
|
97
|
+
<th class="text-center px-4 py-3 text-sm font-semibold text-foreground border-b border-border w-24">Status</th>
|
|
98
|
+
</tr>
|
|
99
|
+
</thead>
|
|
100
|
+
<tbody>
|
|
101
|
+
${Object.entries(mcpAllProjects).map(([path, config]) => {
|
|
102
|
+
const servers = config.mcpServers || {};
|
|
103
|
+
const projectDisabled = config.disabledMcpServers || [];
|
|
104
|
+
const serverNames = Object.keys(servers);
|
|
105
|
+
const isCurrentProject = path === currentPath;
|
|
106
|
+
const enabledCount = serverNames.filter(s => !projectDisabled.includes(s)).length;
|
|
107
|
+
|
|
108
|
+
return `
|
|
109
|
+
<tr class="border-b border-border last:border-b-0 ${isCurrentProject ? 'bg-primary/5' : 'hover:bg-hover/50'}">
|
|
110
|
+
<td class="px-4 py-3">
|
|
111
|
+
<div class="flex items-center gap-2 min-w-0">
|
|
112
|
+
<span class="text-base shrink-0">${isCurrentProject ? '📍' : '📁'}</span>
|
|
113
|
+
<div class="min-w-0">
|
|
114
|
+
<div class="font-medium text-foreground truncate text-sm" title="${escapeHtml(path)}">
|
|
115
|
+
${escapeHtml(path.split('\\').pop() || path)}
|
|
116
|
+
${isCurrentProject ? '<span class="ml-2 text-xs text-primary font-medium">(Current)</span>' : ''}
|
|
117
|
+
</div>
|
|
118
|
+
<div class="text-xs text-muted-foreground truncate">${escapeHtml(path)}</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</td>
|
|
122
|
+
<td class="px-4 py-3">
|
|
123
|
+
<div class="flex flex-wrap gap-1.5">
|
|
124
|
+
${serverNames.length === 0
|
|
125
|
+
? '<span class="text-xs text-muted-foreground italic">No MCP servers</span>'
|
|
126
|
+
: serverNames.map(serverName => {
|
|
127
|
+
const isEnabled = !projectDisabled.includes(serverName);
|
|
128
|
+
return `
|
|
129
|
+
<span class="inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full ${isEnabled ? 'bg-success-light text-success' : 'bg-hover text-muted-foreground'}">
|
|
130
|
+
<span class="w-1.5 h-1.5 rounded-full ${isEnabled ? 'bg-success' : 'bg-muted-foreground'}"></span>
|
|
131
|
+
${escapeHtml(serverName)}
|
|
132
|
+
</span>
|
|
133
|
+
`;
|
|
134
|
+
}).join('')
|
|
135
|
+
}
|
|
136
|
+
</div>
|
|
137
|
+
</td>
|
|
138
|
+
<td class="px-4 py-3 text-center">
|
|
139
|
+
<span class="inline-flex items-center px-2 py-1 text-xs font-semibold rounded-full ${serverNames.length > 0 ? 'bg-success-light text-success' : 'bg-hover text-muted-foreground'}">
|
|
140
|
+
${enabledCount}/${serverNames.length}
|
|
141
|
+
</span>
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
`;
|
|
145
|
+
}).join('')}
|
|
146
|
+
</tbody>
|
|
147
|
+
</table>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
`;
|
|
152
|
+
|
|
153
|
+
// Attach event listeners for toggle switches
|
|
154
|
+
attachMcpEventListeners();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function renderMcpServerCard(serverName, serverConfig, isEnabled, isInCurrentProject) {
|
|
158
|
+
const command = serverConfig.command || 'N/A';
|
|
159
|
+
const args = serverConfig.args || [];
|
|
160
|
+
const hasEnv = serverConfig.env && Object.keys(serverConfig.env).length > 0;
|
|
161
|
+
|
|
162
|
+
return `
|
|
163
|
+
<div class="mcp-server-card bg-card border border-border rounded-lg p-4 hover:shadow-md transition-all ${isEnabled ? '' : 'opacity-60'}">
|
|
164
|
+
<div class="flex items-start justify-between mb-3">
|
|
165
|
+
<div class="flex items-center gap-2">
|
|
166
|
+
<span class="text-xl">${isEnabled ? '🟢' : '🔴'}</span>
|
|
167
|
+
<h4 class="font-semibold text-foreground">${escapeHtml(serverName)}</h4>
|
|
168
|
+
</div>
|
|
169
|
+
<label class="mcp-toggle relative inline-flex items-center cursor-pointer">
|
|
170
|
+
<input type="checkbox" class="sr-only peer"
|
|
171
|
+
${isEnabled ? 'checked' : ''}
|
|
172
|
+
data-server-name="${escapeHtml(serverName)}"
|
|
173
|
+
data-action="toggle">
|
|
174
|
+
<div class="w-9 h-5 bg-hover peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-success"></div>
|
|
175
|
+
</label>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<div class="mcp-server-details text-sm space-y-1">
|
|
179
|
+
<div class="flex items-center gap-2 text-muted-foreground">
|
|
180
|
+
<span class="font-mono text-xs bg-muted px-1.5 py-0.5 rounded">cmd</span>
|
|
181
|
+
<span class="truncate" title="${escapeHtml(command)}">${escapeHtml(command)}</span>
|
|
182
|
+
</div>
|
|
183
|
+
${args.length > 0 ? `
|
|
184
|
+
<div class="flex items-start gap-2 text-muted-foreground">
|
|
185
|
+
<span class="font-mono text-xs bg-muted px-1.5 py-0.5 rounded shrink-0">args</span>
|
|
186
|
+
<span class="text-xs font-mono truncate" title="${escapeHtml(args.join(' '))}">${escapeHtml(args.slice(0, 3).join(' '))}${args.length > 3 ? '...' : ''}</span>
|
|
187
|
+
</div>
|
|
188
|
+
` : ''}
|
|
189
|
+
${hasEnv ? `
|
|
190
|
+
<div class="flex items-center gap-2 text-muted-foreground">
|
|
191
|
+
<span class="font-mono text-xs bg-muted px-1.5 py-0.5 rounded">env</span>
|
|
192
|
+
<span class="text-xs">${Object.keys(serverConfig.env).length} variables</span>
|
|
193
|
+
</div>
|
|
194
|
+
` : ''}
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
${isInCurrentProject ? `
|
|
198
|
+
<div class="mt-3 pt-3 border-t border-border">
|
|
199
|
+
<button class="text-xs text-destructive hover:text-destructive/80 transition-colors"
|
|
200
|
+
data-server-name="${escapeHtml(serverName)}"
|
|
201
|
+
data-action="remove">
|
|
202
|
+
Remove from project
|
|
203
|
+
</button>
|
|
204
|
+
</div>
|
|
205
|
+
` : ''}
|
|
206
|
+
</div>
|
|
207
|
+
`;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function renderAvailableServerCard(serverName, serverInfo) {
|
|
211
|
+
const serverConfig = serverInfo.config;
|
|
212
|
+
const usedIn = serverInfo.usedIn || [];
|
|
213
|
+
const command = serverConfig.command || 'N/A';
|
|
214
|
+
|
|
215
|
+
return `
|
|
216
|
+
<div class="mcp-server-card mcp-server-available bg-card border border-border border-dashed rounded-lg p-4 hover:shadow-md hover:border-solid transition-all">
|
|
217
|
+
<div class="flex items-start justify-between mb-3">
|
|
218
|
+
<div class="flex items-center gap-2">
|
|
219
|
+
<span class="text-xl">⚪</span>
|
|
220
|
+
<h4 class="font-semibold text-foreground">${escapeHtml(serverName)}</h4>
|
|
221
|
+
</div>
|
|
222
|
+
<button class="px-3 py-1 text-xs bg-primary text-primary-foreground rounded hover:opacity-90 transition-opacity"
|
|
223
|
+
data-server-name="${escapeHtml(serverName)}"
|
|
224
|
+
data-server-config='${JSON.stringify(serverConfig).replace(/'/g, "'")}'
|
|
225
|
+
data-action="add">
|
|
226
|
+
Add
|
|
227
|
+
</button>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div class="mcp-server-details text-sm space-y-1">
|
|
231
|
+
<div class="flex items-center gap-2 text-muted-foreground">
|
|
232
|
+
<span class="font-mono text-xs bg-muted px-1.5 py-0.5 rounded">cmd</span>
|
|
233
|
+
<span class="truncate" title="${escapeHtml(command)}">${escapeHtml(command)}</span>
|
|
234
|
+
</div>
|
|
235
|
+
<div class="flex items-center gap-2 text-muted-foreground">
|
|
236
|
+
<span class="text-xs">Used in ${usedIn.length} project${usedIn.length !== 1 ? 's' : ''}</span>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
`;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function attachMcpEventListeners() {
|
|
244
|
+
// Toggle switches
|
|
245
|
+
document.querySelectorAll('.mcp-server-card input[data-action="toggle"]').forEach(input => {
|
|
246
|
+
input.addEventListener('change', async (e) => {
|
|
247
|
+
const serverName = e.target.dataset.serverName;
|
|
248
|
+
const enable = e.target.checked;
|
|
249
|
+
await toggleMcpServer(serverName, enable);
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// Add buttons
|
|
254
|
+
document.querySelectorAll('.mcp-server-card button[data-action="add"]').forEach(btn => {
|
|
255
|
+
btn.addEventListener('click', async (e) => {
|
|
256
|
+
const serverName = e.target.dataset.serverName;
|
|
257
|
+
const serverConfig = JSON.parse(e.target.dataset.serverConfig);
|
|
258
|
+
await copyMcpServerToProject(serverName, serverConfig);
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// Remove buttons
|
|
263
|
+
document.querySelectorAll('.mcp-server-card button[data-action="remove"]').forEach(btn => {
|
|
264
|
+
btn.addEventListener('click', async (e) => {
|
|
265
|
+
const serverName = e.target.dataset.serverName;
|
|
266
|
+
if (confirm(`Remove MCP server "${serverName}" from this project?`)) {
|
|
267
|
+
await removeMcpServerFromProject(serverName);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
}
|