@mycodemap/mycodemap 1.9.0 → 2.7.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/CHANGELOG.md +38 -0
- package/README.md +63 -978
- package/README.zh-CN.md +1096 -0
- package/dist/cli/commands/agent-metrics/human.d.ts +4 -0
- package/dist/cli/commands/agent-metrics/human.d.ts.map +1 -0
- package/dist/cli/commands/agent-metrics/human.js +134 -0
- package/dist/cli/commands/agent-metrics/human.js.map +1 -0
- package/dist/cli/commands/agent-metrics/index.d.ts +15 -0
- package/dist/cli/commands/agent-metrics/index.d.ts.map +1 -0
- package/dist/cli/commands/agent-metrics/index.js +116 -0
- package/dist/cli/commands/agent-metrics/index.js.map +1 -0
- package/dist/cli/commands/analyze-options.d.ts.map +1 -1
- package/dist/cli/commands/analyze-options.js +8 -0
- package/dist/cli/commands/analyze-options.js.map +1 -1
- package/dist/cli/commands/analyze.d.ts +3 -196
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +27 -1162
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/benchmark.d.ts +8 -0
- package/dist/cli/commands/benchmark.d.ts.map +1 -0
- package/dist/cli/commands/benchmark.js +153 -0
- package/dist/cli/commands/benchmark.js.map +1 -0
- package/dist/cli/commands/complexity.d.ts.map +1 -1
- package/dist/cli/commands/complexity.js +62 -95
- package/dist/cli/commands/complexity.js.map +1 -1
- package/dist/cli/commands/deps.d.ts +3 -59
- package/dist/cli/commands/deps.d.ts.map +1 -1
- package/dist/cli/commands/deps.js +25 -331
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +34 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/env-contract.d.ts +3 -0
- package/dist/cli/commands/env-contract.d.ts.map +1 -0
- package/dist/cli/commands/env-contract.js +221 -0
- package/dist/cli/commands/env-contract.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +19 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +735 -89
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/impact.d.ts +4 -38
- package/dist/cli/commands/impact.d.ts.map +1 -1
- package/dist/cli/commands/impact.js +133 -375
- package/dist/cli/commands/impact.js.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +61 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/preview.d.ts +3 -0
- package/dist/cli/commands/preview.d.ts.map +1 -0
- package/dist/cli/commands/preview.js +216 -0
- package/dist/cli/commands/preview.js.map +1 -0
- package/dist/cli/commands/query.d.ts +2 -20
- package/dist/cli/commands/query.d.ts.map +1 -1
- package/dist/cli/commands/query.js +23 -708
- package/dist/cli/commands/query.js.map +1 -1
- package/dist/cli/commands/watch-foreground.d.ts.map +1 -1
- package/dist/cli/commands/watch-foreground.js +5 -1
- package/dist/cli/commands/watch-foreground.js.map +1 -1
- package/dist/cli/config-loader.d.ts.map +1 -1
- package/dist/cli/config-loader.js +51 -13
- package/dist/cli/config-loader.js.map +1 -1
- package/dist/cli/doctor/check-agent.d.ts +3 -0
- package/dist/cli/doctor/check-agent.d.ts.map +1 -0
- package/dist/cli/doctor/check-agent.js +60 -0
- package/dist/cli/doctor/check-agent.js.map +1 -0
- package/dist/cli/doctor/check-env-contract.d.ts +3 -0
- package/dist/cli/doctor/check-env-contract.d.ts.map +1 -0
- package/dist/cli/doctor/check-env-contract.js +96 -0
- package/dist/cli/doctor/check-env-contract.js.map +1 -0
- package/dist/cli/doctor/check-ghost-commands.d.ts +3 -0
- package/dist/cli/doctor/check-ghost-commands.d.ts.map +1 -0
- package/dist/cli/doctor/check-ghost-commands.js +86 -0
- package/dist/cli/doctor/check-ghost-commands.js.map +1 -0
- package/dist/cli/doctor/check-native-deps.d.ts +3 -0
- package/dist/cli/doctor/check-native-deps.d.ts.map +1 -0
- package/dist/cli/doctor/check-native-deps.js +70 -0
- package/dist/cli/doctor/check-native-deps.js.map +1 -0
- package/dist/cli/doctor/check-workspace-drift.d.ts +3 -0
- package/dist/cli/doctor/check-workspace-drift.d.ts.map +1 -0
- package/dist/cli/doctor/check-workspace-drift.js +83 -0
- package/dist/cli/doctor/check-workspace-drift.js.map +1 -0
- package/dist/cli/doctor/formatter.d.ts +20 -0
- package/dist/cli/doctor/formatter.d.ts.map +1 -0
- package/dist/cli/doctor/formatter.js +91 -0
- package/dist/cli/doctor/formatter.js.map +1 -0
- package/dist/cli/doctor/index.d.ts +8 -0
- package/dist/cli/doctor/index.d.ts.map +1 -0
- package/dist/cli/doctor/index.js +9 -0
- package/dist/cli/doctor/index.js.map +1 -0
- package/dist/cli/doctor/orchestrator.d.ts +3 -0
- package/dist/cli/doctor/orchestrator.d.ts.map +1 -0
- package/dist/cli/doctor/orchestrator.js +40 -0
- package/dist/cli/doctor/orchestrator.js.map +1 -0
- package/dist/cli/doctor/types.d.ts +19 -0
- package/dist/cli/doctor/types.d.ts.map +1 -0
- package/dist/cli/doctor/types.js +4 -0
- package/dist/cli/doctor/types.js.map +1 -0
- package/dist/cli/env-contract/check.d.ts +18 -0
- package/dist/cli/env-contract/check.d.ts.map +1 -0
- package/dist/cli/env-contract/check.js +118 -0
- package/dist/cli/env-contract/check.js.map +1 -0
- package/dist/cli/env-contract/discovery.d.ts +12 -0
- package/dist/cli/env-contract/discovery.d.ts.map +1 -0
- package/dist/cli/env-contract/discovery.js +249 -0
- package/dist/cli/env-contract/discovery.js.map +1 -0
- package/dist/cli/env-contract/filters.d.ts +10 -0
- package/dist/cli/env-contract/filters.d.ts.map +1 -0
- package/dist/cli/env-contract/filters.js +23 -0
- package/dist/cli/env-contract/filters.js.map +1 -0
- package/dist/cli/env-contract/index.d.ts +6 -0
- package/dist/cli/env-contract/index.d.ts.map +1 -0
- package/dist/cli/env-contract/index.js +8 -0
- package/dist/cli/env-contract/index.js.map +1 -0
- package/dist/cli/env-contract/reminder-engine.d.ts +34 -0
- package/dist/cli/env-contract/reminder-engine.d.ts.map +1 -0
- package/dist/cli/env-contract/reminder-engine.js +51 -0
- package/dist/cli/env-contract/reminder-engine.js.map +1 -0
- package/dist/cli/env-contract/reminder-hook-runner.d.ts +45 -0
- package/dist/cli/env-contract/reminder-hook-runner.d.ts.map +1 -0
- package/dist/cli/env-contract/reminder-hook-runner.js +273 -0
- package/dist/cli/env-contract/reminder-hook-runner.js.map +1 -0
- package/dist/cli/env-contract/reminder-ledger.d.ts +11 -0
- package/dist/cli/env-contract/reminder-ledger.d.ts.map +1 -0
- package/dist/cli/env-contract/reminder-ledger.js +37 -0
- package/dist/cli/env-contract/reminder-ledger.js.map +1 -0
- package/dist/cli/env-contract/types.d.ts +48 -0
- package/dist/cli/env-contract/types.d.ts.map +1 -0
- package/dist/cli/env-contract/types.js +22 -0
- package/dist/cli/env-contract/types.js.map +1 -0
- package/dist/cli/env-contract/validation.d.ts +10 -0
- package/dist/cli/env-contract/validation.d.ts.map +1 -0
- package/dist/cli/env-contract/validation.js +116 -0
- package/dist/cli/env-contract/validation.js.map +1 -0
- package/dist/cli/first-run-guide.d.ts.map +1 -1
- package/dist/cli/first-run-guide.js +8 -3
- package/dist/cli/first-run-guide.js.map +1 -1
- package/dist/cli/index.js +94 -22
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/assistant-plan.d.ts +14 -0
- package/dist/cli/init/assistant-plan.d.ts.map +1 -0
- package/dist/cli/init/assistant-plan.js +208 -0
- package/dist/cli/init/assistant-plan.js.map +1 -0
- package/dist/cli/init/detect.d.ts +28 -0
- package/dist/cli/init/detect.d.ts.map +1 -0
- package/dist/cli/init/detect.js +63 -0
- package/dist/cli/init/detect.js.map +1 -0
- package/dist/cli/init/env-contract-plan.d.ts +28 -0
- package/dist/cli/init/env-contract-plan.d.ts.map +1 -0
- package/dist/cli/init/env-contract-plan.js +184 -0
- package/dist/cli/init/env-contract-plan.js.map +1 -0
- package/dist/cli/init/manifest-extractors.d.ts +22 -0
- package/dist/cli/init/manifest-extractors.d.ts.map +1 -0
- package/dist/cli/init/manifest-extractors.js +185 -0
- package/dist/cli/init/manifest-extractors.js.map +1 -0
- package/dist/cli/init/profile-loader.d.ts +49 -0
- package/dist/cli/init/profile-loader.d.ts.map +1 -0
- package/dist/cli/init/profile-loader.js +107 -0
- package/dist/cli/init/profile-loader.js.map +1 -0
- package/dist/cli/init/profile-plan.d.ts +38 -0
- package/dist/cli/init/profile-plan.d.ts.map +1 -0
- package/dist/cli/init/profile-plan.js +120 -0
- package/dist/cli/init/profile-plan.js.map +1 -0
- package/dist/cli/init/profiles/generic.json +16 -0
- package/dist/cli/init/profiles/go.json +12 -0
- package/dist/cli/init/profiles/nodejs.json +16 -0
- package/dist/cli/init/profiles/python.json +17 -0
- package/dist/cli/init/profiles/rust.json +12 -0
- package/dist/cli/init/receipt.d.ts.map +1 -1
- package/dist/cli/init/receipt.js +107 -7
- package/dist/cli/init/receipt.js.map +1 -1
- package/dist/cli/init/reconciler.d.ts +10 -1
- package/dist/cli/init/reconciler.d.ts.map +1 -1
- package/dist/cli/init/reconciler.js +85 -15
- package/dist/cli/init/reconciler.js.map +1 -1
- package/dist/cli/interface-contract/commands/agent-metrics.d.ts +3 -0
- package/dist/cli/interface-contract/commands/agent-metrics.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/agent-metrics.js +217 -0
- package/dist/cli/interface-contract/commands/agent-metrics.js.map +1 -0
- package/dist/cli/interface-contract/commands/analyze.d.ts +3 -0
- package/dist/cli/interface-contract/commands/analyze.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/analyze.js +139 -0
- package/dist/cli/interface-contract/commands/analyze.js.map +1 -0
- package/dist/cli/interface-contract/commands/benchmark.d.ts +3 -0
- package/dist/cli/interface-contract/commands/benchmark.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/benchmark.js +108 -0
- package/dist/cli/interface-contract/commands/benchmark.js.map +1 -0
- package/dist/cli/interface-contract/commands/deps.d.ts +3 -0
- package/dist/cli/interface-contract/commands/deps.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/deps.js +130 -0
- package/dist/cli/interface-contract/commands/deps.js.map +1 -0
- package/dist/cli/interface-contract/commands/doctor.d.ts +3 -0
- package/dist/cli/interface-contract/commands/doctor.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/doctor.js +60 -0
- package/dist/cli/interface-contract/commands/doctor.js.map +1 -0
- package/dist/cli/interface-contract/commands/env-contract.d.ts +3 -0
- package/dist/cli/interface-contract/commands/env-contract.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/env-contract.js +168 -0
- package/dist/cli/interface-contract/commands/env-contract.js.map +1 -0
- package/dist/cli/interface-contract/commands/index.d.ts +12 -0
- package/dist/cli/interface-contract/commands/index.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/index.js +24 -0
- package/dist/cli/interface-contract/commands/index.js.map +1 -0
- package/dist/cli/interface-contract/commands/init.d.ts +3 -0
- package/dist/cli/interface-contract/commands/init.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/init.js +96 -0
- package/dist/cli/interface-contract/commands/init.js.map +1 -0
- package/dist/cli/interface-contract/commands/preview.d.ts +3 -0
- package/dist/cli/interface-contract/commands/preview.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/preview.js +118 -0
- package/dist/cli/interface-contract/commands/preview.js.map +1 -0
- package/dist/cli/interface-contract/commands/query.d.ts +3 -0
- package/dist/cli/interface-contract/commands/query.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/query.js +186 -0
- package/dist/cli/interface-contract/commands/query.js.map +1 -0
- package/dist/cli/interface-contract/index.d.ts +22 -0
- package/dist/cli/interface-contract/index.d.ts.map +1 -0
- package/dist/cli/interface-contract/index.js +41 -0
- package/dist/cli/interface-contract/index.js.map +1 -0
- package/dist/cli/interface-contract/schema.d.ts +30 -0
- package/dist/cli/interface-contract/schema.d.ts.map +1 -0
- package/dist/cli/interface-contract/schema.js +73 -0
- package/dist/cli/interface-contract/schema.js.map +1 -0
- package/dist/cli/interface-contract/types.d.ts +77 -0
- package/dist/cli/interface-contract/types.d.ts.map +1 -0
- package/dist/cli/interface-contract/types.js +4 -0
- package/dist/cli/interface-contract/types.js.map +1 -0
- package/dist/cli/output/apply-suggestion.d.ts +12 -0
- package/dist/cli/output/apply-suggestion.d.ts.map +1 -0
- package/dist/cli/output/apply-suggestion.js +29 -0
- package/dist/cli/output/apply-suggestion.js.map +1 -0
- package/dist/cli/output/error-codes.d.ts +24 -0
- package/dist/cli/output/error-codes.d.ts.map +1 -0
- package/dist/cli/output/error-codes.js +94 -0
- package/dist/cli/output/error-codes.js.map +1 -0
- package/dist/cli/output/errors.d.ts +14 -0
- package/dist/cli/output/errors.d.ts.map +1 -0
- package/dist/cli/output/errors.js +182 -0
- package/dist/cli/output/errors.js.map +1 -0
- package/dist/cli/output/index.d.ts +13 -0
- package/dist/cli/output/index.d.ts.map +1 -0
- package/dist/cli/output/index.js +11 -0
- package/dist/cli/output/index.js.map +1 -0
- package/dist/cli/output/mode.d.ts +12 -0
- package/dist/cli/output/mode.d.ts.map +1 -0
- package/dist/cli/output/mode.js +23 -0
- package/dist/cli/output/mode.js.map +1 -0
- package/dist/cli/output/progress.d.ts +9 -0
- package/dist/cli/output/progress.d.ts.map +1 -0
- package/dist/cli/output/progress.js +65 -0
- package/dist/cli/output/progress.js.map +1 -0
- package/dist/cli/output/render.d.ts +11 -0
- package/dist/cli/output/render.d.ts.map +1 -0
- package/dist/cli/output/render.js +18 -0
- package/dist/cli/output/render.js.map +1 -0
- package/dist/cli/output/types.d.ts +53 -0
- package/dist/cli/output/types.d.ts.map +1 -0
- package/dist/cli/output/types.js +14 -0
- package/dist/cli/output/types.js.map +1 -0
- package/dist/cli/output/wasm-fallback.d.ts +14 -0
- package/dist/cli/output/wasm-fallback.d.ts.map +1 -0
- package/dist/cli/output/wasm-fallback.js +92 -0
- package/dist/cli/output/wasm-fallback.js.map +1 -0
- package/dist/cli/preview/complexity-scanner.d.ts +21 -0
- package/dist/cli/preview/complexity-scanner.d.ts.map +1 -0
- package/dist/cli/preview/complexity-scanner.js +52 -0
- package/dist/cli/preview/complexity-scanner.js.map +1 -0
- package/dist/cli/preview/dependency-extractor.d.ts +38 -0
- package/dist/cli/preview/dependency-extractor.d.ts.map +1 -0
- package/dist/cli/preview/dependency-extractor.js +140 -0
- package/dist/cli/preview/dependency-extractor.js.map +1 -0
- package/dist/cli/preview/preview-renderer.d.ts +32 -0
- package/dist/cli/preview/preview-renderer.d.ts.map +1 -0
- package/dist/cli/preview/preview-renderer.js +54 -0
- package/dist/cli/preview/preview-renderer.js.map +1 -0
- package/dist/cli/storage-runtime.d.ts +7 -0
- package/dist/cli/storage-runtime.d.ts.map +1 -1
- package/dist/cli/storage-runtime.js +22 -0
- package/dist/cli/storage-runtime.js.map +1 -1
- package/dist/cli/tree-sitter-check.d.ts +6 -1
- package/dist/cli/tree-sitter-check.d.ts.map +1 -1
- package/dist/cli/tree-sitter-check.js +23 -1
- package/dist/cli/tree-sitter-check.js.map +1 -1
- package/dist/cli-new/index.js +1 -1
- package/dist/cli-new/index.js.map +1 -1
- package/dist/composition/parser-composition.d.ts +7 -0
- package/dist/composition/parser-composition.d.ts.map +1 -0
- package/dist/composition/parser-composition.js +15 -0
- package/dist/composition/parser-composition.js.map +1 -0
- package/dist/core/analyzer.d.ts.map +1 -1
- package/dist/core/analyzer.js +83 -67
- package/dist/core/analyzer.js.map +1 -1
- package/dist/core/ast-complexity-analyzer.d.ts +12 -6
- package/dist/core/ast-complexity-analyzer.d.ts.map +1 -1
- package/dist/core/ast-complexity-analyzer.js +368 -209
- package/dist/core/ast-complexity-analyzer.js.map +1 -1
- package/dist/core/file-discovery.d.ts +1 -1
- package/dist/core/file-discovery.d.ts.map +1 -1
- package/dist/core/file-discovery.js +3 -0
- package/dist/core/file-discovery.js.map +1 -1
- package/dist/core/global-index.d.ts +3 -1
- package/dist/core/global-index.d.ts.map +1 -1
- package/dist/core/global-index.js +69 -4
- package/dist/core/global-index.js.map +1 -1
- package/dist/domain/entities/CodeGraph.d.ts +3 -0
- package/dist/domain/entities/CodeGraph.d.ts.map +1 -1
- package/dist/domain/entities/CodeGraph.js +19 -2
- package/dist/domain/entities/CodeGraph.js.map +1 -1
- package/dist/domain/entities/Dependency.d.ts +5 -2
- package/dist/domain/entities/Dependency.d.ts.map +1 -1
- package/dist/domain/entities/Dependency.js +49 -3
- package/dist/domain/entities/Dependency.js.map +1 -1
- package/dist/domain/repositories/CodeGraphRepository.d.ts +5 -0
- package/dist/domain/repositories/CodeGraphRepository.d.ts.map +1 -1
- package/dist/domain/repositories/CodeGraphRepository.js.map +1 -1
- package/dist/execution/contract-tools/analyze.d.ts +205 -0
- package/dist/execution/contract-tools/analyze.d.ts.map +1 -0
- package/dist/execution/contract-tools/analyze.js +1215 -0
- package/dist/execution/contract-tools/analyze.js.map +1 -0
- package/dist/execution/contract-tools/deps.d.ts +62 -0
- package/dist/execution/contract-tools/deps.d.ts.map +1 -0
- package/dist/execution/contract-tools/deps.js +234 -0
- package/dist/execution/contract-tools/deps.js.map +1 -0
- package/dist/execution/contract-tools/index.d.ts +5 -0
- package/dist/execution/contract-tools/index.d.ts.map +1 -0
- package/dist/execution/contract-tools/index.js +7 -0
- package/dist/execution/contract-tools/index.js.map +1 -0
- package/dist/execution/contract-tools/query.d.ts +60 -0
- package/dist/execution/contract-tools/query.d.ts.map +1 -0
- package/dist/execution/contract-tools/query.js +532 -0
- package/dist/execution/contract-tools/query.js.map +1 -0
- package/dist/execution/contract-tools/types.d.ts +26 -0
- package/dist/execution/contract-tools/types.d.ts.map +1 -0
- package/dist/execution/contract-tools/types.js +32 -0
- package/dist/execution/contract-tools/types.js.map +1 -0
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +0 -3
- package/dist/generator/index.js.map +1 -1
- package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.d.ts +12 -0
- package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.d.ts.map +1 -0
- package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.js +55 -0
- package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.js.map +1 -0
- package/dist/infrastructure/parser/implementations/GoParser.d.ts +2 -1
- package/dist/infrastructure/parser/implementations/GoParser.d.ts.map +1 -1
- package/dist/infrastructure/parser/implementations/GoParser.js +13 -1
- package/dist/infrastructure/parser/implementations/GoParser.js.map +1 -1
- package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.d.ts +114 -0
- package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.d.ts.map +1 -0
- package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.js +1022 -0
- package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.js.map +1 -0
- package/dist/infrastructure/parser/implementations/TreeSitterParser.d.ts +78 -0
- package/dist/infrastructure/parser/implementations/TreeSitterParser.d.ts.map +1 -0
- package/dist/infrastructure/parser/implementations/TreeSitterParser.js +648 -0
- package/dist/infrastructure/parser/implementations/TreeSitterParser.js.map +1 -0
- package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts +3 -55
- package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts.map +1 -1
- package/dist/infrastructure/parser/implementations/TypeScriptParser.js +4 -411
- package/dist/infrastructure/parser/implementations/TypeScriptParser.js.map +1 -1
- package/dist/infrastructure/parser/index.d.ts +2 -0
- package/dist/infrastructure/parser/index.d.ts.map +1 -1
- package/dist/infrastructure/parser/index.js +9 -6
- package/dist/infrastructure/parser/index.js.map +1 -1
- package/dist/infrastructure/parser/interfaces/ParserBase.d.ts.map +1 -1
- package/dist/infrastructure/parser/interfaces/ParserBase.js +1 -0
- package/dist/infrastructure/parser/interfaces/ParserBase.js.map +1 -1
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts +2 -0
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts.map +1 -1
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js +4 -0
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js.map +1 -1
- package/dist/infrastructure/storage/StorageFactory.d.ts +5 -18
- package/dist/infrastructure/storage/StorageFactory.d.ts.map +1 -1
- package/dist/infrastructure/storage/StorageFactory.js +30 -98
- package/dist/infrastructure/storage/StorageFactory.js.map +1 -1
- package/dist/infrastructure/storage/adapters/SQLiteStorage.d.ts +13 -1
- package/dist/infrastructure/storage/adapters/SQLiteStorage.d.ts.map +1 -1
- package/dist/infrastructure/storage/adapters/SQLiteStorage.js +322 -76
- package/dist/infrastructure/storage/adapters/SQLiteStorage.js.map +1 -1
- package/dist/infrastructure/storage/adapters/sqlite-loader.d.ts +45 -0
- package/dist/infrastructure/storage/adapters/sqlite-loader.d.ts.map +1 -0
- package/dist/infrastructure/storage/adapters/sqlite-loader.js +266 -0
- package/dist/infrastructure/storage/adapters/sqlite-loader.js.map +1 -0
- package/dist/infrastructure/storage/community-helpers.d.ts +4 -0
- package/dist/infrastructure/storage/community-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/community-helpers.js +392 -0
- package/dist/infrastructure/storage/community-helpers.js.map +1 -0
- package/dist/infrastructure/storage/graph-helpers.d.ts +22 -5
- package/dist/infrastructure/storage/graph-helpers.d.ts.map +1 -1
- package/dist/infrastructure/storage/graph-helpers.js +496 -91
- package/dist/infrastructure/storage/graph-helpers.js.map +1 -1
- package/dist/infrastructure/storage/index.d.ts +1 -1
- package/dist/infrastructure/storage/index.d.ts.map +1 -1
- package/dist/infrastructure/storage/index.js +1 -1
- package/dist/infrastructure/storage/index.js.map +1 -1
- package/dist/infrastructure/storage/interfaces/StorageBase.d.ts +2 -2
- package/dist/infrastructure/storage/interfaces/StorageBase.d.ts.map +1 -1
- package/dist/infrastructure/storage/interfaces/StorageBase.js.map +1 -1
- package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.d.ts +2 -0
- package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.js +52 -12
- package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.js.map +1 -1
- package/dist/infrastructure/storage/sqlite/schema.d.ts +2 -2
- package/dist/infrastructure/storage/sqlite/schema.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite/schema.js +49 -1
- package/dist/infrastructure/storage/sqlite/schema.js.map +1 -1
- package/dist/interface/config/index.d.ts +5 -3
- package/dist/interface/config/index.d.ts.map +1 -1
- package/dist/interface/types/index.d.ts +37 -6
- package/dist/interface/types/index.d.ts.map +1 -1
- package/dist/interface/types/parser.d.ts +85 -0
- package/dist/interface/types/parser.d.ts.map +1 -1
- package/dist/interface/types/storage.d.ts +227 -10
- package/dist/interface/types/storage.d.ts.map +1 -1
- package/dist/orchestrator/agent-metrics-service.d.ts +126 -0
- package/dist/orchestrator/agent-metrics-service.d.ts.map +1 -0
- package/dist/orchestrator/agent-metrics-service.js +444 -0
- package/dist/orchestrator/agent-metrics-service.js.map +1 -0
- package/dist/orchestrator/types.d.ts +2 -0
- package/dist/orchestrator/types.d.ts.map +1 -1
- package/dist/orchestrator/types.js.map +1 -1
- package/dist/parser/enhancers/PythonTypeEnhancer.d.ts +26 -0
- package/dist/parser/enhancers/PythonTypeEnhancer.d.ts.map +1 -0
- package/dist/parser/enhancers/PythonTypeEnhancer.js +440 -0
- package/dist/parser/enhancers/PythonTypeEnhancer.js.map +1 -0
- package/dist/parser/implementations/smart-parser.d.ts.map +1 -1
- package/dist/parser/implementations/smart-parser.js +7 -69
- package/dist/parser/implementations/smart-parser.js.map +1 -1
- package/dist/parser/implementations/tree-sitter-loader.d.ts +18 -0
- package/dist/parser/implementations/tree-sitter-loader.d.ts.map +1 -0
- package/dist/parser/implementations/tree-sitter-loader.js +136 -0
- package/dist/parser/implementations/tree-sitter-loader.js.map +1 -0
- package/dist/parser/index.d.ts +5 -3
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +68 -6
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/interfaces/IParser.d.ts +19 -6
- package/dist/parser/interfaces/IParser.d.ts.map +1 -1
- package/dist/parser/interfaces/IParser.js +2 -3
- package/dist/parser/interfaces/IParser.js.map +1 -1
- package/dist/server/handlers/AnalysisHandler.d.ts +13 -2
- package/dist/server/handlers/AnalysisHandler.d.ts.map +1 -1
- package/dist/server/handlers/AnalysisHandler.js +24 -0
- package/dist/server/handlers/AnalysisHandler.js.map +1 -1
- package/dist/server/handlers/QueryHandler.d.ts.map +1 -1
- package/dist/server/handlers/QueryHandler.js +11 -30
- package/dist/server/handlers/QueryHandler.js.map +1 -1
- package/dist/server/mcp/context-tool.d.ts +9 -0
- package/dist/server/mcp/context-tool.d.ts.map +1 -0
- package/dist/server/mcp/context-tool.js +257 -0
- package/dist/server/mcp/context-tool.js.map +1 -0
- package/dist/server/mcp/schema-adapter.d.ts +55 -0
- package/dist/server/mcp/schema-adapter.d.ts.map +1 -0
- package/dist/server/mcp/schema-adapter.js +409 -0
- package/dist/server/mcp/schema-adapter.js.map +1 -0
- package/dist/server/mcp/server.d.ts +3 -3
- package/dist/server/mcp/server.d.ts.map +1 -1
- package/dist/server/mcp/server.js +134 -20
- package/dist/server/mcp/server.js.map +1 -1
- package/dist/server/mcp/service.d.ts +6 -2
- package/dist/server/mcp/service.d.ts.map +1 -1
- package/dist/server/mcp/service.js +138 -36
- package/dist/server/mcp/service.js.map +1 -1
- package/dist/server/mcp/stdio-transport.d.ts +23 -0
- package/dist/server/mcp/stdio-transport.d.ts.map +1 -0
- package/dist/server/mcp/stdio-transport.js +101 -0
- package/dist/server/mcp/stdio-transport.js.map +1 -0
- package/dist/server/mcp/types.d.ts +133 -8
- package/dist/server/mcp/types.d.ts.map +1 -1
- package/dist/server/routes/api.d.ts.map +1 -1
- package/dist/server/routes/api.js +11 -2
- package/dist/server/routes/api.js.map +1 -1
- package/docs/AI_ASSISTANT_SETUP.md +281 -12
- package/docs/API.md +170 -0
- package/docs/CONFIGURATION.md +141 -0
- package/docs/DEVELOPMENT.md +96 -0
- package/docs/GETTING-STARTED.md +114 -0
- package/docs/README.md +40 -1
- package/docs/SETUP_GUIDE.md +60 -14
- package/docs/TESTING.md +81 -0
- package/docs/ai-guide/COMMANDS.md +68 -10
- package/docs/ai-guide/INTEGRATION.md +77 -10
- package/docs/ai-guide/OUTPUT.md +345 -9
- package/docs/ai-guide/PROMPTS.md +2 -2
- package/docs/ai-guide/QUICKSTART.md +28 -1
- package/docs/ai-guide/README.md +2 -2
- package/docs/archive/ideation/2026-04-15-executable-architecture-constitution-ideation-archive.md +70 -0
- package/docs/archive/ideation/2026-04-20-mycodemap-init-enhancements-ideation-archive.md +109 -0
- package/docs/archive/ideation/2026-04-22-rules-entry-docs-optimization-consolidated-ideation-archive.md +54 -0
- package/docs/backlog.md +232 -144
- package/docs/brainstorms/2026-05-10-agent-effectiveness-validation-requirements.md +112 -0
- package/docs/generated/phase-58/subagent-evidence/claude-hook-example.json +15 -0
- package/docs/generated/phase-58/subagent-evidence/claude-session.md +146 -0
- package/docs/generated/phase-58/subagent-evidence/claude-subagent.json +28 -0
- package/docs/generated/phase-58/subagent-evidence/codex-agent-example.toml +19 -0
- package/docs/generated/phase-58/subagent-evidence/codex-session.md +150 -0
- package/docs/generated/phase-58/subagent-evidence/codex-subagent.json +20 -0
- package/docs/generated/phase-58/subagent-evidence/negative-no-retrieval.json +12 -0
- package/docs/generated/phase-58/subagent-evidence/verification-manifest.json +19 -0
- package/docs/ideation/2026-04-15-executable-architecture-constitution-ideation.md +10 -22
- package/docs/ideation/2026-04-20-mycodemap-init-enhancements-ideation.md +15 -60
- package/docs/ideation/2026-04-22-rules-entry-docs-optimization-consolidated-ideation.md +47 -52
- package/docs/ideation/2026-04-29-ux-install-agent-experience-ideation.md +256 -0
- package/docs/ideation/2026-05-02-subagent-environment-contract-injection-ideation.md +183 -0
- package/docs/ideation/2026-05-04-subagent-hooks-deep-dive-ideation.md +133 -0
- package/docs/ideation/2026-05-10-agent-effectiveness-validation-ideation.md +219 -0
- package/docs/plans/2026-04-30-install-guide-and-repo-analyzer-design.md +394 -0
- package/docs/rules/README.md +1 -0
- package/docs/rules/architecture-guardrails.md +2 -1
- package/docs/rules/engineering-with-codex-openai.md +1 -1
- package/docs/rules/harness.md +106 -0
- package/docs/rules/pre-release-checklist.md +28 -0
- package/docs/rules/testing.md +51 -0
- package/examples/claude/skills/mycodemap-repo-analyzer/SKILL.md +294 -0
- package/examples/claude/skills/mycodemap-repo-analyzer/references/analysis-guide.md +166 -0
- package/examples/claude/skills/mycodemap-repo-analyzer/references/module-analysis-guide.md +150 -0
- package/package.json +12 -4
- package/scripts/copy-build-assets.mjs +23 -0
- package/scripts/hooks/templates/pre-commit +33 -2
- package/scripts/sync-analyze-docs.js +2 -2
- package/scripts/tests/test_rule_control_workflow.py +15 -1
- package/scripts/validate-docs.js +113 -16
- package/scripts/verify-subagent-env-contract.mjs +279 -0
- package/dist/parser/implementations/tree-sitter-parser.d.ts +0 -57
- package/dist/parser/implementations/tree-sitter-parser.d.ts.map +0 -1
- package/dist/parser/implementations/tree-sitter-parser.js +0 -375
- package/dist/parser/implementations/tree-sitter-parser.js.map +0 -1
- package/docs/references/tmp.md +0 -527
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// [META] since:2026-04-30 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Native dependency health checker — verifies tree-sitter and better-sqlite3 can be loaded, reuses tree-sitter-check pattern
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { detectTreeSitterSync } from '../tree-sitter-check.js';
|
|
5
|
+
function hasSqliteFamilyFallback(projectRequire) {
|
|
6
|
+
const nodeMajorVersion = Number(process.versions.node.split('.')[0] ?? '0');
|
|
7
|
+
if (nodeMajorVersion >= 22) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
projectRequire.resolve('sql.js');
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function checkBetterSqlite3() {
|
|
19
|
+
const projectRequire = createRequire(import.meta.url);
|
|
20
|
+
try {
|
|
21
|
+
projectRequire('better-sqlite3');
|
|
22
|
+
return {
|
|
23
|
+
category: 'runtime',
|
|
24
|
+
severity: 'ok',
|
|
25
|
+
id: 'better-sqlite3-available',
|
|
26
|
+
message: 'better-sqlite3 native module loads successfully',
|
|
27
|
+
remediation: 'No action needed',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
32
|
+
const fallbackAvailable = hasSqliteFamilyFallback(projectRequire);
|
|
33
|
+
return {
|
|
34
|
+
category: 'runtime',
|
|
35
|
+
severity: fallbackAvailable ? 'warn' : 'error',
|
|
36
|
+
id: fallbackAvailable ? 'sqlite-family-fallback-available' : 'native-dep-missing',
|
|
37
|
+
message: `better-sqlite3 cannot be loaded: ${errorMessage}`,
|
|
38
|
+
remediation: fallbackAvailable
|
|
39
|
+
? 'SQLite-family fallback is available. Use Node.js 22+ node:sqlite or install sql.js, then rerun with --wasm-fallback if needed'
|
|
40
|
+
: 'Run npm rebuild better-sqlite3, or install Node.js 22+ / sql.js to restore SQLite-family fallback options',
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export function checkNativeDeps() {
|
|
45
|
+
const results = [];
|
|
46
|
+
// Check tree-sitter using existing detection pattern
|
|
47
|
+
const treeSitterInfo = detectTreeSitterSync();
|
|
48
|
+
if (treeSitterInfo.isAvailable) {
|
|
49
|
+
results.push({
|
|
50
|
+
category: 'runtime',
|
|
51
|
+
severity: 'ok',
|
|
52
|
+
id: 'tree-sitter-available',
|
|
53
|
+
message: `tree-sitter is available${treeSitterInfo.version ? ` (v${treeSitterInfo.version})` : ''}`,
|
|
54
|
+
remediation: 'No action needed',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
results.push({
|
|
59
|
+
category: 'runtime',
|
|
60
|
+
severity: 'error',
|
|
61
|
+
id: 'native-dep-missing',
|
|
62
|
+
message: `tree-sitter cannot be loaded: ${treeSitterInfo.error ?? 'unknown error'}`,
|
|
63
|
+
remediation: 'Run npm install to rebuild native dependencies, or use --wasm-fallback if available',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Check better-sqlite3 using same try-import pattern
|
|
67
|
+
results.push(checkBetterSqlite3());
|
|
68
|
+
return results;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=check-native-deps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-native-deps.js","sourceRoot":"","sources":["../../../src/cli/doctor/check-native-deps.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,mIAAmI;AAEnI,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,SAAS,uBAAuB,CAAC,cAAgD;IAC/E,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;IAC5E,IAAI,gBAAgB,IAAI,EAAE,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,CAAC,IAA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kB;SAChC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CAAC;YACX,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,OAAO;YACjB,EAAE,EAAE,oBAAoB;YACxB,OAAO,EAAE,iCAAiC,cAAc,CAAC,KAAK,IAAI,eAAe,EAAE;YACnF,WAAW,EAAE,qFAAqF;SACnG,CAAC,CAAC;IACL,CAAC;IAED,qDAAqD;IACrD,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAEnC,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-workspace-drift.d.ts","sourceRoot":"","sources":["../../../src/cli/doctor/check-workspace-drift.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAiBnD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAmFvE"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// [META] since:2026-04-30 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Workspace drift detection — compares init-last.json receipt asset paths against actual filesystem state
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
const RECEIPT_RELATIVE_PATH = '.mycodemap/status/init-last.json';
|
|
6
|
+
export function checkWorkspaceDrift(rootDir) {
|
|
7
|
+
const receiptPath = path.join(rootDir, RECEIPT_RELATIVE_PATH);
|
|
8
|
+
if (!existsSync(receiptPath)) {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
category: 'config',
|
|
12
|
+
severity: 'warn',
|
|
13
|
+
id: 'workspace-not-initialized',
|
|
14
|
+
message: 'No init receipt found — workspace has not been initialized',
|
|
15
|
+
remediation: "Run 'codemap init' to create the workspace",
|
|
16
|
+
nextCommand: 'mycodemap init',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
let receipt;
|
|
21
|
+
try {
|
|
22
|
+
const raw = readFileSync(receiptPath, 'utf8');
|
|
23
|
+
receipt = JSON.parse(raw);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return [
|
|
27
|
+
{
|
|
28
|
+
category: 'config',
|
|
29
|
+
severity: 'error',
|
|
30
|
+
id: 'receipt-invalid',
|
|
31
|
+
message: 'init-last.json exists but cannot be parsed',
|
|
32
|
+
remediation: "Run 'codemap init' to regenerate the receipt",
|
|
33
|
+
nextCommand: 'mycodemap init',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
if (!Array.isArray(receipt.assets)) {
|
|
38
|
+
return [
|
|
39
|
+
{
|
|
40
|
+
category: 'config',
|
|
41
|
+
severity: 'error',
|
|
42
|
+
id: 'receipt-invalid',
|
|
43
|
+
message: 'init-last.json has no assets array',
|
|
44
|
+
remediation: "Run 'codemap init' to regenerate the receipt",
|
|
45
|
+
nextCommand: 'mycodemap init',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
const driftResults = [];
|
|
50
|
+
for (const asset of receipt.assets) {
|
|
51
|
+
if (!asset.path) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const absolutePath = path.resolve(rootDir, asset.path);
|
|
55
|
+
if (!existsSync(absolutePath)) {
|
|
56
|
+
const relativePath = path.relative(rootDir, absolutePath);
|
|
57
|
+
const isToolOwned = asset.ownership === 'tool-owned';
|
|
58
|
+
driftResults.push({
|
|
59
|
+
category: 'config',
|
|
60
|
+
severity: isToolOwned ? 'error' : 'warn',
|
|
61
|
+
id: 'workspace-drift-detected',
|
|
62
|
+
message: `Receipt asset "${asset.key}" (${asset.label}) not found at ${relativePath}`,
|
|
63
|
+
remediation: isToolOwned
|
|
64
|
+
? "Run 'codemap init' to recreate missing tool-owned files"
|
|
65
|
+
: 'Verify if the file was intentionally removed, or run codemap init to recreate it',
|
|
66
|
+
nextCommand: isToolOwned ? 'mycodemap init' : undefined,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (driftResults.length === 0) {
|
|
71
|
+
return [
|
|
72
|
+
{
|
|
73
|
+
category: 'config',
|
|
74
|
+
severity: 'ok',
|
|
75
|
+
id: 'workspace-drift-ok',
|
|
76
|
+
message: 'All receipt assets match the filesystem',
|
|
77
|
+
remediation: 'No action needed',
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
return driftResults;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=check-workspace-drift.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-workspace-drift.js","sourceRoot":"","sources":["../../../src/cli/doctor/check-workspace-drift.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,gHAAgH;AAEhH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAgB7B,MAAM,qBAAqB,GAAG,kCAAkC,CAAC;AAEjE,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;IAE9D,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,OAAO;YACL;gBACE,QAAQ,EAAE,QAAQ;gBAClB,QAAQ,EAAE,MAAM;gBAChB,EAAE,EAAE,2BAA2B;gBAC/B,OAAO,EAAE,4DAA4D;gBACrE,WAAW,EAAE,4CAA4C;gBACzD,WAAW,EAAE,gBAAgB;aAC9B;SACF,CAAC;IACJ,CAAC;IAED,IAAI,OAAoB,CAAC;IACzB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC9C,OAAO,GAAG,IAAI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AAM,KAAK,CAAC,KAAK,kBAAkB,YAAY,EAAE;gBACrF,WAAW,EAAE,WAAW;oBACtB,CAAC,CAAC,yDAAyD;oBAC3D,CAAC,CAAC,kFAAkF;gBACtF,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;aACxD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO;YACL;gBACE,QAAQ,EAAE,QAAQ;gBAClB,QAAQ,EAAE,IAAI;gBACd,EAAE,EAAE,oBAAoB;gBACxB,OAAO,EAAE,yCAAyC;gBAClD,WAAW,EAAE,kBAAkB;aAChC;SACF,CAAC;IACJ,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DiagnosticResult } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Build serializable data array from diagnostics — same filtering logic as
|
|
4
|
+
* formatDoctorJson but returns the array of objects instead of a JSON string.
|
|
5
|
+
* Used by renderOutput for JSON mode output.
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatDoctorJsonData(results: DiagnosticResult[]): Record<string, string>[];
|
|
8
|
+
/**
|
|
9
|
+
* Format diagnostics as a JSON flat array — simple, grepable, jq-friendly.
|
|
10
|
+
* Each element: {category, severity, id, message, remediation}
|
|
11
|
+
* nextCommand is included only when defined.
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatDoctorJson(results: DiagnosticResult[]): string;
|
|
14
|
+
/**
|
|
15
|
+
* Format diagnostics as a colorized table — human-friendly for TTY output.
|
|
16
|
+
* Columns: CATEGORY, SEVERITY, ID, MESSAGE
|
|
17
|
+
* Grouped by category order with a summary line.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatDoctorReport(results: DiagnosticResult[]): string;
|
|
20
|
+
//# sourceMappingURL=formatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../../src/cli/doctor/formatter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,YAAY,CAAC;AAkCvE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAc1F;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAiCtE"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// [META] since:2026-04-30 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] TTY-aware output formatting — JSON flat array for non-TTY/CI, colorized table for interactive terminals
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
const CATEGORY_ORDER = {
|
|
5
|
+
install: 0,
|
|
6
|
+
config: 1,
|
|
7
|
+
runtime: 2,
|
|
8
|
+
agent: 3,
|
|
9
|
+
};
|
|
10
|
+
const CATEGORY_WIDTH = 10;
|
|
11
|
+
const SEVERITY_WIDTH = 8;
|
|
12
|
+
const ID_WIDTH = 28;
|
|
13
|
+
function severityLabel(severity) {
|
|
14
|
+
switch (severity) {
|
|
15
|
+
case 'error':
|
|
16
|
+
return chalk.red('error');
|
|
17
|
+
case 'warn':
|
|
18
|
+
return chalk.yellow('warn');
|
|
19
|
+
case 'ok':
|
|
20
|
+
return chalk.green('ok');
|
|
21
|
+
case 'info':
|
|
22
|
+
return chalk.cyan('info');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function sortByCategory(results) {
|
|
26
|
+
return [...results].sort((a, b) => {
|
|
27
|
+
const orderA = CATEGORY_ORDER[a.category] ?? 99;
|
|
28
|
+
const orderB = CATEGORY_ORDER[b.category] ?? 99;
|
|
29
|
+
return orderA - orderB;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Build serializable data array from diagnostics — same filtering logic as
|
|
34
|
+
* formatDoctorJson but returns the array of objects instead of a JSON string.
|
|
35
|
+
* Used by renderOutput for JSON mode output.
|
|
36
|
+
*/
|
|
37
|
+
export function formatDoctorJsonData(results) {
|
|
38
|
+
return results.map((r) => {
|
|
39
|
+
const entry = {
|
|
40
|
+
category: r.category,
|
|
41
|
+
severity: r.severity,
|
|
42
|
+
id: r.id,
|
|
43
|
+
message: r.message,
|
|
44
|
+
remediation: r.remediation,
|
|
45
|
+
};
|
|
46
|
+
if (r.nextCommand) {
|
|
47
|
+
entry.nextCommand = r.nextCommand;
|
|
48
|
+
}
|
|
49
|
+
return entry;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Format diagnostics as a JSON flat array — simple, grepable, jq-friendly.
|
|
54
|
+
* Each element: {category, severity, id, message, remediation}
|
|
55
|
+
* nextCommand is included only when defined.
|
|
56
|
+
*/
|
|
57
|
+
export function formatDoctorJson(results) {
|
|
58
|
+
return JSON.stringify(formatDoctorJsonData(results), null, 2);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Format diagnostics as a colorized table — human-friendly for TTY output.
|
|
62
|
+
* Columns: CATEGORY, SEVERITY, ID, MESSAGE
|
|
63
|
+
* Grouped by category order with a summary line.
|
|
64
|
+
*/
|
|
65
|
+
export function formatDoctorReport(results) {
|
|
66
|
+
const sorted = sortByCategory(results);
|
|
67
|
+
const lines = [];
|
|
68
|
+
// Header
|
|
69
|
+
const header = 'CATEGORY'.padEnd(CATEGORY_WIDTH) +
|
|
70
|
+
'SEVERITY'.padEnd(SEVERITY_WIDTH) +
|
|
71
|
+
'ID'.padEnd(ID_WIDTH) +
|
|
72
|
+
'MESSAGE';
|
|
73
|
+
lines.push(header);
|
|
74
|
+
lines.push('-'.repeat(header.length));
|
|
75
|
+
// Data rows
|
|
76
|
+
for (const r of sorted) {
|
|
77
|
+
const category = r.category.padEnd(CATEGORY_WIDTH);
|
|
78
|
+
const severity = severityLabel(r.severity).padEnd(SEVERITY_WIDTH + 9); // +9 for ANSI escape codes from chalk
|
|
79
|
+
const id = r.id.padEnd(ID_WIDTH);
|
|
80
|
+
lines.push(`${category}${severity}${id}${r.message}`);
|
|
81
|
+
}
|
|
82
|
+
// Summary line
|
|
83
|
+
const errorCount = results.filter((r) => r.severity === 'error').length;
|
|
84
|
+
const warnCount = results.filter((r) => r.severity === 'warn').length;
|
|
85
|
+
const infoCount = results.filter((r) => r.severity === 'info').length;
|
|
86
|
+
const okCount = results.filter((r) => r.severity === 'ok').length;
|
|
87
|
+
lines.push('');
|
|
88
|
+
lines.push(`Total: ${results.length} diagnostics (${errorCount} errors, ${warnCount} warnings, ${infoCount} info, ${okCount} passed)`);
|
|
89
|
+
return lines.join('\n');
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../src/cli/doctor/formatter.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,gHAAgH;AAEhH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,cAAc,GAA2B;IAC7C,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB,SAAS,aAAa,CAAC,QAA4B;IACjD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC5B,KAAK,MAAM;YACT,OAAO,KAAK,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M,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IACtE,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC;IAElE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CACR,UAAU,OAAO,CAAC,MAAM,iBAAiB,UAAU,YAAY,SAAS,cAAc,SAAS,UAAU,OAAO,UAAU,CAC3H,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { DiagnosticCategory, DiagnosticResult, DiagnosticSeverity, DoctorOptions, DoctorReport, } from './types.js';
|
|
2
|
+
export { runDoctor } from './orchestrator.js';
|
|
3
|
+
export { formatDoctorJson, formatDoctorReport } from './formatter.js';
|
|
4
|
+
export { checkGhostCommands } from './check-ghost-commands.js';
|
|
5
|
+
export { checkNativeDeps } from './check-native-deps.js';
|
|
6
|
+
export { checkWorkspaceDrift } from './check-workspace-drift.js';
|
|
7
|
+
export { checkAgent } from './check-agent.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/doctor/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// [META] since:2026-04-30 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Public API for the doctor module — orchestrator, formatters, types, individual checkers
|
|
3
|
+
export { runDoctor } from './orchestrator.js';
|
|
4
|
+
export { formatDoctorJson, formatDoctorReport } from './formatter.js';
|
|
5
|
+
export { checkGhostCommands } from './check-ghost-commands.js';
|
|
6
|
+
export { checkNativeDeps } from './check-native-deps.js';
|
|
7
|
+
export { checkWorkspaceDrift } from './check-workspace-drift.js';
|
|
8
|
+
export { checkAgent } from './check-agent.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/doctor/index.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,gGAAgG;AAUhG,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../../src/cli/doctor/orchestrator.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAoB,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEhF,wBAAsB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAkC7E"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// [META] since:2026-04-30 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Orchestrate all doctor checkers and compute aggregate exit code per CONTEXT.md exit behavior decision
|
|
3
|
+
import { checkGhostCommands } from './check-ghost-commands.js';
|
|
4
|
+
import { checkNativeDeps } from './check-native-deps.js';
|
|
5
|
+
import { checkWorkspaceDrift } from './check-workspace-drift.js';
|
|
6
|
+
import { checkAgent } from './check-agent.js';
|
|
7
|
+
import { checkEnvContract } from './check-env-contract.js';
|
|
8
|
+
export async function runDoctor(options) {
|
|
9
|
+
const rootDir = options.cwd ?? process.cwd();
|
|
10
|
+
// Run all checkers in parallel — ghost/native/workspace/env-contract are sync, agent is async
|
|
11
|
+
const [ghostResults, nativeResults, workspaceResults, agentResults, envContractResults] = await Promise.all([
|
|
12
|
+
Promise.resolve(checkGhostCommands(rootDir)),
|
|
13
|
+
Promise.resolve(checkNativeDeps()),
|
|
14
|
+
Promise.resolve(checkWorkspaceDrift(rootDir)),
|
|
15
|
+
checkAgent(),
|
|
16
|
+
Promise.resolve(checkEnvContract(rootDir)),
|
|
17
|
+
]);
|
|
18
|
+
const results = [
|
|
19
|
+
...ghostResults,
|
|
20
|
+
...nativeResults,
|
|
21
|
+
...workspaceResults,
|
|
22
|
+
...agentResults,
|
|
23
|
+
...envContractResults,
|
|
24
|
+
];
|
|
25
|
+
// Compute exit code: 0=all pass, 1=has errors, 2=warnings only
|
|
26
|
+
const hasErrors = results.some((r) => r.severity === 'error');
|
|
27
|
+
const hasWarnings = results.some((r) => r.severity === 'warn');
|
|
28
|
+
let exitCode;
|
|
29
|
+
if (hasErrors) {
|
|
30
|
+
exitCode = 1;
|
|
31
|
+
}
|
|
32
|
+
else if (hasWarnings) {
|
|
33
|
+
exitCode = 2;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
exitCode = 0;
|
|
37
|
+
}
|
|
38
|
+
return { results, exitCode };
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../../src/cli/doctor/orchestrator.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,8GAA8G;AAE9G,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAsB;IACpD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAE7C,8FAA8F;IAC9F,MAAM,CAAC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1G,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;QAClC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAC7C,UAAU,EAAE;QACZ,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;KAC3C,CAAC,CAAC;IAEH,MAAM,OAAO,GAAuB;QAClC,GAAG,YAAY;QACf,GAAG,aAAa;QAChB,GAAG,gBAAgB;QACnB,GAAG,YAAY;QACf,GAAG,kBAAkB;KACtB,CAAC;IAEF,+DAA+D;IAC/D,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;IAE/D,IAAI,QAAgB,CAAC;IACrB,IAAI,SAAS,EAAE,CAAC;QACd,QAAQ,GAAG,CAAC,CAAC;IACf,CAAC;SAAM,IAAI,WAAW,EAAE,CAAC;QACvB,QAAQ,GAAG,CAAC,CAAC;IACf,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,CAAC,CAAC;IACf,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type DiagnosticCategory = 'install' | 'config' | 'runtime' | 'agent';
|
|
2
|
+
export type DiagnosticSeverity = 'ok' | 'warn' | 'error' | 'info';
|
|
3
|
+
export interface DiagnosticResult {
|
|
4
|
+
category: DiagnosticCategory;
|
|
5
|
+
severity: DiagnosticSeverity;
|
|
6
|
+
id: string;
|
|
7
|
+
message: string;
|
|
8
|
+
remediation: string;
|
|
9
|
+
nextCommand?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DoctorOptions {
|
|
12
|
+
json?: boolean;
|
|
13
|
+
cwd?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DoctorReport {
|
|
16
|
+
results: DiagnosticResult[];
|
|
17
|
+
exitCode: number;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/doctor/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAC5E,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/doctor/types.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,qGAAqG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ProjectEnvironmentContract } from './types.js';
|
|
2
|
+
export interface EnvContractDiagnostic {
|
|
3
|
+
id: string;
|
|
4
|
+
severity: 'ok' | 'warn' | 'error';
|
|
5
|
+
message: string;
|
|
6
|
+
remediation: string;
|
|
7
|
+
}
|
|
8
|
+
export interface EnvContractCheckResult {
|
|
9
|
+
ok: boolean;
|
|
10
|
+
status: 'ok' | 'warn' | 'error';
|
|
11
|
+
diagnostics: EnvContractDiagnostic[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Check a Project Environment Contract for validity, critical coverage,
|
|
15
|
+
* source freshness, and conflicts.
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkProjectEnvironmentContract(contract: ProjectEnvironmentContract, rootDir?: string): EnvContractCheckResult;
|
|
18
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/cli/env-contract/check.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAG7D,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;IAChC,WAAW,EAAE,qBAAqB,EAAE,CAAC;CACtC;AAWD;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,0BAA0B,EACpC,OAAO,CAAC,EAAE,MAAM,GACf,sBAAsB,CA0GxB"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// [META] since:2026-05-02 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Drift/conflict/validity checks for Project Environment Contract data.
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
4
|
+
import { createHash } from 'node:crypto';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { validateProjectEnvironmentContract } from './validation.js';
|
|
7
|
+
const CRITICAL_ITEM_IDS = [
|
|
8
|
+
'commit-format',
|
|
9
|
+
'test-entry-vitest',
|
|
10
|
+
];
|
|
11
|
+
function sha256(content) {
|
|
12
|
+
return `sha256:${createHash('sha256').update(content).digest('hex')}`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Check a Project Environment Contract for validity, critical coverage,
|
|
16
|
+
* source freshness, and conflicts.
|
|
17
|
+
*/
|
|
18
|
+
export function checkProjectEnvironmentContract(contract, rootDir) {
|
|
19
|
+
const diagnostics = [];
|
|
20
|
+
// 1. Schema validation
|
|
21
|
+
const schemaResult = validateProjectEnvironmentContract(contract);
|
|
22
|
+
if (!schemaResult.valid) {
|
|
23
|
+
diagnostics.push({
|
|
24
|
+
id: 'schema-valid',
|
|
25
|
+
severity: 'error',
|
|
26
|
+
message: `Contract schema invalid: ${schemaResult.errors.join('; ')}`,
|
|
27
|
+
remediation: 'Regenerate the contract with `mycodemap env-contract --update`.',
|
|
28
|
+
});
|
|
29
|
+
return { ok: false, status: 'error', diagnostics };
|
|
30
|
+
}
|
|
31
|
+
diagnostics.push({
|
|
32
|
+
id: 'schema-valid',
|
|
33
|
+
severity: 'ok',
|
|
34
|
+
message: 'Contract schema is valid.',
|
|
35
|
+
remediation: '',
|
|
36
|
+
});
|
|
37
|
+
// 2. Critical item presence
|
|
38
|
+
const presentIds = new Set(contract.items.map((item) => item.id));
|
|
39
|
+
const missingCritical = CRITICAL_ITEM_IDS.filter((id) => !presentIds.has(id));
|
|
40
|
+
if (missingCritical.length > 0) {
|
|
41
|
+
diagnostics.push({
|
|
42
|
+
id: 'critical-items-present',
|
|
43
|
+
severity: 'error',
|
|
44
|
+
message: `Missing critical contract items: ${missingCritical.join(', ')}`,
|
|
45
|
+
remediation: 'Ensure .githooks/commit-msg and package.json scripts.test exist, then regenerate.',
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
diagnostics.push({
|
|
50
|
+
id: 'critical-items-present',
|
|
51
|
+
severity: 'ok',
|
|
52
|
+
message: 'All critical contract items are present.',
|
|
53
|
+
remediation: '',
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
// 3. Source snapshot freshness (drift detection)
|
|
57
|
+
if (rootDir) {
|
|
58
|
+
for (const snapshot of contract.sourceSnapshots) {
|
|
59
|
+
const fullPath = path.join(rootDir, snapshot.file);
|
|
60
|
+
if (!existsSync(fullPath)) {
|
|
61
|
+
diagnostics.push({
|
|
62
|
+
id: `source-drift:${snapshot.file}`,
|
|
63
|
+
severity: 'error',
|
|
64
|
+
message: `Source file ${snapshot.file} no longer exists.`,
|
|
65
|
+
remediation: `Regenerate the contract with \`mycodemap env-contract --update\`.`,
|
|
66
|
+
});
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
const currentContent = readFileSync(fullPath, 'utf8');
|
|
71
|
+
const currentHash = sha256(currentContent);
|
|
72
|
+
if (currentHash !== snapshot.hash) {
|
|
73
|
+
diagnostics.push({
|
|
74
|
+
id: `source-drift:${snapshot.file}`,
|
|
75
|
+
severity: 'error',
|
|
76
|
+
message: `Source file ${snapshot.file} has changed since contract generation.`,
|
|
77
|
+
remediation: `Regenerate the contract with \`mycodemap env-contract --update\`.`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
diagnostics.push({
|
|
83
|
+
id: `source-drift:${snapshot.file}`,
|
|
84
|
+
severity: 'warn',
|
|
85
|
+
message: `Cannot read source file ${snapshot.file} for drift check.`,
|
|
86
|
+
remediation: 'Verify file permissions and regenerate the contract.',
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// 4. Conflicts (warn-only)
|
|
92
|
+
if (contract.conflicts.length > 0) {
|
|
93
|
+
diagnostics.push({
|
|
94
|
+
id: 'conflicts',
|
|
95
|
+
severity: 'warn',
|
|
96
|
+
message: `${contract.conflicts.length} conflict(s) detected: ${contract.conflicts.map((c) => c.id).join(', ')}`,
|
|
97
|
+
remediation: 'Review conflicts and align documentation with executable sources.',
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
diagnostics.push({
|
|
102
|
+
id: 'conflicts',
|
|
103
|
+
severity: 'ok',
|
|
104
|
+
message: 'No conflicts detected.',
|
|
105
|
+
remediation: '',
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
// Determine overall status
|
|
109
|
+
const hasError = diagnostics.some((d) => d.severity === 'error');
|
|
110
|
+
const hasWarn = diagnostics.some((d) => d.severity === 'warn');
|
|
111
|
+
const status = hasError ? 'error' : hasWarn ? 'warn' : 'ok';
|
|
112
|
+
return {
|
|
113
|
+
ok: !hasError,
|
|
114
|
+
status,
|
|
115
|
+
diagnostics,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/cli/env-contract/check.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,8EAA8E;AAE9E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kCAAkC,EAAE,MAAM,iBAAiB,CAAC;AAerE,MAAM,iBAAiB,GAAG;IACxB,eAAe;IACf,mBAAmB;CACX,CAAC;AAEX,SAAS,MAAM,CAAC,OAAe;IAC7B,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACxE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAC7C,QAAoC,EACpC,OAAgB;IAEhB,MAAM,WAAW,GAA4B,EAAE,CAAC;IAEhD,uBAAuB;IACvB,MAAM,YAAY,GAAG,kCAAkC,CAAC,QAAQ,CAAC,CAAC;IAClE,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QACxB,WAAW,CAAC,IAAI,CAAC;YACf,EAAE,EAAE,cAAc;YAClB,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,4BAA4B,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACrE,WAAW,EAAE,iEAAiE;SAC/E,CAAC,CAAC;QACH,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAC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AAC;SAAM,CAAC;QACN,WAAW,CAAC,IAAI,CAAC;YACf,EAAE,EAAE,WAAW;YACf,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,wBAAwB;YACjC,WAAW,EAAE,EAAE;SAChB,CAAC,CAAC;IACL,CAAC;IAED,2BAA2B;IAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;IACjE,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;IAE/D,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAE5D,OAAO;QACL,EAAE,EAAE,CAAC,QAAQ;QACb,MAAM;QACN,WAAW;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ProjectEnvironmentContract } from './types.js';
|
|
2
|
+
export interface SourceSnapshot {
|
|
3
|
+
file: string;
|
|
4
|
+
hash: string;
|
|
5
|
+
lastModified: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DiscoveryOptions {
|
|
8
|
+
profileName?: string;
|
|
9
|
+
generatedAt?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function discoverProjectEnvironmentContract(rootDir: string, options?: DiscoveryOptions): ProjectEnvironmentContract;
|
|
12
|
+
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../src/cli/env-contract/discovery.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAMV,0BAA0B,EAE3B,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB;AAiND,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,gBAAgB,GACzB,0BAA0B,CAyD5B"}
|