distill-mcp 0.6.0-beta
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/bin/cli.js +133 -0
- package/dist/analytics/session-tracker.d.ts +74 -0
- package/dist/analytics/session-tracker.d.ts.map +1 -0
- package/dist/analytics/session-tracker.js +123 -0
- package/dist/ast/benchmark.test.d.ts +7 -0
- package/dist/ast/benchmark.test.d.ts.map +1 -0
- package/dist/ast/benchmark.test.js +175 -0
- package/dist/ast/go/index.d.ts +9 -0
- package/dist/ast/go/index.d.ts.map +1 -0
- package/dist/ast/go/index.js +8 -0
- package/dist/ast/go/parser.d.ts +31 -0
- package/dist/ast/go/parser.d.ts.map +1 -0
- package/dist/ast/go/parser.js +428 -0
- package/dist/ast/go/parser.test.d.ts +5 -0
- package/dist/ast/go/parser.test.d.ts.map +1 -0
- package/dist/ast/go/parser.test.js +241 -0
- package/dist/ast/go/queries.d.ts +51 -0
- package/dist/ast/go/queries.d.ts.map +1 -0
- package/dist/ast/go/queries.js +114 -0
- package/dist/ast/go/utils.d.ts +66 -0
- package/dist/ast/go/utils.d.ts.map +1 -0
- package/dist/ast/go/utils.js +140 -0
- package/dist/ast/index.d.ts +39 -0
- package/dist/ast/index.d.ts.map +1 -0
- package/dist/ast/index.js +245 -0
- package/dist/ast/php/index.d.ts +9 -0
- package/dist/ast/php/index.d.ts.map +1 -0
- package/dist/ast/php/index.js +8 -0
- package/dist/ast/php/parser.d.ts +31 -0
- package/dist/ast/php/parser.d.ts.map +1 -0
- package/dist/ast/php/parser.js +388 -0
- package/dist/ast/php/parser.test.d.ts +5 -0
- package/dist/ast/php/parser.test.d.ts.map +1 -0
- package/dist/ast/php/parser.test.js +328 -0
- package/dist/ast/php/queries.d.ts +61 -0
- package/dist/ast/php/queries.d.ts.map +1 -0
- package/dist/ast/php/queries.js +117 -0
- package/dist/ast/php/utils.d.ts +83 -0
- package/dist/ast/php/utils.d.ts.map +1 -0
- package/dist/ast/php/utils.js +246 -0
- package/dist/ast/python/index.d.ts +9 -0
- package/dist/ast/python/index.d.ts.map +1 -0
- package/dist/ast/python/index.js +8 -0
- package/dist/ast/python/parser.d.ts +32 -0
- package/dist/ast/python/parser.d.ts.map +1 -0
- package/dist/ast/python/parser.js +422 -0
- package/dist/ast/python/parser.test.d.ts +5 -0
- package/dist/ast/python/parser.test.d.ts.map +1 -0
- package/dist/ast/python/parser.test.js +186 -0
- package/dist/ast/python/queries.d.ts +73 -0
- package/dist/ast/python/queries.d.ts.map +1 -0
- package/dist/ast/python/queries.js +137 -0
- package/dist/ast/python/utils.d.ts +63 -0
- package/dist/ast/python/utils.d.ts.map +1 -0
- package/dist/ast/python/utils.js +159 -0
- package/dist/ast/quick-scan.d.ts +40 -0
- package/dist/ast/quick-scan.d.ts.map +1 -0
- package/dist/ast/quick-scan.js +287 -0
- package/dist/ast/rust/index.d.ts +9 -0
- package/dist/ast/rust/index.d.ts.map +1 -0
- package/dist/ast/rust/index.js +8 -0
- package/dist/ast/rust/parser.d.ts +31 -0
- package/dist/ast/rust/parser.d.ts.map +1 -0
- package/dist/ast/rust/parser.js +416 -0
- package/dist/ast/rust/parser.test.d.ts +5 -0
- package/dist/ast/rust/parser.test.d.ts.map +1 -0
- package/dist/ast/rust/parser.test.js +329 -0
- package/dist/ast/rust/queries.d.ts +66 -0
- package/dist/ast/rust/queries.d.ts.map +1 -0
- package/dist/ast/rust/queries.js +132 -0
- package/dist/ast/rust/utils.d.ts +91 -0
- package/dist/ast/rust/utils.d.ts.map +1 -0
- package/dist/ast/rust/utils.js +254 -0
- package/dist/ast/swift/index.d.ts +10 -0
- package/dist/ast/swift/index.d.ts.map +1 -0
- package/dist/ast/swift/index.js +8 -0
- package/dist/ast/swift/parser.d.ts +31 -0
- package/dist/ast/swift/parser.d.ts.map +1 -0
- package/dist/ast/swift/parser.js +554 -0
- package/dist/ast/swift/parser.test.d.ts +5 -0
- package/dist/ast/swift/parser.test.d.ts.map +1 -0
- package/dist/ast/swift/parser.test.js +398 -0
- package/dist/ast/swift/queries.d.ts +71 -0
- package/dist/ast/swift/queries.d.ts.map +1 -0
- package/dist/ast/swift/queries.js +137 -0
- package/dist/ast/swift/utils.d.ts +94 -0
- package/dist/ast/swift/utils.d.ts.map +1 -0
- package/dist/ast/swift/utils.js +411 -0
- package/dist/ast/types.d.ts +96 -0
- package/dist/ast/types.d.ts.map +1 -0
- package/dist/ast/types.js +21 -0
- package/dist/ast/typescript.d.ts +24 -0
- package/dist/ast/typescript.d.ts.map +1 -0
- package/dist/ast/typescript.js +357 -0
- package/dist/cache/file-hash.d.ts +33 -0
- package/dist/cache/file-hash.d.ts.map +1 -0
- package/dist/cache/file-hash.js +59 -0
- package/dist/cache/index.d.ts +9 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +8 -0
- package/dist/cache/smart-cache.d.ts +68 -0
- package/dist/cache/smart-cache.d.ts.map +1 -0
- package/dist/cache/smart-cache.js +266 -0
- package/dist/cache/types.d.ts +102 -0
- package/dist/cache/types.d.ts.map +1 -0
- package/dist/cache/types.js +6 -0
- package/dist/cli/analyze.d.ts +43 -0
- package/dist/cli/analyze.d.ts.map +1 -0
- package/dist/cli/analyze.js +250 -0
- package/dist/cli/doctor.d.ts +2 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +127 -0
- package/dist/cli/hooks.d.ts +14 -0
- package/dist/cli/hooks.d.ts.map +1 -0
- package/dist/cli/hooks.js +229 -0
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +4 -0
- package/dist/cli/setup.d.ts +10 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +117 -0
- package/dist/cli/utils.d.ts +30 -0
- package/dist/cli/utils.d.ts.map +1 -0
- package/dist/cli/utils.js +116 -0
- package/dist/compressors/config.d.ts +9 -0
- package/dist/compressors/config.d.ts.map +1 -0
- package/dist/compressors/config.js +183 -0
- package/dist/compressors/conversation.d.ts +109 -0
- package/dist/compressors/conversation.d.ts.map +1 -0
- package/dist/compressors/conversation.js +404 -0
- package/dist/compressors/diff.d.ts +35 -0
- package/dist/compressors/diff.d.ts.map +1 -0
- package/dist/compressors/diff.js +389 -0
- package/dist/compressors/generic.d.ts +9 -0
- package/dist/compressors/generic.d.ts.map +1 -0
- package/dist/compressors/generic.js +188 -0
- package/dist/compressors/index.d.ts +31 -0
- package/dist/compressors/index.d.ts.map +1 -0
- package/dist/compressors/index.js +82 -0
- package/dist/compressors/logs.d.ts +9 -0
- package/dist/compressors/logs.d.ts.map +1 -0
- package/dist/compressors/logs.js +245 -0
- package/dist/compressors/multifile.d.ts +106 -0
- package/dist/compressors/multifile.d.ts.map +1 -0
- package/dist/compressors/multifile.js +498 -0
- package/dist/compressors/semantic.d.ts +33 -0
- package/dist/compressors/semantic.d.ts.map +1 -0
- package/dist/compressors/semantic.js +233 -0
- package/dist/compressors/stacktrace.d.ts +9 -0
- package/dist/compressors/stacktrace.d.ts.map +1 -0
- package/dist/compressors/stacktrace.js +259 -0
- package/dist/compressors/types.d.ts +146 -0
- package/dist/compressors/types.d.ts.map +1 -0
- package/dist/compressors/types.js +6 -0
- package/dist/config/output-config.d.ts +56 -0
- package/dist/config/output-config.d.ts.map +1 -0
- package/dist/config/output-config.js +78 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/middleware/chain.d.ts +49 -0
- package/dist/middleware/chain.d.ts.map +1 -0
- package/dist/middleware/chain.js +126 -0
- package/dist/middleware/index.d.ts +4 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +3 -0
- package/dist/middleware/logging.d.ts +8 -0
- package/dist/middleware/logging.d.ts.map +1 -0
- package/dist/middleware/logging.js +71 -0
- package/dist/middleware/types.d.ts +58 -0
- package/dist/middleware/types.d.ts.map +1 -0
- package/dist/middleware/types.js +7 -0
- package/dist/parsers/eslint.d.ts +8 -0
- package/dist/parsers/eslint.d.ts.map +1 -0
- package/dist/parsers/eslint.js +132 -0
- package/dist/parsers/generic.d.ts +8 -0
- package/dist/parsers/generic.d.ts.map +1 -0
- package/dist/parsers/generic.js +234 -0
- package/dist/parsers/index.d.ts +34 -0
- package/dist/parsers/index.d.ts.map +1 -0
- package/dist/parsers/index.js +216 -0
- package/dist/parsers/types.d.ts +84 -0
- package/dist/parsers/types.d.ts.map +1 -0
- package/dist/parsers/types.js +6 -0
- package/dist/parsers/typescript.d.ts +8 -0
- package/dist/parsers/typescript.d.ts.map +1 -0
- package/dist/parsers/typescript.js +107 -0
- package/dist/pipelines/definitions.d.ts +50 -0
- package/dist/pipelines/definitions.d.ts.map +1 -0
- package/dist/pipelines/definitions.js +206 -0
- package/dist/sandbox/executor.d.ts +12 -0
- package/dist/sandbox/executor.d.ts.map +1 -0
- package/dist/sandbox/executor.js +191 -0
- package/dist/sandbox/index.d.ts +11 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/index.js +9 -0
- package/dist/sandbox/sandbox.test.d.ts +7 -0
- package/dist/sandbox/sandbox.test.d.ts.map +1 -0
- package/dist/sandbox/sandbox.test.js +202 -0
- package/dist/sandbox/sdk/analyze.d.ts +36 -0
- package/dist/sandbox/sdk/analyze.d.ts.map +1 -0
- package/dist/sandbox/sdk/analyze.js +413 -0
- package/dist/sandbox/sdk/analyze.test.d.ts +7 -0
- package/dist/sandbox/sdk/analyze.test.d.ts.map +1 -0
- package/dist/sandbox/sdk/analyze.test.js +191 -0
- package/dist/sandbox/sdk/code.d.ts +20 -0
- package/dist/sandbox/sdk/code.d.ts.map +1 -0
- package/dist/sandbox/sdk/code.js +104 -0
- package/dist/sandbox/sdk/compress.d.ts +23 -0
- package/dist/sandbox/sdk/compress.d.ts.map +1 -0
- package/dist/sandbox/sdk/compress.js +107 -0
- package/dist/sandbox/sdk/conversation.d.ts +148 -0
- package/dist/sandbox/sdk/conversation.d.ts.map +1 -0
- package/dist/sandbox/sdk/conversation.js +177 -0
- package/dist/sandbox/sdk/files.d.ts +29 -0
- package/dist/sandbox/sdk/files.d.ts.map +1 -0
- package/dist/sandbox/sdk/files.js +41 -0
- package/dist/sandbox/sdk/git.d.ts +37 -0
- package/dist/sandbox/sdk/git.d.ts.map +1 -0
- package/dist/sandbox/sdk/git.js +313 -0
- package/dist/sandbox/sdk/git.test.d.ts +8 -0
- package/dist/sandbox/sdk/git.test.d.ts.map +1 -0
- package/dist/sandbox/sdk/git.test.js +160 -0
- package/dist/sandbox/sdk/index.d.ts +16 -0
- package/dist/sandbox/sdk/index.d.ts.map +1 -0
- package/dist/sandbox/sdk/index.js +15 -0
- package/dist/sandbox/sdk/multifile.d.ts +63 -0
- package/dist/sandbox/sdk/multifile.d.ts.map +1 -0
- package/dist/sandbox/sdk/multifile.js +130 -0
- package/dist/sandbox/sdk/pipeline.d.ts +16 -0
- package/dist/sandbox/sdk/pipeline.d.ts.map +1 -0
- package/dist/sandbox/sdk/pipeline.js +454 -0
- package/dist/sandbox/sdk/pipeline.test.d.ts +7 -0
- package/dist/sandbox/sdk/pipeline.test.d.ts.map +1 -0
- package/dist/sandbox/sdk/pipeline.test.js +197 -0
- package/dist/sandbox/sdk/search.d.ts +36 -0
- package/dist/sandbox/sdk/search.d.ts.map +1 -0
- package/dist/sandbox/sdk/search.js +338 -0
- package/dist/sandbox/sdk/search.test.d.ts +7 -0
- package/dist/sandbox/sdk/search.test.d.ts.map +1 -0
- package/dist/sandbox/sdk/search.test.js +183 -0
- package/dist/sandbox/sdk/utils.d.ts +18 -0
- package/dist/sandbox/sdk/utils.d.ts.map +1 -0
- package/dist/sandbox/sdk/utils.js +24 -0
- package/dist/sandbox/security/code-analyzer.d.ts +15 -0
- package/dist/sandbox/security/code-analyzer.d.ts.map +1 -0
- package/dist/sandbox/security/code-analyzer.js +87 -0
- package/dist/sandbox/security/index.d.ts +6 -0
- package/dist/sandbox/security/index.d.ts.map +1 -0
- package/dist/sandbox/security/index.js +5 -0
- package/dist/sandbox/security/path-validator.d.ts +23 -0
- package/dist/sandbox/security/path-validator.d.ts.map +1 -0
- package/dist/sandbox/security/path-validator.js +113 -0
- package/dist/sandbox/types.d.ts +577 -0
- package/dist/sandbox/types.d.ts.map +1 -0
- package/dist/sandbox/types.js +14 -0
- package/dist/server.d.ts +36 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +133 -0
- package/dist/summarizers/build-logs.d.ts +11 -0
- package/dist/summarizers/build-logs.d.ts.map +1 -0
- package/dist/summarizers/build-logs.js +234 -0
- package/dist/summarizers/generic.d.ts +11 -0
- package/dist/summarizers/generic.d.ts.map +1 -0
- package/dist/summarizers/generic.js +93 -0
- package/dist/summarizers/index.d.ts +20 -0
- package/dist/summarizers/index.d.ts.map +1 -0
- package/dist/summarizers/index.js +43 -0
- package/dist/summarizers/server-logs.d.ts +11 -0
- package/dist/summarizers/server-logs.d.ts.map +1 -0
- package/dist/summarizers/server-logs.js +215 -0
- package/dist/summarizers/test-logs.d.ts +11 -0
- package/dist/summarizers/test-logs.d.ts.map +1 -0
- package/dist/summarizers/test-logs.js +258 -0
- package/dist/summarizers/types.d.ts +146 -0
- package/dist/summarizers/types.d.ts.map +1 -0
- package/dist/summarizers/types.js +21 -0
- package/dist/tools/analyze-build-output.d.ts +30 -0
- package/dist/tools/analyze-build-output.d.ts.map +1 -0
- package/dist/tools/analyze-build-output.js +45 -0
- package/dist/tools/analyze-context.d.ts +23 -0
- package/dist/tools/analyze-context.d.ts.map +1 -0
- package/dist/tools/analyze-context.js +78 -0
- package/dist/tools/auto-optimize.d.ts +9 -0
- package/dist/tools/auto-optimize.d.ts.map +1 -0
- package/dist/tools/auto-optimize.js +191 -0
- package/dist/tools/code-execute.d.ts +9 -0
- package/dist/tools/code-execute.d.ts.map +1 -0
- package/dist/tools/code-execute.js +84 -0
- package/dist/tools/code-skeleton.d.ts +33 -0
- package/dist/tools/code-skeleton.d.ts.map +1 -0
- package/dist/tools/code-skeleton.js +206 -0
- package/dist/tools/compress-context.d.ts +33 -0
- package/dist/tools/compress-context.d.ts.map +1 -0
- package/dist/tools/compress-context.js +64 -0
- package/dist/tools/context-budget.d.ts +43 -0
- package/dist/tools/context-budget.d.ts.map +1 -0
- package/dist/tools/context-budget.js +260 -0
- package/dist/tools/context-budget.test.d.ts +5 -0
- package/dist/tools/context-budget.test.d.ts.map +1 -0
- package/dist/tools/context-budget.test.js +219 -0
- package/dist/tools/conversation-compress.d.ts +46 -0
- package/dist/tools/conversation-compress.d.ts.map +1 -0
- package/dist/tools/conversation-compress.js +78 -0
- package/dist/tools/conversation-memory.d.ts +75 -0
- package/dist/tools/conversation-memory.d.ts.map +1 -0
- package/dist/tools/conversation-memory.js +289 -0
- package/dist/tools/deduplicate-errors.d.ts +30 -0
- package/dist/tools/deduplicate-errors.d.ts.map +1 -0
- package/dist/tools/deduplicate-errors.js +72 -0
- package/dist/tools/detect-retry-loop.d.ts +40 -0
- package/dist/tools/detect-retry-loop.d.ts.map +1 -0
- package/dist/tools/detect-retry-loop.js +212 -0
- package/dist/tools/diff-compress.d.ts +40 -0
- package/dist/tools/diff-compress.d.ts.map +1 -0
- package/dist/tools/diff-compress.js +94 -0
- package/dist/tools/discover-tools.d.ts +11 -0
- package/dist/tools/discover-tools.d.ts.map +1 -0
- package/dist/tools/discover-tools.js +163 -0
- package/dist/tools/dynamic-loader.d.ts +131 -0
- package/dist/tools/dynamic-loader.d.ts.map +1 -0
- package/dist/tools/dynamic-loader.js +378 -0
- package/dist/tools/dynamic-loader.test.d.ts +10 -0
- package/dist/tools/dynamic-loader.test.d.ts.map +1 -0
- package/dist/tools/dynamic-loader.test.js +164 -0
- package/dist/tools/lazy-mcp.d.ts +31 -0
- package/dist/tools/lazy-mcp.d.ts.map +1 -0
- package/dist/tools/lazy-mcp.js +151 -0
- package/dist/tools/lazy-mcp.test.d.ts +10 -0
- package/dist/tools/lazy-mcp.test.d.ts.map +1 -0
- package/dist/tools/lazy-mcp.test.js +172 -0
- package/dist/tools/multifile-compress.d.ts +36 -0
- package/dist/tools/multifile-compress.d.ts.map +1 -0
- package/dist/tools/multifile-compress.js +223 -0
- package/dist/tools/optimization-tips.d.ts +18 -0
- package/dist/tools/optimization-tips.d.ts.map +1 -0
- package/dist/tools/optimization-tips.js +133 -0
- package/dist/tools/registry.d.ts +70 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +169 -0
- package/dist/tools/semantic-compress.d.ts +39 -0
- package/dist/tools/semantic-compress.d.ts.map +1 -0
- package/dist/tools/semantic-compress.js +113 -0
- package/dist/tools/semantic-compress.test.d.ts +5 -0
- package/dist/tools/semantic-compress.test.d.ts.map +1 -0
- package/dist/tools/semantic-compress.test.js +182 -0
- package/dist/tools/session-stats.d.ts +34 -0
- package/dist/tools/session-stats.d.ts.map +1 -0
- package/dist/tools/session-stats.js +194 -0
- package/dist/tools/set-output-config.d.ts +38 -0
- package/dist/tools/set-output-config.d.ts.map +1 -0
- package/dist/tools/set-output-config.js +122 -0
- package/dist/tools/smart-cache-tool.d.ts +38 -0
- package/dist/tools/smart-cache-tool.d.ts.map +1 -0
- package/dist/tools/smart-cache-tool.js +224 -0
- package/dist/tools/smart-file-read.d.ts +52 -0
- package/dist/tools/smart-file-read.d.ts.map +1 -0
- package/dist/tools/smart-file-read.js +481 -0
- package/dist/tools/smart-pipeline.d.ts +40 -0
- package/dist/tools/smart-pipeline.d.ts.map +1 -0
- package/dist/tools/smart-pipeline.js +295 -0
- package/dist/tools/summarize-logs.d.ts +36 -0
- package/dist/tools/summarize-logs.d.ts.map +1 -0
- package/dist/tools/summarize-logs.js +184 -0
- package/dist/tools/token-budget.test.d.ts +11 -0
- package/dist/tools/token-budget.test.d.ts.map +1 -0
- package/dist/tools/token-budget.test.js +275 -0
- package/dist/utils/bm25.d.ts +86 -0
- package/dist/utils/bm25.d.ts.map +1 -0
- package/dist/utils/bm25.js +153 -0
- package/dist/utils/bm25.test.d.ts +5 -0
- package/dist/utils/bm25.test.d.ts.map +1 -0
- package/dist/utils/bm25.test.js +156 -0
- package/dist/utils/command-normalizer.d.ts +39 -0
- package/dist/utils/command-normalizer.d.ts.map +1 -0
- package/dist/utils/command-normalizer.js +90 -0
- package/dist/utils/content-detector.d.ts +27 -0
- package/dist/utils/content-detector.d.ts.map +1 -0
- package/dist/utils/content-detector.js +127 -0
- package/dist/utils/embeddings.d.ts +54 -0
- package/dist/utils/embeddings.d.ts.map +1 -0
- package/dist/utils/embeddings.js +97 -0
- package/dist/utils/embeddings.test.d.ts +8 -0
- package/dist/utils/embeddings.test.d.ts.map +1 -0
- package/dist/utils/embeddings.test.js +96 -0
- package/dist/utils/error-normalizer.d.ts +39 -0
- package/dist/utils/error-normalizer.d.ts.map +1 -0
- package/dist/utils/error-normalizer.js +233 -0
- package/dist/utils/hybrid-search.d.ts +79 -0
- package/dist/utils/hybrid-search.d.ts.map +1 -0
- package/dist/utils/hybrid-search.js +146 -0
- package/dist/utils/hybrid-search.test.d.ts +5 -0
- package/dist/utils/hybrid-search.test.d.ts.map +1 -0
- package/dist/utils/hybrid-search.test.js +172 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/language-detector.d.ts +27 -0
- package/dist/utils/language-detector.d.ts.map +1 -0
- package/dist/utils/language-detector.js +94 -0
- package/dist/utils/log-parser.d.ts +46 -0
- package/dist/utils/log-parser.d.ts.map +1 -0
- package/dist/utils/log-parser.js +287 -0
- package/dist/utils/output-estimator.d.ts +54 -0
- package/dist/utils/output-estimator.d.ts.map +1 -0
- package/dist/utils/output-estimator.js +119 -0
- package/dist/utils/output-estimator.test.d.ts +5 -0
- package/dist/utils/output-estimator.test.d.ts.map +1 -0
- package/dist/utils/output-estimator.test.js +115 -0
- package/dist/utils/output-similarity.d.ts +48 -0
- package/dist/utils/output-similarity.d.ts.map +1 -0
- package/dist/utils/output-similarity.js +140 -0
- package/dist/utils/project-detector.d.ts +16 -0
- package/dist/utils/project-detector.d.ts.map +1 -0
- package/dist/utils/project-detector.js +119 -0
- package/dist/utils/segment-scorer.d.ts +99 -0
- package/dist/utils/segment-scorer.d.ts.map +1 -0
- package/dist/utils/segment-scorer.js +148 -0
- package/dist/utils/signature-grouper.d.ts +58 -0
- package/dist/utils/signature-grouper.d.ts.map +1 -0
- package/dist/utils/signature-grouper.js +185 -0
- package/dist/utils/tfidf.d.ts +45 -0
- package/dist/utils/tfidf.d.ts.map +1 -0
- package/dist/utils/tfidf.js +204 -0
- package/dist/utils/tfidf.test.d.ts +5 -0
- package/dist/utils/tfidf.test.d.ts.map +1 -0
- package/dist/utils/tfidf.test.js +115 -0
- package/dist/utils/token-counter.d.ts +35 -0
- package/dist/utils/token-counter.d.ts.map +1 -0
- package/dist/utils/token-counter.js +83 -0
- package/dist/utils/toon-serializer.d.ts +120 -0
- package/dist/utils/toon-serializer.d.ts.map +1 -0
- package/dist/utils/toon-serializer.js +472 -0
- package/dist/utils/toon-serializer.test.d.ts +7 -0
- package/dist/utils/toon-serializer.test.d.ts.map +1 -0
- package/dist/utils/toon-serializer.test.js +290 -0
- package/package.json +63 -0
- package/scripts/install.ps1 +133 -0
- package/scripts/install.sh +183 -0
- package/scripts/pre-commit-hook.sh +86 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/compressors/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAqC,MAAM,YAAY,CAAC;AA6KhF,eAAO,MAAM,gBAAgB,EAAE,UA+C9B,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Compressor
|
|
3
|
+
*
|
|
4
|
+
* Specialized compressor for configuration files (JSON, YAML-like).
|
|
5
|
+
* Summarizes nested objects and arrays while preserving structure.
|
|
6
|
+
*/
|
|
7
|
+
import { encodingForModel } from "js-tiktoken";
|
|
8
|
+
const encoding = encodingForModel("gpt-4");
|
|
9
|
+
function countTokens(text) {
|
|
10
|
+
return encoding.encode(text).length;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Check if content is valid JSON
|
|
14
|
+
*/
|
|
15
|
+
function isValidJSON(content) {
|
|
16
|
+
try {
|
|
17
|
+
JSON.parse(content);
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Summarize a value based on its type and size
|
|
26
|
+
*/
|
|
27
|
+
function summarizeValue(value, depth, maxDepth) {
|
|
28
|
+
if (value === null || value === undefined) {
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
if (typeof value !== "object") {
|
|
32
|
+
// Truncate long strings
|
|
33
|
+
if (typeof value === "string" && value.length > 100) {
|
|
34
|
+
return value.slice(0, 97) + "...";
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
if (Array.isArray(value)) {
|
|
39
|
+
if (value.length === 0)
|
|
40
|
+
return [];
|
|
41
|
+
// For deep arrays, just show count
|
|
42
|
+
if (depth >= maxDepth) {
|
|
43
|
+
return `[${value.length} items]`;
|
|
44
|
+
}
|
|
45
|
+
// For large arrays, show sample and count
|
|
46
|
+
if (value.length > 5) {
|
|
47
|
+
const sample = value.slice(0, 2).map((v) => summarizeValue(v, depth + 1, maxDepth));
|
|
48
|
+
return [...sample, `... (${value.length - 2} more items)`];
|
|
49
|
+
}
|
|
50
|
+
return value.map((v) => summarizeValue(v, depth + 1, maxDepth));
|
|
51
|
+
}
|
|
52
|
+
// Object
|
|
53
|
+
const obj = value;
|
|
54
|
+
const keys = Object.keys(obj);
|
|
55
|
+
if (keys.length === 0)
|
|
56
|
+
return {};
|
|
57
|
+
// For deep objects, just show key count
|
|
58
|
+
if (depth >= maxDepth) {
|
|
59
|
+
return `{${keys.length} keys}`;
|
|
60
|
+
}
|
|
61
|
+
// Summarize each key
|
|
62
|
+
const result = {};
|
|
63
|
+
for (const key of keys) {
|
|
64
|
+
result[key] = summarizeValue(obj[key], depth + 1, maxDepth);
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Compress JSON content
|
|
70
|
+
*/
|
|
71
|
+
function compressJSON(content, detail) {
|
|
72
|
+
try {
|
|
73
|
+
const parsed = JSON.parse(content);
|
|
74
|
+
// Determine max depth based on detail level
|
|
75
|
+
const maxDepth = detail === "minimal" ? 1 : detail === "normal" ? 2 : 3;
|
|
76
|
+
const summarized = summarizeValue(parsed, 0, maxDepth);
|
|
77
|
+
const compressed = JSON.stringify(summarized, null, 2);
|
|
78
|
+
return { compressed, technique: "json-summarize" };
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return { compressed: content, technique: "none" };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Compress YAML-like content (simple key: value pairs)
|
|
86
|
+
*/
|
|
87
|
+
function compressYAML(content, detail) {
|
|
88
|
+
const lines = content.split("\n");
|
|
89
|
+
const output = [];
|
|
90
|
+
let currentIndent = 0;
|
|
91
|
+
let skipUntilDedent = false;
|
|
92
|
+
let skipIndent = 0;
|
|
93
|
+
let skippedCount = 0;
|
|
94
|
+
const maxIndent = detail === "minimal" ? 2 : detail === "normal" ? 4 : 6;
|
|
95
|
+
for (const line of lines) {
|
|
96
|
+
// Calculate indent level
|
|
97
|
+
const match = line.match(/^(\s*)/);
|
|
98
|
+
const indent = match ? match[1]?.length ?? 0 : 0;
|
|
99
|
+
// If we were skipping, check if we should stop
|
|
100
|
+
if (skipUntilDedent) {
|
|
101
|
+
if (indent <= skipIndent && line.trim()) {
|
|
102
|
+
// We've dedented, stop skipping
|
|
103
|
+
if (skippedCount > 0) {
|
|
104
|
+
output.push(`${" ".repeat(skipIndent / 2)} ... (${skippedCount} nested items)`);
|
|
105
|
+
}
|
|
106
|
+
skipUntilDedent = false;
|
|
107
|
+
skippedCount = 0;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
skippedCount++;
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Check if this line is too deep
|
|
115
|
+
if (indent > maxIndent && line.trim()) {
|
|
116
|
+
skipUntilDedent = true;
|
|
117
|
+
skipIndent = currentIndent;
|
|
118
|
+
skippedCount = 1;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
output.push(line);
|
|
122
|
+
currentIndent = indent;
|
|
123
|
+
}
|
|
124
|
+
// Handle trailing skipped content
|
|
125
|
+
if (skippedCount > 0) {
|
|
126
|
+
output.push(`${" ".repeat(skipIndent / 2)} ... (${skippedCount} nested items)`);
|
|
127
|
+
}
|
|
128
|
+
return { compressed: output.join("\n"), technique: "yaml-depth-limit" };
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Detect if content is JSON or YAML-like
|
|
132
|
+
*/
|
|
133
|
+
function detectConfigType(content) {
|
|
134
|
+
const trimmed = content.trim();
|
|
135
|
+
// JSON starts with { or [
|
|
136
|
+
if ((trimmed.startsWith("{") || trimmed.startsWith("[")) && isValidJSON(content)) {
|
|
137
|
+
return "json";
|
|
138
|
+
}
|
|
139
|
+
// YAML-like: key: value patterns
|
|
140
|
+
const yamlPattern = /^[\w-]+:\s*(.+)?$/m;
|
|
141
|
+
if (yamlPattern.test(content)) {
|
|
142
|
+
return "yaml";
|
|
143
|
+
}
|
|
144
|
+
return "unknown";
|
|
145
|
+
}
|
|
146
|
+
export const configCompressor = {
|
|
147
|
+
name: "config",
|
|
148
|
+
supportedTypes: ["config"],
|
|
149
|
+
canCompress(content) {
|
|
150
|
+
return detectConfigType(content) !== "unknown";
|
|
151
|
+
},
|
|
152
|
+
compress(content, options) {
|
|
153
|
+
const originalTokens = countTokens(content);
|
|
154
|
+
const originalLines = content.split("\n").length;
|
|
155
|
+
const configType = detectConfigType(content);
|
|
156
|
+
let result;
|
|
157
|
+
switch (configType) {
|
|
158
|
+
case "json":
|
|
159
|
+
result = compressJSON(content, options.detail);
|
|
160
|
+
break;
|
|
161
|
+
case "yaml":
|
|
162
|
+
result = compressYAML(content, options.detail);
|
|
163
|
+
break;
|
|
164
|
+
default:
|
|
165
|
+
result = { compressed: content, technique: "none" };
|
|
166
|
+
}
|
|
167
|
+
const compressedTokens = countTokens(result.compressed);
|
|
168
|
+
const compressedLines = result.compressed.split("\n").length;
|
|
169
|
+
const reductionPercent = originalTokens > 0 ? Math.round((1 - compressedTokens / originalTokens) * 100) : 0;
|
|
170
|
+
return {
|
|
171
|
+
compressed: result.compressed,
|
|
172
|
+
stats: {
|
|
173
|
+
originalLines,
|
|
174
|
+
compressedLines,
|
|
175
|
+
originalTokens,
|
|
176
|
+
compressedTokens,
|
|
177
|
+
reductionPercent,
|
|
178
|
+
technique: result.technique,
|
|
179
|
+
},
|
|
180
|
+
omittedInfo: reductionPercent > 0 ? `Nested structures summarized (${configType} format)` : undefined,
|
|
181
|
+
};
|
|
182
|
+
},
|
|
183
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversation Compressor
|
|
3
|
+
*
|
|
4
|
+
* Compresses conversation history using different strategies
|
|
5
|
+
* to reduce tokens while preserving key information.
|
|
6
|
+
*/
|
|
7
|
+
export interface ConversationMessage {
|
|
8
|
+
role: "user" | "assistant" | "system";
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ConversationCompressOptions {
|
|
12
|
+
strategy: "rolling-summary" | "key-extraction" | "hybrid";
|
|
13
|
+
maxTokens: number;
|
|
14
|
+
preserveSystem?: boolean;
|
|
15
|
+
preserveLastN?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ConversationCompressResult {
|
|
18
|
+
compressedMessages: ConversationMessage[];
|
|
19
|
+
summary?: string;
|
|
20
|
+
keyPoints?: string[];
|
|
21
|
+
originalTokens: number;
|
|
22
|
+
compressedTokens: number;
|
|
23
|
+
savings: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Compress conversation messages
|
|
27
|
+
*/
|
|
28
|
+
export declare function compressConversation(messages: ConversationMessage[], options: ConversationCompressOptions): ConversationCompressResult;
|
|
29
|
+
/**
|
|
30
|
+
* Decision extracted from conversation
|
|
31
|
+
*/
|
|
32
|
+
export interface Decision {
|
|
33
|
+
decision: string;
|
|
34
|
+
context: string;
|
|
35
|
+
timestamp: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Code reference from conversation
|
|
39
|
+
*/
|
|
40
|
+
export interface CodeReference {
|
|
41
|
+
file: string;
|
|
42
|
+
element?: string;
|
|
43
|
+
action: "created" | "modified" | "discussed" | "deleted";
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Conversation memory state
|
|
47
|
+
*/
|
|
48
|
+
export interface ConversationMemory {
|
|
49
|
+
/** Rolling summary of conversation */
|
|
50
|
+
summary: string;
|
|
51
|
+
/** Key decisions made */
|
|
52
|
+
decisions: Decision[];
|
|
53
|
+
/** Code references mentioned */
|
|
54
|
+
codeReferences: CodeReference[];
|
|
55
|
+
/** Compressed message history */
|
|
56
|
+
compressedHistory: ConversationMessage[];
|
|
57
|
+
/** Timestamp of last update */
|
|
58
|
+
lastUpdated: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Options for memory restoration
|
|
62
|
+
*/
|
|
63
|
+
export interface MemoryRestoreOptions {
|
|
64
|
+
/** Include full summary */
|
|
65
|
+
includeSummary?: boolean;
|
|
66
|
+
/** Number of recent messages to include */
|
|
67
|
+
recentMessages?: number;
|
|
68
|
+
/** Include code references */
|
|
69
|
+
includeCodeRefs?: boolean;
|
|
70
|
+
/** Include decisions */
|
|
71
|
+
includeDecisions?: boolean;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Result of conversation memory operation
|
|
75
|
+
*/
|
|
76
|
+
export interface ConversationMemoryResult {
|
|
77
|
+
/** Restored context string */
|
|
78
|
+
context: string;
|
|
79
|
+
/** Memory state */
|
|
80
|
+
memory: ConversationMemory;
|
|
81
|
+
/** Statistics */
|
|
82
|
+
stats: {
|
|
83
|
+
originalTokens: number;
|
|
84
|
+
compressedTokens: number;
|
|
85
|
+
decisionsExtracted: number;
|
|
86
|
+
codeRefsFound: number;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Extract decisions from messages with enhanced patterns
|
|
91
|
+
*/
|
|
92
|
+
export declare function extractDecisions(messages: ConversationMessage[]): Decision[];
|
|
93
|
+
/**
|
|
94
|
+
* Extract code references from messages
|
|
95
|
+
*/
|
|
96
|
+
export declare function extractCodeReferences(messages: ConversationMessage[]): CodeReference[];
|
|
97
|
+
/**
|
|
98
|
+
* Create conversation memory from messages
|
|
99
|
+
*/
|
|
100
|
+
export declare function createMemory(messages: ConversationMessage[], options: ConversationCompressOptions): ConversationMemory;
|
|
101
|
+
/**
|
|
102
|
+
* Restore context from memory state
|
|
103
|
+
*/
|
|
104
|
+
export declare function restoreContext(memory: ConversationMemory, options?: MemoryRestoreOptions): string;
|
|
105
|
+
/**
|
|
106
|
+
* Compress conversation and create memory result
|
|
107
|
+
*/
|
|
108
|
+
export declare function compressConversationWithMemory(messages: ConversationMessage[], options: ConversationCompressOptions): ConversationMemoryResult;
|
|
109
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/compressors/conversation.ts"],"names":[],"mappings":"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"}
|