docorbit 0.1.0 → 0.1.2
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/README.md +29 -15
- package/bin/docorbit.js +2 -2
- package/dist/apps/cli/src/commands/add.d.ts +7 -0
- package/dist/apps/cli/src/commands/add.js +35 -0
- package/dist/apps/cli/src/commands/api.d.ts +2 -0
- package/dist/apps/cli/src/commands/api.js +35 -0
- package/dist/apps/cli/src/commands/context.d.ts +10 -0
- package/dist/apps/cli/src/commands/context.js +36 -0
- package/dist/apps/cli/src/commands/dashboard.d.ts +8 -0
- package/dist/apps/cli/src/commands/dashboard.js +43 -0
- package/dist/apps/cli/src/commands/diff.d.ts +2 -0
- package/dist/apps/cli/src/commands/diff.js +29 -0
- package/dist/apps/cli/src/commands/evaluate.d.ts +11 -0
- package/dist/apps/cli/src/commands/evaluate.js +101 -0
- package/dist/apps/cli/src/commands/examples.d.ts +2 -0
- package/dist/apps/cli/src/commands/examples.js +36 -0
- package/dist/apps/cli/src/commands/export.d.ts +11 -0
- package/dist/apps/cli/src/commands/export.js +72 -0
- package/dist/apps/cli/src/commands/impact.d.ts +2 -0
- package/dist/apps/cli/src/commands/impact.js +30 -0
- package/dist/apps/cli/src/commands/init.d.ts +5 -0
- package/dist/apps/cli/src/commands/init.js +52 -0
- package/dist/apps/cli/src/commands/inspect.d.ts +5 -0
- package/dist/apps/cli/src/commands/inspect.js +24 -0
- package/dist/apps/cli/src/commands/mcp.d.ts +8 -0
- package/dist/apps/cli/src/commands/mcp.js +49 -0
- package/dist/apps/cli/src/commands/pitfalls.d.ts +2 -0
- package/dist/apps/cli/src/commands/pitfalls.js +35 -0
- package/dist/apps/cli/src/commands/recipes.d.ts +2 -0
- package/dist/apps/cli/src/commands/recipes.js +33 -0
- package/dist/apps/cli/src/commands/search.d.ts +11 -0
- package/dist/apps/cli/src/commands/search.js +36 -0
- package/dist/apps/cli/src/commands/update.d.ts +6 -0
- package/dist/apps/cli/src/commands/update.js +53 -0
- package/dist/apps/cli/src/commands/verify.d.ts +2 -0
- package/dist/apps/cli/src/commands/verify.js +44 -0
- package/dist/apps/cli/src/formatters/colors.d.ts +21 -0
- package/dist/apps/cli/src/formatters/colors.js +22 -0
- package/dist/apps/cli/src/formatters/inspection.d.ts +3 -0
- package/dist/apps/cli/src/formatters/inspection.js +88 -0
- package/dist/apps/cli/src/formatters/knowledge.d.ts +5 -0
- package/dist/apps/cli/src/formatters/knowledge.js +229 -0
- package/dist/apps/cli/src/formatters/retrieval.d.ts +3 -0
- package/dist/apps/cli/src/formatters/retrieval.js +61 -0
- package/{apps/cli/src/formatters/terminal.ts → dist/apps/cli/src/formatters/terminal.d.ts} +0 -1
- package/dist/apps/cli/src/formatters/terminal.js +5 -0
- package/dist/apps/cli/src/formatters/verification.d.ts +4 -0
- package/dist/apps/cli/src/formatters/verification.js +102 -0
- package/dist/apps/cli/src/index.d.ts +1 -0
- package/dist/apps/cli/src/index.js +376 -0
- package/dist/packages/core/src/dashboard/server.d.ts +33 -0
- package/dist/packages/core/src/dashboard/server.js +267 -0
- package/dist/packages/core/src/dashboard/ui.d.ts +5 -0
- package/{packages/core/src/dashboard/ui.ts → dist/packages/core/src/dashboard/ui.js} +2 -2
- package/dist/packages/core/src/implementation-service.d.ts +73 -0
- package/dist/packages/core/src/implementation-service.js +325 -0
- package/{packages/core/src/index.ts → dist/packages/core/src/index.d.ts} +0 -1
- package/dist/packages/core/src/index.js +6 -0
- package/dist/packages/core/src/inspector.d.ts +22 -0
- package/dist/packages/core/src/inspector.js +38 -0
- package/dist/packages/core/src/pipeline.d.ts +45 -0
- package/dist/packages/core/src/pipeline.js +246 -0
- package/dist/packages/crawler/src/config.d.ts +2 -0
- package/dist/packages/crawler/src/config.js +10 -0
- package/dist/packages/crawler/src/fetcher.d.ts +31 -0
- package/dist/packages/crawler/src/fetcher.js +139 -0
- package/dist/packages/crawler/src/index.js +2 -0
- package/dist/packages/discovery/src/index.d.ts +11 -0
- package/dist/packages/discovery/src/index.js +29 -0
- package/dist/packages/discovery/src/provider.d.ts +12 -0
- package/dist/packages/discovery/src/provider.js +30 -0
- package/dist/packages/discovery/src/providers/generic.d.ts +7 -0
- package/dist/packages/discovery/src/providers/generic.js +94 -0
- package/dist/packages/discovery/src/providers/github.d.ts +7 -0
- package/dist/packages/discovery/src/providers/github.js +52 -0
- package/dist/packages/discovery/src/providers/llms-txt.d.ts +7 -0
- package/dist/packages/discovery/src/providers/llms-txt.js +60 -0
- package/dist/packages/discovery/src/providers/markdown.d.ts +7 -0
- package/dist/packages/discovery/src/providers/markdown.js +38 -0
- package/dist/packages/discovery/src/providers/openapi.d.ts +7 -0
- package/dist/packages/discovery/src/providers/openapi.js +77 -0
- package/dist/packages/discovery/src/providers/sitemap.d.ts +7 -0
- package/dist/packages/discovery/src/providers/sitemap.js +53 -0
- package/dist/packages/discovery/src/providers/skill.d.ts +7 -0
- package/dist/packages/discovery/src/providers/skill.js +46 -0
- package/dist/packages/discovery/src/ranker.d.ts +6 -0
- package/dist/packages/discovery/src/ranker.js +107 -0
- package/dist/packages/evaluation/src/dataset.d.ts +2 -0
- package/dist/packages/evaluation/src/dataset.js +944 -0
- package/dist/packages/evaluation/src/index.js +8 -0
- package/dist/packages/evaluation/src/runner.d.ts +7 -0
- package/dist/packages/evaluation/src/runner.js +196 -0
- package/dist/packages/evaluation/src/strategies/context7-runner.d.ts +24 -0
- package/dist/packages/evaluation/src/strategies/context7-runner.js +229 -0
- package/dist/packages/evaluation/src/strategies/docorbit-runner.d.ts +5 -0
- package/dist/packages/evaluation/src/strategies/docorbit-runner.js +210 -0
- package/dist/packages/evaluation/src/strategies/firecrawl-runner.d.ts +24 -0
- package/dist/packages/evaluation/src/strategies/firecrawl-runner.js +151 -0
- package/dist/packages/evaluation/src/strategies/web-search-runner.d.ts +32 -0
- package/dist/packages/evaluation/src/strategies/web-search-runner.js +161 -0
- package/dist/packages/evaluation/src/types.d.ts +15 -0
- package/dist/packages/evaluation/src/types.js +1 -0
- package/dist/packages/evaluation/src/version-matcher.d.ts +11 -0
- package/dist/packages/evaluation/src/version-matcher.js +61 -0
- package/dist/packages/export/src/agents-md.d.ts +19 -0
- package/dist/packages/export/src/agents-md.js +170 -0
- package/dist/packages/export/src/claude-md.d.ts +17 -0
- package/dist/packages/export/src/claude-md.js +118 -0
- package/dist/packages/export/src/docs-map.d.ts +14 -0
- package/dist/packages/export/src/docs-map.js +118 -0
- package/dist/packages/export/src/index.js +6 -0
- package/dist/packages/export/src/llms-txt.d.ts +15 -0
- package/dist/packages/export/src/llms-txt.js +73 -0
- package/dist/packages/export/src/service.d.ts +23 -0
- package/dist/packages/export/src/service.js +210 -0
- package/dist/packages/export/src/skill-md.d.ts +14 -0
- package/dist/packages/export/src/skill-md.js +107 -0
- package/{packages/mcp/src/index.ts → dist/packages/mcp/src/index.d.ts} +2 -35
- package/dist/packages/mcp/src/index.js +6 -0
- package/dist/packages/mcp/src/resources/index.d.ts +12 -0
- package/dist/packages/mcp/src/resources/index.js +165 -0
- package/dist/packages/mcp/src/server.d.ts +30 -0
- package/dist/packages/mcp/src/server.js +243 -0
- package/dist/packages/mcp/src/tools/analyze-impact.d.ts +6 -0
- package/dist/packages/mcp/src/tools/analyze-impact.js +64 -0
- package/dist/packages/mcp/src/tools/check-api.d.ts +6 -0
- package/dist/packages/mcp/src/tools/check-api.js +74 -0
- package/dist/packages/mcp/src/tools/diff-docs.d.ts +6 -0
- package/dist/packages/mcp/src/tools/diff-docs.js +58 -0
- package/dist/packages/mcp/src/tools/export-context.d.ts +6 -0
- package/dist/packages/mcp/src/tools/export-context.js +61 -0
- package/dist/packages/mcp/src/tools/find-api.d.ts +6 -0
- package/dist/packages/mcp/src/tools/find-api.js +91 -0
- package/dist/packages/mcp/src/tools/find-example.d.ts +6 -0
- package/dist/packages/mcp/src/tools/find-example.js +92 -0
- package/dist/packages/mcp/src/tools/find-pitfall.d.ts +6 -0
- package/dist/packages/mcp/src/tools/find-pitfall.js +85 -0
- package/dist/packages/mcp/src/tools/find-recipe.d.ts +6 -0
- package/dist/packages/mcp/src/tools/find-recipe.js +89 -0
- package/dist/packages/mcp/src/tools/get-doc.d.ts +6 -0
- package/dist/packages/mcp/src/tools/get-doc.js +118 -0
- package/dist/packages/mcp/src/tools/get-docs-map.d.ts +6 -0
- package/dist/packages/mcp/src/tools/get-docs-map.js +54 -0
- package/dist/packages/mcp/src/tools/get-version.d.ts +6 -0
- package/dist/packages/mcp/src/tools/get-version.js +104 -0
- package/dist/packages/mcp/src/tools/implementation-context.d.ts +6 -0
- package/dist/packages/mcp/src/tools/implementation-context.js +102 -0
- package/dist/packages/mcp/src/tools/index.d.ts +19 -0
- package/dist/packages/mcp/src/tools/index.js +41 -0
- package/dist/packages/mcp/src/tools/ingest-doc.d.ts +6 -0
- package/dist/packages/mcp/src/tools/ingest-doc.js +264 -0
- package/dist/packages/mcp/src/tools/list-sources.d.ts +6 -0
- package/dist/packages/mcp/src/tools/list-sources.js +76 -0
- package/dist/packages/mcp/src/tools/search-docs.d.ts +6 -0
- package/dist/packages/mcp/src/tools/search-docs.js +113 -0
- package/dist/packages/mcp/src/tools/types.d.ts +22 -0
- package/dist/packages/mcp/src/tools/types.js +1 -0
- package/dist/packages/mcp/src/transports/http.d.ts +31 -0
- package/dist/packages/mcp/src/transports/http.js +215 -0
- package/dist/packages/mcp/src/transports/stdio.d.ts +22 -0
- package/dist/packages/mcp/src/transports/stdio.js +86 -0
- package/{packages/mcp/src/transports/types.ts → dist/packages/mcp/src/transports/types.d.ts} +2 -3
- package/dist/packages/mcp/src/transports/types.js +1 -0
- package/dist/packages/mcp/src/types.d.ts +89 -0
- package/dist/packages/mcp/src/types.js +7 -0
- package/dist/packages/normalizer/src/example-indexer.d.ts +5 -0
- package/dist/packages/normalizer/src/example-indexer.js +200 -0
- package/dist/packages/normalizer/src/html.d.ts +13 -0
- package/dist/packages/normalizer/src/html.js +221 -0
- package/{packages/normalizer/src/index.ts → dist/packages/normalizer/src/index.d.ts} +0 -1
- package/dist/packages/normalizer/src/index.js +7 -0
- package/dist/packages/normalizer/src/llms.d.ts +3 -0
- package/dist/packages/normalizer/src/llms.js +71 -0
- package/dist/packages/normalizer/src/openapi/endpoint-parser.d.ts +11 -0
- package/dist/packages/normalizer/src/openapi/endpoint-parser.js +357 -0
- package/dist/packages/normalizer/src/openapi/schema-resolver.d.ts +10 -0
- package/dist/packages/normalizer/src/openapi/schema-resolver.js +82 -0
- package/dist/packages/normalizer/src/openapi.js +2 -0
- package/dist/packages/normalizer/src/page.d.ts +13 -0
- package/dist/packages/normalizer/src/page.js +150 -0
- package/dist/packages/normalizer/src/pitfall-extractor.d.ts +6 -0
- package/dist/packages/normalizer/src/pitfall-extractor.js +153 -0
- package/dist/packages/normalizer/src/slicer.d.ts +30 -0
- package/dist/packages/normalizer/src/slicer.js +360 -0
- package/dist/packages/retrieval/src/engine.d.ts +17 -0
- package/dist/packages/retrieval/src/engine.js +93 -0
- package/{packages/retrieval/src/index.ts → dist/packages/retrieval/src/index.d.ts} +0 -1
- package/dist/packages/retrieval/src/index.js +6 -0
- package/dist/packages/retrieval/src/intent.d.ts +6 -0
- package/dist/packages/retrieval/src/intent.js +39 -0
- package/dist/packages/retrieval/src/packer.d.ts +2 -0
- package/dist/packages/retrieval/src/packer.js +108 -0
- package/dist/packages/retrieval/src/recipe-engine.d.ts +18 -0
- package/dist/packages/retrieval/src/recipe-engine.js +265 -0
- package/dist/packages/retrieval/src/scorer.d.ts +13 -0
- package/dist/packages/retrieval/src/scorer.js +110 -0
- package/dist/packages/retrieval/src/weights.d.ts +3 -0
- package/dist/packages/retrieval/src/weights.js +28 -0
- package/dist/packages/security/src/annotations.d.ts +10 -0
- package/dist/packages/security/src/annotations.js +100 -0
- package/dist/packages/security/src/index.js +2 -0
- package/dist/packages/security/src/ssrf.d.ts +17 -0
- package/dist/packages/security/src/ssrf.js +132 -0
- package/dist/packages/shared/src/errors.d.ts +22 -0
- package/dist/packages/shared/src/errors.js +44 -0
- package/dist/packages/shared/src/hashing.d.ts +3 -0
- package/dist/packages/shared/src/hashing.js +21 -0
- package/dist/packages/shared/src/index.js +3 -0
- package/dist/packages/shared/src/types.d.ts +715 -0
- package/dist/packages/shared/src/types.js +1 -0
- package/dist/packages/storage/src/db.d.ts +11 -0
- package/dist/packages/storage/src/db.js +128 -0
- package/dist/packages/storage/src/index.js +10 -0
- package/dist/packages/storage/src/interfaces.d.ts +83 -0
- package/dist/packages/storage/src/interfaces.js +1 -0
- package/dist/packages/storage/src/repositories/api-repository.d.ts +16 -0
- package/dist/packages/storage/src/repositories/api-repository.js +169 -0
- package/dist/packages/storage/src/repositories/chunk-repository.d.ts +32 -0
- package/dist/packages/storage/src/repositories/chunk-repository.js +250 -0
- package/dist/packages/storage/src/repositories/example-repository.d.ts +16 -0
- package/dist/packages/storage/src/repositories/example-repository.js +158 -0
- package/dist/packages/storage/src/repositories/page-repository.d.ts +16 -0
- package/dist/packages/storage/src/repositories/page-repository.js +161 -0
- package/dist/packages/storage/src/repositories/pitfall-repository.d.ts +15 -0
- package/dist/packages/storage/src/repositories/pitfall-repository.js +144 -0
- package/dist/packages/storage/src/repositories/source-repository.d.ts +33 -0
- package/dist/packages/storage/src/repositories/source-repository.js +153 -0
- package/dist/packages/storage/src/repository.d.ts +92 -0
- package/dist/packages/storage/src/repository.js +157 -0
- package/dist/packages/storage/src/schema.d.ts +2 -0
- package/{packages/storage/src/schema.ts → dist/packages/storage/src/schema.js} +0 -3
- package/dist/packages/storage/src/search-tokens.d.ts +6 -0
- package/dist/packages/storage/src/search-tokens.js +26 -0
- package/dist/packages/verification/src/diff-engine.d.ts +18 -0
- package/dist/packages/verification/src/diff-engine.js +218 -0
- package/dist/packages/verification/src/extractor.d.ts +29 -0
- package/dist/packages/verification/src/extractor.js +302 -0
- package/dist/packages/verification/src/impact-scanner.d.ts +9 -0
- package/dist/packages/verification/src/impact-scanner.js +181 -0
- package/dist/packages/verification/src/index.js +5 -0
- package/dist/packages/verification/src/services.d.ts +55 -0
- package/dist/packages/verification/src/services.js +189 -0
- package/dist/packages/verification/src/verifier.d.ts +15 -0
- package/dist/packages/verification/src/verifier.js +315 -0
- package/dist/packages/workspace/src/detector.d.ts +7 -0
- package/dist/packages/workspace/src/detector.js +117 -0
- package/dist/packages/workspace/src/ecosystems/cargo.d.ts +10 -0
- package/dist/packages/workspace/src/ecosystems/cargo.js +69 -0
- package/dist/packages/workspace/src/ecosystems/composer.d.ts +7 -0
- package/dist/packages/workspace/src/ecosystems/composer.js +40 -0
- package/dist/packages/workspace/src/ecosystems/go.d.ts +7 -0
- package/dist/packages/workspace/src/ecosystems/go.js +49 -0
- package/{packages/workspace/src/ecosystems/index.ts → dist/packages/workspace/src/ecosystems/index.d.ts} +2 -24
- package/dist/packages/workspace/src/ecosystems/index.js +21 -0
- package/dist/packages/workspace/src/ecosystems/maven.d.ts +7 -0
- package/dist/packages/workspace/src/ecosystems/maven.js +28 -0
- package/dist/packages/workspace/src/ecosystems/npm.d.ts +10 -0
- package/dist/packages/workspace/src/ecosystems/npm.js +73 -0
- package/dist/packages/workspace/src/ecosystems/pub.d.ts +7 -0
- package/dist/packages/workspace/src/ecosystems/pub.js +34 -0
- package/dist/packages/workspace/src/ecosystems/pypi.d.ts +9 -0
- package/dist/packages/workspace/src/ecosystems/pypi.js +94 -0
- package/dist/packages/workspace/src/ecosystems/rubygems.d.ts +7 -0
- package/dist/packages/workspace/src/ecosystems/rubygems.js +25 -0
- package/dist/packages/workspace/src/ecosystems/types.d.ts +9 -0
- package/dist/packages/workspace/src/ecosystems/types.js +1 -0
- package/dist/packages/workspace/src/index.js +5 -0
- package/dist/packages/workspace/src/lockfile.d.ts +21 -0
- package/dist/packages/workspace/src/lockfile.js +153 -0
- package/dist/packages/workspace/src/resolver.d.ts +39 -0
- package/dist/packages/workspace/src/resolver.js +164 -0
- package/dist/packages/workspace/src/semver.d.ts +33 -0
- package/dist/packages/workspace/src/semver.js +235 -0
- package/package.json +13 -9
- package/apps/cli/bin/docorbit.js +0 -8
- package/apps/cli/src/commands/add.ts +0 -44
- package/apps/cli/src/commands/api.ts +0 -38
- package/apps/cli/src/commands/context.ts +0 -47
- package/apps/cli/src/commands/dashboard.ts +0 -55
- package/apps/cli/src/commands/diff.ts +0 -30
- package/apps/cli/src/commands/evaluate.ts +0 -133
- package/apps/cli/src/commands/examples.ts +0 -39
- package/apps/cli/src/commands/export.ts +0 -89
- package/apps/cli/src/commands/impact.ts +0 -31
- package/apps/cli/src/commands/init.ts +0 -69
- package/apps/cli/src/commands/inspect.ts +0 -30
- package/apps/cli/src/commands/mcp.ts +0 -72
- package/apps/cli/src/commands/pitfalls.ts +0 -38
- package/apps/cli/src/commands/recipes.ts +0 -35
- package/apps/cli/src/commands/search.ts +0 -48
- package/apps/cli/src/commands/update.ts +0 -73
- package/apps/cli/src/commands/verify.ts +0 -48
- package/apps/cli/src/formatters/colors.ts +0 -23
- package/apps/cli/src/formatters/inspection.ts +0 -102
- package/apps/cli/src/formatters/knowledge.ts +0 -272
- package/apps/cli/src/formatters/retrieval.ts +0 -74
- package/apps/cli/src/formatters/verification.ts +0 -126
- package/apps/cli/src/index.ts +0 -409
- package/packages/core/src/dashboard/server.ts +0 -314
- package/packages/core/src/implementation-service.ts +0 -451
- package/packages/core/src/inspector.ts +0 -71
- package/packages/core/src/pipeline.ts +0 -331
- package/packages/crawler/src/config.ts +0 -12
- package/packages/crawler/src/fetcher.ts +0 -185
- package/packages/discovery/src/index.ts +0 -31
- package/packages/discovery/src/provider.ts +0 -47
- package/packages/discovery/src/providers/generic.ts +0 -98
- package/packages/discovery/src/providers/github.ts +0 -61
- package/packages/discovery/src/providers/llms-txt.ts +0 -73
- package/packages/discovery/src/providers/markdown.ts +0 -48
- package/packages/discovery/src/providers/openapi.ts +0 -91
- package/packages/discovery/src/providers/sitemap.ts +0 -62
- package/packages/discovery/src/providers/skill.ts +0 -54
- package/packages/discovery/src/ranker.ts +0 -123
- package/packages/evaluation/src/dataset.ts +0 -963
- package/packages/evaluation/src/runner.ts +0 -241
- package/packages/evaluation/src/strategies/context7-runner.ts +0 -269
- package/packages/evaluation/src/strategies/docorbit-runner.ts +0 -228
- package/packages/evaluation/src/strategies/firecrawl-runner.ts +0 -172
- package/packages/evaluation/src/strategies/web-search-runner.ts +0 -194
- package/packages/evaluation/src/types.ts +0 -34
- package/packages/evaluation/src/version-matcher.ts +0 -73
- package/packages/export/src/agents-md.ts +0 -200
- package/packages/export/src/claude-md.ts +0 -141
- package/packages/export/src/docs-map.ts +0 -150
- package/packages/export/src/llms-txt.ts +0 -96
- package/packages/export/src/service.ts +0 -250
- package/packages/export/src/skill-md.ts +0 -128
- package/packages/mcp/src/resources/index.ts +0 -189
- package/packages/mcp/src/server.ts +0 -278
- package/packages/mcp/src/tools/analyze-impact.ts +0 -74
- package/packages/mcp/src/tools/check-api.ts +0 -86
- package/packages/mcp/src/tools/diff-docs.ts +0 -68
- package/packages/mcp/src/tools/export-context.ts +0 -73
- package/packages/mcp/src/tools/find-api.ts +0 -99
- package/packages/mcp/src/tools/find-example.ts +0 -100
- package/packages/mcp/src/tools/find-pitfall.ts +0 -94
- package/packages/mcp/src/tools/find-recipe.ts +0 -98
- package/packages/mcp/src/tools/get-doc.ts +0 -130
- package/packages/mcp/src/tools/get-docs-map.ts +0 -64
- package/packages/mcp/src/tools/get-version.ts +0 -118
- package/packages/mcp/src/tools/implementation-context.ts +0 -88
- package/packages/mcp/src/tools/index.ts +0 -59
- package/packages/mcp/src/tools/list-sources.ts +0 -85
- package/packages/mcp/src/tools/search-docs.ts +0 -123
- package/packages/mcp/src/tools/types.ts +0 -28
- package/packages/mcp/src/transports/http.ts +0 -256
- package/packages/mcp/src/transports/stdio.ts +0 -105
- package/packages/mcp/src/types.ts +0 -102
- package/packages/normalizer/src/example-indexer.ts +0 -240
- package/packages/normalizer/src/html.ts +0 -253
- package/packages/normalizer/src/llms.ts +0 -83
- package/packages/normalizer/src/openapi/endpoint-parser.ts +0 -406
- package/packages/normalizer/src/openapi/schema-resolver.ts +0 -111
- package/packages/normalizer/src/page.ts +0 -184
- package/packages/normalizer/src/pitfall-extractor.ts +0 -190
- package/packages/normalizer/src/slicer.ts +0 -455
- package/packages/retrieval/src/engine.ts +0 -120
- package/packages/retrieval/src/intent.ts +0 -43
- package/packages/retrieval/src/packer.ts +0 -145
- package/packages/retrieval/src/recipe-engine.ts +0 -313
- package/packages/retrieval/src/scorer.ts +0 -139
- package/packages/retrieval/src/weights.ts +0 -31
- package/packages/security/src/annotations.ts +0 -112
- package/packages/security/src/ssrf.ts +0 -153
- package/packages/shared/src/errors.ts +0 -53
- package/packages/shared/src/hashing.ts +0 -23
- package/packages/shared/src/types.ts +0 -881
- package/packages/storage/src/db.ts +0 -72
- package/packages/storage/src/interfaces.ts +0 -115
- package/packages/storage/src/repositories/api-repository.ts +0 -219
- package/packages/storage/src/repositories/chunk-repository.ts +0 -316
- package/packages/storage/src/repositories/example-repository.ts +0 -206
- package/packages/storage/src/repositories/page-repository.ts +0 -205
- package/packages/storage/src/repositories/pitfall-repository.ts +0 -188
- package/packages/storage/src/repositories/source-repository.ts +0 -205
- package/packages/storage/src/repository.ts +0 -256
- package/packages/storage/src/search-tokens.ts +0 -28
- package/packages/verification/src/diff-engine.ts +0 -258
- package/packages/verification/src/extractor.ts +0 -339
- package/packages/verification/src/impact-scanner.ts +0 -203
- package/packages/verification/src/services.ts +0 -238
- package/packages/verification/src/verifier.ts +0 -375
- package/packages/workspace/src/detector.ts +0 -143
- package/packages/workspace/src/ecosystems/cargo.ts +0 -84
- package/packages/workspace/src/ecosystems/composer.ts +0 -42
- package/packages/workspace/src/ecosystems/go.ts +0 -54
- package/packages/workspace/src/ecosystems/maven.ts +0 -34
- package/packages/workspace/src/ecosystems/npm.ts +0 -83
- package/packages/workspace/src/ecosystems/pub.ts +0 -40
- package/packages/workspace/src/ecosystems/pypi.ts +0 -100
- package/packages/workspace/src/ecosystems/rubygems.ts +0 -30
- package/packages/workspace/src/ecosystems/types.ts +0 -18
- package/packages/workspace/src/lockfile.ts +0 -194
- package/packages/workspace/src/resolver.ts +0 -234
- package/packages/workspace/src/semver.ts +0 -259
- /package/{packages/crawler/src/index.ts → dist/packages/crawler/src/index.d.ts} +0 -0
- /package/{packages/evaluation/src/index.ts → dist/packages/evaluation/src/index.d.ts} +0 -0
- /package/{packages/export/src/index.ts → dist/packages/export/src/index.d.ts} +0 -0
- /package/{packages/normalizer/src/openapi.ts → dist/packages/normalizer/src/openapi.d.ts} +0 -0
- /package/{packages/security/src/index.ts → dist/packages/security/src/index.d.ts} +0 -0
- /package/{packages/shared/src/index.ts → dist/packages/shared/src/index.d.ts} +0 -0
- /package/{packages/storage/src/index.ts → dist/packages/storage/src/index.d.ts} +0 -0
- /package/{packages/verification/src/index.ts → dist/packages/verification/src/index.d.ts} +0 -0
- /package/{packages/workspace/src/index.ts → dist/packages/workspace/src/index.d.ts} +0 -0
|
@@ -0,0 +1,715 @@
|
|
|
1
|
+
export type SourceType = 'llms_txt' | 'llms_full_txt' | 'openapi' | 'markdown' | 'sitemap' | 'github' | 'skill' | 'web';
|
|
2
|
+
export type SourceAuthority = 'official' | 'community' | 'third_party';
|
|
3
|
+
export type SourceStatus = 'valid' | 'invalid' | 'unreachable';
|
|
4
|
+
export interface DiscoveredSource {
|
|
5
|
+
url: string;
|
|
6
|
+
type: SourceType;
|
|
7
|
+
discoveredBy: string;
|
|
8
|
+
status: SourceStatus;
|
|
9
|
+
contentType?: string;
|
|
10
|
+
confidence: number;
|
|
11
|
+
authority: SourceAuthority;
|
|
12
|
+
machineReadable: boolean;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export type SourcePurpose = 'navigation' | 'conceptual' | 'api' | 'examples' | 'implementation';
|
|
16
|
+
export interface SourceRankResult {
|
|
17
|
+
purpose: SourcePurpose;
|
|
18
|
+
recommended: DiscoveredSource | null;
|
|
19
|
+
ranked: DiscoveredSource[];
|
|
20
|
+
rationale: string;
|
|
21
|
+
}
|
|
22
|
+
export interface Heading {
|
|
23
|
+
level: number;
|
|
24
|
+
text: string;
|
|
25
|
+
anchor: string;
|
|
26
|
+
}
|
|
27
|
+
export interface Link {
|
|
28
|
+
text: string;
|
|
29
|
+
url: string;
|
|
30
|
+
isExternal: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface CodeExample {
|
|
33
|
+
id: string;
|
|
34
|
+
language: string;
|
|
35
|
+
code: string;
|
|
36
|
+
caption?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface SecurityAnnotation {
|
|
39
|
+
type: 'prompt_injection_suspected' | 'unsafe_link' | 'suspicious_instruction';
|
|
40
|
+
location?: string;
|
|
41
|
+
evidence: string;
|
|
42
|
+
severity: 'low' | 'medium' | 'high';
|
|
43
|
+
}
|
|
44
|
+
export interface Provenance {
|
|
45
|
+
sourceUrl: string;
|
|
46
|
+
targetUrl: string;
|
|
47
|
+
fetchedAt: string;
|
|
48
|
+
discoveredBy: string;
|
|
49
|
+
contentHash: string;
|
|
50
|
+
snapshotId?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface NormalizedPage {
|
|
53
|
+
id: string;
|
|
54
|
+
sourceId: string;
|
|
55
|
+
title: string;
|
|
56
|
+
url: string;
|
|
57
|
+
content: string;
|
|
58
|
+
headings: Heading[];
|
|
59
|
+
links: Link[];
|
|
60
|
+
codeExamples: CodeExample[];
|
|
61
|
+
contentHash: string;
|
|
62
|
+
fetchedAt: string;
|
|
63
|
+
rawBytes: number;
|
|
64
|
+
estimatedTokens: number;
|
|
65
|
+
securityAnnotations: SecurityAnnotation[];
|
|
66
|
+
provenance?: Provenance;
|
|
67
|
+
}
|
|
68
|
+
export interface LlmsLink {
|
|
69
|
+
title: string;
|
|
70
|
+
url: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface LlmsSection {
|
|
74
|
+
name: string;
|
|
75
|
+
links: LlmsLink[];
|
|
76
|
+
}
|
|
77
|
+
export interface LlmsDocument {
|
|
78
|
+
title?: string;
|
|
79
|
+
summary?: string;
|
|
80
|
+
sections: LlmsSection[];
|
|
81
|
+
rawContent: string;
|
|
82
|
+
}
|
|
83
|
+
export interface OpenApiSummary {
|
|
84
|
+
specVersion: string;
|
|
85
|
+
title: string;
|
|
86
|
+
description?: string;
|
|
87
|
+
servers: string[];
|
|
88
|
+
pathCount: number;
|
|
89
|
+
sourceUrl: string;
|
|
90
|
+
rawJson?: Record<string, unknown>;
|
|
91
|
+
}
|
|
92
|
+
export interface CrawlerConfig {
|
|
93
|
+
maxPages: number;
|
|
94
|
+
maxDepth: number;
|
|
95
|
+
maxBytesPerResponse: number;
|
|
96
|
+
timeoutMs: number;
|
|
97
|
+
maxRedirects: number;
|
|
98
|
+
concurrency: number;
|
|
99
|
+
allowedProtocols: string[];
|
|
100
|
+
userAgent: string;
|
|
101
|
+
}
|
|
102
|
+
export interface Target {
|
|
103
|
+
type: 'url' | 'library' | 'package' | 'git' | 'local';
|
|
104
|
+
value: string;
|
|
105
|
+
normalizedUrl?: string;
|
|
106
|
+
metadata?: Record<string, unknown>;
|
|
107
|
+
}
|
|
108
|
+
export interface CrawlPolicy {
|
|
109
|
+
purpose?: SourcePurpose;
|
|
110
|
+
maxPages: number;
|
|
111
|
+
maxDepth: number;
|
|
112
|
+
followLlmsReferences: boolean;
|
|
113
|
+
followExternalDomains: boolean;
|
|
114
|
+
}
|
|
115
|
+
export type ChunkType = 'prose' | 'code' | 'api' | 'warning' | 'example' | 'mixed';
|
|
116
|
+
export interface DocumentChunk {
|
|
117
|
+
id: string;
|
|
118
|
+
pageId: string;
|
|
119
|
+
snapshotId: string;
|
|
120
|
+
title?: string;
|
|
121
|
+
sectionPath: string[];
|
|
122
|
+
content: string;
|
|
123
|
+
chunkType: ChunkType;
|
|
124
|
+
language?: string;
|
|
125
|
+
tokenEstimate: number;
|
|
126
|
+
ordinal: number;
|
|
127
|
+
contentHash: string;
|
|
128
|
+
provenance: Provenance;
|
|
129
|
+
docVersion?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface ChunkCode {
|
|
132
|
+
id: string;
|
|
133
|
+
chunkId: string;
|
|
134
|
+
language?: string;
|
|
135
|
+
code: string;
|
|
136
|
+
}
|
|
137
|
+
export type SymbolKind = 'function' | 'class' | 'interface' | 'endpoint' | 'type' | 'variable' | 'config';
|
|
138
|
+
export interface SymbolReference {
|
|
139
|
+
id: string;
|
|
140
|
+
chunkId: string;
|
|
141
|
+
name: string;
|
|
142
|
+
kind: SymbolKind;
|
|
143
|
+
}
|
|
144
|
+
export type ChunkRelationshipType = 'parent_section' | 'next_chunk' | 'previous_chunk' | 'contains_code' | 'explains_code';
|
|
145
|
+
export interface ChunkRelationship {
|
|
146
|
+
sourceChunkId: string;
|
|
147
|
+
targetChunkId: string;
|
|
148
|
+
type: ChunkRelationshipType;
|
|
149
|
+
}
|
|
150
|
+
export interface ChunkingConfig {
|
|
151
|
+
targetTokens: number;
|
|
152
|
+
maxTokens: number;
|
|
153
|
+
overlapTokens: number;
|
|
154
|
+
}
|
|
155
|
+
export type QueryIntent = 'api' | 'examples' | 'implementation' | 'conceptual' | 'troubleshooting' | 'configuration';
|
|
156
|
+
export interface ScoringWeights {
|
|
157
|
+
version: string;
|
|
158
|
+
bm25Weight: number;
|
|
159
|
+
exactPhraseBonus: number;
|
|
160
|
+
titleBonus: number;
|
|
161
|
+
sectionPathBonus: number;
|
|
162
|
+
symbolMatchBonus: number;
|
|
163
|
+
intentTypeBonus: number;
|
|
164
|
+
versionBonus: number;
|
|
165
|
+
authorityWeights: Record<SourceAuthority, number>;
|
|
166
|
+
}
|
|
167
|
+
export interface SearchResult {
|
|
168
|
+
chunk: DocumentChunk;
|
|
169
|
+
score: number;
|
|
170
|
+
matchReasons: string[];
|
|
171
|
+
symbols: SymbolReference[];
|
|
172
|
+
codeSnippets: ChunkCode[];
|
|
173
|
+
}
|
|
174
|
+
export interface SearchOptions {
|
|
175
|
+
limit?: number;
|
|
176
|
+
chunkType?: ChunkType;
|
|
177
|
+
snapshotId?: string;
|
|
178
|
+
sourceId?: string;
|
|
179
|
+
minScore?: number;
|
|
180
|
+
intent?: QueryIntent;
|
|
181
|
+
weights?: Partial<ScoringWeights>;
|
|
182
|
+
docVersion?: string;
|
|
183
|
+
projectDir?: string;
|
|
184
|
+
}
|
|
185
|
+
export interface ContextPackage {
|
|
186
|
+
task: string;
|
|
187
|
+
detectedIntent: QueryIntent;
|
|
188
|
+
totalEstimatedTokens: number;
|
|
189
|
+
tokenBudget: number;
|
|
190
|
+
chunks: DocumentChunk[];
|
|
191
|
+
markdown: string;
|
|
192
|
+
sources: string[];
|
|
193
|
+
warnings: string[];
|
|
194
|
+
resolvedVersions?: Record<string, VersionResolutionResult>;
|
|
195
|
+
}
|
|
196
|
+
export interface ContextOptions {
|
|
197
|
+
tokenBudget?: number;
|
|
198
|
+
maxChunks?: number;
|
|
199
|
+
intent?: QueryIntent;
|
|
200
|
+
weights?: Partial<ScoringWeights>;
|
|
201
|
+
redundancyPenalty?: number;
|
|
202
|
+
snapshotId?: string;
|
|
203
|
+
docVersion?: string;
|
|
204
|
+
projectDir?: string;
|
|
205
|
+
}
|
|
206
|
+
export type Ecosystem = 'npm' | 'cargo' | 'go' | 'pypi' | 'maven' | 'rubygems' | 'composer' | 'pub';
|
|
207
|
+
export interface ProjectDependency {
|
|
208
|
+
name: string;
|
|
209
|
+
ecosystem: Ecosystem;
|
|
210
|
+
requestedVersion: string;
|
|
211
|
+
resolvedVersion?: string;
|
|
212
|
+
sourceFile: string;
|
|
213
|
+
packagePath?: string;
|
|
214
|
+
isDev?: boolean;
|
|
215
|
+
}
|
|
216
|
+
export interface WorkspaceScanResult {
|
|
217
|
+
workspaceRoot: string;
|
|
218
|
+
ecosystems: Ecosystem[];
|
|
219
|
+
manifestsFound: string[];
|
|
220
|
+
dependencies: ProjectDependency[];
|
|
221
|
+
}
|
|
222
|
+
export type DocVersionMatch = 'exact' | 'major_minor' | 'major' | 'range' | 'latest_fallback' | 'unresolved';
|
|
223
|
+
export interface VersionResolutionResult {
|
|
224
|
+
dependencyName: string;
|
|
225
|
+
projectVersion: string;
|
|
226
|
+
selectedDocVersion: string;
|
|
227
|
+
matchType: DocVersionMatch;
|
|
228
|
+
confidence: number;
|
|
229
|
+
availableVersions: string[];
|
|
230
|
+
}
|
|
231
|
+
export interface LockedDoc {
|
|
232
|
+
name: string;
|
|
233
|
+
ecosystem: Ecosystem;
|
|
234
|
+
requestedVersion: string;
|
|
235
|
+
resolvedDependencyVersion: string;
|
|
236
|
+
sourceFile: string;
|
|
237
|
+
docSourceUrl: string;
|
|
238
|
+
docVersion: string;
|
|
239
|
+
matchType: DocVersionMatch;
|
|
240
|
+
confidence: number;
|
|
241
|
+
snapshotId: string;
|
|
242
|
+
snapshotHash: string;
|
|
243
|
+
retrievedAt: string;
|
|
244
|
+
metadata?: Record<string, unknown>;
|
|
245
|
+
}
|
|
246
|
+
export interface DocsLock {
|
|
247
|
+
version: 1;
|
|
248
|
+
workspaceRoot: string;
|
|
249
|
+
dependencies: Record<string, LockedDoc>;
|
|
250
|
+
}
|
|
251
|
+
export type EvidenceLevel = 'documented_fact' | 'inferred_relationship' | 'missing_information';
|
|
252
|
+
export interface ApiParameter {
|
|
253
|
+
name: string;
|
|
254
|
+
in: 'path' | 'query' | 'header' | 'cookie';
|
|
255
|
+
required: boolean;
|
|
256
|
+
type?: string;
|
|
257
|
+
description?: string;
|
|
258
|
+
default?: unknown;
|
|
259
|
+
schema?: Record<string, unknown>;
|
|
260
|
+
example?: unknown;
|
|
261
|
+
}
|
|
262
|
+
export interface ApiSchema {
|
|
263
|
+
type?: string;
|
|
264
|
+
properties?: Record<string, unknown>;
|
|
265
|
+
required?: string[];
|
|
266
|
+
description?: string;
|
|
267
|
+
items?: Record<string, unknown>;
|
|
268
|
+
raw?: Record<string, unknown>;
|
|
269
|
+
}
|
|
270
|
+
export interface ApiResponse {
|
|
271
|
+
statusCode: string;
|
|
272
|
+
description: string;
|
|
273
|
+
contentType?: string;
|
|
274
|
+
schema?: ApiSchema;
|
|
275
|
+
example?: unknown;
|
|
276
|
+
}
|
|
277
|
+
export interface ApiAuthScheme {
|
|
278
|
+
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'mutualTLS';
|
|
279
|
+
name?: string;
|
|
280
|
+
in?: 'header' | 'query' | 'cookie';
|
|
281
|
+
scheme?: string;
|
|
282
|
+
bearerFormat?: string;
|
|
283
|
+
description?: string;
|
|
284
|
+
}
|
|
285
|
+
export interface ApiErrorResponse {
|
|
286
|
+
statusCode: string;
|
|
287
|
+
description: string;
|
|
288
|
+
schema?: ApiSchema;
|
|
289
|
+
example?: unknown;
|
|
290
|
+
}
|
|
291
|
+
export interface ApiPaginationMetadata {
|
|
292
|
+
type: 'cursor' | 'offset' | 'page' | 'link_header' | 'unknown';
|
|
293
|
+
parameters: string[];
|
|
294
|
+
responseFields: string[];
|
|
295
|
+
}
|
|
296
|
+
export interface ApiEndpoint {
|
|
297
|
+
id: string;
|
|
298
|
+
pageId: string;
|
|
299
|
+
snapshotId: string;
|
|
300
|
+
method: 'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options';
|
|
301
|
+
path: string;
|
|
302
|
+
summary?: string;
|
|
303
|
+
description?: string;
|
|
304
|
+
operationId?: string;
|
|
305
|
+
parameters: ApiParameter[];
|
|
306
|
+
requestSchema?: ApiSchema;
|
|
307
|
+
responseSchema?: Record<string, ApiResponse>;
|
|
308
|
+
auth: ApiAuthScheme[];
|
|
309
|
+
errors: ApiErrorResponse[];
|
|
310
|
+
pagination?: ApiPaginationMetadata;
|
|
311
|
+
deprecated: boolean;
|
|
312
|
+
docVersion?: string;
|
|
313
|
+
provenance?: Provenance;
|
|
314
|
+
createdAt: string;
|
|
315
|
+
}
|
|
316
|
+
export interface IndexedExample {
|
|
317
|
+
id: string;
|
|
318
|
+
chunkId?: string;
|
|
319
|
+
pageId: string;
|
|
320
|
+
snapshotId: string;
|
|
321
|
+
language: string;
|
|
322
|
+
framework?: string;
|
|
323
|
+
task: string;
|
|
324
|
+
code: string;
|
|
325
|
+
sourceUrl: string;
|
|
326
|
+
sourceAuthority: SourceAuthority;
|
|
327
|
+
relatedApi?: string;
|
|
328
|
+
relatedSymbol?: string;
|
|
329
|
+
docVersion?: string;
|
|
330
|
+
provenance?: Provenance;
|
|
331
|
+
createdAt: string;
|
|
332
|
+
}
|
|
333
|
+
export type PitfallKind = 'deprecated' | 'removed' | 'breaking_change' | 'server_only' | 'client_only' | 'required_config' | 'permission' | 'rate_limit' | 'runtime_restriction' | 'security';
|
|
334
|
+
export interface Pitfall {
|
|
335
|
+
id: string;
|
|
336
|
+
chunkId?: string;
|
|
337
|
+
pageId: string;
|
|
338
|
+
snapshotId: string;
|
|
339
|
+
kind: PitfallKind;
|
|
340
|
+
title: string;
|
|
341
|
+
content: string;
|
|
342
|
+
relatedApi?: string;
|
|
343
|
+
relatedSymbol?: string;
|
|
344
|
+
docVersion?: string;
|
|
345
|
+
provenance?: Provenance;
|
|
346
|
+
createdAt: string;
|
|
347
|
+
}
|
|
348
|
+
export interface RecipeStep {
|
|
349
|
+
step: number;
|
|
350
|
+
title: string;
|
|
351
|
+
description: string;
|
|
352
|
+
evidenceLevel: EvidenceLevel;
|
|
353
|
+
apiEndpoint?: string;
|
|
354
|
+
exampleCode?: string;
|
|
355
|
+
pitfalls?: string[];
|
|
356
|
+
sourceUrl?: string;
|
|
357
|
+
sourceChunkIds?: string[];
|
|
358
|
+
}
|
|
359
|
+
export interface RecipeValidationStep {
|
|
360
|
+
step: number;
|
|
361
|
+
description: string;
|
|
362
|
+
evidenceLevel: EvidenceLevel;
|
|
363
|
+
expectedResponse?: string;
|
|
364
|
+
testPattern?: string;
|
|
365
|
+
sourceUrl?: string;
|
|
366
|
+
}
|
|
367
|
+
export interface Recipe {
|
|
368
|
+
id: string;
|
|
369
|
+
goal: string;
|
|
370
|
+
prerequisites: Array<{
|
|
371
|
+
text: string;
|
|
372
|
+
evidenceLevel: EvidenceLevel;
|
|
373
|
+
sourceUrl?: string;
|
|
374
|
+
}>;
|
|
375
|
+
orderedSteps: RecipeStep[];
|
|
376
|
+
requiredApis: string[];
|
|
377
|
+
examples: string[];
|
|
378
|
+
pitfalls: string[];
|
|
379
|
+
validationSteps: RecipeValidationStep[];
|
|
380
|
+
sources: string[];
|
|
381
|
+
docVersion?: string;
|
|
382
|
+
confidence: number;
|
|
383
|
+
}
|
|
384
|
+
export interface ApiCommandOptions {
|
|
385
|
+
method?: string;
|
|
386
|
+
docVersion?: string;
|
|
387
|
+
projectDir?: string;
|
|
388
|
+
limit?: number;
|
|
389
|
+
json?: boolean;
|
|
390
|
+
dbPath?: string;
|
|
391
|
+
}
|
|
392
|
+
export interface ExamplesCommandOptions {
|
|
393
|
+
language?: string;
|
|
394
|
+
framework?: string;
|
|
395
|
+
docVersion?: string;
|
|
396
|
+
projectDir?: string;
|
|
397
|
+
limit?: number;
|
|
398
|
+
json?: boolean;
|
|
399
|
+
dbPath?: string;
|
|
400
|
+
}
|
|
401
|
+
export interface PitfallsCommandOptions {
|
|
402
|
+
kind?: PitfallKind;
|
|
403
|
+
docVersion?: string;
|
|
404
|
+
projectDir?: string;
|
|
405
|
+
limit?: number;
|
|
406
|
+
json?: boolean;
|
|
407
|
+
dbPath?: string;
|
|
408
|
+
}
|
|
409
|
+
export interface RecipesCommandOptions {
|
|
410
|
+
docVersion?: string;
|
|
411
|
+
projectDir?: string;
|
|
412
|
+
json?: boolean;
|
|
413
|
+
dbPath?: string;
|
|
414
|
+
}
|
|
415
|
+
export type VerificationRule = 'endpoint_validity' | 'method_validity' | 'required_parameters' | 'schema_compatibility' | 'deprecation' | 'removed_api' | 'version_mismatch' | 'response_assumption';
|
|
416
|
+
export type VerificationSeverity = 'error' | 'warning' | 'info';
|
|
417
|
+
export type VerificationStatus = 'verified' | 'warning' | 'mismatch' | 'insufficient_evidence';
|
|
418
|
+
export interface VerificationFinding {
|
|
419
|
+
id: string;
|
|
420
|
+
rule: VerificationRule;
|
|
421
|
+
severity: VerificationSeverity;
|
|
422
|
+
status: VerificationStatus;
|
|
423
|
+
message: string;
|
|
424
|
+
location?: {
|
|
425
|
+
line?: number;
|
|
426
|
+
column?: number;
|
|
427
|
+
snippet?: string;
|
|
428
|
+
};
|
|
429
|
+
expected?: unknown;
|
|
430
|
+
actual?: unknown;
|
|
431
|
+
docVersion?: string;
|
|
432
|
+
provenance?: {
|
|
433
|
+
sourceUrl?: string;
|
|
434
|
+
sourceAuthority?: string;
|
|
435
|
+
endpointId?: string;
|
|
436
|
+
pitfallId?: string;
|
|
437
|
+
};
|
|
438
|
+
confidence: number;
|
|
439
|
+
}
|
|
440
|
+
export interface ExtractedApiCall {
|
|
441
|
+
endpointPath?: string;
|
|
442
|
+
method?: string;
|
|
443
|
+
parameters?: Record<string, unknown>;
|
|
444
|
+
bodyFields?: string[];
|
|
445
|
+
headers?: Record<string, string>;
|
|
446
|
+
responseFieldsAccessed?: string[];
|
|
447
|
+
symbol?: string;
|
|
448
|
+
rawSnippet: string;
|
|
449
|
+
line?: number;
|
|
450
|
+
language?: string;
|
|
451
|
+
isDynamicOrAmbiguous?: boolean;
|
|
452
|
+
reasonIfAmbiguous?: string;
|
|
453
|
+
}
|
|
454
|
+
export interface VerificationResult {
|
|
455
|
+
verdict: VerificationStatus;
|
|
456
|
+
summary: string;
|
|
457
|
+
targetVersion?: string;
|
|
458
|
+
projectVersion?: string;
|
|
459
|
+
matchedLibrary?: string;
|
|
460
|
+
findings: VerificationFinding[];
|
|
461
|
+
extractedCalls: ExtractedApiCall[];
|
|
462
|
+
totalChecks: number;
|
|
463
|
+
untrusted: true;
|
|
464
|
+
}
|
|
465
|
+
export interface EndpointDiffItem {
|
|
466
|
+
path: string;
|
|
467
|
+
method: string;
|
|
468
|
+
changeType: 'added' | 'removed' | 'deprecated' | 'modified';
|
|
469
|
+
changes?: string[];
|
|
470
|
+
endpoint: ApiEndpoint;
|
|
471
|
+
previousEndpoint?: ApiEndpoint;
|
|
472
|
+
}
|
|
473
|
+
export interface DocDiffResult {
|
|
474
|
+
fromVersion?: string;
|
|
475
|
+
toVersion?: string;
|
|
476
|
+
fromSnapshotId?: string;
|
|
477
|
+
toSnapshotId?: string;
|
|
478
|
+
sourceId?: string;
|
|
479
|
+
summary: {
|
|
480
|
+
endpointsAdded: number;
|
|
481
|
+
endpointsRemoved: number;
|
|
482
|
+
endpointsModified: number;
|
|
483
|
+
endpointsDeprecated: number;
|
|
484
|
+
pitfallsAdded: number;
|
|
485
|
+
pitfallsRemoved: number;
|
|
486
|
+
contentChanged: number;
|
|
487
|
+
};
|
|
488
|
+
apiChanges: EndpointDiffItem[];
|
|
489
|
+
pitfallChanges: Array<{
|
|
490
|
+
changeType: 'added' | 'removed';
|
|
491
|
+
pitfall: Pitfall;
|
|
492
|
+
}>;
|
|
493
|
+
contentChanges: Array<{
|
|
494
|
+
title: string;
|
|
495
|
+
changeType: 'added' | 'removed' | 'modified';
|
|
496
|
+
summary: string;
|
|
497
|
+
}>;
|
|
498
|
+
retrievedAt: string;
|
|
499
|
+
}
|
|
500
|
+
export interface AffectedFileLocation {
|
|
501
|
+
filePath: string;
|
|
502
|
+
line: number;
|
|
503
|
+
column?: number;
|
|
504
|
+
snippet: string;
|
|
505
|
+
reason: string;
|
|
506
|
+
matchedPattern: string;
|
|
507
|
+
changeCategory: 'removed_api' | 'deprecated_api' | 'modified_parameters' | 'breaking_pitfall' | 'content_change';
|
|
508
|
+
certainty: 'high' | 'medium' | 'heuristic';
|
|
509
|
+
confidence: number;
|
|
510
|
+
relatedChange: {
|
|
511
|
+
endpoint?: string;
|
|
512
|
+
symbol?: string;
|
|
513
|
+
pitfallTitle?: string;
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
export interface ImpactAnalysisResult {
|
|
517
|
+
projectDir: string;
|
|
518
|
+
fromVersion?: string;
|
|
519
|
+
toVersion?: string;
|
|
520
|
+
totalFilesScanned: number;
|
|
521
|
+
affectedFilesCount: number;
|
|
522
|
+
affectedLocations: AffectedFileLocation[];
|
|
523
|
+
summary: string;
|
|
524
|
+
}
|
|
525
|
+
export interface VerifyCommandOptions {
|
|
526
|
+
docVersion?: string;
|
|
527
|
+
projectDir?: string;
|
|
528
|
+
library?: string;
|
|
529
|
+
language?: string;
|
|
530
|
+
json?: boolean;
|
|
531
|
+
dbPath?: string;
|
|
532
|
+
}
|
|
533
|
+
export interface DiffCommandOptions {
|
|
534
|
+
from?: string;
|
|
535
|
+
to?: string;
|
|
536
|
+
source?: string;
|
|
537
|
+
json?: boolean;
|
|
538
|
+
dbPath?: string;
|
|
539
|
+
}
|
|
540
|
+
export interface ImpactCommandOptions {
|
|
541
|
+
from?: string;
|
|
542
|
+
to?: string;
|
|
543
|
+
projectDir?: string;
|
|
544
|
+
source?: string;
|
|
545
|
+
json?: boolean;
|
|
546
|
+
dbPath?: string;
|
|
547
|
+
}
|
|
548
|
+
export type ExportFormat = 'agents.md' | 'claude.md' | 'skill.md' | 'llms.txt' | 'docs-map.md';
|
|
549
|
+
export interface ExportOptions {
|
|
550
|
+
format: ExportFormat;
|
|
551
|
+
projectDir?: string;
|
|
552
|
+
targetSource?: string;
|
|
553
|
+
docVersion?: string;
|
|
554
|
+
outputPath?: string;
|
|
555
|
+
stdout?: boolean;
|
|
556
|
+
tokenBudget?: number;
|
|
557
|
+
dbPath?: string;
|
|
558
|
+
}
|
|
559
|
+
export interface ExportResult {
|
|
560
|
+
format: ExportFormat;
|
|
561
|
+
content: string;
|
|
562
|
+
outputPath?: string;
|
|
563
|
+
metadata: {
|
|
564
|
+
generatedAt: string;
|
|
565
|
+
sources: string[];
|
|
566
|
+
docVersion?: string;
|
|
567
|
+
projectDependencies: Array<{
|
|
568
|
+
name: string;
|
|
569
|
+
version: string;
|
|
570
|
+
matchType: string;
|
|
571
|
+
}>;
|
|
572
|
+
totalApis: number;
|
|
573
|
+
totalPitfalls: number;
|
|
574
|
+
totalExamples: number;
|
|
575
|
+
tokenEstimate: number;
|
|
576
|
+
untrusted: true;
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
export interface DocumentationMapNode {
|
|
580
|
+
id: string;
|
|
581
|
+
title: string;
|
|
582
|
+
url: string;
|
|
583
|
+
version?: string;
|
|
584
|
+
sourceId: string;
|
|
585
|
+
chunkCount: number;
|
|
586
|
+
estimatedTokens: number;
|
|
587
|
+
headings: string[];
|
|
588
|
+
apis?: string[];
|
|
589
|
+
pitfallCount?: number;
|
|
590
|
+
exampleCount?: number;
|
|
591
|
+
untrusted: true;
|
|
592
|
+
}
|
|
593
|
+
export interface DocumentationMapResult {
|
|
594
|
+
totalSources: number;
|
|
595
|
+
totalPages: number;
|
|
596
|
+
totalChunks: number;
|
|
597
|
+
totalEstimatedTokens: number;
|
|
598
|
+
sources: Array<{
|
|
599
|
+
id: string;
|
|
600
|
+
url: string;
|
|
601
|
+
version?: string;
|
|
602
|
+
pageCount: number;
|
|
603
|
+
chunkCount: number;
|
|
604
|
+
}>;
|
|
605
|
+
pages: DocumentationMapNode[];
|
|
606
|
+
markdownTree: string;
|
|
607
|
+
untrusted: true;
|
|
608
|
+
}
|
|
609
|
+
export interface DashboardOptions {
|
|
610
|
+
port?: number;
|
|
611
|
+
host?: string;
|
|
612
|
+
dbPath?: string;
|
|
613
|
+
projectDir?: string;
|
|
614
|
+
open?: boolean;
|
|
615
|
+
}
|
|
616
|
+
export interface DashboardStats {
|
|
617
|
+
totalSources: number;
|
|
618
|
+
totalPages: number;
|
|
619
|
+
totalChunks: number;
|
|
620
|
+
totalApis: number;
|
|
621
|
+
totalPitfalls: number;
|
|
622
|
+
totalExamples: number;
|
|
623
|
+
totalRecipes: number;
|
|
624
|
+
activeVersions: string[];
|
|
625
|
+
dbPath: string;
|
|
626
|
+
untrusted: true;
|
|
627
|
+
}
|
|
628
|
+
export type AgentEvaluationStrategy = 'agent_official_docs_fetch' | 'agent_context7' | 'agent_docorbit' | 'agent_firecrawl' | 'agent_web_search';
|
|
629
|
+
export type EvaluationSplit = 'train' | 'eval' | 'verification';
|
|
630
|
+
export interface BenchmarkTaskDoc {
|
|
631
|
+
url: string;
|
|
632
|
+
title: string;
|
|
633
|
+
version: string;
|
|
634
|
+
content: string;
|
|
635
|
+
}
|
|
636
|
+
export interface BenchmarkTaskDef {
|
|
637
|
+
id: string;
|
|
638
|
+
split: EvaluationSplit;
|
|
639
|
+
title: string;
|
|
640
|
+
ecosystem: string;
|
|
641
|
+
library: string;
|
|
642
|
+
targetVersion: string;
|
|
643
|
+
taskPrompt: string;
|
|
644
|
+
workspaceFiles: Record<string, string>;
|
|
645
|
+
docs: BenchmarkTaskDoc[];
|
|
646
|
+
/** Canonical documentation URL for the direct-docs-fetch web baseline */
|
|
647
|
+
docsUrl: string;
|
|
648
|
+
/** Optional pre-structured endpoints to index into DocOrbit for AST verification */
|
|
649
|
+
endpoints?: ApiEndpoint[];
|
|
650
|
+
/** Optional pre-structured pitfalls to index into DocOrbit for AST verification */
|
|
651
|
+
pitfalls?: Pitfall[];
|
|
652
|
+
/** Dedicated verification category if this is an intentional code flaw test */
|
|
653
|
+
verificationCategory?: 'wrong_endpoint' | 'wrong_http_method' | 'missing_required_parameter' | 'deprecated_api' | 'removed_api' | 'version_mismatch' | 'dynamic_ambiguous_code';
|
|
654
|
+
groundTruth: {
|
|
655
|
+
expectedVersion: string;
|
|
656
|
+
expectedApi: {
|
|
657
|
+
method?: string;
|
|
658
|
+
path?: string;
|
|
659
|
+
symbol?: string;
|
|
660
|
+
requiredParams?: string[];
|
|
661
|
+
};
|
|
662
|
+
fatalPitfalls: string[];
|
|
663
|
+
validCode: string;
|
|
664
|
+
invalidCode: {
|
|
665
|
+
snippet: string;
|
|
666
|
+
expectedRule: string;
|
|
667
|
+
};
|
|
668
|
+
dynamicCode?: string;
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
export interface BenchmarkTaskResult {
|
|
672
|
+
strategy: AgentEvaluationStrategy;
|
|
673
|
+
taskId: string;
|
|
674
|
+
split: EvaluationSplit;
|
|
675
|
+
taskSuccess: boolean;
|
|
676
|
+
correctApiSelected: boolean;
|
|
677
|
+
correctVersionSelected: boolean;
|
|
678
|
+
retrievalPrecision: number;
|
|
679
|
+
retrievalRecall: number;
|
|
680
|
+
tokenUsage: number;
|
|
681
|
+
latencyMs: number;
|
|
682
|
+
toolCallsCount: number;
|
|
683
|
+
verificationCatches: number;
|
|
684
|
+
verificationFalsePositives: number;
|
|
685
|
+
insufficientEvidenceCount: number;
|
|
686
|
+
notes: string;
|
|
687
|
+
/** True when this result was produced by a simulated runner (no real network calls) */
|
|
688
|
+
isSimulation: boolean;
|
|
689
|
+
/** First 2000 chars of actual retrieved content for auditability; empty string for simulations */
|
|
690
|
+
rawRetrievedContent: string;
|
|
691
|
+
}
|
|
692
|
+
export interface StrategyAggregateMetrics {
|
|
693
|
+
overallSuccessRate: number;
|
|
694
|
+
evalSuccessRate: number;
|
|
695
|
+
versionAccuracy: number;
|
|
696
|
+
meanPrecision: number;
|
|
697
|
+
meanRecall: number;
|
|
698
|
+
meanTokens: number;
|
|
699
|
+
medianTokens: number;
|
|
700
|
+
meanLatencyMs: number;
|
|
701
|
+
meanToolCalls: number;
|
|
702
|
+
totalVerificationCatches: number;
|
|
703
|
+
verificationCatchRate?: number;
|
|
704
|
+
falsePositives: number;
|
|
705
|
+
insufficientEvidenceRate: number;
|
|
706
|
+
}
|
|
707
|
+
export interface BenchmarkSuiteReport {
|
|
708
|
+
timestamp: string;
|
|
709
|
+
totalTasks: number;
|
|
710
|
+
trainTasks: number;
|
|
711
|
+
evalTasks: number;
|
|
712
|
+
verificationTasks?: number;
|
|
713
|
+
byStrategy: Record<AgentEvaluationStrategy, StrategyAggregateMetrics>;
|
|
714
|
+
tasks: BenchmarkTaskResult[];
|
|
715
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|