spectra-cli 4.1.1
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/LICENSE +21 -0
- package/README.md +350 -0
- package/dist/adapters/go-adapter.d.ts +38 -0
- package/dist/adapters/go-adapter.d.ts.map +1 -0
- package/dist/adapters/go-adapter.js +58 -0
- package/dist/adapters/go-adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +21 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +36 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/java-adapter.d.ts +39 -0
- package/dist/adapters/java-adapter.d.ts.map +1 -0
- package/dist/adapters/java-adapter.js +65 -0
- package/dist/adapters/java-adapter.js.map +1 -0
- package/dist/adapters/language-adapter-registry.d.ts +56 -0
- package/dist/adapters/language-adapter-registry.d.ts.map +1 -0
- package/dist/adapters/language-adapter-registry.js +110 -0
- package/dist/adapters/language-adapter-registry.js.map +1 -0
- package/dist/adapters/language-adapter.d.ts +127 -0
- package/dist/adapters/language-adapter.d.ts.map +1 -0
- package/dist/adapters/language-adapter.js +2 -0
- package/dist/adapters/language-adapter.js.map +1 -0
- package/dist/adapters/python-adapter.d.ts +61 -0
- package/dist/adapters/python-adapter.d.ts.map +1 -0
- package/dist/adapters/python-adapter.js +260 -0
- package/dist/adapters/python-adapter.js.map +1 -0
- package/dist/adapters/tree-sitter-comment-extractor.d.ts +15 -0
- package/dist/adapters/tree-sitter-comment-extractor.d.ts.map +1 -0
- package/dist/adapters/tree-sitter-comment-extractor.js +105 -0
- package/dist/adapters/tree-sitter-comment-extractor.js.map +1 -0
- package/dist/adapters/ts-js-adapter.d.ts +38 -0
- package/dist/adapters/ts-js-adapter.d.ts.map +1 -0
- package/dist/adapters/ts-js-adapter.js +164 -0
- package/dist/adapters/ts-js-adapter.js.map +1 -0
- package/dist/auth/auth-detector.d.ts +41 -0
- package/dist/auth/auth-detector.d.ts.map +1 -0
- package/dist/auth/auth-detector.js +324 -0
- package/dist/auth/auth-detector.js.map +1 -0
- package/dist/auth/cli-proxy.d.ts +35 -0
- package/dist/auth/cli-proxy.d.ts.map +1 -0
- package/dist/auth/cli-proxy.js +225 -0
- package/dist/auth/cli-proxy.js.map +1 -0
- package/dist/auth/codex-proxy.d.ts +22 -0
- package/dist/auth/codex-proxy.d.ts.map +1 -0
- package/dist/auth/codex-proxy.js +199 -0
- package/dist/auth/codex-proxy.js.map +1 -0
- package/dist/batch/batch-orchestrator.d.ts +214 -0
- package/dist/batch/batch-orchestrator.d.ts.map +1 -0
- package/dist/batch/batch-orchestrator.js +1552 -0
- package/dist/batch/batch-orchestrator.js.map +1 -0
- package/dist/batch/batch-readme-generator.d.ts +32 -0
- package/dist/batch/batch-readme-generator.d.ts.map +1 -0
- package/dist/batch/batch-readme-generator.js +153 -0
- package/dist/batch/batch-readme-generator.js.map +1 -0
- package/dist/batch/budget-gate.d.ts +107 -0
- package/dist/batch/budget-gate.d.ts.map +1 -0
- package/dist/batch/budget-gate.js +279 -0
- package/dist/batch/budget-gate.js.map +1 -0
- package/dist/batch/checkpoint.d.ts +25 -0
- package/dist/batch/checkpoint.d.ts.map +1 -0
- package/dist/batch/checkpoint.js +68 -0
- package/dist/batch/checkpoint.js.map +1 -0
- package/dist/batch/cost-summary.d.ts +78 -0
- package/dist/batch/cost-summary.d.ts.map +1 -0
- package/dist/batch/cost-summary.js +191 -0
- package/dist/batch/cost-summary.js.map +1 -0
- package/dist/batch/delta-regenerator.d.ts +41 -0
- package/dist/batch/delta-regenerator.d.ts.map +1 -0
- package/dist/batch/delta-regenerator.js +267 -0
- package/dist/batch/delta-regenerator.js.map +1 -0
- package/dist/batch/directory-classifier.d.ts +79 -0
- package/dist/batch/directory-classifier.d.ts.map +1 -0
- package/dist/batch/directory-classifier.js +270 -0
- package/dist/batch/directory-classifier.js.map +1 -0
- package/dist/batch/language-grouper.d.ts +28 -0
- package/dist/batch/language-grouper.d.ts.map +1 -0
- package/dist/batch/language-grouper.js +67 -0
- package/dist/batch/language-grouper.js.map +1 -0
- package/dist/batch/model-override-decision.d.ts +27 -0
- package/dist/batch/model-override-decision.d.ts.map +1 -0
- package/dist/batch/model-override-decision.js +14 -0
- package/dist/batch/model-override-decision.js.map +1 -0
- package/dist/batch/module-grouper.d.ts +59 -0
- package/dist/batch/module-grouper.d.ts.map +1 -0
- package/dist/batch/module-grouper.js +286 -0
- package/dist/batch/module-grouper.js.map +1 -0
- package/dist/batch/progress-reporter.d.ts +68 -0
- package/dist/batch/progress-reporter.d.ts.map +1 -0
- package/dist/batch/progress-reporter.js +273 -0
- package/dist/batch/progress-reporter.js.map +1 -0
- package/dist/batch/readme-graph-section.d.ts +53 -0
- package/dist/batch/readme-graph-section.d.ts.map +1 -0
- package/dist/batch/readme-graph-section.js +183 -0
- package/dist/batch/readme-graph-section.js.map +1 -0
- package/dist/cli/commands/auth-status.d.ts +10 -0
- package/dist/cli/commands/auth-status.d.ts.map +1 -0
- package/dist/cli/commands/auth-status.js +50 -0
- package/dist/cli/commands/auth-status.js.map +1 -0
- package/dist/cli/commands/batch.d.ts +10 -0
- package/dist/cli/commands/batch.d.ts.map +1 -0
- package/dist/cli/commands/batch.js +133 -0
- package/dist/cli/commands/batch.js.map +1 -0
- package/dist/cli/commands/cache.d.ts +13 -0
- package/dist/cli/commands/cache.d.ts.map +1 -0
- package/dist/cli/commands/cache.js +65 -0
- package/dist/cli/commands/cache.js.map +1 -0
- package/dist/cli/commands/community.d.ts +10 -0
- package/dist/cli/commands/community.d.ts.map +1 -0
- package/dist/cli/commands/community.js +92 -0
- package/dist/cli/commands/community.js.map +1 -0
- package/dist/cli/commands/diff.d.ts +10 -0
- package/dist/cli/commands/diff.d.ts.map +1 -0
- package/dist/cli/commands/diff.js +49 -0
- package/dist/cli/commands/diff.js.map +1 -0
- package/dist/cli/commands/direction-audit.d.ts +12 -0
- package/dist/cli/commands/direction-audit.d.ts.map +1 -0
- package/dist/cli/commands/direction-audit.js +458 -0
- package/dist/cli/commands/direction-audit.js.map +1 -0
- package/dist/cli/commands/export.d.ts +22 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +123 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +10 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +50 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/graph.d.ts +20 -0
- package/dist/cli/commands/graph.d.ts.map +1 -0
- package/dist/cli/commands/graph.js +189 -0
- package/dist/cli/commands/graph.js.map +1 -0
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +33 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/install.d.ts +11 -0
- package/dist/cli/commands/install.d.ts.map +1 -0
- package/dist/cli/commands/install.js +52 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/commands/mcp-server.d.ts +23 -0
- package/dist/cli/commands/mcp-server.d.ts.map +1 -0
- package/dist/cli/commands/mcp-server.js +90 -0
- package/dist/cli/commands/mcp-server.js.map +1 -0
- package/dist/cli/commands/panoramic.d.ts +7 -0
- package/dist/cli/commands/panoramic.d.ts.map +1 -0
- package/dist/cli/commands/panoramic.js +43 -0
- package/dist/cli/commands/panoramic.js.map +1 -0
- package/dist/cli/commands/prepare.d.ts +13 -0
- package/dist/cli/commands/prepare.d.ts.map +1 -0
- package/dist/cli/commands/prepare.js +148 -0
- package/dist/cli/commands/prepare.js.map +1 -0
- package/dist/cli/commands/query.d.ts +13 -0
- package/dist/cli/commands/query.d.ts.map +1 -0
- package/dist/cli/commands/query.js +116 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +16 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +188 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +193 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/utils/error-handler.d.ts +41 -0
- package/dist/cli/utils/error-handler.d.ts.map +1 -0
- package/dist/cli/utils/error-handler.js +90 -0
- package/dist/cli/utils/error-handler.js.map +1 -0
- package/dist/cli/utils/parse-args.d.ts +111 -0
- package/dist/cli/utils/parse-args.d.ts.map +1 -0
- package/dist/cli/utils/parse-args.js +756 -0
- package/dist/cli/utils/parse-args.js.map +1 -0
- package/dist/config/project-config.d.ts +49 -0
- package/dist/config/project-config.d.ts.map +1 -0
- package/dist/config/project-config.js +118 -0
- package/dist/config/project-config.js.map +1 -0
- package/dist/config/spec-driver-config.d.ts +32 -0
- package/dist/config/spec-driver-config.d.ts.map +1 -0
- package/dist/config/spec-driver-config.js +91 -0
- package/dist/config/spec-driver-config.js.map +1 -0
- package/dist/core/ast-analyzer.d.ts +49 -0
- package/dist/core/ast-analyzer.d.ts.map +1 -0
- package/dist/core/ast-analyzer.js +439 -0
- package/dist/core/ast-analyzer.js.map +1 -0
- package/dist/core/code-slice-extractor.d.ts +47 -0
- package/dist/core/code-slice-extractor.d.ts.map +1 -0
- package/dist/core/code-slice-extractor.js +227 -0
- package/dist/core/code-slice-extractor.js.map +1 -0
- package/dist/core/context-assembler.d.ts +80 -0
- package/dist/core/context-assembler.d.ts.map +1 -0
- package/dist/core/context-assembler.js +262 -0
- package/dist/core/context-assembler.js.map +1 -0
- package/dist/core/grammar-manager.d.ts +79 -0
- package/dist/core/grammar-manager.d.ts.map +1 -0
- package/dist/core/grammar-manager.js +188 -0
- package/dist/core/grammar-manager.js.map +1 -0
- package/dist/core/llm-client.d.ts +120 -0
- package/dist/core/llm-client.d.ts.map +1 -0
- package/dist/core/llm-client.js +608 -0
- package/dist/core/llm-client.js.map +1 -0
- package/dist/core/model-selection.d.ts +50 -0
- package/dist/core/model-selection.d.ts.map +1 -0
- package/dist/core/model-selection.js +410 -0
- package/dist/core/model-selection.js.map +1 -0
- package/dist/core/query-mappers/base-mapper.d.ts +22 -0
- package/dist/core/query-mappers/base-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/base-mapper.js +2 -0
- package/dist/core/query-mappers/base-mapper.js.map +1 -0
- package/dist/core/query-mappers/go-mapper.d.ts +46 -0
- package/dist/core/query-mappers/go-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/go-mapper.js +477 -0
- package/dist/core/query-mappers/go-mapper.js.map +1 -0
- package/dist/core/query-mappers/index.d.ts +6 -0
- package/dist/core/query-mappers/index.d.ts.map +1 -0
- package/dist/core/query-mappers/index.js +5 -0
- package/dist/core/query-mappers/index.js.map +1 -0
- package/dist/core/query-mappers/java-mapper.d.ts +40 -0
- package/dist/core/query-mappers/java-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/java-mapper.js +405 -0
- package/dist/core/query-mappers/java-mapper.js.map +1 -0
- package/dist/core/query-mappers/python-mapper.d.ts +65 -0
- package/dist/core/query-mappers/python-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/python-mapper.js +673 -0
- package/dist/core/query-mappers/python-mapper.js.map +1 -0
- package/dist/core/query-mappers/typescript-mapper.d.ts +54 -0
- package/dist/core/query-mappers/typescript-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/typescript-mapper.js +706 -0
- package/dist/core/query-mappers/typescript-mapper.js.map +1 -0
- package/dist/core/secret-redactor.d.ts +10 -0
- package/dist/core/secret-redactor.d.ts.map +1 -0
- package/dist/core/secret-redactor.js +208 -0
- package/dist/core/secret-redactor.js.map +1 -0
- package/dist/core/single-spec-orchestrator.d.ts +103 -0
- package/dist/core/single-spec-orchestrator.d.ts.map +1 -0
- package/dist/core/single-spec-orchestrator.js +911 -0
- package/dist/core/single-spec-orchestrator.js.map +1 -0
- package/dist/core/token-counter.d.ts +48 -0
- package/dist/core/token-counter.d.ts.map +1 -0
- package/dist/core/token-counter.js +136 -0
- package/dist/core/token-counter.js.map +1 -0
- package/dist/core/tree-sitter-analyzer.d.ts +62 -0
- package/dist/core/tree-sitter-analyzer.d.ts.map +1 -0
- package/dist/core/tree-sitter-analyzer.js +229 -0
- package/dist/core/tree-sitter-analyzer.js.map +1 -0
- package/dist/core/tree-sitter-fallback.d.ts +14 -0
- package/dist/core/tree-sitter-fallback.d.ts.map +1 -0
- package/dist/core/tree-sitter-fallback.js +423 -0
- package/dist/core/tree-sitter-fallback.js.map +1 -0
- package/dist/debt-scanner/aggregator/quality-report-patcher.d.ts +22 -0
- package/dist/debt-scanner/aggregator/quality-report-patcher.d.ts.map +1 -0
- package/dist/debt-scanner/aggregator/quality-report-patcher.js +107 -0
- package/dist/debt-scanner/aggregator/quality-report-patcher.js.map +1 -0
- package/dist/debt-scanner/aggregator/readme-indexer.d.ts +6 -0
- package/dist/debt-scanner/aggregator/readme-indexer.d.ts.map +1 -0
- package/dist/debt-scanner/aggregator/readme-indexer.js +52 -0
- package/dist/debt-scanner/aggregator/readme-indexer.js.map +1 -0
- package/dist/debt-scanner/aggregator/report-builder.d.ts +25 -0
- package/dist/debt-scanner/aggregator/report-builder.d.ts.map +1 -0
- package/dist/debt-scanner/aggregator/report-builder.js +162 -0
- package/dist/debt-scanner/aggregator/report-builder.js.map +1 -0
- package/dist/debt-scanner/comments/debt-classifier.d.ts +28 -0
- package/dist/debt-scanner/comments/debt-classifier.d.ts.map +1 -0
- package/dist/debt-scanner/comments/debt-classifier.js +50 -0
- package/dist/debt-scanner/comments/debt-classifier.js.map +1 -0
- package/dist/debt-scanner/comments/index.d.ts +32 -0
- package/dist/debt-scanner/comments/index.d.ts.map +1 -0
- package/dist/debt-scanner/comments/index.js +103 -0
- package/dist/debt-scanner/comments/index.js.map +1 -0
- package/dist/debt-scanner/comments/symbol-resolver.d.ts +18 -0
- package/dist/debt-scanner/comments/symbol-resolver.d.ts.map +1 -0
- package/dist/debt-scanner/comments/symbol-resolver.js +18 -0
- package/dist/debt-scanner/comments/symbol-resolver.js.map +1 -0
- package/dist/debt-scanner/design-docs/doc-discoverer.d.ts +6 -0
- package/dist/debt-scanner/design-docs/doc-discoverer.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/doc-discoverer.js +62 -0
- package/dist/debt-scanner/design-docs/doc-discoverer.js.map +1 -0
- package/dist/debt-scanner/design-docs/index.d.ts +28 -0
- package/dist/debt-scanner/design-docs/index.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/index.js +60 -0
- package/dist/debt-scanner/design-docs/index.js.map +1 -0
- package/dist/debt-scanner/design-docs/llm-topic-inferrer.d.ts +68 -0
- package/dist/debt-scanner/design-docs/llm-topic-inferrer.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/llm-topic-inferrer.js +151 -0
- package/dist/debt-scanner/design-docs/llm-topic-inferrer.js.map +1 -0
- package/dist/debt-scanner/design-docs/markdown-sections.d.ts +24 -0
- package/dist/debt-scanner/design-docs/markdown-sections.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/markdown-sections.js +92 -0
- package/dist/debt-scanner/design-docs/markdown-sections.js.map +1 -0
- package/dist/debt-scanner/design-docs/rule-detector.d.ts +18 -0
- package/dist/debt-scanner/design-docs/rule-detector.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/rule-detector.js +46 -0
- package/dist/debt-scanner/design-docs/rule-detector.js.map +1 -0
- package/dist/debt-scanner/index.d.ts +43 -0
- package/dist/debt-scanner/index.d.ts.map +1 -0
- package/dist/debt-scanner/index.js +177 -0
- package/dist/debt-scanner/index.js.map +1 -0
- package/dist/debt-scanner/llm-clients.d.ts +33 -0
- package/dist/debt-scanner/llm-clients.d.ts.map +1 -0
- package/dist/debt-scanner/llm-clients.js +78 -0
- package/dist/debt-scanner/llm-clients.js.map +1 -0
- package/dist/debt-scanner/types.d.ts +97 -0
- package/dist/debt-scanner/types.d.ts.map +1 -0
- package/dist/debt-scanner/types.js +7 -0
- package/dist/debt-scanner/types.js.map +1 -0
- package/dist/diff/drift-orchestrator.d.ts +25 -0
- package/dist/diff/drift-orchestrator.d.ts.map +1 -0
- package/dist/diff/drift-orchestrator.js +248 -0
- package/dist/diff/drift-orchestrator.js.map +1 -0
- package/dist/diff/noise-filter.d.ts +27 -0
- package/dist/diff/noise-filter.d.ts.map +1 -0
- package/dist/diff/noise-filter.js +129 -0
- package/dist/diff/noise-filter.js.map +1 -0
- package/dist/diff/semantic-diff.d.ts +12 -0
- package/dist/diff/semantic-diff.d.ts.map +1 -0
- package/dist/diff/semantic-diff.js +94 -0
- package/dist/diff/semantic-diff.js.map +1 -0
- package/dist/diff/structural-diff.d.ts +16 -0
- package/dist/diff/structural-diff.d.ts.map +1 -0
- package/dist/diff/structural-diff.js +171 -0
- package/dist/diff/structural-diff.js.map +1 -0
- package/dist/extraction/artifact-classifier.d.ts +19 -0
- package/dist/extraction/artifact-classifier.d.ts.map +1 -0
- package/dist/extraction/artifact-classifier.js +104 -0
- package/dist/extraction/artifact-classifier.js.map +1 -0
- package/dist/extraction/extraction-cache.d.ts +32 -0
- package/dist/extraction/extraction-cache.d.ts.map +1 -0
- package/dist/extraction/extraction-cache.js +117 -0
- package/dist/extraction/extraction-cache.js.map +1 -0
- package/dist/extraction/extraction-pipeline.d.ts +44 -0
- package/dist/extraction/extraction-pipeline.d.ts.map +1 -0
- package/dist/extraction/extraction-pipeline.js +286 -0
- package/dist/extraction/extraction-pipeline.js.map +1 -0
- package/dist/extraction/extraction-types.d.ts +180 -0
- package/dist/extraction/extraction-types.d.ts.map +1 -0
- package/dist/extraction/extraction-types.js +63 -0
- package/dist/extraction/extraction-types.js.map +1 -0
- package/dist/extraction/image-extractor.d.ts +21 -0
- package/dist/extraction/image-extractor.d.ts.map +1 -0
- package/dist/extraction/image-extractor.js +211 -0
- package/dist/extraction/image-extractor.js.map +1 -0
- package/dist/extraction/index.d.ts +8 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +6 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/markdown-extractor.d.ts +11 -0
- package/dist/extraction/markdown-extractor.d.ts.map +1 -0
- package/dist/extraction/markdown-extractor.js +212 -0
- package/dist/extraction/markdown-extractor.js.map +1 -0
- package/dist/extraction/openapi-extractor.d.ts +10 -0
- package/dist/extraction/openapi-extractor.d.ts.map +1 -0
- package/dist/extraction/openapi-extractor.js +449 -0
- package/dist/extraction/openapi-extractor.js.map +1 -0
- package/dist/generator/frontmatter.d.ts +58 -0
- package/dist/generator/frontmatter.d.ts.map +1 -0
- package/dist/generator/frontmatter.js +100 -0
- package/dist/generator/frontmatter.js.map +1 -0
- package/dist/generator/index-generator.d.ts +27 -0
- package/dist/generator/index-generator.d.ts.map +1 -0
- package/dist/generator/index-generator.js +129 -0
- package/dist/generator/index-generator.js.map +1 -0
- package/dist/generator/mermaid-class-diagram.d.ts +14 -0
- package/dist/generator/mermaid-class-diagram.d.ts.map +1 -0
- package/dist/generator/mermaid-class-diagram.js +115 -0
- package/dist/generator/mermaid-class-diagram.js.map +1 -0
- package/dist/generator/mermaid-dependency-graph.d.ts +15 -0
- package/dist/generator/mermaid-dependency-graph.d.ts.map +1 -0
- package/dist/generator/mermaid-dependency-graph.js +84 -0
- package/dist/generator/mermaid-dependency-graph.js.map +1 -0
- package/dist/generator/spec-renderer.d.ts +24 -0
- package/dist/generator/spec-renderer.d.ts.map +1 -0
- package/dist/generator/spec-renderer.js +110 -0
- package/dist/generator/spec-renderer.js.map +1 -0
- package/dist/graph/dependency-graph.d.ts +24 -0
- package/dist/graph/dependency-graph.d.ts.map +1 -0
- package/dist/graph/dependency-graph.js +206 -0
- package/dist/graph/dependency-graph.js.map +1 -0
- package/dist/graph/directory-graph.d.ts +16 -0
- package/dist/graph/directory-graph.d.ts.map +1 -0
- package/dist/graph/directory-graph.js +281 -0
- package/dist/graph/directory-graph.js.map +1 -0
- package/dist/graph/mermaid-renderer.d.ts +22 -0
- package/dist/graph/mermaid-renderer.d.ts.map +1 -0
- package/dist/graph/mermaid-renderer.js +133 -0
- package/dist/graph/mermaid-renderer.js.map +1 -0
- package/dist/graph/topological-sort.d.ts +31 -0
- package/dist/graph/topological-sort.d.ts.map +1 -0
- package/dist/graph/topological-sort.js +167 -0
- package/dist/graph/topological-sort.js.map +1 -0
- package/dist/hooks/git-hook-installer.d.ts +37 -0
- package/dist/hooks/git-hook-installer.d.ts.map +1 -0
- package/dist/hooks/git-hook-installer.js +136 -0
- package/dist/hooks/git-hook-installer.js.map +1 -0
- package/dist/hooks/hook-installer.d.ts +39 -0
- package/dist/hooks/hook-installer.d.ts.map +1 -0
- package/dist/hooks/hook-installer.js +164 -0
- package/dist/hooks/hook-installer.js.map +1 -0
- package/dist/installer/skill-installer.d.ts +63 -0
- package/dist/installer/skill-installer.d.ts.map +1 -0
- package/dist/installer/skill-installer.js +203 -0
- package/dist/installer/skill-installer.js.map +1 -0
- package/dist/installer/skill-templates.d.ts +19 -0
- package/dist/installer/skill-templates.d.ts.map +1 -0
- package/dist/installer/skill-templates.js +42 -0
- package/dist/installer/skill-templates.js.map +1 -0
- package/dist/mcp/graph-tools.d.ts +17 -0
- package/dist/mcp/graph-tools.d.ts.map +1 -0
- package/dist/mcp/graph-tools.js +269 -0
- package/dist/mcp/graph-tools.js.map +1 -0
- package/dist/mcp/index.d.ts +10 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +18 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +10 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +235 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/models/code-skeleton.d.ts +394 -0
- package/dist/models/code-skeleton.d.ts.map +1 -0
- package/dist/models/code-skeleton.js +119 -0
- package/dist/models/code-skeleton.js.map +1 -0
- package/dist/models/dependency-graph.d.ts +172 -0
- package/dist/models/dependency-graph.d.ts.map +1 -0
- package/dist/models/dependency-graph.js +44 -0
- package/dist/models/dependency-graph.js.map +1 -0
- package/dist/models/drift-item.d.ts +104 -0
- package/dist/models/drift-item.d.ts.map +1 -0
- package/dist/models/drift-item.js +38 -0
- package/dist/models/drift-item.js.map +1 -0
- package/dist/models/module-spec.d.ts +1905 -0
- package/dist/models/module-spec.d.ts.map +1 -0
- package/dist/models/module-spec.js +272 -0
- package/dist/models/module-spec.js.map +1 -0
- package/dist/panoramic/abstract-registry.d.ts +87 -0
- package/dist/panoramic/abstract-registry.d.ts.map +1 -0
- package/dist/panoramic/abstract-registry.js +88 -0
- package/dist/panoramic/abstract-registry.js.map +1 -0
- package/dist/panoramic/anchoring/chunker.d.ts +34 -0
- package/dist/panoramic/anchoring/chunker.d.ts.map +1 -0
- package/dist/panoramic/anchoring/chunker.js +274 -0
- package/dist/panoramic/anchoring/chunker.js.map +1 -0
- package/dist/panoramic/anchoring/edge-builder.d.ts +53 -0
- package/dist/panoramic/anchoring/edge-builder.d.ts.map +1 -0
- package/dist/panoramic/anchoring/edge-builder.js +183 -0
- package/dist/panoramic/anchoring/edge-builder.js.map +1 -0
- package/dist/panoramic/anchoring/embedding-provider.d.ts +51 -0
- package/dist/panoramic/anchoring/embedding-provider.d.ts.map +1 -0
- package/dist/panoramic/anchoring/embedding-provider.js +7 -0
- package/dist/panoramic/anchoring/embedding-provider.js.map +1 -0
- package/dist/panoramic/anchoring/index.d.ts +73 -0
- package/dist/panoramic/anchoring/index.d.ts.map +1 -0
- package/dist/panoramic/anchoring/index.js +91 -0
- package/dist/panoramic/anchoring/index.js.map +1 -0
- package/dist/panoramic/anchoring/providers/factory.d.ts +35 -0
- package/dist/panoramic/anchoring/providers/factory.d.ts.map +1 -0
- package/dist/panoramic/anchoring/providers/factory.js +33 -0
- package/dist/panoramic/anchoring/providers/factory.js.map +1 -0
- package/dist/panoramic/anchoring/providers/local-provider.d.ts +48 -0
- package/dist/panoramic/anchoring/providers/local-provider.d.ts.map +1 -0
- package/dist/panoramic/anchoring/providers/local-provider.js +145 -0
- package/dist/panoramic/anchoring/providers/local-provider.js.map +1 -0
- package/dist/panoramic/anchoring/providers/openai-provider.d.ts +45 -0
- package/dist/panoramic/anchoring/providers/openai-provider.d.ts.map +1 -0
- package/dist/panoramic/anchoring/providers/openai-provider.js +78 -0
- package/dist/panoramic/anchoring/providers/openai-provider.js.map +1 -0
- package/dist/panoramic/anchoring/similarity.d.ts +37 -0
- package/dist/panoramic/anchoring/similarity.d.ts.map +1 -0
- package/dist/panoramic/anchoring/similarity.js +75 -0
- package/dist/panoramic/anchoring/similarity.js.map +1 -0
- package/dist/panoramic/api-surface/endpoint-utils.d.ts +15 -0
- package/dist/panoramic/api-surface/endpoint-utils.d.ts.map +1 -0
- package/dist/panoramic/api-surface/endpoint-utils.js +145 -0
- package/dist/panoramic/api-surface/endpoint-utils.js.map +1 -0
- package/dist/panoramic/api-surface/express-extractor.d.ts +3 -0
- package/dist/panoramic/api-surface/express-extractor.d.ts.map +1 -0
- package/dist/panoramic/api-surface/express-extractor.js +288 -0
- package/dist/panoramic/api-surface/express-extractor.js.map +1 -0
- package/dist/panoramic/api-surface/fastapi-extractor.d.ts +6 -0
- package/dist/panoramic/api-surface/fastapi-extractor.d.ts.map +1 -0
- package/dist/panoramic/api-surface/fastapi-extractor.js +287 -0
- package/dist/panoramic/api-surface/fastapi-extractor.js.map +1 -0
- package/dist/panoramic/api-surface/framework-introspection.d.ts +3 -0
- package/dist/panoramic/api-surface/framework-introspection.d.ts.map +1 -0
- package/dist/panoramic/api-surface/framework-introspection.js +189 -0
- package/dist/panoramic/api-surface/framework-introspection.js.map +1 -0
- package/dist/panoramic/api-surface/index.d.ts +13 -0
- package/dist/panoramic/api-surface/index.d.ts.map +1 -0
- package/dist/panoramic/api-surface/index.js +238 -0
- package/dist/panoramic/api-surface/index.js.map +1 -0
- package/dist/panoramic/api-surface/openapi-extractor.d.ts +3 -0
- package/dist/panoramic/api-surface/openapi-extractor.d.ts.map +1 -0
- package/dist/panoramic/api-surface/openapi-extractor.js +247 -0
- package/dist/panoramic/api-surface/openapi-extractor.js.map +1 -0
- package/dist/panoramic/api-surface/types.d.ts +140 -0
- package/dist/panoramic/api-surface/types.d.ts.map +1 -0
- package/dist/panoramic/api-surface/types.js +7 -0
- package/dist/panoramic/api-surface/types.js.map +1 -0
- package/dist/panoramic/api-surface/utils.d.ts +29 -0
- package/dist/panoramic/api-surface/utils.d.ts.map +1 -0
- package/dist/panoramic/api-surface/utils.js +340 -0
- package/dist/panoramic/api-surface/utils.js.map +1 -0
- package/dist/panoramic/batch-project-docs.d.ts +101 -0
- package/dist/panoramic/batch-project-docs.d.ts.map +1 -0
- package/dist/panoramic/batch-project-docs.js +616 -0
- package/dist/panoramic/batch-project-docs.js.map +1 -0
- package/dist/panoramic/builders/architecture-ir-builder.d.ts +19 -0
- package/dist/panoramic/builders/architecture-ir-builder.d.ts.map +1 -0
- package/dist/panoramic/builders/architecture-ir-builder.js +561 -0
- package/dist/panoramic/builders/architecture-ir-builder.js.map +1 -0
- package/dist/panoramic/builders/architecture-ir-mermaid-adapter.d.ts +6 -0
- package/dist/panoramic/builders/architecture-ir-mermaid-adapter.d.ts.map +1 -0
- package/dist/panoramic/builders/architecture-ir-mermaid-adapter.js +98 -0
- package/dist/panoramic/builders/architecture-ir-mermaid-adapter.js.map +1 -0
- package/dist/panoramic/builders/component-view-builder.d.ts +38 -0
- package/dist/panoramic/builders/component-view-builder.d.ts.map +1 -0
- package/dist/panoramic/builders/component-view-builder.js +694 -0
- package/dist/panoramic/builders/component-view-builder.js.map +1 -0
- package/dist/panoramic/builders/doc-graph-builder.d.ts +179 -0
- package/dist/panoramic/builders/doc-graph-builder.d.ts.map +1 -0
- package/dist/panoramic/builders/doc-graph-builder.js +546 -0
- package/dist/panoramic/builders/doc-graph-builder.js.map +1 -0
- package/dist/panoramic/builders/dynamic-scenarios-builder.d.ts +38 -0
- package/dist/panoramic/builders/dynamic-scenarios-builder.d.ts.map +1 -0
- package/dist/panoramic/builders/dynamic-scenarios-builder.js +361 -0
- package/dist/panoramic/builders/dynamic-scenarios-builder.js.map +1 -0
- package/dist/panoramic/cache/cache-key-builder.d.ts +25 -0
- package/dist/panoramic/cache/cache-key-builder.d.ts.map +1 -0
- package/dist/panoramic/cache/cache-key-builder.js +119 -0
- package/dist/panoramic/cache/cache-key-builder.js.map +1 -0
- package/dist/panoramic/cache/cache-manager.d.ts +58 -0
- package/dist/panoramic/cache/cache-manager.d.ts.map +1 -0
- package/dist/panoramic/cache/cache-manager.js +170 -0
- package/dist/panoramic/cache/cache-manager.js.map +1 -0
- package/dist/panoramic/cache/content-hasher.d.ts +47 -0
- package/dist/panoramic/cache/content-hasher.d.ts.map +1 -0
- package/dist/panoramic/cache/content-hasher.js +89 -0
- package/dist/panoramic/cache/content-hasher.js.map +1 -0
- package/dist/panoramic/cache/index.d.ts +10 -0
- package/dist/panoramic/cache/index.d.ts.map +1 -0
- package/dist/panoramic/cache/index.js +13 -0
- package/dist/panoramic/cache/index.js.map +1 -0
- package/dist/panoramic/cache/manifest-manager.d.ts +83 -0
- package/dist/panoramic/cache/manifest-manager.d.ts.map +1 -0
- package/dist/panoramic/cache/manifest-manager.js +119 -0
- package/dist/panoramic/cache/manifest-manager.js.map +1 -0
- package/dist/panoramic/cache/schemas.d.ts +199 -0
- package/dist/panoramic/cache/schemas.d.ts.map +1 -0
- package/dist/panoramic/cache/schemas.js +53 -0
- package/dist/panoramic/cache/schemas.js.map +1 -0
- package/dist/panoramic/cluster-orchestrator.d.ts +278 -0
- package/dist/panoramic/cluster-orchestrator.d.ts.map +1 -0
- package/dist/panoramic/cluster-orchestrator.js +531 -0
- package/dist/panoramic/cluster-orchestrator.js.map +1 -0
- package/dist/panoramic/community/community-detector.d.ts +41 -0
- package/dist/panoramic/community/community-detector.d.ts.map +1 -0
- package/dist/panoramic/community/community-detector.js +190 -0
- package/dist/panoramic/community/community-detector.js.map +1 -0
- package/dist/panoramic/community/god-node-analyzer.d.ts +28 -0
- package/dist/panoramic/community/god-node-analyzer.d.ts.map +1 -0
- package/dist/panoramic/community/god-node-analyzer.js +91 -0
- package/dist/panoramic/community/god-node-analyzer.js.map +1 -0
- package/dist/panoramic/community/graph-report-generator.d.ts +31 -0
- package/dist/panoramic/community/graph-report-generator.d.ts.map +1 -0
- package/dist/panoramic/community/graph-report-generator.js +98 -0
- package/dist/panoramic/community/graph-report-generator.js.map +1 -0
- package/dist/panoramic/community/index.d.ts +31 -0
- package/dist/panoramic/community/index.d.ts.map +1 -0
- package/dist/panoramic/community/index.js +63 -0
- package/dist/panoramic/community/index.js.map +1 -0
- package/dist/panoramic/community/surprising-edges.d.ts +42 -0
- package/dist/panoramic/community/surprising-edges.d.ts.map +1 -0
- package/dist/panoramic/community/surprising-edges.js +154 -0
- package/dist/panoramic/community/surprising-edges.js.map +1 -0
- package/dist/panoramic/cross-reference-index.d.ts +4 -0
- package/dist/panoramic/cross-reference-index.d.ts.map +1 -0
- package/dist/panoramic/cross-reference-index.js +201 -0
- package/dist/panoramic/cross-reference-index.js.map +1 -0
- package/dist/panoramic/exporters/architecture-ir-exporters.d.ts +7 -0
- package/dist/panoramic/exporters/architecture-ir-exporters.d.ts.map +1 -0
- package/dist/panoramic/exporters/architecture-ir-exporters.js +183 -0
- package/dist/panoramic/exporters/architecture-ir-exporters.js.map +1 -0
- package/dist/panoramic/exporters/export-types.d.ts +33 -0
- package/dist/panoramic/exporters/export-types.d.ts.map +1 -0
- package/dist/panoramic/exporters/export-types.js +7 -0
- package/dist/panoramic/exporters/export-types.js.map +1 -0
- package/dist/panoramic/exporters/html-exporter.d.ts +83 -0
- package/dist/panoramic/exporters/html-exporter.d.ts.map +1 -0
- package/dist/panoramic/exporters/html-exporter.js +224 -0
- package/dist/panoramic/exporters/html-exporter.js.map +1 -0
- package/dist/panoramic/exporters/html-template.d.ts +32 -0
- package/dist/panoramic/exporters/html-template.d.ts.map +1 -0
- package/dist/panoramic/exporters/html-template.js +737 -0
- package/dist/panoramic/exporters/html-template.js.map +1 -0
- package/dist/panoramic/exporters/obsidian-exporter.d.ts +67 -0
- package/dist/panoramic/exporters/obsidian-exporter.d.ts.map +1 -0
- package/dist/panoramic/exporters/obsidian-exporter.js +333 -0
- package/dist/panoramic/exporters/obsidian-exporter.js.map +1 -0
- package/dist/panoramic/generator-registry.d.ts +86 -0
- package/dist/panoramic/generator-registry.d.ts.map +1 -0
- package/dist/panoramic/generator-registry.js +194 -0
- package/dist/panoramic/generator-registry.js.map +1 -0
- package/dist/panoramic/generators/architecture-ir-generator.d.ts +36 -0
- package/dist/panoramic/generators/architecture-ir-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/architecture-ir-generator.js +51 -0
- package/dist/panoramic/generators/architecture-ir-generator.js.map +1 -0
- package/dist/panoramic/generators/architecture-overview-generator.d.ts +31 -0
- package/dist/panoramic/generators/architecture-overview-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/architecture-overview-generator.js +454 -0
- package/dist/panoramic/generators/architecture-overview-generator.js.map +1 -0
- package/dist/panoramic/generators/config-reference-generator.d.ts +78 -0
- package/dist/panoramic/generators/config-reference-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/config-reference-generator.js +201 -0
- package/dist/panoramic/generators/config-reference-generator.js.map +1 -0
- package/dist/panoramic/generators/cross-package-analyzer.d.ts +112 -0
- package/dist/panoramic/generators/cross-package-analyzer.d.ts.map +1 -0
- package/dist/panoramic/generators/cross-package-analyzer.js +258 -0
- package/dist/panoramic/generators/cross-package-analyzer.js.map +1 -0
- package/dist/panoramic/generators/data-model-generator.d.ts +528 -0
- package/dist/panoramic/generators/data-model-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/data-model-generator.js +674 -0
- package/dist/panoramic/generators/data-model-generator.js.map +1 -0
- package/dist/panoramic/generators/event-surface-generator.d.ts +52 -0
- package/dist/panoramic/generators/event-surface-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/event-surface-generator.js +634 -0
- package/dist/panoramic/generators/event-surface-generator.js.map +1 -0
- package/dist/panoramic/generators/interface-surface-generator.d.ts +50 -0
- package/dist/panoramic/generators/interface-surface-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/interface-surface-generator.js +393 -0
- package/dist/panoramic/generators/interface-surface-generator.js.map +1 -0
- package/dist/panoramic/generators/mock-readme-generator.d.ts +90 -0
- package/dist/panoramic/generators/mock-readme-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/mock-readme-generator.js +113 -0
- package/dist/panoramic/generators/mock-readme-generator.js.map +1 -0
- package/dist/panoramic/generators/pattern-hints-generator.d.ts +28 -0
- package/dist/panoramic/generators/pattern-hints-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/pattern-hints-generator.js +170 -0
- package/dist/panoramic/generators/pattern-hints-generator.js.map +1 -0
- package/dist/panoramic/generators/runtime-topology-generator.d.ts +77 -0
- package/dist/panoramic/generators/runtime-topology-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/runtime-topology-generator.js +679 -0
- package/dist/panoramic/generators/runtime-topology-generator.js.map +1 -0
- package/dist/panoramic/generators/troubleshooting-generator.d.ts +51 -0
- package/dist/panoramic/generators/troubleshooting-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/troubleshooting-generator.js +464 -0
- package/dist/panoramic/generators/troubleshooting-generator.js.map +1 -0
- package/dist/panoramic/generators/workspace-index-generator.d.ts +148 -0
- package/dist/panoramic/generators/workspace-index-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/workspace-index-generator.js +500 -0
- package/dist/panoramic/generators/workspace-index-generator.js.map +1 -0
- package/dist/panoramic/graph/confidence-mapper.d.ts +39 -0
- package/dist/panoramic/graph/confidence-mapper.d.ts.map +1 -0
- package/dist/panoramic/graph/confidence-mapper.js +55 -0
- package/dist/panoramic/graph/confidence-mapper.js.map +1 -0
- package/dist/panoramic/graph/graph-builder.d.ts +33 -0
- package/dist/panoramic/graph/graph-builder.d.ts.map +1 -0
- package/dist/panoramic/graph/graph-builder.js +382 -0
- package/dist/panoramic/graph/graph-builder.js.map +1 -0
- package/dist/panoramic/graph/graph-paths.d.ts +13 -0
- package/dist/panoramic/graph/graph-paths.d.ts.map +1 -0
- package/dist/panoramic/graph/graph-paths.js +16 -0
- package/dist/panoramic/graph/graph-paths.js.map +1 -0
- package/dist/panoramic/graph/graph-query.d.ts +226 -0
- package/dist/panoramic/graph/graph-query.d.ts.map +1 -0
- package/dist/panoramic/graph/graph-query.js +571 -0
- package/dist/panoramic/graph/graph-query.js.map +1 -0
- package/dist/panoramic/graph/graph-types.d.ts +156 -0
- package/dist/panoramic/graph/graph-types.d.ts.map +1 -0
- package/dist/panoramic/graph/graph-types.js +10 -0
- package/dist/panoramic/graph/graph-types.js.map +1 -0
- package/dist/panoramic/graph/index.d.ts +6 -0
- package/dist/panoramic/graph/index.d.ts.map +1 -0
- package/dist/panoramic/graph/index.js +8 -0
- package/dist/panoramic/graph/index.js.map +1 -0
- package/dist/panoramic/hyperedges/constants.d.ts +16 -0
- package/dist/panoramic/hyperedges/constants.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/constants.js +13 -0
- package/dist/panoramic/hyperedges/constants.js.map +1 -0
- package/dist/panoramic/hyperedges/extractor.d.ts +80 -0
- package/dist/panoramic/hyperedges/extractor.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/extractor.js +133 -0
- package/dist/panoramic/hyperedges/extractor.js.map +1 -0
- package/dist/panoramic/hyperedges/index.d.ts +12 -0
- package/dist/panoramic/hyperedges/index.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/index.js +19 -0
- package/dist/panoramic/hyperedges/index.js.map +1 -0
- package/dist/panoramic/hyperedges/prompt.d.ts +30 -0
- package/dist/panoramic/hyperedges/prompt.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/prompt.js +88 -0
- package/dist/panoramic/hyperedges/prompt.js.map +1 -0
- package/dist/panoramic/hyperedges/schema.d.ts +91 -0
- package/dist/panoramic/hyperedges/schema.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/schema.js +52 -0
- package/dist/panoramic/hyperedges/schema.js.map +1 -0
- package/dist/panoramic/index.d.ts +17 -0
- package/dist/panoramic/index.d.ts.map +1 -0
- package/dist/panoramic/index.js +22 -0
- package/dist/panoramic/index.js.map +1 -0
- package/dist/panoramic/interfaces.d.ts +243 -0
- package/dist/panoramic/interfaces.d.ts.map +1 -0
- package/dist/panoramic/interfaces.js +130 -0
- package/dist/panoramic/interfaces.js.map +1 -0
- package/dist/panoramic/internal.d.ts +67 -0
- package/dist/panoramic/internal.d.ts.map +1 -0
- package/dist/panoramic/internal.js +93 -0
- package/dist/panoramic/internal.js.map +1 -0
- package/dist/panoramic/models/architecture-ir-model.d.ts +92 -0
- package/dist/panoramic/models/architecture-ir-model.d.ts.map +1 -0
- package/dist/panoramic/models/architecture-ir-model.js +14 -0
- package/dist/panoramic/models/architecture-ir-model.js.map +1 -0
- package/dist/panoramic/models/architecture-overview-model.d.ts +77 -0
- package/dist/panoramic/models/architecture-overview-model.d.ts.map +1 -0
- package/dist/panoramic/models/architecture-overview-model.js +31 -0
- package/dist/panoramic/models/architecture-overview-model.js.map +1 -0
- package/dist/panoramic/models/component-view-model.d.ts +127 -0
- package/dist/panoramic/models/component-view-model.d.ts.map +1 -0
- package/dist/panoramic/models/component-view-model.js +65 -0
- package/dist/panoramic/models/component-view-model.js.map +1 -0
- package/dist/panoramic/models/docs-bundle-profiles.d.ts +4 -0
- package/dist/panoramic/models/docs-bundle-profiles.d.ts.map +1 -0
- package/dist/panoramic/models/docs-bundle-profiles.js +82 -0
- package/dist/panoramic/models/docs-bundle-profiles.js.map +1 -0
- package/dist/panoramic/models/docs-bundle-types.d.ts +94 -0
- package/dist/panoramic/models/docs-bundle-types.d.ts.map +1 -0
- package/dist/panoramic/models/docs-bundle-types.js +10 -0
- package/dist/panoramic/models/docs-bundle-types.js.map +1 -0
- package/dist/panoramic/models/docs-quality-model.d.ts +125 -0
- package/dist/panoramic/models/docs-quality-model.d.ts.map +1 -0
- package/dist/panoramic/models/docs-quality-model.js +166 -0
- package/dist/panoramic/models/docs-quality-model.js.map +1 -0
- package/dist/panoramic/models/pattern-hints-model.d.ts +89 -0
- package/dist/panoramic/models/pattern-hints-model.d.ts.map +1 -0
- package/dist/panoramic/models/pattern-hints-model.js +61 -0
- package/dist/panoramic/models/pattern-hints-model.js.map +1 -0
- package/dist/panoramic/models/pattern-knowledge-base.d.ts +31 -0
- package/dist/panoramic/models/pattern-knowledge-base.d.ts.map +1 -0
- package/dist/panoramic/models/pattern-knowledge-base.js +407 -0
- package/dist/panoramic/models/pattern-knowledge-base.js.map +1 -0
- package/dist/panoramic/models/runtime-topology-model.d.ts +145 -0
- package/dist/panoramic/models/runtime-topology-model.d.ts.map +1 -0
- package/dist/panoramic/models/runtime-topology-model.js +300 -0
- package/dist/panoramic/models/runtime-topology-model.js.map +1 -0
- package/dist/panoramic/output-filenames.d.ts +26 -0
- package/dist/panoramic/output-filenames.d.ts.map +1 -0
- package/dist/panoramic/output-filenames.js +48 -0
- package/dist/panoramic/output-filenames.js.map +1 -0
- package/dist/panoramic/parser-registry.d.ts +89 -0
- package/dist/panoramic/parser-registry.d.ts.map +1 -0
- package/dist/panoramic/parser-registry.js +169 -0
- package/dist/panoramic/parser-registry.js.map +1 -0
- package/dist/panoramic/parsers/abstract-artifact-parser.d.ts +48 -0
- package/dist/panoramic/parsers/abstract-artifact-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/abstract-artifact-parser.js +52 -0
- package/dist/panoramic/parsers/abstract-artifact-parser.js.map +1 -0
- package/dist/panoramic/parsers/abstract-config-parser.d.ts +35 -0
- package/dist/panoramic/parsers/abstract-config-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/abstract-config-parser.js +34 -0
- package/dist/panoramic/parsers/abstract-config-parser.js.map +1 -0
- package/dist/panoramic/parsers/behavior-yaml-parser.d.ts +34 -0
- package/dist/panoramic/parsers/behavior-yaml-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/behavior-yaml-parser.js +195 -0
- package/dist/panoramic/parsers/behavior-yaml-parser.js.map +1 -0
- package/dist/panoramic/parsers/comment-tracker.d.ts +37 -0
- package/dist/panoramic/parsers/comment-tracker.d.ts.map +1 -0
- package/dist/panoramic/parsers/comment-tracker.js +50 -0
- package/dist/panoramic/parsers/comment-tracker.js.map +1 -0
- package/dist/panoramic/parsers/dockerfile-parser.d.ts +42 -0
- package/dist/panoramic/parsers/dockerfile-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/dockerfile-parser.js +128 -0
- package/dist/panoramic/parsers/dockerfile-parser.js.map +1 -0
- package/dist/panoramic/parsers/env-config-parser.d.ts +37 -0
- package/dist/panoramic/parsers/env-config-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/env-config-parser.js +73 -0
- package/dist/panoramic/parsers/env-config-parser.js.map +1 -0
- package/dist/panoramic/parsers/index.d.ts +25 -0
- package/dist/panoramic/parsers/index.d.ts.map +1 -0
- package/dist/panoramic/parsers/index.js +25 -0
- package/dist/panoramic/parsers/index.js.map +1 -0
- package/dist/panoramic/parsers/skill-md-parser.d.ts +42 -0
- package/dist/panoramic/parsers/skill-md-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/skill-md-parser.js +105 -0
- package/dist/panoramic/parsers/skill-md-parser.js.map +1 -0
- package/dist/panoramic/parsers/toml-config-parser.d.ts +39 -0
- package/dist/panoramic/parsers/toml-config-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/toml-config-parser.js +98 -0
- package/dist/panoramic/parsers/toml-config-parser.js.map +1 -0
- package/dist/panoramic/parsers/types.d.ts +314 -0
- package/dist/panoramic/parsers/types.d.ts.map +1 -0
- package/dist/panoramic/parsers/types.js +136 -0
- package/dist/panoramic/parsers/types.js.map +1 -0
- package/dist/panoramic/parsers/yaml-config-parser.d.ts +58 -0
- package/dist/panoramic/parsers/yaml-config-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/yaml-config-parser.js +356 -0
- package/dist/panoramic/parsers/yaml-config-parser.js.map +1 -0
- package/dist/panoramic/pipelines/adr-decision-pipeline.d.ts +74 -0
- package/dist/panoramic/pipelines/adr-decision-pipeline.d.ts.map +1 -0
- package/dist/panoramic/pipelines/adr-decision-pipeline.js +421 -0
- package/dist/panoramic/pipelines/adr-decision-pipeline.js.map +1 -0
- package/dist/panoramic/pipelines/adr-evidence-verifier.d.ts +30 -0
- package/dist/panoramic/pipelines/adr-evidence-verifier.d.ts.map +1 -0
- package/dist/panoramic/pipelines/adr-evidence-verifier.js +141 -0
- package/dist/panoramic/pipelines/adr-evidence-verifier.js.map +1 -0
- package/dist/panoramic/pipelines/adr-mapreduce.d.ts +316 -0
- package/dist/panoramic/pipelines/adr-mapreduce.d.ts.map +1 -0
- package/dist/panoramic/pipelines/adr-mapreduce.js +331 -0
- package/dist/panoramic/pipelines/adr-mapreduce.js.map +1 -0
- package/dist/panoramic/pipelines/adr-migration.d.ts +26 -0
- package/dist/panoramic/pipelines/adr-migration.d.ts.map +1 -0
- package/dist/panoramic/pipelines/adr-migration.js +203 -0
- package/dist/panoramic/pipelines/adr-migration.js.map +1 -0
- package/dist/panoramic/pipelines/architecture-narrative-mapreduce.d.ts +121 -0
- package/dist/panoramic/pipelines/architecture-narrative-mapreduce.d.ts.map +1 -0
- package/dist/panoramic/pipelines/architecture-narrative-mapreduce.js +412 -0
- package/dist/panoramic/pipelines/architecture-narrative-mapreduce.js.map +1 -0
- package/dist/panoramic/pipelines/architecture-narrative.d.ts +123 -0
- package/dist/panoramic/pipelines/architecture-narrative.d.ts.map +1 -0
- package/dist/panoramic/pipelines/architecture-narrative.js +419 -0
- package/dist/panoramic/pipelines/architecture-narrative.js.map +1 -0
- package/dist/panoramic/pipelines/coverage-auditor.d.ts +95 -0
- package/dist/panoramic/pipelines/coverage-auditor.d.ts.map +1 -0
- package/dist/panoramic/pipelines/coverage-auditor.js +290 -0
- package/dist/panoramic/pipelines/coverage-auditor.js.map +1 -0
- package/dist/panoramic/pipelines/debt-intelligence-pipeline.d.ts +32 -0
- package/dist/panoramic/pipelines/debt-intelligence-pipeline.d.ts.map +1 -0
- package/dist/panoramic/pipelines/debt-intelligence-pipeline.js +108 -0
- package/dist/panoramic/pipelines/debt-intelligence-pipeline.js.map +1 -0
- package/dist/panoramic/pipelines/docs-bundle-manifest-reader.d.ts +26 -0
- package/dist/panoramic/pipelines/docs-bundle-manifest-reader.d.ts.map +1 -0
- package/dist/panoramic/pipelines/docs-bundle-manifest-reader.js +108 -0
- package/dist/panoramic/pipelines/docs-bundle-manifest-reader.js.map +1 -0
- package/dist/panoramic/pipelines/docs-bundle-orchestrator.d.ts +16 -0
- package/dist/panoramic/pipelines/docs-bundle-orchestrator.d.ts.map +1 -0
- package/dist/panoramic/pipelines/docs-bundle-orchestrator.js +588 -0
- package/dist/panoramic/pipelines/docs-bundle-orchestrator.js.map +1 -0
- package/dist/panoramic/pipelines/docs-quality-evaluator.d.ts +55 -0
- package/dist/panoramic/pipelines/docs-quality-evaluator.d.ts.map +1 -0
- package/dist/panoramic/pipelines/docs-quality-evaluator.js +1045 -0
- package/dist/panoramic/pipelines/docs-quality-evaluator.js.map +1 -0
- package/dist/panoramic/pipelines/narrative-provenance-adapter.d.ts +8 -0
- package/dist/panoramic/pipelines/narrative-provenance-adapter.d.ts.map +1 -0
- package/dist/panoramic/pipelines/narrative-provenance-adapter.js +99 -0
- package/dist/panoramic/pipelines/narrative-provenance-adapter.js.map +1 -0
- package/dist/panoramic/pipelines/product-ux-docs.d.ts +123 -0
- package/dist/panoramic/pipelines/product-ux-docs.d.ts.map +1 -0
- package/dist/panoramic/pipelines/product-ux-docs.js +959 -0
- package/dist/panoramic/pipelines/product-ux-docs.js.map +1 -0
- package/dist/panoramic/project-context.d.ts +17 -0
- package/dist/panoramic/project-context.d.ts.map +1 -0
- package/dist/panoramic/project-context.js +289 -0
- package/dist/panoramic/project-context.js.map +1 -0
- package/dist/panoramic/qa/citation.d.ts +21 -0
- package/dist/panoramic/qa/citation.d.ts.map +1 -0
- package/dist/panoramic/qa/citation.js +184 -0
- package/dist/panoramic/qa/citation.js.map +1 -0
- package/dist/panoramic/qa/debt-context.d.ts +33 -0
- package/dist/panoramic/qa/debt-context.d.ts.map +1 -0
- package/dist/panoramic/qa/debt-context.js +82 -0
- package/dist/panoramic/qa/debt-context.js.map +1 -0
- package/dist/panoramic/qa/graph-retriever.d.ts +29 -0
- package/dist/panoramic/qa/graph-retriever.d.ts.map +1 -0
- package/dist/panoramic/qa/graph-retriever.js +65 -0
- package/dist/panoramic/qa/graph-retriever.js.map +1 -0
- package/dist/panoramic/qa/index.d.ts +23 -0
- package/dist/panoramic/qa/index.d.ts.map +1 -0
- package/dist/panoramic/qa/index.js +201 -0
- package/dist/panoramic/qa/index.js.map +1 -0
- package/dist/panoramic/qa/llm-caller.d.ts +35 -0
- package/dist/panoramic/qa/llm-caller.d.ts.map +1 -0
- package/dist/panoramic/qa/llm-caller.js +138 -0
- package/dist/panoramic/qa/llm-caller.js.map +1 -0
- package/dist/panoramic/qa/prompt-builder.d.ts +36 -0
- package/dist/panoramic/qa/prompt-builder.d.ts.map +1 -0
- package/dist/panoramic/qa/prompt-builder.js +143 -0
- package/dist/panoramic/qa/prompt-builder.js.map +1 -0
- package/dist/panoramic/qa/rag-reranker.d.ts +43 -0
- package/dist/panoramic/qa/rag-reranker.d.ts.map +1 -0
- package/dist/panoramic/qa/rag-reranker.js +129 -0
- package/dist/panoramic/qa/rag-reranker.js.map +1 -0
- package/dist/panoramic/qa/types.d.ts +126 -0
- package/dist/panoramic/qa/types.d.ts.map +1 -0
- package/dist/panoramic/qa/types.js +6 -0
- package/dist/panoramic/qa/types.js.map +1 -0
- package/dist/panoramic/query.d.ts +29 -0
- package/dist/panoramic/query.d.ts.map +1 -0
- package/dist/panoramic/query.js +80 -0
- package/dist/panoramic/query.js.map +1 -0
- package/dist/panoramic/stored-module-specs.d.ts +26 -0
- package/dist/panoramic/stored-module-specs.d.ts.map +1 -0
- package/dist/panoramic/stored-module-specs.js +155 -0
- package/dist/panoramic/stored-module-specs.js.map +1 -0
- package/dist/panoramic/utils/html-sanitizer.d.ts +33 -0
- package/dist/panoramic/utils/html-sanitizer.d.ts.map +1 -0
- package/dist/panoramic/utils/html-sanitizer.js +170 -0
- package/dist/panoramic/utils/html-sanitizer.js.map +1 -0
- package/dist/panoramic/utils/llm-enricher.d.ts +74 -0
- package/dist/panoramic/utils/llm-enricher.d.ts.map +1 -0
- package/dist/panoramic/utils/llm-enricher.js +315 -0
- package/dist/panoramic/utils/llm-enricher.js.map +1 -0
- package/dist/panoramic/utils/llm-facade.d.ts +66 -0
- package/dist/panoramic/utils/llm-facade.d.ts.map +1 -0
- package/dist/panoramic/utils/llm-facade.js +136 -0
- package/dist/panoramic/utils/llm-facade.js.map +1 -0
- package/dist/panoramic/utils/logger.d.ts +43 -0
- package/dist/panoramic/utils/logger.d.ts.map +1 -0
- package/dist/panoramic/utils/logger.js +76 -0
- package/dist/panoramic/utils/logger.js.map +1 -0
- package/dist/panoramic/utils/mermaid-helpers.d.ts +19 -0
- package/dist/panoramic/utils/mermaid-helpers.d.ts.map +1 -0
- package/dist/panoramic/utils/mermaid-helpers.js +21 -0
- package/dist/panoramic/utils/mermaid-helpers.js.map +1 -0
- package/dist/panoramic/utils/multi-format-writer.d.ts +43 -0
- package/dist/panoramic/utils/multi-format-writer.d.ts.map +1 -0
- package/dist/panoramic/utils/multi-format-writer.js +73 -0
- package/dist/panoramic/utils/multi-format-writer.js.map +1 -0
- package/dist/panoramic/utils/template-loader.d.ts +15 -0
- package/dist/panoramic/utils/template-loader.d.ts.map +1 -0
- package/dist/panoramic/utils/template-loader.js +65 -0
- package/dist/panoramic/utils/template-loader.js.map +1 -0
- package/dist/panoramic/utils/text-segmenter.d.ts +50 -0
- package/dist/panoramic/utils/text-segmenter.d.ts.map +1 -0
- package/dist/panoramic/utils/text-segmenter.js +151 -0
- package/dist/panoramic/utils/text-segmenter.js.map +1 -0
- package/dist/scripts/postinstall.d.ts +7 -0
- package/dist/scripts/postinstall.d.ts.map +1 -0
- package/dist/scripts/postinstall.js +70 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/scripts/preuninstall.d.ts +7 -0
- package/dist/scripts/preuninstall.d.ts.map +1 -0
- package/dist/scripts/preuninstall.js +62 -0
- package/dist/scripts/preuninstall.js.map +1 -0
- package/dist/spec-store/index.d.ts +9 -0
- package/dist/spec-store/index.d.ts.map +1 -0
- package/dist/spec-store/index.js +9 -0
- package/dist/spec-store/index.js.map +1 -0
- package/dist/spec-store/spec-identity.d.ts +28 -0
- package/dist/spec-store/spec-identity.d.ts.map +1 -0
- package/dist/spec-store/spec-identity.js +24 -0
- package/dist/spec-store/spec-identity.js.map +1 -0
- package/dist/spec-store/spec-store.d.ts +62 -0
- package/dist/spec-store/spec-store.d.ts.map +1 -0
- package/dist/spec-store/spec-store.js +201 -0
- package/dist/spec-store/spec-store.js.map +1 -0
- package/dist/utils/atomic-write.d.ts +10 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/atomic-write.js +27 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/dist/utils/chunk-splitter.d.ts +32 -0
- package/dist/utils/chunk-splitter.d.ts.map +1 -0
- package/dist/utils/chunk-splitter.js +116 -0
- package/dist/utils/chunk-splitter.js.map +1 -0
- package/dist/utils/file-scanner.d.ts +38 -0
- package/dist/utils/file-scanner.d.ts.map +1 -0
- package/dist/utils/file-scanner.js +323 -0
- package/dist/utils/file-scanner.js.map +1 -0
- package/dist/utils/git-blame.d.ts +32 -0
- package/dist/utils/git-blame.d.ts.map +1 -0
- package/dist/utils/git-blame.js +151 -0
- package/dist/utils/git-blame.js.map +1 -0
- package/dist/utils/specify-template-sync.d.ts +16 -0
- package/dist/utils/specify-template-sync.d.ts.map +1 -0
- package/dist/utils/specify-template-sync.js +66 -0
- package/dist/utils/specify-template-sync.js.map +1 -0
- package/dist/watcher/file-watcher.d.ts +77 -0
- package/dist/watcher/file-watcher.d.ts.map +1 -0
- package/dist/watcher/file-watcher.js +233 -0
- package/dist/watcher/file-watcher.js.map +1 -0
- package/dist/watcher/index.d.ts +6 -0
- package/dist/watcher/index.d.ts.map +1 -0
- package/dist/watcher/index.js +5 -0
- package/dist/watcher/index.js.map +1 -0
- package/grammars/manifest.json +28 -0
- package/grammars/tree-sitter-go.wasm +0 -0
- package/grammars/tree-sitter-java.wasm +0 -0
- package/grammars/tree-sitter-javascript.wasm +0 -0
- package/grammars/tree-sitter-python.wasm +0 -0
- package/grammars/tree-sitter-typescript.wasm +0 -0
- package/package.json +84 -0
- package/plugins/spec-driver/.claude-plugin/plugin.json +16 -0
- package/plugins/spec-driver/README.md +401 -0
- package/plugins/spec-driver/agents/analyze.artifact.yaml +10 -0
- package/plugins/spec-driver/agents/analyze.md +144 -0
- package/plugins/spec-driver/agents/checklist.artifact.yaml +8 -0
- package/plugins/spec-driver/agents/checklist.md +84 -0
- package/plugins/spec-driver/agents/clarify.artifact.yaml +6 -0
- package/plugins/spec-driver/agents/clarify.md +104 -0
- package/plugins/spec-driver/agents/constitution.artifact.yaml +9 -0
- package/plugins/spec-driver/agents/constitution.md +100 -0
- package/plugins/spec-driver/agents/implement.artifact.yaml +8 -0
- package/plugins/spec-driver/agents/implement.md +159 -0
- package/plugins/spec-driver/agents/plan.artifact.yaml +12 -0
- package/plugins/spec-driver/agents/plan.md +116 -0
- package/plugins/spec-driver/agents/product-research.artifact.yaml +11 -0
- package/plugins/spec-driver/agents/product-research.md +94 -0
- package/plugins/spec-driver/agents/quality-review.artifact.yaml +11 -0
- package/plugins/spec-driver/agents/quality-review.md +165 -0
- package/plugins/spec-driver/agents/refactor-plan.md +132 -0
- package/plugins/spec-driver/agents/spec-review.artifact.yaml +12 -0
- package/plugins/spec-driver/agents/spec-review.md +111 -0
- package/plugins/spec-driver/agents/specify.artifact.yaml +9 -0
- package/plugins/spec-driver/agents/specify.md +109 -0
- package/plugins/spec-driver/agents/sync.artifact.yaml +19 -0
- package/plugins/spec-driver/agents/sync.md +91 -0
- package/plugins/spec-driver/agents/tasks.artifact.yaml +10 -0
- package/plugins/spec-driver/agents/tasks.md +88 -0
- package/plugins/spec-driver/agents/tech-research.artifact.yaml +12 -0
- package/plugins/spec-driver/agents/tech-research.md +102 -0
- package/plugins/spec-driver/agents/verify.artifact.yaml +11 -0
- package/plugins/spec-driver/agents/verify.md +204 -0
- package/plugins/spec-driver/config/orchestration.yaml +779 -0
- package/plugins/spec-driver/contracts/orchestration-overrides-contract.yaml +124 -0
- package/plugins/spec-driver/contracts/orchestration-schema.mjs +301 -0
- package/plugins/spec-driver/contracts/scan-project-output.md +70 -0
- package/plugins/spec-driver/contracts/wrapper-source-of-truth.yaml +44 -0
- package/plugins/spec-driver/hooks/hooks.json +70 -0
- package/plugins/spec-driver/hooks/post-tool-use-format.sh +28 -0
- package/plugins/spec-driver/hooks/pre-tool-use-guard.sh +42 -0
- package/plugins/spec-driver/hooks/stop-task-check.sh +22 -0
- package/plugins/spec-driver/hooks/worktree-lifecycle.sh +33 -0
- package/plugins/spec-driver/lib/orchestration-output-serializer.mjs +219 -0
- package/plugins/spec-driver/lib/orchestration-resolver.mjs +485 -0
- package/plugins/spec-driver/lib/orchestrator-fallback.mjs +98 -0
- package/plugins/spec-driver/lib/orchestrator.mjs +280 -0
- package/plugins/spec-driver/scorecards/default-governance.yaml +63 -0
- package/plugins/spec-driver/scripts/codex-skills.sh +225 -0
- package/plugins/spec-driver/scripts/experimental/README.md +9 -0
- package/plugins/spec-driver/scripts/generate-adoption-insights.mjs +523 -0
- package/plugins/spec-driver/scripts/generate-product-entity-catalog.mjs +472 -0
- package/plugins/spec-driver/scripts/generate-product-quality-reports.mjs +18 -0
- package/plugins/spec-driver/scripts/generate-product-scorecards.mjs +25 -0
- package/plugins/spec-driver/scripts/generate-project-context-suggestions.mjs +622 -0
- package/plugins/spec-driver/scripts/generate-workflow-registry.mjs +16 -0
- package/plugins/spec-driver/scripts/init-project.sh +328 -0
- package/plugins/spec-driver/scripts/lib/config-schema.mjs +433 -0
- package/plugins/spec-driver/scripts/lib/init-project-output.sh +146 -0
- package/plugins/spec-driver/scripts/lib/product-artifact-patchers.mjs +29 -0
- package/plugins/spec-driver/scripts/lib/product-artifact-paths.mjs +129 -0
- package/plugins/spec-driver/scripts/lib/product-governance-helpers.mjs +48 -0
- package/plugins/spec-driver/scripts/lib/product-quality-core.mjs +531 -0
- package/plugins/spec-driver/scripts/lib/product-scorecard-core.mjs +810 -0
- package/plugins/spec-driver/scripts/lib/project-context-paths.mjs +21 -0
- package/plugins/spec-driver/scripts/lib/project-profile-resolver.mjs +704 -0
- package/plugins/spec-driver/scripts/lib/project-profile-schema.mjs +78 -0
- package/plugins/spec-driver/scripts/lib/script-cli-args.mjs +25 -0
- package/plugins/spec-driver/scripts/lib/script-diagnostics.mjs +29 -0
- package/plugins/spec-driver/scripts/lib/script-report-io.mjs +37 -0
- package/plugins/spec-driver/scripts/lib/simple-yaml.mjs +257 -0
- package/plugins/spec-driver/scripts/lib/sync-conflict-resolver.mjs +128 -0
- package/plugins/spec-driver/scripts/lib/sync-merge-strategy.mjs +388 -0
- package/plugins/spec-driver/scripts/lib/sync-product-mapping.mjs +228 -0
- package/plugins/spec-driver/scripts/lib/sync-timeline-builder.mjs +114 -0
- package/plugins/spec-driver/scripts/lib/sync-validator.mjs +174 -0
- package/plugins/spec-driver/scripts/lib/workflow-registry-core.mjs +281 -0
- package/plugins/spec-driver/scripts/orchestrator-cli.mjs +490 -0
- package/plugins/spec-driver/scripts/orchestrator-cli.sh +36 -0
- package/plugins/spec-driver/scripts/postinstall.sh +101 -0
- package/plugins/spec-driver/scripts/record-workflow-run.mjs +332 -0
- package/plugins/spec-driver/scripts/resolve-project-context.mjs +56 -0
- package/plugins/spec-driver/scripts/scan-project.sh +668 -0
- package/plugins/spec-driver/scripts/sync-merge-engine.mjs +663 -0
- package/plugins/spec-driver/scripts/validate-config.mjs +223 -0
- package/plugins/spec-driver/scripts/validate-orchestration-overrides.mjs +190 -0
- package/plugins/spec-driver/scripts/validate-wrapper-sources.mjs +302 -0
- package/plugins/spec-driver/skills/spec-driver-constitution/SKILL.md +77 -0
- package/plugins/spec-driver/skills/spec-driver-doc/SKILL.md +732 -0
- package/plugins/spec-driver/skills/spec-driver-feature/SKILL.md +336 -0
- package/plugins/spec-driver/skills/spec-driver-fix/SKILL.md +457 -0
- package/plugins/spec-driver/skills/spec-driver-implement/SKILL.md +653 -0
- package/plugins/spec-driver/skills/spec-driver-refactor/SKILL.md +250 -0
- package/plugins/spec-driver/skills/spec-driver-resume/SKILL.md +325 -0
- package/plugins/spec-driver/skills/spec-driver-story/SKILL.md +566 -0
- package/plugins/spec-driver/skills/spec-driver-sync/SKILL.md +300 -0
- package/plugins/spec-driver/templates/code-of-conduct-v2.1.md +85 -0
- package/plugins/spec-driver/templates/licenses/Apache-2.0.txt +201 -0
- package/plugins/spec-driver/templates/licenses/BSD-2-Clause.txt +24 -0
- package/plugins/spec-driver/templates/licenses/BSD-3-Clause.txt +28 -0
- package/plugins/spec-driver/templates/licenses/GPL-3.0.txt +232 -0
- package/plugins/spec-driver/templates/licenses/ISC.txt +15 -0
- package/plugins/spec-driver/templates/licenses/MIT.txt +21 -0
- package/plugins/spec-driver/templates/licenses/MPL-2.0.txt +373 -0
- package/plugins/spec-driver/templates/licenses/Unlicense.txt +24 -0
- package/plugins/spec-driver/templates/orchestration-overrides.example.yaml +81 -0
- package/plugins/spec-driver/templates/product-research-template.md +95 -0
- package/plugins/spec-driver/templates/product-spec-template.md +250 -0
- package/plugins/spec-driver/templates/research-synthesis-template.md +102 -0
- package/plugins/spec-driver/templates/spec-driver.config-template.yaml +244 -0
- package/plugins/spec-driver/templates/specify-base/agent-file-template.md +28 -0
- package/plugins/spec-driver/templates/specify-base/checklist-template.md +40 -0
- package/plugins/spec-driver/templates/specify-base/constitution-template.md +50 -0
- package/plugins/spec-driver/templates/specify-base/plan-template.md +134 -0
- package/plugins/spec-driver/templates/specify-base/product-research-template.md +95 -0
- package/plugins/spec-driver/templates/specify-base/project-context-template.yaml +40 -0
- package/plugins/spec-driver/templates/specify-base/research-synthesis-template.md +102 -0
- package/plugins/spec-driver/templates/specify-base/spec-template.md +115 -0
- package/plugins/spec-driver/templates/specify-base/tasks-template.md +266 -0
- package/plugins/spec-driver/templates/specify-base/tech-research-template.md +111 -0
- package/plugins/spec-driver/templates/specify-base/verification-report-template.md +63 -0
- package/plugins/spec-driver/templates/tech-research-template.md +111 -0
- package/plugins/spec-driver/templates/verification-report-template.md +63 -0
- package/plugins/spec-driver/workflows/golden-paths.yaml +39 -0
- package/plugins/spec-driver/workflows/spec-driver-doc.yaml +24 -0
- package/plugins/spec-driver/workflows/spec-driver-feature.yaml +29 -0
- package/plugins/spec-driver/workflows/spec-driver-fix.yaml +21 -0
- package/plugins/spec-driver/workflows/spec-driver-implement.yaml +23 -0
- package/plugins/spec-driver/workflows/spec-driver-resume.yaml +20 -0
- package/plugins/spec-driver/workflows/spec-driver-story.yaml +24 -0
- package/plugins/spec-driver/workflows/spec-driver-sync.yaml +34 -0
- package/plugins/spectra/.claude-plugin/plugin.json +20 -0
- package/plugins/spectra/.mcp.json +8 -0
- package/plugins/spectra/README.md +128 -0
- package/plugins/spectra/contracts/skill-source-of-truth.yaml +34 -0
- package/plugins/spectra/hooks/hooks.json +15 -0
- package/plugins/spectra/scripts/postinstall.sh +12 -0
- package/plugins/spectra/scripts/sync-skill-mirrors.mjs +148 -0
- package/plugins/spectra/scripts/validate-skill-sources.mjs +280 -0
- package/plugins/spectra/skills/spectra/SKILL.md +214 -0
- package/plugins/spectra/skills/spectra-batch/SKILL.md +232 -0
- package/plugins/spectra/skills/spectra-diff/SKILL.md +99 -0
- package/queries/go.scm +54 -0
- package/queries/java.scm +50 -0
- package/queries/javascript.scm +30 -0
- package/queries/python.scm +35 -0
- package/queries/typescript.scm +50 -0
- package/scripts/lifecycle-runner.cjs +33 -0
- package/templates/adr-draft.hbs +51 -0
- package/templates/adr-index.hbs +25 -0
- package/templates/api-surface.hbs +40 -0
- package/templates/architecture-ir.hbs +49 -0
- package/templates/architecture-narrative.hbs +116 -0
- package/templates/architecture-overview.hbs +103 -0
- package/templates/component-view.hbs +87 -0
- package/templates/config-reference.hbs +22 -0
- package/templates/coverage-report.hbs +84 -0
- package/templates/cross-package-analysis.hbs +43 -0
- package/templates/data-model.hbs +72 -0
- package/templates/delta-report.hbs +53 -0
- package/templates/docs-bundle-index.hbs +41 -0
- package/templates/drift-report.hbs +53 -0
- package/templates/dynamic-scenarios.hbs +46 -0
- package/templates/event-surface.hbs +90 -0
- package/templates/feature-brief-index.hbs +27 -0
- package/templates/feature-brief.hbs +28 -0
- package/templates/index-spec.hbs +57 -0
- package/templates/interface-surface.hbs +87 -0
- package/templates/module-spec.hbs +117 -0
- package/templates/pattern-hints.hbs +85 -0
- package/templates/product-overview.hbs +65 -0
- package/templates/quality-report.hbs +130 -0
- package/templates/runtime-topology.hbs +128 -0
- package/templates/troubleshooting.hbs +86 -0
- package/templates/user-journeys.hbs +44 -0
- package/templates/workspace-index.hbs +26 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* preuninstall 脚本
|
|
3
|
+
* 全局卸载时清理 ~/.claude/skills/ 和/或 ~/.codex/skills/ 中已注册的 skill
|
|
4
|
+
* 复用 installer 模块的核心逻辑
|
|
5
|
+
*/
|
|
6
|
+
import { removeSkills, resolveTargetDir, } from '../installer/skill-installer.js';
|
|
7
|
+
function resolvePreUninstallTargets() {
|
|
8
|
+
const env = process.env['REVERSE_SPEC_SKILL_TARGET'];
|
|
9
|
+
if (!env) {
|
|
10
|
+
// 默认清理双端,避免遗留
|
|
11
|
+
return ['claude', 'codex'];
|
|
12
|
+
}
|
|
13
|
+
const value = env.trim().toLowerCase();
|
|
14
|
+
if (value === 'both') {
|
|
15
|
+
return ['claude', 'codex'];
|
|
16
|
+
}
|
|
17
|
+
const values = value
|
|
18
|
+
.split(',')
|
|
19
|
+
.map((item) => item.trim())
|
|
20
|
+
.filter(Boolean);
|
|
21
|
+
const targets = new Set();
|
|
22
|
+
for (const item of values) {
|
|
23
|
+
if (item === 'claude' || item === 'codex') {
|
|
24
|
+
targets.add(item);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (targets.size === 0) {
|
|
28
|
+
console.warn(`⚠ 警告: REVERSE_SPEC_SKILL_TARGET=${env} 无效,回退清理双端(可选: claude, codex, both)`);
|
|
29
|
+
return ['claude', 'codex'];
|
|
30
|
+
}
|
|
31
|
+
return [...targets];
|
|
32
|
+
}
|
|
33
|
+
function main() {
|
|
34
|
+
// 仅在全局卸载时执行
|
|
35
|
+
if (process.env['npm_config_global'] !== 'true') {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const targets = resolvePreUninstallTargets();
|
|
40
|
+
for (const platform of targets) {
|
|
41
|
+
const targetDir = resolveTargetDir('global', platform);
|
|
42
|
+
const summary = removeSkills({ targetDir, mode: 'global', platform });
|
|
43
|
+
const rootDir = platform === 'codex' ? '.codex' : '.claude';
|
|
44
|
+
const platformLabel = platform === 'codex' ? 'Codex' : 'Claude Code';
|
|
45
|
+
for (const result of summary.results) {
|
|
46
|
+
if (result.status === 'removed') {
|
|
47
|
+
console.log(`✓ 已清理: ~/${rootDir}/skills/${result.skillName}/`);
|
|
48
|
+
}
|
|
49
|
+
else if (result.status === 'failed') {
|
|
50
|
+
console.warn(`⚠ 警告: 清理 ${result.skillName} 失败: ${result.error ?? '未知错误'}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
console.log(`spectra skills 已从 ${platformLabel} 注销`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
58
|
+
console.warn(`⚠ 警告: skill 注销失败: ${message}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
main();
|
|
62
|
+
//# sourceMappingURL=preuninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preuninstall.js","sourceRoot":"","sources":["../../src/scripts/preuninstall.ts"],"names":[],"mappings":"A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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spec-store 模块统一导出入口
|
|
3
|
+
*
|
|
4
|
+
* 封装 SpecStore 类和 SpecSourceKind 类型,
|
|
5
|
+
* 为所有消费方提供统一的 spec 集合查询接口。
|
|
6
|
+
*/
|
|
7
|
+
export { SpecStore, type IndexableModuleSpec, type SpecStoreOptions } from './spec-store.js';
|
|
8
|
+
export { getDefaultSourceKind, type SpecSourceKind } from './spec-identity.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spec-store/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/spec-store/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAmD,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAuB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spec 身份标识类型与辅助函数
|
|
3
|
+
*
|
|
4
|
+
* 定义 SpecSourceKind 类型和 getDefaultSourceKind 辅助函数,
|
|
5
|
+
* 用于区分 canonical(权威原始)、derived(衍生)、bundle_copy(bundle 副本)。
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* spec 身份类型
|
|
9
|
+
* - canonical:权威原始 spec,由 batch 生成并直接对应源代码模块
|
|
10
|
+
* - derived:从 canonical 派生的变体(如翻译版、摘要版),内容可能不同
|
|
11
|
+
* - bundle_copy:bundle 打包时原样复制的副本,内容与 canonical 完全一致
|
|
12
|
+
*
|
|
13
|
+
* 历史遗留 spec(缺少此字段)默认视为 canonical。
|
|
14
|
+
*/
|
|
15
|
+
export type SpecSourceKind = 'canonical' | 'derived' | 'bundle_copy';
|
|
16
|
+
/**
|
|
17
|
+
* 将原始值(可能来自 frontmatter 解析)规范化为合法的 SpecSourceKind。
|
|
18
|
+
*
|
|
19
|
+
* 向后兼容规则:
|
|
20
|
+
* - 缺失值(undefined / null / '')→ 'canonical'
|
|
21
|
+
* - 非法字符串 → 'canonical'
|
|
22
|
+
* - 合法的枚举值 → 原样返回
|
|
23
|
+
*
|
|
24
|
+
* @param value 待规范化的原始值
|
|
25
|
+
* @returns 合法的 SpecSourceKind,缺失或无效时返回 'canonical'
|
|
26
|
+
*/
|
|
27
|
+
export declare function getDefaultSourceKind(value?: string | null): SpecSourceKind;
|
|
28
|
+
//# sourceMappingURL=spec-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-identity.d.ts","sourceRoot":"","sources":["../../src/spec-store/spec-identity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAAC;AAErE;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc,CAK1E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spec 身份标识类型与辅助函数
|
|
3
|
+
*
|
|
4
|
+
* 定义 SpecSourceKind 类型和 getDefaultSourceKind 辅助函数,
|
|
5
|
+
* 用于区分 canonical(权威原始)、derived(衍生)、bundle_copy(bundle 副本)。
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* 将原始值(可能来自 frontmatter 解析)规范化为合法的 SpecSourceKind。
|
|
9
|
+
*
|
|
10
|
+
* 向后兼容规则:
|
|
11
|
+
* - 缺失值(undefined / null / '')→ 'canonical'
|
|
12
|
+
* - 非法字符串 → 'canonical'
|
|
13
|
+
* - 合法的枚举值 → 原样返回
|
|
14
|
+
*
|
|
15
|
+
* @param value 待规范化的原始值
|
|
16
|
+
* @returns 合法的 SpecSourceKind,缺失或无效时返回 'canonical'
|
|
17
|
+
*/
|
|
18
|
+
export function getDefaultSourceKind(value) {
|
|
19
|
+
if (value === 'canonical' || value === 'derived' || value === 'bundle_copy') {
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
return 'canonical';
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=spec-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-identity.js","sourceRoot":"","sources":["../../src/spec-store/spec-identity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAqB;IACxD,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,aAAa,EAAE,CAAC;QAC5E,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ModuleSpec } from '../models/module-spec.js';
|
|
2
|
+
import type { StoredModuleSpecSummary, ExistingSpecDocument } from '../panoramic/builders/doc-graph-builder.js';
|
|
3
|
+
import type { IndexableModuleSpec } from '../generator/index-generator.js';
|
|
4
|
+
import { type SpecSourceKind } from './spec-identity.js';
|
|
5
|
+
export type { IndexableModuleSpec };
|
|
6
|
+
export interface SpecStoreOptions {
|
|
7
|
+
/** 本次 batch 生成的 spec 列表 */
|
|
8
|
+
currentSpecs: ModuleSpec[];
|
|
9
|
+
/** 磁盘已有的 spec 摘要列表(来自 scanStoredModuleSpecs) */
|
|
10
|
+
storedSpecs: StoredModuleSpecSummary[];
|
|
11
|
+
/** 项目根目录绝对路径(用于 orphan 判断) */
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
/** 将绝对路径转为项目相对路径的工具函数 */
|
|
14
|
+
toProjectPath: (absPath: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* 文件存在性检查函数(可注入,用于测试)
|
|
17
|
+
* 生产环境默认使用 fs.existsSync
|
|
18
|
+
*/
|
|
19
|
+
existsFn?: (filePath: string) => boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare class SpecStore {
|
|
22
|
+
private readonly mergedMap;
|
|
23
|
+
private readonly orphans;
|
|
24
|
+
private readonly currentSpecPaths;
|
|
25
|
+
private readonly storedSpecsInput;
|
|
26
|
+
private readonly currentSpecsInput;
|
|
27
|
+
constructor(options: SpecStoreOptions);
|
|
28
|
+
/**
|
|
29
|
+
* 返回本次生成 + 历史存储的合集,已去重。
|
|
30
|
+
* 默认:排除 orphan + 排除 sourceKind 为 bundle_copy/derived 的 spec。
|
|
31
|
+
*/
|
|
32
|
+
allKnownSpecs(options?: {
|
|
33
|
+
includeOrphans?: boolean;
|
|
34
|
+
includeNonCanonical?: boolean;
|
|
35
|
+
}): IndexableModuleSpec[];
|
|
36
|
+
/** 仅返回本次运行中新生成的 spec,不含历史缓存。 */
|
|
37
|
+
currentRunSpecs(): ModuleSpec[];
|
|
38
|
+
/**
|
|
39
|
+
* 返回磁盘中存在但本次未重新生成的 spec 摘要。
|
|
40
|
+
* 可按 sourceKind 过滤。
|
|
41
|
+
*/
|
|
42
|
+
storedOnlySpecs(options?: {
|
|
43
|
+
sourceKind?: SpecSourceKind;
|
|
44
|
+
}): StoredModuleSpecSummary[];
|
|
45
|
+
/** 返回磁盘上存在但对应源文件已不存在的 spec 摘要列表。 */
|
|
46
|
+
orphanSpecs(): StoredModuleSpecSummary[];
|
|
47
|
+
/**
|
|
48
|
+
* 替代原来直接传 collectedModuleSpecs + existingStoredSpecs 的调用方式。
|
|
49
|
+
* currentRunSpecs → moduleSpecs(标记 currentRun: true)
|
|
50
|
+
* storedSpecs(非本次生成,已过滤 orphan)→ existingSpecs
|
|
51
|
+
*/
|
|
52
|
+
asDocGraphInput(): {
|
|
53
|
+
moduleSpecs: ModuleSpec[];
|
|
54
|
+
existingSpecs: ExistingSpecDocument[];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 所有已知 canonical spec 的总数(排除 orphan)。
|
|
58
|
+
* 等价于 allKnownSpecs().length,但语义更明确。
|
|
59
|
+
*/
|
|
60
|
+
totalKnownCount(): number;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=spec-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-store.d.ts","sourceRoot":"","sources":["../../src/spec-store/spec-store.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,0BAA0B,CAAC;AAE5E,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAO/E,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAMpC,MAAM,WAAW,gBAAgB;IAC/B,2BAA2B;IAC3B,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,gDAAgD;IAChD,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACvC,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CAC1C;AAMD,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmC;IAC7D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAc;IAC/C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA4B;IAC7D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAe;gBAErC,OAAO,EAAE,gBAAgB;IAiFrC;;;OAGG;IACH,aAAa,CAAC,OAAO,CAAC,EAAE;QACtB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,GAAG,mBAAmB,EAAE;IA8BzB,gCAAgC;IAChC,eAAe,IAAI,UAAU,EAAE;IAQ/B;;;OAGG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE;QACxB,UAAU,CAAC,EAAE,cAAc,CAAC;KAC7B,GAAG,uBAAuB,EAAE;IAuB7B,oCAAoC;IACpC,WAAW,IAAI,uBAAuB,EAAE;IAUxC;;;;OAIG;IACH,eAAe,IAAI;QACjB,WAAW,EAAE,UAAU,EAAE,CAAC;QAC1B,aAAa,EAAE,oBAAoB,EAAE,CAAC;KACvC;IAqCD;;;OAGG;IACH,eAAe,IAAI,MAAM;CAG1B"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SpecStore — spec 集合统一查询入口
|
|
3
|
+
*
|
|
4
|
+
* 封装"本次生成 + 历史存储 + orphan 识别 + 身份过滤",
|
|
5
|
+
* 泛化自 batch-orchestrator.ts 的 mergeIndexSpecs 私有函数。
|
|
6
|
+
* 所有消费方必须通过此类获取 spec 集合,不得自行合并。
|
|
7
|
+
*/
|
|
8
|
+
import * as fs from 'node:fs';
|
|
9
|
+
import * as path from 'node:path';
|
|
10
|
+
import { getSpectraVersionString } from '../generator/frontmatter.js';
|
|
11
|
+
import { getDefaultSourceKind } from './spec-identity.js';
|
|
12
|
+
// ============================================================
|
|
13
|
+
// SpecStore 类实现
|
|
14
|
+
// ============================================================
|
|
15
|
+
export class SpecStore {
|
|
16
|
+
mergedMap;
|
|
17
|
+
orphans;
|
|
18
|
+
currentSpecPaths;
|
|
19
|
+
storedSpecsInput;
|
|
20
|
+
currentSpecsInput;
|
|
21
|
+
constructor(options) {
|
|
22
|
+
const { currentSpecs, storedSpecs, projectRoot, toProjectPath } = options;
|
|
23
|
+
const existsFn = options.existsFn ?? fs.existsSync;
|
|
24
|
+
this.storedSpecsInput = storedSpecs;
|
|
25
|
+
this.currentSpecsInput = currentSpecs;
|
|
26
|
+
this.mergedMap = new Map();
|
|
27
|
+
this.orphans = new Set();
|
|
28
|
+
this.currentSpecPaths = new Set();
|
|
29
|
+
// 迁移自 batch-orchestrator.ts mergeIndexSpecs(第 912-966 行)的合并逻辑:
|
|
30
|
+
// 1. 先插入磁盘已存储的 spec(有 skeletonHash 校验)
|
|
31
|
+
for (const storedSpec of storedSpecs) {
|
|
32
|
+
// 原 mergeIndexSpecs 中的 skeletonHash 存在性检查:无 hash 则跳过
|
|
33
|
+
if (!storedSpec.skeletonHash) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
// 从 storedSpec 构造 IndexableModuleSpec,将 sourceKind 携带进 frontmatter
|
|
37
|
+
// 这样 allKnownSpecs() 的 sourceKind 过滤才能正确工作
|
|
38
|
+
const storedSourceKind = storedSpec.sourceKind;
|
|
39
|
+
const frontmatterFromStored = {
|
|
40
|
+
type: 'module-spec',
|
|
41
|
+
version: storedSpec.version ?? 'v1',
|
|
42
|
+
generatedBy: getSpectraVersionString(),
|
|
43
|
+
sourceTarget: storedSpec.sourceTarget,
|
|
44
|
+
relatedFiles: storedSpec.relatedFiles,
|
|
45
|
+
lastUpdated: new Date().toISOString(),
|
|
46
|
+
confidence: storedSpec.confidence ?? 'medium',
|
|
47
|
+
skeletonHash: storedSpec.skeletonHash,
|
|
48
|
+
language: storedSpec.language,
|
|
49
|
+
crossLanguageRefs: storedSpec.crossLanguageRefs,
|
|
50
|
+
};
|
|
51
|
+
if (storedSourceKind !== undefined) {
|
|
52
|
+
frontmatterFromStored.sourceKind = storedSourceKind;
|
|
53
|
+
}
|
|
54
|
+
this.mergedMap.set(storedSpec.outputPath, {
|
|
55
|
+
frontmatter: frontmatterFromStored,
|
|
56
|
+
outputPath: storedSpec.outputPath,
|
|
57
|
+
intentSummary: storedSpec.intentSummary,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
// 2. 用本次生成的 spec 覆盖(同一 outputPath 时本次生成优先)
|
|
61
|
+
for (const currentSpec of currentSpecs) {
|
|
62
|
+
const normalizedOutputPath = path.isAbsolute(currentSpec.outputPath)
|
|
63
|
+
? toProjectPath(path.resolve(currentSpec.outputPath))
|
|
64
|
+
: currentSpec.outputPath;
|
|
65
|
+
this.mergedMap.set(normalizedOutputPath, {
|
|
66
|
+
frontmatter: currentSpec.frontmatter,
|
|
67
|
+
outputPath: normalizedOutputPath,
|
|
68
|
+
sections: {
|
|
69
|
+
intent: currentSpec.sections.intent,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
this.currentSpecPaths.add(normalizedOutputPath);
|
|
73
|
+
}
|
|
74
|
+
// 3. Orphan 检测:仅对 canonical(或字段缺失)的 storedSpec 做文件存在性检查
|
|
75
|
+
for (const storedSpec of storedSpecs) {
|
|
76
|
+
const sourceKind = getDefaultSourceKind(storedSpec.sourceKind);
|
|
77
|
+
// bundle_copy 和 derived 的派生 spec 不做 orphan 判断(其源是另一个 spec,不是代码文件)
|
|
78
|
+
if (sourceKind !== 'canonical') {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const absoluteSourceTarget = path.join(projectRoot, storedSpec.sourceTarget);
|
|
82
|
+
if (!existsFn(absoluteSourceTarget)) {
|
|
83
|
+
this.orphans.add(storedSpec.outputPath);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// ============================================================
|
|
88
|
+
// 视图 1:所有已知 spec(canonical,排除 orphan 和非 canonical)
|
|
89
|
+
// ============================================================
|
|
90
|
+
/**
|
|
91
|
+
* 返回本次生成 + 历史存储的合集,已去重。
|
|
92
|
+
* 默认:排除 orphan + 排除 sourceKind 为 bundle_copy/derived 的 spec。
|
|
93
|
+
*/
|
|
94
|
+
allKnownSpecs(options) {
|
|
95
|
+
const includeOrphans = options?.includeOrphans ?? false;
|
|
96
|
+
const includeNonCanonical = options?.includeNonCanonical ?? false;
|
|
97
|
+
return [...this.mergedMap.values()]
|
|
98
|
+
.filter((spec) => {
|
|
99
|
+
// orphan 过滤
|
|
100
|
+
if (!includeOrphans && this.orphans.has(spec.outputPath)) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
// sourceKind 身份过滤(从 frontmatter 中读取,缺失默认为 canonical)
|
|
104
|
+
if (!includeNonCanonical) {
|
|
105
|
+
const sourceKind = getDefaultSourceKind(spec.frontmatter.sourceKind);
|
|
106
|
+
if (sourceKind !== 'canonical') {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
})
|
|
112
|
+
.sort((a, b) => a.outputPath.localeCompare(b.outputPath));
|
|
113
|
+
}
|
|
114
|
+
// ============================================================
|
|
115
|
+
// 视图 2:本次 batch 生成的 spec
|
|
116
|
+
// ============================================================
|
|
117
|
+
/** 仅返回本次运行中新生成的 spec,不含历史缓存。 */
|
|
118
|
+
currentRunSpecs() {
|
|
119
|
+
return [...this.currentSpecsInput];
|
|
120
|
+
}
|
|
121
|
+
// ============================================================
|
|
122
|
+
// 视图 3:磁盘已有的 spec(不含本次生成的部分)
|
|
123
|
+
// ============================================================
|
|
124
|
+
/**
|
|
125
|
+
* 返回磁盘中存在但本次未重新生成的 spec 摘要。
|
|
126
|
+
* 可按 sourceKind 过滤。
|
|
127
|
+
*/
|
|
128
|
+
storedOnlySpecs(options) {
|
|
129
|
+
return this.storedSpecsInput.filter((storedSpec) => {
|
|
130
|
+
// 排除本次已生成的路径(outputPath 规范化后已在 currentSpecPaths 中)
|
|
131
|
+
if (this.currentSpecPaths.has(storedSpec.outputPath)) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
// 按 sourceKind 过滤(若有)
|
|
135
|
+
if (options?.sourceKind !== undefined) {
|
|
136
|
+
const actualKind = getDefaultSourceKind(storedSpec.sourceKind);
|
|
137
|
+
if (actualKind !== options.sourceKind) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return true;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
// ============================================================
|
|
145
|
+
// 视图 4:orphan spec(源文件已不存在的磁盘 spec)
|
|
146
|
+
// ============================================================
|
|
147
|
+
/** 返回磁盘上存在但对应源文件已不存在的 spec 摘要列表。 */
|
|
148
|
+
orphanSpecs() {
|
|
149
|
+
return this.storedSpecsInput.filter((storedSpec) => this.orphans.has(storedSpec.outputPath));
|
|
150
|
+
}
|
|
151
|
+
// ============================================================
|
|
152
|
+
// 辅助方法:转为 buildDocGraph 所需的输入参数
|
|
153
|
+
// ============================================================
|
|
154
|
+
/**
|
|
155
|
+
* 替代原来直接传 collectedModuleSpecs + existingStoredSpecs 的调用方式。
|
|
156
|
+
* currentRunSpecs → moduleSpecs(标记 currentRun: true)
|
|
157
|
+
* storedSpecs(非本次生成,已过滤 orphan)→ existingSpecs
|
|
158
|
+
*/
|
|
159
|
+
asDocGraphInput() {
|
|
160
|
+
// existingSpecs:仅包含 canonical + 非 orphan 的存储 spec,且不含本次生成的(避免重复)
|
|
161
|
+
const existingSpecs = this.storedSpecsInput
|
|
162
|
+
.filter((storedSpec) => {
|
|
163
|
+
// 排除 orphan
|
|
164
|
+
if (this.orphans.has(storedSpec.outputPath)) {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
// 排除本次已生成(doc-graph-builder 会从 moduleSpecs 中取,不需要再放进 existingSpecs)
|
|
168
|
+
if (this.currentSpecPaths.has(storedSpec.outputPath)) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
// 排除 bundle_copy / derived(docGraph 只处理 canonical spec)
|
|
172
|
+
const sourceKind = getDefaultSourceKind(storedSpec.sourceKind);
|
|
173
|
+
if (sourceKind !== 'canonical') {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
return true;
|
|
177
|
+
})
|
|
178
|
+
.map((storedSpec) => ({
|
|
179
|
+
specPath: storedSpec.specPath,
|
|
180
|
+
sourceTarget: storedSpec.sourceTarget,
|
|
181
|
+
relatedFiles: storedSpec.relatedFiles,
|
|
182
|
+
linked: storedSpec.linked,
|
|
183
|
+
confidence: storedSpec.confidence,
|
|
184
|
+
}));
|
|
185
|
+
return {
|
|
186
|
+
moduleSpecs: this.currentSpecsInput,
|
|
187
|
+
existingSpecs,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
// ============================================================
|
|
191
|
+
// 辅助方法:canonical spec 总数(排除 orphan)
|
|
192
|
+
// ============================================================
|
|
193
|
+
/**
|
|
194
|
+
* 所有已知 canonical spec 的总数(排除 orphan)。
|
|
195
|
+
* 等价于 allKnownSpecs().length,但语义更明确。
|
|
196
|
+
*/
|
|
197
|
+
totalKnownCount() {
|
|
198
|
+
return this.allKnownSpecs().length;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=spec-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-store.js","sourceRoot":"","sources":["../../src/spec-store/spec-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAMtE,OAAO,EAAE,oBAAoB,EAAuB,MAAM,oBAAoB,CAAC;AA6B/E,+DAA+D;AAC/D,gBAAgB;AAChB,+DAA+D;AAE/D,MAAM,OAAO,SAAS;IACH,SAAS,CAAmC;IAC5C,OAAO,CAAc;IACrB,gBAAgB,CAAc;IAC9B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K,CAAC;YACf,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;aACD,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YACpB,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,YAAY,EAAE,UAAU,CAAC,YAAY;YACrC,YAAY,EAAE,UAAU,CAAC,YAAY;YACrC,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,UAAU,EAAE,UAAU,CAAC,UAAU;SACF,CAAA,CAAC,CAAC;QAErC,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,iBAAiB;YACnC,aAAa;SACd,CAAC;IACJ,CAAC;IAED,+DAA+D;IAC/D,oCAAoC;IACpC,+DAA+D;IAE/D;;;OAGG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 原子写入 JSON 数据到文件
|
|
3
|
+
* 先写临时文件再 rename,防止写入中断导致数据损坏
|
|
4
|
+
* .tmp 残留由 renameSync 覆盖,无需预清理
|
|
5
|
+
*
|
|
6
|
+
* @param filePath - 目标文件路径
|
|
7
|
+
* @param data - 要序列化为 JSON 的数据
|
|
8
|
+
*/
|
|
9
|
+
export declare function writeAtomicJson(filePath: string, data: unknown): void;
|
|
10
|
+
//# sourceMappingURL=atomic-write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic-write.d.ts","sourceRoot":"","sources":["../../src/utils/atomic-write.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAarE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 原子写入工具函数
|
|
3
|
+
* 从 checkpoint.ts 的 saveCheckpoint() 提取通用原子写入逻辑
|
|
4
|
+
* 核心流程:解析绝对路径 → 创建目录 → 写 .tmp → renameSync 原子替换
|
|
5
|
+
*/
|
|
6
|
+
import * as fs from 'node:fs';
|
|
7
|
+
import * as path from 'node:path';
|
|
8
|
+
/**
|
|
9
|
+
* 原子写入 JSON 数据到文件
|
|
10
|
+
* 先写临时文件再 rename,防止写入中断导致数据损坏
|
|
11
|
+
* .tmp 残留由 renameSync 覆盖,无需预清理
|
|
12
|
+
*
|
|
13
|
+
* @param filePath - 目标文件路径
|
|
14
|
+
* @param data - 要序列化为 JSON 的数据
|
|
15
|
+
*/
|
|
16
|
+
export function writeAtomicJson(filePath, data) {
|
|
17
|
+
const resolvedPath = path.resolve(filePath);
|
|
18
|
+
const dir = path.dirname(resolvedPath);
|
|
19
|
+
// 确保目录存在
|
|
20
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
21
|
+
// 原子写入:先写临时文件
|
|
22
|
+
const tmpPath = `${resolvedPath}.tmp`;
|
|
23
|
+
const content = JSON.stringify(data, null, 2);
|
|
24
|
+
fs.writeFileSync(tmpPath, content, 'utf-8');
|
|
25
|
+
fs.renameSync(tmpPath, resolvedPath);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=atomic-write.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic-write.js","sourceRoot":"","sources":["../../src/utils/atomic-write.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,IAAa;IAC7D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAEvC,SAAS;IACT,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvC,cAAc;IACd,MAAM,OAAO,GAAG,GAAG,YAAY,MAAM,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAE9C,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 超大文件分块策略
|
|
3
|
+
* 当文件超过 5k LOC 时,按函数边界分割,返回带元数据的分块数组(FR-005)
|
|
4
|
+
*/
|
|
5
|
+
/** 分块阈值:5000 行 */
|
|
6
|
+
export declare const CHUNK_THRESHOLD = 5000;
|
|
7
|
+
/** 单个分块 */
|
|
8
|
+
export interface Chunk {
|
|
9
|
+
/** 分块索引(从 0 开始) */
|
|
10
|
+
index: number;
|
|
11
|
+
/** 总分块数 */
|
|
12
|
+
totalChunks: number;
|
|
13
|
+
/** 分块内容 */
|
|
14
|
+
content: string;
|
|
15
|
+
/** 起始行号(1-based) */
|
|
16
|
+
startLine: number;
|
|
17
|
+
/** 结束行号(1-based) */
|
|
18
|
+
endLine: number;
|
|
19
|
+
/** 行数 */
|
|
20
|
+
lineCount: number;
|
|
21
|
+
/** 分块中包含的顶层函数/类名称 */
|
|
22
|
+
symbols: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 将文件内容按函数边界分块
|
|
26
|
+
*
|
|
27
|
+
* @param content - 文件完整内容
|
|
28
|
+
* @param maxLinesPerChunk - 每个分块的目标最大行数(默认与阈值相同)
|
|
29
|
+
* @returns 分块数组,如果文件不超过阈值则返回单元素数组
|
|
30
|
+
*/
|
|
31
|
+
export declare function splitIntoChunks(content: string, maxLinesPerChunk?: number): Chunk[];
|
|
32
|
+
//# sourceMappingURL=chunk-splitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-splitter.d.ts","sourceRoot":"","sources":["../../src/utils/chunk-splitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kBAAkB;AAClB,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,WAAW;AACX,MAAM,WAAW,KAAK;IACpB,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS;IACT,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AA6DD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,gBAAgB,GAAE,MAAwB,GACzC,KAAK,EAAE,CA0DT"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 超大文件分块策略
|
|
3
|
+
* 当文件超过 5k LOC 时,按函数边界分割,返回带元数据的分块数组(FR-005)
|
|
4
|
+
*/
|
|
5
|
+
/** 分块阈值:5000 行 */
|
|
6
|
+
export const CHUNK_THRESHOLD = 5000;
|
|
7
|
+
/**
|
|
8
|
+
* 检测顶层函数/类声明的正则模式
|
|
9
|
+
* 匹配 export function, export class, export interface, export type, export const 等
|
|
10
|
+
*/
|
|
11
|
+
const TOP_LEVEL_DECL_RE = /^(?:export\s+)?(?:default\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|interface|type|enum|const|let|var)\s+(\w+)/;
|
|
12
|
+
/**
|
|
13
|
+
* 查找函数边界(寻找以 } 结尾的行作为函数/类的结束位置)
|
|
14
|
+
* 在 threshold 附近寻找最近的边界
|
|
15
|
+
*/
|
|
16
|
+
function findBoundary(lines, targetLine) {
|
|
17
|
+
// 在目标行前后 200 行范围内寻找最佳分割点
|
|
18
|
+
const searchRadius = 200;
|
|
19
|
+
const start = Math.max(0, targetLine - searchRadius);
|
|
20
|
+
const end = Math.min(lines.length - 1, targetLine + searchRadius);
|
|
21
|
+
let bestBoundary = targetLine;
|
|
22
|
+
let bestDistance = Infinity;
|
|
23
|
+
for (let i = start; i <= end; i++) {
|
|
24
|
+
const trimmed = lines[i].trim();
|
|
25
|
+
// 寻找顶层声明的开头作为分割点(在下一行开始新分块)
|
|
26
|
+
if (TOP_LEVEL_DECL_RE.test(trimmed) && i > 0) {
|
|
27
|
+
const distance = Math.abs(i - targetLine);
|
|
28
|
+
if (distance < bestDistance) {
|
|
29
|
+
bestDistance = distance;
|
|
30
|
+
bestBoundary = i; // 在声明之前分割
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// 或者寻找仅有 } 的行(函数/类结束)
|
|
34
|
+
if (trimmed === '}' || trimmed === '};') {
|
|
35
|
+
const distance = Math.abs(i - targetLine);
|
|
36
|
+
if (distance < bestDistance) {
|
|
37
|
+
bestDistance = distance;
|
|
38
|
+
bestBoundary = i + 1; // 在 } 之后分割
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return bestBoundary;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 提取分块中的顶层符号名称
|
|
46
|
+
*/
|
|
47
|
+
function extractSymbols(lines) {
|
|
48
|
+
const symbols = [];
|
|
49
|
+
for (const line of lines) {
|
|
50
|
+
const match = TOP_LEVEL_DECL_RE.exec(line);
|
|
51
|
+
if (match?.[1]) {
|
|
52
|
+
symbols.push(match[1]);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return symbols;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 将文件内容按函数边界分块
|
|
59
|
+
*
|
|
60
|
+
* @param content - 文件完整内容
|
|
61
|
+
* @param maxLinesPerChunk - 每个分块的目标最大行数(默认与阈值相同)
|
|
62
|
+
* @returns 分块数组,如果文件不超过阈值则返回单元素数组
|
|
63
|
+
*/
|
|
64
|
+
export function splitIntoChunks(content, maxLinesPerChunk = CHUNK_THRESHOLD) {
|
|
65
|
+
const lines = content.split('\n');
|
|
66
|
+
const totalLines = lines.length;
|
|
67
|
+
// 不需要分块
|
|
68
|
+
if (totalLines <= CHUNK_THRESHOLD) {
|
|
69
|
+
return [
|
|
70
|
+
{
|
|
71
|
+
index: 0,
|
|
72
|
+
totalChunks: 1,
|
|
73
|
+
content,
|
|
74
|
+
startLine: 1,
|
|
75
|
+
endLine: totalLines,
|
|
76
|
+
lineCount: totalLines,
|
|
77
|
+
symbols: extractSymbols(lines),
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
// 需要分块
|
|
82
|
+
const chunks = [];
|
|
83
|
+
let currentStart = 0;
|
|
84
|
+
while (currentStart < totalLines) {
|
|
85
|
+
let currentEnd;
|
|
86
|
+
if (currentStart + maxLinesPerChunk >= totalLines) {
|
|
87
|
+
// 最后一块
|
|
88
|
+
currentEnd = totalLines;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
// 在函数边界处分割
|
|
92
|
+
currentEnd = findBoundary(lines, currentStart + maxLinesPerChunk);
|
|
93
|
+
// 确保至少前进一些行,防止无限循环
|
|
94
|
+
if (currentEnd <= currentStart) {
|
|
95
|
+
currentEnd = currentStart + maxLinesPerChunk;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const chunkLines = lines.slice(currentStart, currentEnd);
|
|
99
|
+
chunks.push({
|
|
100
|
+
index: chunks.length,
|
|
101
|
+
totalChunks: 0, // 稍后回填
|
|
102
|
+
content: chunkLines.join('\n'),
|
|
103
|
+
startLine: currentStart + 1, // 1-based
|
|
104
|
+
endLine: currentEnd,
|
|
105
|
+
lineCount: chunkLines.length,
|
|
106
|
+
symbols: extractSymbols(chunkLines),
|
|
107
|
+
});
|
|
108
|
+
currentStart = currentEnd;
|
|
109
|
+
}
|
|
110
|
+
// 回填 totalChunks
|
|
111
|
+
for (const chunk of chunks) {
|
|
112
|
+
chunk.totalChunks = chunks.length;
|
|
113
|
+
}
|
|
114
|
+
return chunks;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=chunk-splitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-splitter.js","sourceRoot":"","sources":["../../src/utils/chunk-splitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kBAAkB;AAClB,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAoBpC;;;GAGG;AACH,MAAM,iBAAiB,GACrB,yHAAyH,CAAC;AAE5H;;;GAGG;AACH,SAAS,YAAY,CAAC,KAAe,EAAE,UAAkB;IACvD,yBAAyB;IACzB,MAAM,YAAY,GAAG,GAAG,CAAC;IACzB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC,CAAC;IAElE,IAAI,YAAY,GAAG,UAAU,CAAC;IAC9B,IAAI,YAAY,GAAG,QAAQ,CAAC;IAE5B,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC,IAAI,EAAE,CAAC;QAEjC,4BAA4B;QAC5B,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;YAC1C,IAAI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