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,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 跨社区异常边发现 + betweenness 近似采样
|
|
3
|
+
* 参考 Graphify analyze.py 的 surprising_connections 策略
|
|
4
|
+
* 复合评分:跨社区加成 + 置信度权重 + betweenness centrality
|
|
5
|
+
*/
|
|
6
|
+
// ============================================================
|
|
7
|
+
// 常量
|
|
8
|
+
// ============================================================
|
|
9
|
+
/** 置信度惊奇权重:低置信度 = 更意外 */
|
|
10
|
+
const CONFIDENCE_SURPRISE_WEIGHT = {
|
|
11
|
+
AMBIGUOUS: 3,
|
|
12
|
+
INFERRED: 2,
|
|
13
|
+
EXTRACTED: 1,
|
|
14
|
+
};
|
|
15
|
+
// ============================================================
|
|
16
|
+
// 公共函数
|
|
17
|
+
// ============================================================
|
|
18
|
+
/**
|
|
19
|
+
* 发现跨社区异常边
|
|
20
|
+
* 评分策略:
|
|
21
|
+
* 1. 跨社区加成(+3)
|
|
22
|
+
* 2. 置信度权重(AMBIGUOUS=3, INFERRED=2, EXTRACTED=1)
|
|
23
|
+
* 3. betweenness centrality 采样归一化加成
|
|
24
|
+
*
|
|
25
|
+
* @param graph - graphology 图实例
|
|
26
|
+
* @param nodeCommunityMap - 节点 → 社区 ID 映射
|
|
27
|
+
* @param options - 采样和返回数量配置
|
|
28
|
+
* @returns 异常边列表(按评分降序)
|
|
29
|
+
*/
|
|
30
|
+
export function findSurprisingEdges(graph, nodeCommunityMap, options) {
|
|
31
|
+
const topN = options?.topN ?? 10;
|
|
32
|
+
const sampleSize = options?.sampleSize ?? 1000;
|
|
33
|
+
if (graph.size === 0)
|
|
34
|
+
return [];
|
|
35
|
+
// 计算边 betweenness(采样近似)
|
|
36
|
+
const edgeBetweenness = approximateEdgeBetweenness(graph, sampleSize);
|
|
37
|
+
// 归一化 betweenness(避免 spread 大 Map 导致栈溢出)
|
|
38
|
+
let maxBetweenness = 1;
|
|
39
|
+
for (const v of edgeBetweenness.values()) {
|
|
40
|
+
if (v > maxBetweenness)
|
|
41
|
+
maxBetweenness = v;
|
|
42
|
+
}
|
|
43
|
+
const candidates = [];
|
|
44
|
+
graph.forEachEdge((_edge, attrs, source, target) => {
|
|
45
|
+
const sourceCommunity = nodeCommunityMap.get(source);
|
|
46
|
+
const targetCommunity = nodeCommunityMap.get(target);
|
|
47
|
+
const crossCommunity = sourceCommunity !== undefined
|
|
48
|
+
&& targetCommunity !== undefined
|
|
49
|
+
&& sourceCommunity !== targetCommunity;
|
|
50
|
+
// 仅保留跨社区边或低置信度边
|
|
51
|
+
const confidence = attrs['confidence'] ?? 'EXTRACTED';
|
|
52
|
+
if (!crossCommunity && confidence === 'EXTRACTED')
|
|
53
|
+
return;
|
|
54
|
+
// 排除纯结构边
|
|
55
|
+
const relation = attrs['relation'] ?? 'unknown';
|
|
56
|
+
if (relation === 'contains')
|
|
57
|
+
return;
|
|
58
|
+
// 复合评分
|
|
59
|
+
let score = 0;
|
|
60
|
+
if (crossCommunity)
|
|
61
|
+
score += 3;
|
|
62
|
+
score += CONFIDENCE_SURPRISE_WEIGHT[confidence] ?? 1;
|
|
63
|
+
// betweenness 归一化加成(0-2 分)
|
|
64
|
+
const edgeKey = [source, target].sort().join('|');
|
|
65
|
+
const betweenness = edgeBetweenness.get(edgeKey) ?? 0;
|
|
66
|
+
score += (betweenness / maxBetweenness) * 2;
|
|
67
|
+
candidates.push({
|
|
68
|
+
source,
|
|
69
|
+
target,
|
|
70
|
+
relation,
|
|
71
|
+
confidence,
|
|
72
|
+
crossCommunity,
|
|
73
|
+
score: Math.round(score * 100) / 100,
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
// 按评分降序,取 Top N
|
|
77
|
+
candidates.sort((a, b) => b.score - a.score);
|
|
78
|
+
return candidates.slice(0, topN);
|
|
79
|
+
}
|
|
80
|
+
// ============================================================
|
|
81
|
+
// 内���函数
|
|
82
|
+
// ============================================================
|
|
83
|
+
/**
|
|
84
|
+
* 近似边 betweenness centrality(BFS 采样)
|
|
85
|
+
* 从随机采样的源节点出发做 BFS,统计每条边被最短路径经过的次数
|
|
86
|
+
*
|
|
87
|
+
* @param graph - graphology 图实例
|
|
88
|
+
* @param sampleSize - 采样的源节点数
|
|
89
|
+
* @returns Map<edgeKey, betweenness count>
|
|
90
|
+
*/
|
|
91
|
+
function approximateEdgeBetweenness(graph, sampleSize) {
|
|
92
|
+
const betweenness = new Map();
|
|
93
|
+
const allNodes = graph.nodes();
|
|
94
|
+
if (allNodes.length === 0)
|
|
95
|
+
return betweenness;
|
|
96
|
+
// 随机采样源节点
|
|
97
|
+
const sampledSources = sampleNodes(allNodes, Math.min(sampleSize, allNodes.length));
|
|
98
|
+
for (const source of sampledSources) {
|
|
99
|
+
// BFS 计算从 source 到所有节点的最短路径
|
|
100
|
+
const dist = new Map();
|
|
101
|
+
const pred = new Map();
|
|
102
|
+
const sigma = new Map();
|
|
103
|
+
const queue = [source];
|
|
104
|
+
dist.set(source, 0);
|
|
105
|
+
sigma.set(source, 1);
|
|
106
|
+
while (queue.length > 0) {
|
|
107
|
+
const v = queue.shift();
|
|
108
|
+
const dv = dist.get(v);
|
|
109
|
+
graph.forEachNeighbor(v, (w) => {
|
|
110
|
+
if (!dist.has(w)) {
|
|
111
|
+
dist.set(w, dv + 1);
|
|
112
|
+
queue.push(w);
|
|
113
|
+
}
|
|
114
|
+
if (dist.get(w) === dv + 1) {
|
|
115
|
+
sigma.set(w, (sigma.get(w) ?? 0) + (sigma.get(v) ?? 1));
|
|
116
|
+
const preds = pred.get(w) ?? [];
|
|
117
|
+
preds.push(v);
|
|
118
|
+
pred.set(w, preds);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
// 反向累加 betweenness
|
|
123
|
+
const delta = new Map();
|
|
124
|
+
// 按距离降序处理节点
|
|
125
|
+
const sorted = [...dist.entries()].sort((a, b) => b[1] - a[1]);
|
|
126
|
+
for (const [w] of sorted) {
|
|
127
|
+
if (w === source)
|
|
128
|
+
continue;
|
|
129
|
+
const dw = delta.get(w) ?? 0;
|
|
130
|
+
const sigmaW = sigma.get(w) ?? 1;
|
|
131
|
+
for (const v of pred.get(w) ?? []) {
|
|
132
|
+
const sigmaV = sigma.get(v) ?? 1;
|
|
133
|
+
const contribution = (sigmaV / sigmaW) * (1 + dw);
|
|
134
|
+
delta.set(v, (delta.get(v) ?? 0) + contribution);
|
|
135
|
+
// 累加到边 betweenness
|
|
136
|
+
const edgeKey = [v, w].sort().join('|');
|
|
137
|
+
betweenness.set(edgeKey, (betweenness.get(edgeKey) ?? 0) + contribution);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return betweenness;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* 从数组中随机采样 N 个元素(Fisher-Yates 部分洗牌)
|
|
145
|
+
*/
|
|
146
|
+
function sampleNodes(nodes, n) {
|
|
147
|
+
const copy = [...nodes];
|
|
148
|
+
for (let i = copy.length - 1; i > copy.length - 1 - n && i > 0; i--) {
|
|
149
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
150
|
+
[copy[i], copy[j]] = [copy[j], copy[i]];
|
|
151
|
+
}
|
|
152
|
+
return copy.slice(copy.length - n);
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=surprising-edges.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surprising-edges.js","sourceRoot":"","sources":["../../../src/panoramic/community/surprising-edges.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiCH,+DAA+D;AAC/D,KAAK;AACL,+DAA+D;AAE/D,yBAAyB;AACzB,MAAM,0BAA0B,GAA2B;IACzD,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,CAAC;CACb,CAAC;AAEF,+DAA+D;AAC/D,OAAO;AACP,+DAA+D;AAE/D;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAsB,EACtB,gBAAqC,EACrC,OAAgC;IAEhC,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC;IACjC,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,IAAI,CAAC;IAE/C,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEhC,wBAAwB;IACxB,MAAM,eAAe,GAAG,0BAA0B,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAEtE,yCAAyC;IACzC,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,KAAK,MAAM,CAAC,IAAI,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC;QACzC,IAAI,CAAC,GAAG,cAAc;YAAE,cAAc,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,UAAU,GAAqB,EAAE,CAAC;IAExC,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;QACjD,MAAM,eAAe,GAAG,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACrD,MAAM,eAAe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|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ModuleCrossReferenceIndex, ModuleSpec } from '../models/module-spec.js';
|
|
2
|
+
import type { DocGraph } from './builders/doc-graph-builder.js';
|
|
3
|
+
export declare function buildCrossReferenceIndex(moduleSpec: ModuleSpec, docGraph: DocGraph): ModuleCrossReferenceIndex;
|
|
4
|
+
//# sourceMappingURL=cross-reference-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-reference-index.d.ts","sourceRoot":"","sources":["../../src/panoramic/cross-reference-index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,yBAAyB,EACzB,UAAU,EACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,QAAQ,EAA6C,MAAM,iCAAiC,CAAC;AAW3G,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,GACjB,yBAAyB,CAqH3B"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CrossReferenceIndex
|
|
3
|
+
* 将 DocGraph 投影为单个 ModuleSpec 可直接渲染的 related spec 索引。
|
|
4
|
+
*/
|
|
5
|
+
import * as path from 'node:path';
|
|
6
|
+
import { MODULE_SPEC_ANCHOR_ID } from './builders/doc-graph-builder.js';
|
|
7
|
+
export function buildCrossReferenceIndex(moduleSpec, docGraph) {
|
|
8
|
+
const currentSpecPath = normalizeProjectPath(moduleSpec.outputPath, docGraph.projectRoot);
|
|
9
|
+
const currentSourceTarget = normalizeProjectPath(moduleSpec.frontmatter.sourceTarget, docGraph.projectRoot);
|
|
10
|
+
const currentNode = docGraph.specs.find((spec) => spec.specPath === currentSpecPath || spec.sourceTarget === currentSourceTarget);
|
|
11
|
+
if (!currentNode) {
|
|
12
|
+
return {
|
|
13
|
+
generatedAt: docGraph.generatedAt,
|
|
14
|
+
sameModule: [],
|
|
15
|
+
crossModule: [],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const sameModuleEvidence = docGraph.references
|
|
19
|
+
.filter((reference) => reference.kind === 'same-module'
|
|
20
|
+
&& reference.fromSpecPath === currentNode.specPath
|
|
21
|
+
&& reference.toSpecPath === currentNode.specPath);
|
|
22
|
+
const sameModule = [];
|
|
23
|
+
if (sameModuleEvidence.length > 0) {
|
|
24
|
+
const evidenceCount = sameModuleEvidence.reduce((sum, item) => sum + item.evidenceCount, 0);
|
|
25
|
+
const samples = flattenSamples(sameModuleEvidence.flatMap((item) => item.evidenceSamples));
|
|
26
|
+
sameModule.push({
|
|
27
|
+
label: '当前模块内部关联',
|
|
28
|
+
href: `#${MODULE_SPEC_ANCHOR_ID}`,
|
|
29
|
+
targetSpecPath: currentNode.specPath,
|
|
30
|
+
targetSourceTarget: currentNode.sourceTarget,
|
|
31
|
+
kind: 'same-module',
|
|
32
|
+
direction: 'internal',
|
|
33
|
+
evidenceCount,
|
|
34
|
+
summary: summarizeEvidence(evidenceCount, samples),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const crossModuleMap = new Map();
|
|
38
|
+
for (const reference of docGraph.references) {
|
|
39
|
+
if (reference.kind !== 'cross-module') {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (reference.fromSpecPath === currentNode.specPath) {
|
|
43
|
+
const entry = getOrCreateCrossModuleAccumulator(crossModuleMap, reference.toSpecPath, reference.toSourceTarget);
|
|
44
|
+
entry.outboundCount += reference.evidenceCount;
|
|
45
|
+
entry.samples.push(...reference.evidenceSamples);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (reference.toSpecPath === currentNode.specPath) {
|
|
49
|
+
const entry = getOrCreateCrossModuleAccumulator(crossModuleMap, reference.fromSpecPath, reference.fromSourceTarget);
|
|
50
|
+
entry.inboundCount += reference.evidenceCount;
|
|
51
|
+
entry.samples.push(...reference.evidenceSamples);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// 补充:从 skeleton imports 推断跨模块引用(适用于无相对 import 的项目,如 Python)
|
|
55
|
+
supplementCrossModuleFromSkeletonImports(moduleSpec, docGraph, currentNode, crossModuleMap);
|
|
56
|
+
const crossModule = [...crossModuleMap.values()]
|
|
57
|
+
.map((entry) => {
|
|
58
|
+
const evidenceCount = entry.outboundCount + entry.inboundCount;
|
|
59
|
+
const samples = flattenSamples(entry.samples);
|
|
60
|
+
const direction = entry.outboundCount > 0 && entry.inboundCount > 0
|
|
61
|
+
? 'bidirectional'
|
|
62
|
+
: entry.outboundCount > 0
|
|
63
|
+
? 'outbound'
|
|
64
|
+
: 'inbound';
|
|
65
|
+
return {
|
|
66
|
+
label: entry.targetSourceTarget,
|
|
67
|
+
href: buildRelativeSpecHref(currentNode.specPath, entry.targetSpecPath),
|
|
68
|
+
targetSpecPath: entry.targetSpecPath,
|
|
69
|
+
targetSourceTarget: entry.targetSourceTarget,
|
|
70
|
+
kind: 'cross-module',
|
|
71
|
+
direction,
|
|
72
|
+
evidenceCount,
|
|
73
|
+
summary: summarizeDirectionalEvidence(entry.outboundCount, entry.inboundCount, samples),
|
|
74
|
+
};
|
|
75
|
+
})
|
|
76
|
+
.sort((left, right) => {
|
|
77
|
+
if (right.evidenceCount !== left.evidenceCount) {
|
|
78
|
+
return right.evidenceCount - left.evidenceCount;
|
|
79
|
+
}
|
|
80
|
+
return left.label.localeCompare(right.label);
|
|
81
|
+
});
|
|
82
|
+
return {
|
|
83
|
+
generatedAt: docGraph.generatedAt,
|
|
84
|
+
sameModule,
|
|
85
|
+
crossModule,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 从 skeleton imports 补充跨模块引用
|
|
90
|
+
*
|
|
91
|
+
* 当 docGraph.references 不含引用(如 Python 绝对 import 项目)时,
|
|
92
|
+
* 遍历 skeleton 的 isRelative=false imports,将包名式 specifier 解析为
|
|
93
|
+
* docGraph 中已知的 spec,并增加出站引用计数。
|
|
94
|
+
*/
|
|
95
|
+
function supplementCrossModuleFromSkeletonImports(moduleSpec, docGraph, currentNode, crossModuleMap) {
|
|
96
|
+
// 预构建已覆盖引用的 Set,将内层查询从 O(references) 降到 O(1)
|
|
97
|
+
const coveredKeys = new Set();
|
|
98
|
+
for (const ref of docGraph.references) {
|
|
99
|
+
if (ref.kind === 'cross-module') {
|
|
100
|
+
coveredKeys.add(`${ref.fromSpecPath}:${ref.toSpecPath}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
for (const imp of moduleSpec.baselineSkeleton.imports) {
|
|
104
|
+
// 相对 import 已由 docGraph.references 覆盖
|
|
105
|
+
if (imp.isRelative)
|
|
106
|
+
continue;
|
|
107
|
+
const targetSpecPath = resolveSpecifierToSpecPath(imp.moduleSpecifier, docGraph.specs);
|
|
108
|
+
if (!targetSpecPath || targetSpecPath === currentNode.specPath)
|
|
109
|
+
continue;
|
|
110
|
+
// 若 docGraph.references 已包含该跨模块引用,跳过(避免重复计数)
|
|
111
|
+
if (coveredKeys.has(`${currentNode.specPath}:${targetSpecPath}`))
|
|
112
|
+
continue;
|
|
113
|
+
const targetSpec = docGraph.specs.find((spec) => spec.specPath === targetSpecPath);
|
|
114
|
+
if (!targetSpec)
|
|
115
|
+
continue;
|
|
116
|
+
const entry = getOrCreateCrossModuleAccumulator(crossModuleMap, targetSpecPath, targetSpec.sourceTarget);
|
|
117
|
+
entry.outboundCount += 1;
|
|
118
|
+
entry.samples.push({
|
|
119
|
+
fromSource: currentNode.sourceTarget,
|
|
120
|
+
toSource: targetSpec.sourceTarget,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* 将模块标识符(点分包名)解析为 docGraph 中匹配的 spec 路径
|
|
126
|
+
*
|
|
127
|
+
* 优先精确匹配 sourceTarget,其次匹配 specifier 是 sourceTarget 的子路径前缀。
|
|
128
|
+
* 返回最长匹配(最具体的 spec)。
|
|
129
|
+
*/
|
|
130
|
+
function resolveSpecifierToSpecPath(specifier, specs) {
|
|
131
|
+
const asPath = specifier.replace(/\./g, '/');
|
|
132
|
+
let bestMatch;
|
|
133
|
+
for (const spec of specs) {
|
|
134
|
+
// 规范化 sourceTarget:统一分隔符并去掉文件扩展名
|
|
135
|
+
const st = spec.sourceTarget.replace(/\\/g, '/').replace(/\.(py|pyi|ts|tsx|js|jsx|go|java|rs)$/, '');
|
|
136
|
+
if (asPath === st || asPath.startsWith(`${st}/`)) {
|
|
137
|
+
if (!bestMatch || st.length > bestMatch.length) {
|
|
138
|
+
bestMatch = { specPath: spec.specPath, length: st.length };
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return bestMatch?.specPath;
|
|
143
|
+
}
|
|
144
|
+
function getOrCreateCrossModuleAccumulator(index, targetSpecPath, targetSourceTarget) {
|
|
145
|
+
if (!index.has(targetSpecPath)) {
|
|
146
|
+
index.set(targetSpecPath, {
|
|
147
|
+
targetSpecPath,
|
|
148
|
+
targetSourceTarget,
|
|
149
|
+
outboundCount: 0,
|
|
150
|
+
inboundCount: 0,
|
|
151
|
+
samples: [],
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return index.get(targetSpecPath);
|
|
155
|
+
}
|
|
156
|
+
function buildRelativeSpecHref(fromSpecPath, toSpecPath) {
|
|
157
|
+
const relative = path.relative(path.dirname(fromSpecPath), toSpecPath);
|
|
158
|
+
const normalized = relative.split(path.sep).join('/');
|
|
159
|
+
return `${normalized}#${MODULE_SPEC_ANCHOR_ID}`;
|
|
160
|
+
}
|
|
161
|
+
function flattenSamples(samples) {
|
|
162
|
+
const deduped = [];
|
|
163
|
+
const seen = new Set();
|
|
164
|
+
for (const sample of samples) {
|
|
165
|
+
const key = `${sample.fromSource}->${sample.toSource}`;
|
|
166
|
+
if (seen.has(key)) {
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
seen.add(key);
|
|
170
|
+
deduped.push(sample);
|
|
171
|
+
if (deduped.length >= 3) {
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return deduped;
|
|
176
|
+
}
|
|
177
|
+
function summarizeEvidence(evidenceCount, samples) {
|
|
178
|
+
const sampleText = formatSamples(samples);
|
|
179
|
+
return sampleText.length > 0
|
|
180
|
+
? `${evidenceCount} 条文件级引用;示例:${sampleText}`
|
|
181
|
+
: `${evidenceCount} 条文件级引用`;
|
|
182
|
+
}
|
|
183
|
+
function summarizeDirectionalEvidence(outboundCount, inboundCount, samples) {
|
|
184
|
+
const sampleText = formatSamples(samples);
|
|
185
|
+
const directionText = `出站 ${outboundCount},入站 ${inboundCount}`;
|
|
186
|
+
return sampleText.length > 0
|
|
187
|
+
? `${directionText};示例:${sampleText}`
|
|
188
|
+
: directionText;
|
|
189
|
+
}
|
|
190
|
+
function formatSamples(samples) {
|
|
191
|
+
return samples
|
|
192
|
+
.map((sample) => `${sample.fromSource} -> ${sample.toSource}`)
|
|
193
|
+
.join(';');
|
|
194
|
+
}
|
|
195
|
+
function normalizeProjectPath(inputPath, projectRoot) {
|
|
196
|
+
const relative = path.isAbsolute(inputPath)
|
|
197
|
+
? path.relative(projectRoot, inputPath)
|
|
198
|
+
: inputPath;
|
|
199
|
+
return relative.split(path.sep).join('/');
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=cross-reference-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-reference-index.js","sourceRoot":"","sources":["../../src/panoramic/cross-reference-index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAOlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAUxE,MAAM,UAAU,wBAAwB,CACtC,UAAsB,EACtB,QAAkB;IAElB,MAAM,eAAe,GAAG,oBAAoB,CAAC,UAAU,CAAC,UAAU,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC1F,MAAM,mBAAmB,GAAG,oBAAoB,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G,MAAM,CAAC,UAAU,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;SAC7D,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED,SAAS,oBAAoB,CAAC,SAAiB,EAAE,WAAmB;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QACzC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC;QACvC,CAAC,CAAC,SAAS,CAAC;IACd,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture IR exporters
|
|
3
|
+
*/
|
|
4
|
+
import { type ArchitectureIR } from '../models/architecture-ir-model.js';
|
|
5
|
+
export declare function exportArchitectureIRJson(ir: ArchitectureIR): ArchitectureIR;
|
|
6
|
+
export declare function exportArchitectureIRStructurizrDsl(ir: ArchitectureIR): string;
|
|
7
|
+
//# sourceMappingURL=architecture-ir-exporters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-ir-exporters.d.ts","sourceRoot":"","sources":["../../../src/panoramic/exporters/architecture-ir-exporters.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,oCAAoC,CAAC;AAI5C,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,cAAc,GAAG,cAAc,CAE3E;AAED,wBAAgB,kCAAkC,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,CA2D7E"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture IR exporters
|
|
3
|
+
*/
|
|
4
|
+
import { getArchitectureIRView, } from '../models/architecture-ir-model.js';
|
|
5
|
+
const WORKSPACE_CONTAINER_ID = 'container:workspace';
|
|
6
|
+
export function exportArchitectureIRJson(ir) {
|
|
7
|
+
return ir;
|
|
8
|
+
}
|
|
9
|
+
export function exportArchitectureIRStructurizrDsl(ir) {
|
|
10
|
+
const lines = [
|
|
11
|
+
`workspace "${escapeDsl(ir.projectName)} Architecture" "Generated from panoramic ArchitectureIR" {`,
|
|
12
|
+
' !identifiers hierarchical',
|
|
13
|
+
'',
|
|
14
|
+
' model {',
|
|
15
|
+
];
|
|
16
|
+
const elementLines = buildModelElements(ir);
|
|
17
|
+
lines.push(...elementLines.map((line) => ` ${line}`));
|
|
18
|
+
const relationshipLines = buildStaticRelationships(ir);
|
|
19
|
+
if (relationshipLines.length > 0) {
|
|
20
|
+
lines.push('');
|
|
21
|
+
lines.push(...relationshipLines.map((line) => ` ${line}`));
|
|
22
|
+
}
|
|
23
|
+
const deploymentLines = buildDeploymentEnvironment(ir);
|
|
24
|
+
if (deploymentLines.length > 0) {
|
|
25
|
+
lines.push('');
|
|
26
|
+
lines.push(...deploymentLines.map((line) => ` ${line}`));
|
|
27
|
+
}
|
|
28
|
+
lines.push(' }');
|
|
29
|
+
lines.push('');
|
|
30
|
+
lines.push(' views {');
|
|
31
|
+
const projectIdentifier = identifierFor('project');
|
|
32
|
+
lines.push(` systemContext ${projectIdentifier} "architecture-ir-system-context" "System context derived from ArchitectureIR" {`);
|
|
33
|
+
lines.push(' include *');
|
|
34
|
+
lines.push(' autolayout lr');
|
|
35
|
+
lines.push(' }');
|
|
36
|
+
lines.push('');
|
|
37
|
+
lines.push(` container ${projectIdentifier} "architecture-ir-containers" "Container view derived from ArchitectureIR" {`);
|
|
38
|
+
lines.push(' include *');
|
|
39
|
+
lines.push(' autolayout lr');
|
|
40
|
+
lines.push(' }');
|
|
41
|
+
if (ir.elements.some((element) => element.kind === 'component')) {
|
|
42
|
+
lines.push('');
|
|
43
|
+
lines.push(` component ${identifierFor(WORKSPACE_CONTAINER_ID)} "architecture-ir-components" "Component view derived from ArchitectureIR" {`);
|
|
44
|
+
lines.push(' include *');
|
|
45
|
+
lines.push(' autolayout lr');
|
|
46
|
+
lines.push(' }');
|
|
47
|
+
}
|
|
48
|
+
if ((getArchitectureIRView(ir, 'deployment')?.available ?? false) && ir.elements.some((element) => element.kind === 'deployment-node')) {
|
|
49
|
+
lines.push('');
|
|
50
|
+
lines.push(' deployment * "runtime" "architecture-ir-deployment" "Deployment view derived from ArchitectureIR" {');
|
|
51
|
+
lines.push(' include *');
|
|
52
|
+
lines.push(' autolayout lr');
|
|
53
|
+
lines.push(' }');
|
|
54
|
+
}
|
|
55
|
+
lines.push(' }');
|
|
56
|
+
lines.push('}');
|
|
57
|
+
return lines.join('\n');
|
|
58
|
+
}
|
|
59
|
+
function buildModelElements(ir) {
|
|
60
|
+
const lines = [];
|
|
61
|
+
const project = ir.elements.find((element) => element.id === 'project' || element.kind === 'software-system');
|
|
62
|
+
if (project) {
|
|
63
|
+
lines.push(`${identifierFor(project.id)} = softwareSystem "${escapeDsl(project.name)}" "${escapeDsl(project.description ?? 'Source system derived from panoramic architecture facts')}" {`);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
lines.push(`${identifierFor('project')} = softwareSystem "${escapeDsl(ir.projectName)}" "Source system derived from panoramic architecture facts" {`);
|
|
67
|
+
}
|
|
68
|
+
const runtimeContainers = ir.elements.filter((element) => element.kind === 'container' && !isWorkspaceProxy(element));
|
|
69
|
+
for (const element of runtimeContainers) {
|
|
70
|
+
lines.push(` ${identifierFor(element.id)} = container "${escapeDsl(element.name)}" "${escapeDsl(element.description ?? '')}" "${escapeDsl(element.technology ?? 'Container')}"`);
|
|
71
|
+
}
|
|
72
|
+
const workspaceComponents = ir.elements.filter((element) => element.kind === 'component');
|
|
73
|
+
if (workspaceComponents.length > 0) {
|
|
74
|
+
lines.push(` ${identifierFor(WORKSPACE_CONTAINER_ID)} = container "Workspace" "Unified static workspace/component model" "Codebase" {`);
|
|
75
|
+
const groupedComponents = groupComponentsByWorkspaceGroup(workspaceComponents);
|
|
76
|
+
for (const [groupName, components] of groupedComponents.entries()) {
|
|
77
|
+
if (groupName !== '.') {
|
|
78
|
+
lines.push(` group "${escapeDsl(groupName)}" {`);
|
|
79
|
+
}
|
|
80
|
+
for (const component of components) {
|
|
81
|
+
const indent = groupName !== '.' ? ' ' : ' ';
|
|
82
|
+
lines.push(`${indent}${identifierFor(component.id)} = component "${escapeDsl(component.name)}" "${escapeDsl(component.description ?? '')}" "${escapeDsl(component.technology ?? 'Component')}"`);
|
|
83
|
+
}
|
|
84
|
+
if (groupName !== '.') {
|
|
85
|
+
lines.push(' }');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
lines.push(' }');
|
|
89
|
+
}
|
|
90
|
+
const externalSystems = ir.elements.filter((element) => element.kind === 'external-system');
|
|
91
|
+
for (const element of externalSystems) {
|
|
92
|
+
lines.push(` ${identifierFor(element.id)} = softwareSystem "${escapeDsl(element.name)}" "${escapeDsl(element.description ?? '')}" "External System"`);
|
|
93
|
+
}
|
|
94
|
+
lines.push('}');
|
|
95
|
+
return lines;
|
|
96
|
+
}
|
|
97
|
+
function buildStaticRelationships(ir) {
|
|
98
|
+
const lines = [];
|
|
99
|
+
const allowedKinds = new Set(['software-system', 'container', 'component', 'external-system']);
|
|
100
|
+
for (const relationship of ir.relationships) {
|
|
101
|
+
const source = ir.elements.find((element) => element.id === relationship.sourceId);
|
|
102
|
+
const destination = ir.elements.find((element) => element.id === relationship.destinationId);
|
|
103
|
+
if (!source || !destination) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const sourceDslKind = mapElementKindForStaticDsl(source.kind);
|
|
107
|
+
const destinationDslKind = mapElementKindForStaticDsl(destination.kind);
|
|
108
|
+
if (!allowedKinds.has(sourceDslKind) || !allowedKinds.has(destinationDslKind)) {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
lines.push(`${identifierFor(source.id)} -> ${identifierFor(destination.id)} "${escapeDsl(relationship.description)}" "${escapeDsl(relationship.technology ?? relationship.kind)}"`);
|
|
112
|
+
}
|
|
113
|
+
return dedupe(lines);
|
|
114
|
+
}
|
|
115
|
+
function buildDeploymentEnvironment(ir) {
|
|
116
|
+
const deploymentView = getArchitectureIRView(ir, 'deployment');
|
|
117
|
+
if (!deploymentView?.available) {
|
|
118
|
+
return [];
|
|
119
|
+
}
|
|
120
|
+
const lines = ['deploymentEnvironment "runtime" {'];
|
|
121
|
+
const deploymentNodes = deploymentView.elementIds
|
|
122
|
+
.map((id) => ir.elements.find((element) => element.id === id))
|
|
123
|
+
.filter((element) => element?.kind === 'deployment-node');
|
|
124
|
+
if (deploymentNodes.length === 0) {
|
|
125
|
+
lines.push('}');
|
|
126
|
+
return lines;
|
|
127
|
+
}
|
|
128
|
+
for (const node of deploymentNodes) {
|
|
129
|
+
const serviceName = getStringMetadata(node, 'service');
|
|
130
|
+
const serviceId = serviceName ? `service:${serviceName}` : undefined;
|
|
131
|
+
lines.push(` ${identifierFor(node.id)} = deploymentNode "${escapeDsl(node.name)}" "${escapeDsl(node.description ?? 'Runtime deployment node')}" "Container Runtime" {`);
|
|
132
|
+
if (serviceId) {
|
|
133
|
+
lines.push(` ${identifierFor(`instance:${serviceId}`)} = containerInstance ${identifierFor(serviceId)}`);
|
|
134
|
+
}
|
|
135
|
+
const imageId = getStringMetadata(node, 'image');
|
|
136
|
+
if (imageId) {
|
|
137
|
+
lines.push(` ${identifierFor(`infra:${imageId}`)} = infrastructureNode "${escapeDsl(imageId)}" "Container image" "Image"`);
|
|
138
|
+
}
|
|
139
|
+
lines.push(' }');
|
|
140
|
+
}
|
|
141
|
+
lines.push('}');
|
|
142
|
+
return lines;
|
|
143
|
+
}
|
|
144
|
+
function groupComponentsByWorkspaceGroup(components) {
|
|
145
|
+
const grouped = new Map();
|
|
146
|
+
for (const component of components) {
|
|
147
|
+
const groupName = getStringMetadata(component, 'group') || '.';
|
|
148
|
+
if (!grouped.has(groupName)) {
|
|
149
|
+
grouped.set(groupName, []);
|
|
150
|
+
}
|
|
151
|
+
grouped.get(groupName).push(component);
|
|
152
|
+
}
|
|
153
|
+
for (const group of grouped.values()) {
|
|
154
|
+
group.sort((left, right) => left.name.localeCompare(right.name));
|
|
155
|
+
}
|
|
156
|
+
return new Map([...grouped.entries()].sort((left, right) => left[0].localeCompare(right[0])));
|
|
157
|
+
}
|
|
158
|
+
function isWorkspaceProxy(element) {
|
|
159
|
+
return element.id === WORKSPACE_CONTAINER_ID;
|
|
160
|
+
}
|
|
161
|
+
function mapElementKindForStaticDsl(kind) {
|
|
162
|
+
switch (kind) {
|
|
163
|
+
case 'image':
|
|
164
|
+
case 'deployment-node':
|
|
165
|
+
return 'container';
|
|
166
|
+
default:
|
|
167
|
+
return kind;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function getStringMetadata(element, field) {
|
|
171
|
+
const value = element.metadata[field];
|
|
172
|
+
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
173
|
+
}
|
|
174
|
+
function identifierFor(value) {
|
|
175
|
+
return value.replace(/[^A-Za-z0-9_]/g, '_');
|
|
176
|
+
}
|
|
177
|
+
function escapeDsl(value) {
|
|
178
|
+
return value.replace(/"/g, '\\"');
|
|
179
|
+
}
|
|
180
|
+
function dedupe(values) {
|
|
181
|
+
return [...new Set(values)];
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=architecture-ir-exporters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-ir-exporters.js","sourceRoot":"","sources":["../../../src/panoramic/exporters/architecture-ir-exporters.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,qBAAqB,GAKtB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAErD,MAAM,UAAU,wBAAwB,CAAC,EAAkB;IACzD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,kCAAkC,CAAC,EAAkB;IACnE,MAAM,KAAK,GAAa;QACtB,cAAc,S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GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 多格式导出相关类型定义
|
|
3
|
+
* 供 obsidian-exporter.ts 和 html-exporter.ts 共同使用
|
|
4
|
+
* 无运行时依赖,纯类型文件
|
|
5
|
+
*/
|
|
6
|
+
/** 支持的导出格式 */
|
|
7
|
+
export type ExportFormat = 'obsidian' | 'html';
|
|
8
|
+
/** 导出配置 */
|
|
9
|
+
export interface ExportConfig {
|
|
10
|
+
/** 导出格式 */
|
|
11
|
+
format: ExportFormat;
|
|
12
|
+
/** 输出目录(绝对路径或相对于 cwd 的路径) */
|
|
13
|
+
outputDir: string;
|
|
14
|
+
}
|
|
15
|
+
/** 导出结果 */
|
|
16
|
+
export interface ExportResult {
|
|
17
|
+
/** 生成的文件路径列表(绝对路径) */
|
|
18
|
+
files: string[];
|
|
19
|
+
/** 生成文件总数 */
|
|
20
|
+
fileCount: number;
|
|
21
|
+
/** 执行耗时(毫秒) */
|
|
22
|
+
durationMs: number;
|
|
23
|
+
}
|
|
24
|
+
/** Obsidian 页面内容表示(内存中间状态,尚未写盘) */
|
|
25
|
+
export interface ObsidianPage {
|
|
26
|
+
/** 相对于 outputDir 的文件路径(如 "communities/community-0.md") */
|
|
27
|
+
relativePath: string;
|
|
28
|
+
/** 文件内容(Markdown 字符串) */
|
|
29
|
+
content: string;
|
|
30
|
+
/** 仅 god-nodes 页面填充,用于碰撞检测时生成 disambiguator */
|
|
31
|
+
nodeId?: string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=export-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-types.d.ts","sourceRoot":"","sources":["../../../src/panoramic/exporters/export-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc;AACd,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AAE/C,WAAW;AACX,MAAM,WAAW,YAAY;IAC3B,WAAW;IACX,MAAM,EAAE,YAAY,CAAC;IACrB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,WAAW;AACX,MAAM,WAAW,YAAY;IAC3B,sBAAsB;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,mCAAmC;AACnC,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-types.js","sourceRoot":"","sources":["../../../src/panoramic/exporters/export-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|