@vpxa/kb 0.1.13 → 0.1.16
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 +65 -12
- package/package.json +14 -7
- package/packages/analyzers/dist/blast-radius-analyzer.d.ts +17 -21
- package/packages/analyzers/dist/blast-radius-analyzer.js +5 -12
- package/packages/analyzers/dist/dependency-analyzer.d.ts +31 -28
- package/packages/analyzers/dist/dependency-analyzer.js +6 -9
- package/packages/analyzers/dist/diagram-generator.d.ts +12 -9
- package/packages/analyzers/dist/diagram-generator.js +2 -4
- package/packages/analyzers/dist/entry-point-analyzer.d.ts +39 -36
- package/packages/analyzers/dist/entry-point-analyzer.js +4 -6
- package/packages/analyzers/dist/index.d.ts +12 -14
- package/packages/analyzers/dist/index.js +1 -1
- package/packages/analyzers/dist/knowledge-producer.d.ts +34 -26
- package/packages/analyzers/dist/knowledge-producer.js +17 -15
- package/packages/analyzers/dist/pattern-analyzer.d.ts +14 -11
- package/packages/analyzers/dist/pattern-analyzer.js +2 -5
- package/packages/analyzers/dist/regex-call-graph.d.ts +6 -13
- package/packages/analyzers/dist/regex-call-graph.js +1 -1
- package/packages/analyzers/dist/structure-analyzer.d.ts +13 -10
- package/packages/analyzers/dist/structure-analyzer.js +2 -4
- package/packages/analyzers/dist/symbol-analyzer.d.ts +13 -9
- package/packages/analyzers/dist/symbol-analyzer.js +9 -13
- package/packages/analyzers/dist/ts-call-graph.d.ts +16 -14
- package/packages/analyzers/dist/ts-call-graph.js +1 -1
- package/packages/analyzers/dist/types.d.ts +82 -80
- package/packages/analyzers/dist/types.js +1 -0
- package/packages/chunker/dist/call-graph-extractor.d.ts +15 -12
- package/packages/chunker/dist/call-graph-extractor.js +1 -1
- package/packages/chunker/dist/chunker-factory.d.ts +16 -4
- package/packages/chunker/dist/chunker-factory.js +1 -1
- package/packages/chunker/dist/chunker.interface.d.ts +8 -5
- package/packages/chunker/dist/chunker.interface.js +1 -0
- package/packages/chunker/dist/code-chunker.d.ts +16 -13
- package/packages/chunker/dist/code-chunker.js +11 -14
- package/packages/chunker/dist/extractors/call-extractor.d.ts +24 -0
- package/packages/chunker/dist/extractors/call-extractor.js +1 -0
- package/packages/chunker/dist/extractors/entry-point-detector.d.ts +14 -0
- package/packages/chunker/dist/extractors/entry-point-detector.js +1 -0
- package/packages/chunker/dist/extractors/import-extractor.d.ts +14 -0
- package/packages/chunker/dist/extractors/import-extractor.js +1 -0
- package/packages/chunker/dist/extractors/pattern-detector.d.ts +14 -0
- package/packages/chunker/dist/extractors/pattern-detector.js +1 -0
- package/packages/chunker/dist/extractors/scope-resolver.d.ts +26 -0
- package/packages/chunker/dist/extractors/scope-resolver.js +1 -0
- package/packages/chunker/dist/extractors/symbol-extractor.d.ts +14 -0
- package/packages/chunker/dist/extractors/symbol-extractor.js +1 -0
- package/packages/chunker/dist/extractors/types.d.ts +36 -0
- package/packages/chunker/dist/extractors/types.js +1 -0
- package/packages/chunker/dist/generic-chunker.d.ts +14 -11
- package/packages/chunker/dist/generic-chunker.js +5 -5
- package/packages/chunker/dist/index.d.ts +19 -8
- package/packages/chunker/dist/index.js +1 -1
- package/packages/chunker/dist/markdown-chunker.d.ts +16 -13
- package/packages/chunker/dist/markdown-chunker.js +3 -10
- package/packages/chunker/dist/wasm/languages.d.ts +18 -0
- package/packages/chunker/dist/wasm/languages.js +1 -0
- package/packages/chunker/dist/wasm/query-executor.d.ts +70 -0
- package/packages/chunker/dist/wasm/query-executor.js +1 -0
- package/packages/chunker/dist/wasm/runtime.d.ts +44 -0
- package/packages/chunker/dist/wasm/runtime.js +1 -0
- package/packages/chunker/dist/wasm/types.d.ts +84 -0
- package/packages/chunker/dist/wasm/types.js +1 -0
- package/packages/chunker/dist/wasm-chunker.d.ts +23 -0
- package/packages/chunker/dist/wasm-chunker.js +6 -0
- package/packages/chunker/src/queries/go/calls.scm +11 -0
- package/packages/chunker/src/queries/go/entry-points.scm +20 -0
- package/packages/chunker/src/queries/go/imports.scm +6 -0
- package/packages/chunker/src/queries/go/patterns.scm +25 -0
- package/packages/chunker/src/queries/go/symbols.scm +26 -0
- package/packages/chunker/src/queries/java/calls.scm +10 -0
- package/packages/chunker/src/queries/java/entry-points.scm +27 -0
- package/packages/chunker/src/queries/java/imports.scm +11 -0
- package/packages/chunker/src/queries/java/patterns.scm +27 -0
- package/packages/chunker/src/queries/java/symbols.scm +28 -0
- package/packages/chunker/src/queries/javascript/calls.scm +21 -0
- package/packages/chunker/src/queries/javascript/entry-points.scm +31 -0
- package/packages/chunker/src/queries/javascript/imports.scm +32 -0
- package/packages/chunker/src/queries/javascript/patterns.scm +28 -0
- package/packages/chunker/src/queries/javascript/symbols.scm +52 -0
- package/packages/chunker/src/queries/python/calls.scm +11 -0
- package/packages/chunker/src/queries/python/entry-points.scm +21 -0
- package/packages/chunker/src/queries/python/imports.scm +14 -0
- package/packages/chunker/src/queries/python/patterns.scm +25 -0
- package/packages/chunker/src/queries/python/symbols.scm +17 -0
- package/packages/chunker/src/queries/rust/calls.scm +20 -0
- package/packages/chunker/src/queries/rust/entry-points.scm +7 -0
- package/packages/chunker/src/queries/rust/imports.scm +26 -0
- package/packages/chunker/src/queries/rust/patterns.scm +18 -0
- package/packages/chunker/src/queries/rust/symbols.scm +73 -0
- package/packages/chunker/src/queries/typescript/calls.scm +21 -0
- package/packages/chunker/src/queries/typescript/entry-points.scm +48 -0
- package/packages/chunker/src/queries/typescript/imports.scm +35 -0
- package/packages/chunker/src/queries/typescript/patterns.scm +47 -0
- package/packages/chunker/src/queries/typescript/symbols.scm +79 -0
- package/packages/chunker/wasm/tree-sitter-go.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-java.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-javascript.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-python.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-rust.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-typescript.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter.wasm +0 -0
- package/packages/cli/dist/commands/analyze.d.ts +6 -3
- package/packages/cli/dist/commands/analyze.js +2 -3
- package/packages/cli/dist/commands/context-cmds.d.ts +6 -3
- package/packages/cli/dist/commands/context-cmds.js +1 -1
- package/packages/cli/dist/commands/environment.d.ts +6 -3
- package/packages/cli/dist/commands/environment.js +1 -2
- package/packages/cli/dist/commands/execution.d.ts +6 -3
- package/packages/cli/dist/commands/execution.js +1 -1
- package/packages/cli/dist/commands/graph.d.ts +6 -3
- package/packages/cli/dist/commands/graph.js +5 -6
- package/packages/cli/dist/commands/init/adapters.d.ts +28 -0
- package/packages/cli/dist/commands/init/adapters.js +1 -0
- package/packages/cli/dist/commands/init/config.d.ts +10 -0
- package/packages/cli/dist/commands/init/config.js +3 -0
- package/packages/cli/dist/commands/init/constants.d.ts +18 -0
- package/packages/cli/dist/commands/init/constants.js +1 -0
- package/packages/cli/dist/commands/init/curated.d.ts +7 -0
- package/packages/cli/dist/commands/init/curated.js +1 -0
- package/packages/cli/dist/commands/init/global.d.ts +34 -0
- package/packages/cli/dist/commands/init/global.js +5 -0
- package/packages/cli/dist/commands/init/index.d.ts +28 -0
- package/packages/cli/dist/commands/init/index.js +5 -0
- package/packages/cli/dist/commands/init/scaffold.d.ts +23 -0
- package/packages/cli/dist/commands/init/scaffold.js +1 -0
- package/packages/cli/dist/commands/init/templates.d.ts +9 -0
- package/packages/cli/dist/commands/init/templates.js +165 -0
- package/packages/cli/dist/commands/knowledge.d.ts +6 -3
- package/packages/cli/dist/commands/knowledge.js +1 -1
- package/packages/cli/dist/commands/search.d.ts +6 -3
- package/packages/cli/dist/commands/search.js +1 -8
- package/packages/cli/dist/commands/system.d.ts +6 -3
- package/packages/cli/dist/commands/system.js +4 -7
- package/packages/cli/dist/commands/workspace.d.ts +6 -3
- package/packages/cli/dist/commands/workspace.js +1 -2
- package/packages/cli/dist/context.d.ts +7 -5
- package/packages/cli/dist/context.js +1 -1
- package/packages/cli/dist/helpers.d.ts +51 -48
- package/packages/cli/dist/helpers.js +5 -5
- package/packages/cli/dist/index.d.ts +4 -2
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/dist/kb-init.d.ts +48 -51
- package/packages/cli/dist/kb-init.js +1 -1
- package/packages/cli/dist/types.d.ts +8 -6
- package/packages/cli/dist/types.js +1 -0
- package/packages/core/dist/constants.d.ts +58 -34
- package/packages/core/dist/constants.js +1 -1
- package/packages/core/dist/content-detector.d.ts +8 -8
- package/packages/core/dist/content-detector.js +1 -1
- package/packages/core/dist/errors.d.ts +15 -13
- package/packages/core/dist/errors.js +1 -1
- package/packages/core/dist/global-registry.d.ts +62 -0
- package/packages/core/dist/global-registry.js +1 -0
- package/packages/core/dist/index.d.ts +7 -6
- package/packages/core/dist/index.js +1 -1
- package/packages/core/dist/logger.d.ts +19 -8
- package/packages/core/dist/logger.js +1 -1
- package/packages/core/dist/types.d.ts +107 -92
- package/packages/core/dist/types.js +1 -0
- package/packages/embeddings/dist/embedder.interface.d.ts +22 -20
- package/packages/embeddings/dist/embedder.interface.js +1 -0
- package/packages/embeddings/dist/index.d.ts +3 -3
- package/packages/embeddings/dist/index.js +1 -1
- package/packages/embeddings/dist/onnx-embedder.d.ts +21 -23
- package/packages/embeddings/dist/onnx-embedder.js +1 -1
- package/packages/enterprise-bridge/dist/cache.d.ts +28 -0
- package/packages/enterprise-bridge/dist/cache.js +1 -0
- package/packages/enterprise-bridge/dist/er-client.d.ts +37 -0
- package/packages/enterprise-bridge/dist/er-client.js +1 -0
- package/packages/enterprise-bridge/dist/evolution-collector.d.ts +62 -0
- package/packages/enterprise-bridge/dist/evolution-collector.js +1 -0
- package/packages/enterprise-bridge/dist/index.d.ts +8 -0
- package/packages/enterprise-bridge/dist/index.js +1 -0
- package/packages/enterprise-bridge/dist/policy-store.d.ts +45 -0
- package/packages/enterprise-bridge/dist/policy-store.js +1 -0
- package/packages/enterprise-bridge/dist/push-adapter.d.ts +23 -0
- package/packages/enterprise-bridge/dist/push-adapter.js +1 -0
- package/packages/enterprise-bridge/dist/result-merger.d.ts +14 -0
- package/packages/enterprise-bridge/dist/result-merger.js +1 -0
- package/packages/enterprise-bridge/dist/types.d.ts +81 -0
- package/packages/enterprise-bridge/dist/types.js +1 -0
- package/packages/indexer/dist/file-hasher.d.ts +5 -3
- package/packages/indexer/dist/file-hasher.js +1 -1
- package/packages/indexer/dist/filesystem-crawler.d.ts +23 -21
- package/packages/indexer/dist/filesystem-crawler.js +1 -1
- package/packages/indexer/dist/graph-extractor.d.ts +9 -13
- package/packages/indexer/dist/graph-extractor.js +1 -1
- package/packages/indexer/dist/incremental-indexer.d.ts +49 -44
- package/packages/indexer/dist/incremental-indexer.js +1 -1
- package/packages/indexer/dist/index.d.ts +5 -5
- package/packages/indexer/dist/index.js +1 -1
- package/packages/server/dist/api.d.ts +3 -8
- package/packages/server/dist/api.js +1 -1
- package/packages/server/dist/config.d.ts +6 -3
- package/packages/server/dist/config.js +1 -1
- package/packages/server/dist/cross-workspace.d.ts +43 -0
- package/packages/server/dist/cross-workspace.js +1 -0
- package/packages/server/dist/curated-manager.d.ts +80 -78
- package/packages/server/dist/curated-manager.js +5 -10
- package/packages/server/dist/index.d.ts +1 -2
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/replay-interceptor.d.ts +6 -7
- package/packages/server/dist/replay-interceptor.js +1 -1
- package/packages/server/dist/resources/resources.d.ts +7 -4
- package/packages/server/dist/resources/resources.js +2 -2
- package/packages/server/dist/server.d.ts +37 -25
- package/packages/server/dist/server.js +1 -1
- package/packages/server/dist/tools/analyze.tools.d.ts +14 -11
- package/packages/server/dist/tools/analyze.tools.js +1 -3
- package/packages/server/dist/tools/audit.tool.d.ts +8 -5
- package/packages/server/dist/tools/audit.tool.js +1 -4
- package/packages/server/dist/tools/bridge.tools.d.ts +34 -0
- package/packages/server/dist/tools/bridge.tools.js +15 -0
- package/packages/server/dist/tools/evolution.tools.d.ts +7 -0
- package/packages/server/dist/tools/evolution.tools.js +5 -0
- package/packages/server/dist/tools/forge.tools.d.ts +13 -12
- package/packages/server/dist/tools/forge.tools.js +10 -13
- package/packages/server/dist/tools/forget.tool.d.ts +7 -4
- package/packages/server/dist/tools/forget.tool.js +1 -7
- package/packages/server/dist/tools/graph.tool.d.ts +7 -4
- package/packages/server/dist/tools/graph.tool.js +4 -5
- package/packages/server/dist/tools/list.tool.d.ts +7 -4
- package/packages/server/dist/tools/list.tool.js +2 -8
- package/packages/server/dist/tools/lookup.tool.d.ts +7 -4
- package/packages/server/dist/tools/lookup.tool.js +2 -9
- package/packages/server/dist/tools/onboard.tool.d.ts +8 -5
- package/packages/server/dist/tools/onboard.tool.js +2 -2
- package/packages/server/dist/tools/policy.tools.d.ts +7 -0
- package/packages/server/dist/tools/policy.tools.js +2 -0
- package/packages/server/dist/tools/produce.tool.d.ts +6 -3
- package/packages/server/dist/tools/produce.tool.js +2 -2
- package/packages/server/dist/tools/read.tool.d.ts +7 -4
- package/packages/server/dist/tools/read.tool.js +2 -6
- package/packages/server/dist/tools/reindex.tool.d.ts +10 -7
- package/packages/server/dist/tools/reindex.tool.js +3 -2
- package/packages/server/dist/tools/remember.tool.d.ts +8 -4
- package/packages/server/dist/tools/remember.tool.js +3 -5
- package/packages/server/dist/tools/replay.tool.d.ts +6 -3
- package/packages/server/dist/tools/replay.tool.js +2 -6
- package/packages/server/dist/tools/search.tool.d.ts +10 -5
- package/packages/server/dist/tools/search.tool.js +6 -22
- package/packages/server/dist/tools/status.tool.d.ts +12 -4
- package/packages/server/dist/tools/status.tool.js +2 -3
- package/packages/server/dist/tools/toolkit.tools.d.ts +36 -35
- package/packages/server/dist/tools/toolkit.tools.js +20 -24
- package/packages/server/dist/tools/update.tool.d.ts +7 -4
- package/packages/server/dist/tools/update.tool.js +1 -6
- package/packages/server/dist/tools/utility.tools.d.ts +15 -15
- package/packages/server/dist/tools/utility.tools.js +10 -23
- package/packages/server/dist/version-check.d.ts +5 -2
- package/packages/server/dist/version-check.js +1 -1
- package/packages/store/dist/graph-store.interface.d.ts +89 -87
- package/packages/store/dist/graph-store.interface.js +1 -0
- package/packages/store/dist/index.d.ts +6 -6
- package/packages/store/dist/index.js +1 -1
- package/packages/store/dist/lance-store.d.ts +37 -31
- package/packages/store/dist/lance-store.js +1 -1
- package/packages/store/dist/sqlite-graph-store.d.ts +43 -47
- package/packages/store/dist/sqlite-graph-store.js +13 -13
- package/packages/store/dist/store-factory.d.ts +11 -8
- package/packages/store/dist/store-factory.js +1 -1
- package/packages/store/dist/store.interface.d.ts +47 -47
- package/packages/store/dist/store.interface.js +1 -0
- package/packages/tools/dist/audit.d.ts +61 -62
- package/packages/tools/dist/audit.js +4 -5
- package/packages/tools/dist/batch.d.ts +20 -18
- package/packages/tools/dist/batch.js +1 -1
- package/packages/tools/dist/changelog.d.ts +29 -27
- package/packages/tools/dist/changelog.js +2 -2
- package/packages/tools/dist/check.d.ts +42 -39
- package/packages/tools/dist/check.js +2 -2
- package/packages/tools/dist/checkpoint.d.ts +17 -15
- package/packages/tools/dist/checkpoint.js +1 -2
- package/packages/tools/dist/codemod.d.ts +35 -33
- package/packages/tools/dist/codemod.js +2 -2
- package/packages/tools/dist/compact.d.ts +34 -38
- package/packages/tools/dist/compact.js +2 -2
- package/packages/tools/dist/data-transform.d.ts +10 -8
- package/packages/tools/dist/data-transform.js +1 -1
- package/packages/tools/dist/dead-symbols.d.ts +29 -26
- package/packages/tools/dist/dead-symbols.js +2 -2
- package/packages/tools/dist/delegate.d.ts +26 -24
- package/packages/tools/dist/delegate.js +1 -5
- package/packages/tools/dist/diff-parse.d.ts +24 -22
- package/packages/tools/dist/diff-parse.js +3 -3
- package/packages/tools/dist/digest.d.ts +43 -46
- package/packages/tools/dist/digest.js +4 -5
- package/packages/tools/dist/dogfood-log.d.ts +49 -0
- package/packages/tools/dist/dogfood-log.js +2 -0
- package/packages/tools/dist/encode.d.ts +11 -9
- package/packages/tools/dist/encode.js +1 -1
- package/packages/tools/dist/env-info.d.ts +25 -23
- package/packages/tools/dist/env-info.js +1 -1
- package/packages/tools/dist/eval.d.ts +13 -11
- package/packages/tools/dist/eval.js +2 -3
- package/packages/tools/dist/evidence-map.d.ts +64 -62
- package/packages/tools/dist/evidence-map.js +2 -3
- package/packages/tools/dist/file-cache.d.ts +41 -0
- package/packages/tools/dist/file-cache.js +3 -0
- package/packages/tools/dist/file-summary.d.ts +50 -30
- package/packages/tools/dist/file-summary.js +2 -2
- package/packages/tools/dist/file-walk.d.ts +6 -4
- package/packages/tools/dist/file-walk.js +1 -1
- package/packages/tools/dist/find-examples.d.ts +26 -22
- package/packages/tools/dist/find-examples.js +3 -3
- package/packages/tools/dist/find.d.ts +39 -41
- package/packages/tools/dist/find.js +1 -1
- package/packages/tools/dist/forge-classify.d.ts +35 -39
- package/packages/tools/dist/forge-classify.js +2 -2
- package/packages/tools/dist/forge-ground.d.ts +58 -61
- package/packages/tools/dist/forge-ground.js +1 -1
- package/packages/tools/dist/git-context.d.ts +22 -20
- package/packages/tools/dist/git-context.js +3 -3
- package/packages/tools/dist/graph-query.d.ts +75 -79
- package/packages/tools/dist/graph-query.js +1 -1
- package/packages/tools/dist/guide.d.ts +14 -12
- package/packages/tools/dist/guide.js +1 -1
- package/packages/tools/dist/health.d.ts +13 -11
- package/packages/tools/dist/health.js +2 -2
- package/packages/tools/dist/http-request.d.ts +20 -18
- package/packages/tools/dist/http-request.js +1 -1
- package/packages/tools/dist/index.d.ts +55 -53
- package/packages/tools/dist/index.js +1 -1
- package/packages/tools/dist/lane.d.ts +28 -26
- package/packages/tools/dist/lane.js +6 -7
- package/packages/tools/dist/measure.d.ts +34 -30
- package/packages/tools/dist/measure.js +2 -2
- package/packages/tools/dist/onboard.d.ts +29 -27
- package/packages/tools/dist/onboard.js +17 -41
- package/packages/tools/dist/parse-output.d.ts +48 -46
- package/packages/tools/dist/parse-output.js +2 -2
- package/packages/tools/dist/path-resolver.d.ts +4 -2
- package/packages/tools/dist/path-resolver.js +1 -1
- package/packages/tools/dist/process-manager.d.ts +18 -16
- package/packages/tools/dist/process-manager.js +1 -1
- package/packages/tools/dist/queue.d.ts +28 -26
- package/packages/tools/dist/queue.js +1 -2
- package/packages/tools/dist/regex-test.d.ts +26 -24
- package/packages/tools/dist/regex-test.js +1 -1
- package/packages/tools/dist/rename.d.ts +28 -26
- package/packages/tools/dist/rename.js +2 -2
- package/packages/tools/dist/replay.d.ts +33 -31
- package/packages/tools/dist/replay.js +4 -6
- package/packages/tools/dist/response-envelope.d.ts +32 -30
- package/packages/tools/dist/response-envelope.js +1 -1
- package/packages/tools/dist/schema-validate.d.ts +15 -13
- package/packages/tools/dist/schema-validate.js +1 -1
- package/packages/tools/dist/scope-map.d.ts +45 -48
- package/packages/tools/dist/scope-map.js +1 -1
- package/packages/tools/dist/snippet.d.ts +26 -25
- package/packages/tools/dist/snippet.js +1 -1
- package/packages/tools/dist/stash.d.ts +13 -11
- package/packages/tools/dist/stash.js +1 -2
- package/packages/tools/dist/stratum-card.d.ts +27 -28
- package/packages/tools/dist/stratum-card.js +3 -5
- package/packages/tools/dist/symbol.d.ts +31 -26
- package/packages/tools/dist/symbol.js +3 -3
- package/packages/tools/dist/test-run.d.ts +19 -16
- package/packages/tools/dist/test-run.js +2 -2
- package/packages/tools/dist/text-utils.d.ts +6 -4
- package/packages/tools/dist/text-utils.js +2 -2
- package/packages/tools/dist/time-utils.d.ts +15 -13
- package/packages/tools/dist/time-utils.js +1 -1
- package/packages/tools/dist/trace.d.ts +26 -21
- package/packages/tools/dist/trace.js +2 -2
- package/packages/tools/dist/truncation.d.ts +6 -4
- package/packages/tools/dist/truncation.js +6 -13
- package/packages/tools/dist/watch.d.ts +28 -26
- package/packages/tools/dist/watch.js +1 -1
- package/packages/tools/dist/web-fetch.d.ts +35 -33
- package/packages/tools/dist/web-fetch.js +6 -12
- package/packages/tools/dist/web-search.d.ts +16 -14
- package/packages/tools/dist/web-search.js +1 -1
- package/packages/tools/dist/workset.d.ts +19 -17
- package/packages/tools/dist/workset.js +1 -2
- package/packages/tui/dist/App-CYLNJLr6.js +2 -0
- package/packages/tui/dist/App.d.ts +11 -6
- package/packages/tui/dist/App.js +1 -450
- package/packages/tui/dist/CuratedPanel-sYdZAICX.js +2 -0
- package/packages/tui/dist/LogPanel-DtMnoyXT.js +3 -0
- package/packages/tui/dist/SearchPanel-DREo6zgt.js +2 -0
- package/packages/tui/dist/StatusPanel-2ex8fLOO.js +2 -0
- package/packages/tui/dist/chunk-D6axbAb-.js +2 -0
- package/packages/tui/dist/devtools-DUyj952l.js +7 -0
- package/packages/tui/dist/embedder.interface-D4ew0HPW.d.ts +28 -0
- package/packages/tui/dist/index-B9VpfVPP.d.ts +13 -0
- package/packages/tui/dist/index.d.ts +3 -19
- package/packages/tui/dist/index.js +1 -476
- package/packages/tui/dist/jsx-runtime-Cof-kwFn.js +316 -0
- package/packages/tui/dist/panels/CuratedPanel.d.ts +11 -6
- package/packages/tui/dist/panels/CuratedPanel.js +1 -371
- package/packages/tui/dist/panels/LogPanel.d.ts +7 -3
- package/packages/tui/dist/panels/LogPanel.js +1 -449
- package/packages/tui/dist/panels/SearchPanel.d.ts +14 -8
- package/packages/tui/dist/panels/SearchPanel.js +1 -372
- package/packages/tui/dist/panels/StatusPanel.d.ts +11 -6
- package/packages/tui/dist/panels/StatusPanel.js +1 -371
- package/packages/tui/dist/store.interface-CnY6SPOH.d.ts +150 -0
- package/scaffold/adapters/claude-code.mjs +20 -0
- package/scaffold/adapters/copilot.mjs +320 -0
- package/scaffold/copilot/agents/Architect-Reviewer-Alpha.agent.md +21 -0
- package/scaffold/copilot/agents/Architect-Reviewer-Beta.agent.md +21 -0
- package/scaffold/copilot/agents/Documenter.agent.md +42 -0
- package/scaffold/copilot/agents/Orchestrator.agent.md +104 -0
- package/scaffold/copilot/agents/Planner.agent.md +54 -0
- package/scaffold/copilot/agents/Refactor.agent.md +36 -0
- package/scaffold/copilot/agents/Researcher-Alpha.agent.md +20 -0
- package/scaffold/copilot/agents/Researcher-Beta.agent.md +20 -0
- package/scaffold/copilot/agents/Researcher-Delta.agent.md +20 -0
- package/scaffold/copilot/agents/Researcher-Gamma.agent.md +20 -0
- package/scaffold/definitions/agents.mjs +165 -0
- package/scaffold/definitions/bodies.mjs +292 -0
- package/scaffold/definitions/hooks.mjs +43 -0
- package/scaffold/definitions/models.mjs +56 -0
- package/scaffold/definitions/plugins.mjs +24 -0
- package/scaffold/definitions/prompts.mjs +145 -0
- package/scaffold/definitions/protocols.mjs +322 -0
- package/scaffold/definitions/tools.mjs +176 -0
- package/scaffold/general/agents/Architect-Reviewer-Alpha.agent.md +21 -0
- package/scaffold/general/agents/Architect-Reviewer-Beta.agent.md +21 -0
- package/scaffold/general/agents/Code-Reviewer-Alpha.agent.md +12 -0
- package/scaffold/general/agents/Code-Reviewer-Beta.agent.md +12 -0
- package/scaffold/general/agents/Debugger.agent.md +31 -0
- package/scaffold/general/agents/Documenter.agent.md +42 -0
- package/scaffold/general/agents/Explorer.agent.md +50 -0
- package/scaffold/general/agents/Frontend.agent.md +29 -0
- package/scaffold/general/agents/Implementer.agent.md +31 -0
- package/scaffold/general/agents/Orchestrator.agent.md +104 -0
- package/scaffold/general/agents/Planner.agent.md +55 -0
- package/scaffold/general/agents/README.md +57 -0
- package/scaffold/general/agents/Refactor.agent.md +36 -0
- package/scaffold/general/agents/Researcher-Alpha.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Beta.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Delta.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Gamma.agent.md +20 -0
- package/scaffold/general/agents/Security.agent.md +42 -0
- package/scaffold/general/agents/_shared/adr-protocol.md +91 -0
- package/scaffold/general/agents/_shared/architect-reviewer-base.md +50 -0
- package/scaffold/general/agents/_shared/code-agent-base.md +88 -0
- package/scaffold/general/agents/_shared/code-reviewer-base.md +54 -0
- package/scaffold/general/agents/_shared/decision-protocol.md +27 -0
- package/scaffold/general/agents/_shared/forge-protocol.md +46 -0
- package/scaffold/general/agents/_shared/researcher-base.md +61 -0
- package/scaffold/general/agents/templates/adr-template.md +27 -0
- package/scaffold/general/agents/templates/execution-state.md +25 -0
- package/scaffold/general/prompts/ask.prompt.md +20 -0
- package/scaffold/general/prompts/debug.prompt.md +25 -0
- package/scaffold/general/prompts/design.prompt.md +22 -0
- package/scaffold/general/prompts/implement.prompt.md +26 -0
- package/scaffold/general/prompts/plan.prompt.md +24 -0
- package/scaffold/general/prompts/review.prompt.md +31 -0
- package/scaffold/generate.mjs +74 -0
- package/skills/adr-skill/SKILL.md +329 -0
- package/skills/adr-skill/assets/templates/adr-madr.md +89 -0
- package/skills/adr-skill/assets/templates/adr-readme.md +20 -0
- package/skills/adr-skill/assets/templates/adr-simple.md +46 -0
- package/skills/adr-skill/references/adr-conventions.md +95 -0
- package/skills/adr-skill/references/examples.md +193 -0
- package/skills/adr-skill/references/review-checklist.md +77 -0
- package/skills/adr-skill/references/template-variants.md +52 -0
- package/skills/adr-skill/scripts/bootstrap_adr.js +259 -0
- package/skills/adr-skill/scripts/new_adr.js +391 -0
- package/skills/adr-skill/scripts/set_adr_status.js +169 -0
- package/skills/brainstorming/SKILL.md +259 -0
- package/skills/brainstorming/scripts/frame-template.html +365 -0
- package/skills/brainstorming/scripts/helper.js +216 -0
- package/skills/brainstorming/scripts/server.cjs +9 -0
- package/skills/brainstorming/scripts/server.src.cjs +249 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +430 -0
- package/skills/c4-architecture/SKILL.md +295 -0
- package/skills/c4-architecture/references/advanced-patterns.md +552 -0
- package/skills/c4-architecture/references/c4-syntax.md +492 -0
- package/skills/c4-architecture/references/common-mistakes.md +437 -0
- package/skills/knowledge-base/SKILL.md +100 -10
- package/skills/lesson-learned/SKILL.md +105 -0
- package/skills/lesson-learned/references/anti-patterns.md +55 -0
- package/skills/lesson-learned/references/se-principles.md +109 -0
- package/skills/requirements-clarity/SKILL.md +324 -0
- package/skills/session-handoff/SKILL.md +189 -0
- package/skills/session-handoff/references/handoff-template.md +139 -0
- package/skills/session-handoff/references/resume-checklist.md +80 -0
- package/skills/session-handoff/scripts/check_staleness.js +269 -0
- package/skills/session-handoff/scripts/create_handoff.js +299 -0
- package/skills/session-handoff/scripts/list_handoffs.js +113 -0
- package/skills/session-handoff/scripts/validate_handoff.js +241 -0
- package/packages/chunker/dist/treesitter-chunker.d.ts +0 -47
- package/packages/chunker/dist/treesitter-chunker.js +0 -8
- package/packages/cli/dist/commands/init.d.ts +0 -10
- package/packages/cli/dist/commands/init.js +0 -308
|
@@ -1,38 +1,42 @@
|
|
|
1
|
+
//#region packages/tools/src/measure.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* kb_measure — Code complexity and size metrics.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
interface MeasureOptions {
|
|
6
|
+
path: string;
|
|
7
|
+
extensions?: string[];
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
interface FileMetrics {
|
|
10
|
+
path: string;
|
|
11
|
+
lines: {
|
|
12
|
+
total: number;
|
|
13
|
+
code: number;
|
|
14
|
+
blank: number;
|
|
15
|
+
comment: number;
|
|
16
|
+
};
|
|
17
|
+
complexity: number;
|
|
18
|
+
/** AST-based cognitive complexity that weights nested branches higher (available when WASM is active) */
|
|
19
|
+
cognitiveComplexity?: number;
|
|
20
|
+
functions: number;
|
|
21
|
+
imports: number;
|
|
22
|
+
exports: number;
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
totalFunctions: number;
|
|
24
|
+
interface MeasureResult {
|
|
25
|
+
files: FileMetrics[];
|
|
26
|
+
summary: {
|
|
27
|
+
totalFiles: number;
|
|
28
|
+
totalLines: number;
|
|
29
|
+
totalCodeLines: number;
|
|
30
|
+
avgComplexity: number;
|
|
31
|
+
maxComplexity: {
|
|
32
|
+
file: string;
|
|
33
|
+
value: number;
|
|
33
34
|
};
|
|
35
|
+
totalFunctions: number;
|
|
36
|
+
};
|
|
34
37
|
}
|
|
35
|
-
|
|
38
|
+
declare function measure(options: MeasureOptions): Promise<MeasureResult>;
|
|
36
39
|
/** Exported for unit testing */
|
|
37
|
-
|
|
38
|
-
//#
|
|
40
|
+
declare function analyzeFile(path: string, content: string): FileMetrics;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { FileMetrics, MeasureOptions, MeasureResult, analyzeFile, measure };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)
|
|
1
|
+
import{extname as e,join as t,relative as n}from"node:path";import{SUPPORTED_EXTENSIONS as r,WasmRuntime as i}from"../../chunker/dist/index.js";import{readFileSync as a,readdirSync as o,statSync as s}from"node:fs";const c=new Set([`node_modules`,`.git`,`dist`,`build`,`coverage`,`.turbo`,`cdk.out`,`.cache`]),l=[/\bif\s*\(/g,/\belse\s+if\b/g,/\bfor\s*\(/g,/\bwhile\s*\(/g,/\bcase\s+/g,/\bcatch\s*\(/g,/&&/g,/\|\|/g,/\?\?/g];async function u(t){let{path:r,extensions:i=[`.ts`,`.tsx`,`.js`,`.jsx`]}=t,o=h(r,i),s=[];for(let t of o){let r=a(t,`utf8`),i=d(n(process.cwd(),t),r),o=await m(r,e(t));o!==void 0&&(i.cognitiveComplexity=o),s.push(i)}s.sort((e,t)=>t.complexity-e.complexity);let c=s.reduce((e,t)=>e+t.lines.total,0),l=s.reduce((e,t)=>e+t.lines.code,0),u=s.reduce((e,t)=>e+t.complexity,0),f=s.reduce((e,t)=>e+t.functions,0),p=s[0]??{path:``,complexity:0};return{files:s,summary:{totalFiles:s.length,totalLines:c,totalCodeLines:l,avgComplexity:s.length>0?Math.round(u/s.length*10)/10:0,maxComplexity:{file:p.path,value:p.complexity},totalFunctions:f}}}function d(e,t){let n=t.split(`
|
|
2
|
+
`),r=0,i=0,a=!1;for(let e of n){let t=e.trim();if(t===``){r++;continue}if(a){i++,t.includes(`*/`)&&(a=!1);continue}if(t.startsWith(`//`)){i++;continue}t.startsWith(`/*`)&&(i++,a=!t.includes(`*/`))}let o=1;for(let e of l){let n=t.match(e);n&&(o+=n.length)}let s=(t.match(/\bfunction\b/g)?.length??0)+(t.match(/=>\s*[{(]/g)?.length??0),c=t.match(/^\s*import\s/gm)?.length??0,u=t.match(/^\s*export\s/gm)?.length??0;return{path:e,lines:{total:n.length,code:n.length-r-i,blank:r,comment:i},complexity:o,functions:s,imports:c,exports:u}}const f=new Set(`if_statement.for_statement.for_in_statement.while_statement.do_statement.switch_case.catch_clause.ternary_expression.if_statement.for_statement.while_statement.except_clause.list_comprehension.if_statement.for_statement.enhanced_for_statement.while_statement.catch_clause.ternary_expression.if_statement.for_statement.select_statement.if_expression.for_expression.while_expression.match_arm`.split(`.`)),p=new Set([`if_statement`,`if_expression`,`for_statement`,`for_in_statement`,`enhanced_for_statement`,`for_expression`,`while_statement`,`while_expression`,`do_statement`,`switch_statement`,`match_expression`,`try_statement`,`catch_clause`,`except_clause`,`lambda`,`lambda_expression`,`arrow_function`]);async function m(e,t){let n=i.get();if(!(!n||!r.has(t)))try{let r=await n.parse(e,t);if(!r)return;let i=0;function a(e,t){let n=f.has(e.type),r=p.has(e.type);n&&(i+=1+t);let o=r?t+1:t;for(let t=0;t<e.childCount;t++){let n=e.child(t);n&&a(n,o)}}return a(r.rootNode,0),i}catch{return}}function h(n,r){try{if(s(n).isFile())return[n]}catch{throw Error(`Path not found: ${n}`)}let i=[];function a(n){for(let l of o(n)){if(c.has(l))continue;let o=t(n,l);s(o).isDirectory()?a(o):r.includes(e(l).toLowerCase())&&i.push(o)}}return a(n),i.sort(),i}export{d as analyzeFile,u as measure};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region packages/tools/src/onboard.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* kb_onboard — First-time codebase onboarding in a single command.
|
|
3
4
|
*
|
|
@@ -6,36 +7,37 @@
|
|
|
6
7
|
*
|
|
7
8
|
* Analyses: structure, dependencies, entry-points, symbols, patterns, diagram.
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
type OnboardMode = 'memory' | 'generate';
|
|
11
|
+
interface OnboardOptions {
|
|
12
|
+
/** Root path to analyze */
|
|
13
|
+
path: string;
|
|
14
|
+
/** Output mode: 'memory' (KB only) or 'generate' (write to .ai/kb/) */
|
|
15
|
+
mode?: OnboardMode;
|
|
16
|
+
/** Output directory for generate mode (default: '<path>/.ai/kb') */
|
|
17
|
+
outDir?: string;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
interface OnboardStepResult {
|
|
20
|
+
name: string;
|
|
21
|
+
status: 'success' | 'failed';
|
|
22
|
+
output: string;
|
|
23
|
+
durationMs: number;
|
|
24
|
+
error?: string;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
interface OnboardResult {
|
|
27
|
+
/** Root path that was analyzed */
|
|
28
|
+
path: string;
|
|
29
|
+
/** Mode used */
|
|
30
|
+
mode: OnboardMode;
|
|
31
|
+
/** Results for each analysis step */
|
|
32
|
+
steps: OnboardStepResult[];
|
|
33
|
+
/** Output directory (only set in generate mode) */
|
|
34
|
+
outDir?: string;
|
|
35
|
+
/** Total duration in ms */
|
|
36
|
+
totalDurationMs: number;
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* Run all onboarding analyses in parallel and return combined results.
|
|
39
40
|
*/
|
|
40
|
-
|
|
41
|
-
//#
|
|
41
|
+
declare function onboard(options: OnboardOptions): Promise<OnboardResult>;
|
|
42
|
+
//#endregion
|
|
43
|
+
export { OnboardMode, OnboardOptions, OnboardResult, OnboardStepResult, onboard };
|
|
@@ -1,45 +1,21 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`);
|
|
3
|
-
`)}const
|
|
4
|
-
`];if(!p
|
|
5
|
-
`);
|
|
6
|
-
`),i.
|
|
7
|
-
`);for(const[f,x]of P){x.sort(),i.push(`### ${f}/
|
|
8
|
-
`);for(const v of x){const j=b.get(v),D=C.get(v),m=l.get(v),S=r.get(v),e=M.get(v),o=v.startsWith(`${f}/`)?v.slice(f.length+1):v;if(i.push(`**${o}**`),D&&i.push(` \u26A1 Entry: \`${D.name}\`${D.trigger?` (${D.trigger})`:""}`),j&&j.length>0){const s=j.slice(0,8).map(h=>`${h.name}`).join(", "),c=j.length>8?` (+${j.length-8})`:"";i.push(` \u{1F4E4} ${s}${c}`)}if(m&&m.size>0){const s=[...m.entries()].sort((c,h)=>h[1].length-c[1].length);for(const[c,h]of s.slice(0,4)){const A=c.startsWith(`${f}/`)?c.slice(f.length+1):c;i.push(` \u2192 ${A}: ${h.slice(0,5).join(", ")}${h.length>5?"\u2026":""}`)}s.length>4&&i.push(` \u2192 +${s.length-4} more targets`)}if(S&&S.length>0){for(const s of S.slice(0,4)){const c=s.file.startsWith(`${f}/`)?s.file.slice(f.length+1):s.file;i.push(` \u2190 ${c}: ${s.symbols.slice(0,4).join(", ")}${s.symbols.length>4?"\u2026":""}`)}S.length>4&&i.push(` \u2190 +${S.length-4} more callers`)}else if(!t&&e&&e.size>0){const s=[...e].filter(c=>!R(c));s.length<=3?i.push(` \u27A1 Used by: ${s.join(", ")}`):i.push(` \u27A1 Used by: ${s.slice(0,3).join(", ")} (+${s.length-3} more)`)}i.push("")}}return i.join(`
|
|
9
|
-
`)}function z(g){const u=g.split("/");if(u.length>=2&&["packages","services","providers","apps","libs"].includes(u[0]))return`${u[0]}/${u[1]}`;const t=u.indexOf("java"),p=u.indexOf("kotlin"),n=t>=0?t:p;if(n>=0&&n+2<u.length){const a=u.slice(n+1);return["com","org","net","io","dev"].includes(a[0])&&a.length>=3?a.slice(0,3).join("/"):a.slice(0,2).join("/")}return u[0]==="src"&&u.length>=3?`${u[0]}/${u[1]}`:u[0]}function le(g,u,t){const p=u.get("symbols"),n=u.get("entry-points"),a=u.get("dependencies"),i=new Map;for(const[e,o]of g)if(!R(e))for(const[s,c]of o){if(R(s))continue;const h=z(e),A=z(s);if(h===A)continue;const E=`${h}|${A}`;i.set(E,(i.get(E)??0)+c.length)}if(i.size===0)return`## Architecture Diagram
|
|
1
|
+
import{DependencyAnalyzer as e,DiagramGenerator as t,EntryPointAnalyzer as n,PatternAnalyzer as r,StructureAnalyzer as i,SymbolAnalyzer as a,extractRegexCallGraph as o,extractTsCallGraph as s}from"../../analyzers/dist/index.js";import{readFile as c,readdir as l}from"node:fs/promises";import{basename as u,join as d,relative as f,resolve as p}from"node:path";import{existsSync as m,mkdirSync as h,readdirSync as g,rmSync as _,writeFileSync as v}from"node:fs";import{KB_PATHS as y}from"../../core/dist/index.js";const b={structure:`Project Structure`,dependencies:`Dependencies`,"entry-points":`Entry Points`,symbols:`Symbols`,patterns:`Patterns`,diagram:`C4 Container Diagram`,"code-map":`Code Map (Module Graph)`,"config-values":`Configuration Values`,"synthesis-guide":`Synthesis Guide`};function x(e,t,n,r){let i=[`Analysis baselines for **${n}** have been generated.`];t===`generate`?i.push("Individual results are in the sibling `.md` and `.json` files in this directory.",``):i.push(`Results are stored in the KB vector store.`,``);let a=r.get(`symbols`),o=r.get(`dependencies`),s=r.get(`patterns`),c=r.get(`entry-points`),l=a?.totalCount??0,u=a?.exportedCount??0,d=o?.totalImports??0,f=c?.total??0,p=(s?.patterns??[]).map(e=>e.pattern),m=p.some(e=>e.startsWith(`Spring`)),h=p.includes(`AWS CDK`)||p.includes(`CDK IaC`),g=p.includes(`Maven`),_=p.includes(`Serverless`)||f>3,v=o?.external?Object.keys(o.external):[],y=v.some(e=>[`express`,`fastify`,`next`,`react`,`vitest`,`jest`].includes(e))||d>0,x=v.some(e=>[`turbo`,`lerna`,`nx`].includes(e))||p.includes(`Monorepo`);if(i.push(`### Project Profile`,``),i.push(`- **${l} symbols** (${u} exported), **${d} imports**, **${f} entry ${f===1?`point`:`points`}**`),p.length>0&&i.push(`- **Detected**: ${p.slice(0,8).join(`, `)}`),i.push(``),l===0&&d===0&&f===0)return i.push(`> **Note:** This project appears to be empty or contains no analyzable source code.`,`> Run onboard again after adding source files.`),i.join(`
|
|
2
|
+
`);let S=e.filter(e=>e.status===`success`),C=e.filter(e=>e.status===`failed`);i.push(`### Completed Analyses`,``);for(let e of S){let n=b[e.name]??e.name,r=e.output.length>1e3?`${Math.round(e.output.length/1024)}KB`:`${e.output.length}B`;t===`generate`?i.push(`- ✓ [${n}](./${e.name}.md) (${r})`):i.push(`- ✓ ${n} (${r})`)}if(C.length>0){i.push(``,`### Failed Analyses`,``);for(let e of C)i.push(`- ✗ ${e.name}: ${e.error}`)}i.push(``,`### Recommended Reading Order`,``,"1. **Start with** `synthesis-guide.md` (this file) → `entry-points.md` → `patterns.md`","2. **Module graph** via `code-map.md` — cross-package call edges with function names","3. **Architecture** via `diagram.md` (C4 Container) → `dependencies.md`","4. **Browse structure** via `structure.md` for file layout","5. **API surface** via `symbols.md` — file paths + exported symbols (capped at 80KB)","6. **Reference**: `config-values.md` (config reference)",``,`> **Size guidance:** Total output is ~`);let w=S.reduce((e,t)=>e+t.output.length,0)/1024;return i[i.length-1]+=`${Math.round(w)}KB. Focus on code-map.md + entry-points.md + diagram.md (~${Math.round((S.find(e=>e.name===`code-map`)?.output.length??0)/1024+(S.find(e=>e.name===`entry-points`)?.output.length??0)/1024+(S.find(e=>e.name===`diagram`)?.output.length??0)/1024)}KB) for maximum signal-to-token ratio.`,i.push(``,`### Synthesize Knowledge`,``,"Produce the following `kb_remember` entries:",``),i.push("1. **Architecture Summary** (category: `architecture`)"),x?(i.push(` - Package boundaries, dependency graph between packages`),i.push(` - Shared vs service-specific code`)):_?(i.push(` - Lambda functions, triggers, event flow`),i.push(` - Infrastructure patterns (queues, tables, APIs)`)):m?(i.push(` - Controller → Service → Repository layers`),i.push(` - Spring configuration and profiles`)):(i.push(` - Layer structure, dependency flow`),i.push(` - Key design decisions`)),i.push(``),i.push("2. **Domain Model** (category: `architecture`)"),i.push(` - Key entities/types and their relationships`),i.push(` - Data flow from entry points through processing`),i.push(``),i.push("3. **Conventions** (category: `conventions`)"),i.push(` - Naming patterns, file organization, testing approach`),h&&i.push(` - CDK construct patterns and stack organization`),y&&i.push(` - Build tooling, package manager, module system`),g&&i.push(` - Maven module structure, dependency management`),i.push(``,`### Using KB Tools`,``,`This project has a KB MCP server with tools for search, analysis, memory, and more.`,"`kb init` has already created `.github/copilot-instructions.md` and `AGENTS.md` with the complete tool reference.","If not, run `npx @vpxa/kb init` to generate them.",``,`**Workflow pattern — use on every task:**`,``,"```",`kb_search({ query: "your task keywords" }) # Recall prior decisions`,`kb_scope_map({ task: "what you are doing" }) # Get a reading plan`,`# ... do the work ...`,`kb_check({}) # Typecheck + lint`,`kb_test_run({}) # Run tests`,`kb_remember({ title: "What I learned", category: "decisions" }) # Persist`,"```"),i.join(`
|
|
3
|
+
`)}const S=new Set([`test`,`tests`,`__tests__`,`spec`,`specs`,`__mocks__`,`__fixtures__`,`fixtures`,`test-utils`]);function C(e){return e.replace(/\\/g,`/`).split(`/`).some(e=>S.has(e))||/\.(test|spec)\.[jt]sx?$/.test(e)||/Test\.java$/.test(e)}function w(e,t,n){let r=e.get(`dependencies`),i=e.get(`symbols`),a=e.get(`entry-points`),o=[`## Code Map: ${t}\n`];if(!r&&!i)return o.push(`No dependency or symbol data available.`),o.join(`
|
|
4
|
+
`);let s=r?.reverseGraph??{},c=i?.symbols??[],l=a?.entryPoints??[],u=new Map;for(let e of c){if(!e.exported)continue;let t=e.filePath.replace(/\\/g,`/`);if(C(t))continue;let n=u.get(t);n?n.push({name:e.name,kind:e.kind}):u.set(t,[{name:e.name,kind:e.kind}])}let d=new Map;for(let[e,t]of Object.entries(s)){let n=D(e.replace(/\\/g,`/`),u),r=t.map(e=>e.replace(/\\/g,`/`)).filter(e=>!C(e));if(r.length===0)continue;let i=d.get(n);if(i)for(let e of r)i.add(e);else d.set(n,new Set(r))}let f=new Map;for(let e of l)f.set(e.filePath.replace(/\\/g,`/`),{name:e.name,trigger:e.trigger});let p=new Map,m=new Map;if(n)for(let[e,t]of n){if(C(e))continue;let n=T(e);for(let[r,i]of t){if(C(r)||n===T(r))continue;let t=p.get(e);t||(t=new Map,p.set(e,t)),t.set(r,i);let a=m.get(r),o={file:e,symbols:i};a?a.push(o):m.set(r,[o])}}let h=new Set;for(let e of f.keys())h.add(e);for(let e of p.keys())h.add(e);for(let e of m.keys())h.add(e);if(!n)for(let e of u.keys()){let t=d.get(e);t&&t.size>=3&&h.add(e)}let g=new Map;for(let e of h){let t=T(e),n=g.get(t);n?n.push(e):g.set(t,[e])}let _=[...g.entries()].sort((e,t)=>e[0].localeCompare(t[0])),v=n?`AST call graph`:`import analysis`,y=n?`, ${p.size} cross-package callers`:``;o.push(`**${h.size} key modules** (${v}${y})\n`),o.push(`**Legend:** ⚡ Entry point | 📤 Exports | → Calls (outgoing) | ← Called by (incoming) | ➡ Used by (import)
|
|
5
|
+
`);for(let[e,t]of _){t.sort(),o.push(`### ${e}/\n`);for(let r of t){let t=u.get(r),i=f.get(r),a=p.get(r),s=m.get(r),c=d.get(r),l=r.startsWith(`${e}/`)?r.slice(e.length+1):r;if(o.push(`**${l}**`),i&&o.push(` ⚡ Entry: \`${i.name}\`${i.trigger?` (${i.trigger})`:``}`),t&&t.length>0){let e=t.slice(0,8).map(e=>`${e.name}`).join(`, `),n=t.length>8?` (+${t.length-8})`:``;o.push(` 📤 ${e}${n}`)}if(a&&a.size>0){let t=[...a.entries()].sort((e,t)=>t[1].length-e[1].length);for(let[n,r]of t.slice(0,4)){let t=n.startsWith(`${e}/`)?n.slice(e.length+1):n;o.push(` → ${t}: ${r.slice(0,5).join(`, `)}${r.length>5?`…`:``}`)}t.length>4&&o.push(` → +${t.length-4} more targets`)}if(s&&s.length>0){for(let t of s.slice(0,4)){let n=t.file.startsWith(`${e}/`)?t.file.slice(e.length+1):t.file;o.push(` ← ${n}: ${t.symbols.slice(0,4).join(`, `)}${t.symbols.length>4?`…`:``}`)}s.length>4&&o.push(` ← +${s.length-4} more callers`)}else if(!n&&c&&c.size>0){let e=[...c].filter(e=>!C(e));e.length<=3?o.push(` ➡ Used by: ${e.join(`, `)}`):o.push(` ➡ Used by: ${e.slice(0,3).join(`, `)} (+${e.length-3} more)`)}o.push(``)}}return o.join(`
|
|
6
|
+
`)}function T(e){let t=e.split(`/`);if(t.length>=2&&[`packages`,`services`,`providers`,`apps`,`libs`].includes(t[0]))return`${t[0]}/${t[1]}`;let n=t.indexOf(`java`),r=t.indexOf(`kotlin`),i=n>=0?n:r;if(i>=0&&i+2<t.length){let e=t.slice(i+1);return[`com`,`org`,`net`,`io`,`dev`].includes(e[0])&&e.length>=3?e.slice(0,3).join(`/`):e.slice(0,2).join(`/`)}return t[0]===`src`&&t.length>=3?`${t[0]}/${t[1]}`:t[0]}function E(e,t,n){let r=t.get(`symbols`),i=t.get(`entry-points`),a=t.get(`dependencies`),o=new Map;for(let[t,n]of e)if(!C(t))for(let[e,r]of n){if(C(e))continue;let n=T(t),i=T(e);if(n===i)continue;let a=`${n}|${i}`;o.set(a,(o.get(a)??0)+r.length)}if(o.size===0)return`## Architecture Diagram
|
|
10
7
|
|
|
11
|
-
No cross-package dependencies detected.`;
|
|
12
|
-
|
|
13
|
-
${
|
|
14
|
-
`)}`,k=[];k.push("```mermaid"),k.push("graph TB");const f=new Set;for(const[,e]of $)for(const o of e.triggers)f.add(o);if(f.size>0){k.push(' subgraph Triggers["External Triggers"]');for(const e of[...f].sort()){const o=`trigger_${e.replace(/[^a-zA-Z0-9]/g,"_")}`;k.push(` ${o}(("${e}"))`)}k.push(" end"),k.push("")}const x=[...d].filter(e=>$.has(e)).sort(),v=[...d].filter(e=>!$.has(e)).sort();if(x.length>0){k.push(' subgraph Services["Service Layer"]');for(const e of x){const o=`flow_${l(e)}`,s=e.includes("/")?e.split("/").pop()??e:e,c=$.get(e);k.push(` ${o}["${s} (${c?.count??0} handlers)"]`)}k.push(" end"),k.push("")}if(v.length>0){k.push(' subgraph Libraries["Shared Libraries"]');for(const e of v){const o=`flow_${l(e)}`,s=e.includes("/")?e.split("/").pop()??e:e;k.push(` ${o}["${s}"]`)}k.push(" end"),k.push("")}if(b.length>0){k.push(' subgraph External["AWS Services"]');for(const e of b)k.push(` flow_ext_${e.id}[("${e.name}")]`);k.push(" end"),k.push("")}for(const e of x){const o=$.get(e);if(!o)continue;const s=`flow_${l(e)}`;for(const c of o.triggers){const h=`trigger_${c.replace(/[^a-zA-Z0-9]/g,"_")}`;k.push(` ${h} --> ${s}`)}}const j=P.filter(([e])=>{const[o,s]=e.split("|");return $.has(o)&&!$.has(s)});for(const[e,o]of j.slice(0,15)){const[s,c]=e.split("|");k.push(` flow_${l(s)} -->|${o}| flow_${l(c)}`)}const D=P.filter(([e])=>{const[o,s]=e.split("|");return!$.has(o)&&!$.has(s)});for(const[e,o]of D.slice(0,10)){const[s,c]=e.split("|");k.push(` flow_${l(s)} -->|${o}| flow_${l(c)}`)}k.push("```");const m=`## Architectural Flow
|
|
15
|
-
|
|
16
|
-
${k.join(`
|
|
17
|
-
`)}`,S=[`# Architecture Diagrams: ${t}
|
|
18
|
-
`];return S.push(T),S.push(m),S.join(`
|
|
8
|
+
No cross-package dependencies detected.`;let s=new Set;for(let e of o.keys()){let[t,n]=e.split(`|`);s.add(t),s.add(n)}let c=new Map;if(r?.symbols)for(let e of r.symbols){if(!e.exported)continue;let t=e.filePath.replace(/\\/g,`/`);if(C(t))continue;let n=T(t);c.set(n,(c.get(n)??0)+1)}let l=new Map;if(i?.entryPoints)for(let e of i.entryPoints){let t=T(e.filePath.replace(/\\/g,`/`)),n=l.get(t);n?(n.count++,e.trigger&&n.triggers.add(e.trigger)):l.set(t,{count:1,triggers:new Set(e.trigger?[e.trigger]:[])})}let u=[];if(a?.external){let e=a.external,t={"client-dynamodb":{id:`dynamodb`,name:`DynamoDB`},"lib-dynamodb":{id:`dynamodb`,name:`DynamoDB`},"client-sqs":{id:`sqs`,name:`SQS`},"client-ses":{id:`ses`,name:`SES`},"client-sesv2":{id:`ses`,name:`SES`},"client-s3":{id:`s3`,name:`S3`},"client-eventbridge":{id:`eventbridge`,name:`EventBridge`},"client-sns":{id:`sns`,name:`SNS`},"client-secrets-manager":{id:`secrets`,name:`Secrets Manager`},"client-scheduler":{id:`scheduler`,name:`EventBridge Scheduler`},"client-apigatewaymanagementapi":{id:`apigw`,name:`API Gateway`},"client-cloudwatch":{id:`cloudwatch`,name:`CloudWatch`}},n=new Set;for(let r of Object.keys(e))for(let[e,i]of Object.entries(t))r.includes(e)&&!n.has(i.id)&&(n.add(i.id),u.push(i));u.sort((e,t)=>e.name.localeCompare(t.name))}let d=new Map;for(let e of[...s].sort()){let t=e.split(`/`)[0],n=d.get(t);n?n.push(e):d.set(t,[e])}let f=new Map;if(r?.symbols){let e=new Map;for(let t of r.symbols){let n=t.filePath.replace(/\\/g,`/`),r=T(n),i=n.match(/\.[^./]+$/)?.[0]||``;e.has(r)||e.set(r,new Map);let a=e.get(r);a.set(i,(a.get(i)??0)+1)}let t={".ts":`TypeScript`,".tsx":`TypeScript`,".js":`JavaScript`,".jsx":`JavaScript`,".java":`Java`,".kt":`Kotlin`,".scala":`Scala`,".py":`Python`,".go":`Go`,".rs":`Rust`,".cs":`C#`,".rb":`Ruby`,".php":`PHP`,".swift":`Swift`};for(let[n,r]of e){let e=``,i=0;for(let[t,n]of r)n>i&&(i=n,e=t);f.set(n,t[e]||`TypeScript`)}}let p=e=>e.replace(/[^a-zA-Z0-9]/g,`_`),m=[];m.push("```mermaid"),m.push(`C4Container`),m.push(` title C4 Container: ${n}`),m.push(``);let h=e=>{let t=[],n=l.get(e);n&&(t.push(`${n.count} handlers`),n.triggers.size>0&&t.push([...n.triggers].join(`, `)));let r=c.get(e);return r&&t.push(`${r} exports`),t.join(` · `)||``},g=e=>{let t=f.get(e)||`TypeScript`;if(e.startsWith(`infra`))return`CDK/${t}`;if(l.has(e)){let n=l.get(e);if(n?.triggers.has(`SQS`)||n?.triggers.has(`SNS`)||n?.triggers.has(`API Gateway`))return`Lambda/${t}`;if(n?.triggers.has(`HTTP Server`)||n?.triggers.has(`HTTP Endpoint`))return`Spring Boot/${t}`}return t};for(let[e,t]of[...d.entries()].sort()){let r=new Set([`com`,`org`,`net`,`io`,`dev`,`src`]).has(e)?n.charAt(0).toUpperCase()+n.slice(1):e.charAt(0).toUpperCase()+e.slice(1);if(t.length===1&&t[0]===e){let e=t[0];m.push(` Container(${p(e)}, "${e}", "${g(e)}", "${h(e)}")`)}else{m.push(` System_Boundary(${p(e)}_boundary, "${r}") {`);for(let e of t){let t=e.split(`/`).slice(1).join(`/`)||e;m.push(` Container(${p(e)}, "${t}", "${g(e)}", "${h(e)}")`)}m.push(` }`)}m.push(``)}if(u.length>0){for(let e of u)m.push(` System_Ext(ext_${e.id}, "${e.name}", "AWS")`);m.push(``)}let _=[...o.entries()].sort((e,t)=>t[1]-e[1]);for(let[e,t]of _.slice(0,30)){let[n,r]=e.split(`|`);m.push(` Rel(${p(n)}, ${p(r)}, "Uses", "${t} calls")`)}m.push("```");let v=`## C4 Container Diagram\n\n${m.join(`
|
|
9
|
+
`)}`,y=[];y.push("```mermaid"),y.push(`graph TB`);let b=new Set;for(let[,e]of l)for(let t of e.triggers)b.add(t);if(b.size>0){y.push(` subgraph Triggers["External Triggers"]`);for(let e of[...b].sort()){let t=`trigger_${e.replace(/[^a-zA-Z0-9]/g,`_`)}`;y.push(` ${t}(("${e}"))`)}y.push(` end`),y.push(``)}let x=[...s].filter(e=>l.has(e)).sort(),S=[...s].filter(e=>!l.has(e)).sort();if(x.length>0){y.push(` subgraph Services["Service Layer"]`);for(let e of x){let t=`flow_${p(e)}`,n=e.includes(`/`)?e.split(`/`).pop()??e:e,r=l.get(e);y.push(` ${t}["${n} (${r?.count??0} handlers)"]`)}y.push(` end`),y.push(``)}if(S.length>0){y.push(` subgraph Libraries["Shared Libraries"]`);for(let e of S){let t=`flow_${p(e)}`,n=e.includes(`/`)?e.split(`/`).pop()??e:e;y.push(` ${t}["${n}"]`)}y.push(` end`),y.push(``)}if(u.length>0){y.push(` subgraph External["AWS Services"]`);for(let e of u)y.push(` flow_ext_${e.id}[("${e.name}")]`);y.push(` end`),y.push(``)}for(let e of x){let t=l.get(e);if(!t)continue;let n=`flow_${p(e)}`;for(let e of t.triggers){let t=`trigger_${e.replace(/[^a-zA-Z0-9]/g,`_`)}`;y.push(` ${t} --> ${n}`)}}let w=_.filter(([e])=>{let[t,n]=e.split(`|`);return l.has(t)&&!l.has(n)});for(let[e,t]of w.slice(0,15)){let[n,r]=e.split(`|`);y.push(` flow_${p(n)} -->|${t}| flow_${p(r)}`)}let E=_.filter(([e])=>{let[t,n]=e.split(`|`);return!l.has(t)&&!l.has(n)});for(let[e,t]of E.slice(0,10)){let[n,r]=e.split(`|`);y.push(` flow_${p(n)} -->|${t}| flow_${p(r)}`)}y.push("```");let D=`## Architectural Flow\n\n${y.join(`
|
|
10
|
+
`)}`,O=[`# Architecture Diagrams: ${n}\n`];return O.push(v),O.push(D),O.join(`
|
|
19
11
|
|
|
20
12
|
---
|
|
21
13
|
|
|
22
|
-
`)}function
|
|
23
|
-
`)){
|
|
24
|
-
`)){
|
|
25
|
-
`)){
|
|
26
|
-
`),g.length
|
|
27
|
-
`);t.push(`**${g.length}
|
|
28
|
-
`)
|
|
29
|
-
`)
|
|
30
|
-
`),t.push("| Key | Value | Sensitive |"),t.push("|-----|-------|-----------|");for(const $ of d.values.slice(0,50)){const b=$.value.replace(/\|/g,"\\|");t.push(`| ${$.key} | ${b} | ${$.sensitive?"\u26A0\uFE0F yes":"no"} |`)}t.push("")}const y=i.filter($=>$.file!=="package.json");if(y.length>0){const $=new Map;for(const l of y)for(const r of l.values){const w=`${r.key}=${r.value}`;$.set(w,($.get(w)??0)+1)}const b=Math.max(2,Math.floor(y.length*.5));t.push(`#### Sub-packages (${y.length} packages)
|
|
31
|
-
`);const M=[...$.entries()].filter(([,l])=>l>=b).map(([l])=>{const[r,...w]=l.split("=");return{key:r,value:w.join("=")}});if(M.length>0){t.push(`**Common scripts** (shared by most sub-packages):
|
|
32
|
-
`),t.push("| Key | Value |"),t.push("|-----|-------|");for(const l of M)t.push(`| ${l.key} | ${l.value.replace(/\|/g,"\\|")} |`);t.push("")}const C=new Map;for(const l of y){const r=l.values.filter(P=>{const T=`${P.key}=${P.value}`;return($.get(T)??0)<b});if(r.length===0)continue;const w=r.map(P=>`${P.key}=${P.value}`).sort().join("||"),_=C.get(w);_?_.files.push(l.file):C.set(w,{files:[l.file],entries:r.map(P=>({key:P.key,value:P.value}))})}for(const[,l]of C){l.files.length>1?t.push(`**${l.files.length} packages** (${l.files.map(r=>r.split("/").slice(-2,-1)[0]||r).join(", ")}):`):t.push(`**${l.files[0]}**:`),t.push("| Key | Value |"),t.push("|-----|-------|");for(const r of l.entries)t.push(`| ${r.key} | ${r.value.replace(/\|/g,"\\|")} |`);t.push("")}}continue}if(i.length>3){const d=i.map(b=>b.values.map(M=>`${M.key}=${M.value}`).sort().join("||")),y=d.sort((b,M)=>d.filter(C=>C===M).length-d.filter(C=>C===b).length)[0];if(d.filter(b=>b===y).length>2){t.push(`### ${a}
|
|
33
|
-
`);const b=i[d.indexOf(y)],M=i.filter((l,r)=>d[r]===y).map(l=>l.file),C=i.filter((l,r)=>d[r]!==y);t.push(`**${M.length} identical files**: ${M.join(", ")}
|
|
34
|
-
`),t.push("| Key | Value | Sensitive |"),t.push("|-----|-------|-----------|");for(const l of b.values.slice(0,30)){const r=l.value.replace(/\|/g,"\\|");t.push(`| ${l.key} | ${r} | ${l.sensitive?"\u26A0\uFE0F yes":"no"} |`)}t.push("");for(const l of C){t.push(`#### ${l.file}
|
|
35
|
-
`),t.push("| Key | Value | Sensitive |"),t.push("|-----|-------|-----------|");for(const r of l.values.slice(0,30)){const w=r.value.replace(/\|/g,"\\|");t.push(`| ${r.key} | ${w} | ${r.sensitive?"\u26A0\uFE0F yes":"no"} |`)}t.push("")}continue}}t.push(`### ${a}
|
|
36
|
-
`);for(const d of i){t.push(`#### ${d.file}
|
|
37
|
-
`),t.push("| Key | Value | Sensitive |"),t.push("|-----|-------|-----------|");for(const y of d.values.slice(0,50)){const $=y.value.replace(/\|/g,"\\|");t.push(`| ${y.key} | ${$} | ${y.sensitive?"\u26A0\uFE0F yes":"no"} |`)}d.values.length>50&&t.push(`
|
|
38
|
-
_...and ${d.values.length-50} more values._`),t.push("")}}const n=g.reduce((a,i)=>a+i.values.filter(d=>d.sensitive).length,0);return n>0&&t.push(`
|
|
39
|
-
**\u26A0\uFE0F ${n} sensitive values detected** (values masked).`),t.join(`
|
|
40
|
-
`)}async function ve(g){const u=Date.now(),t=Q(g.path),p=N(t),n=g.mode??"memory",a=g.outDir??O(t,".ai","kb"),i=new oe,d=new X,y=new re,$=new ne,b=new ee,M=new Y,C=[{name:"structure",fn:()=>i.analyze(t,{format:"markdown",maxDepth:3,sourceOnly:!0})},{name:"dependencies",fn:()=>d.analyze(t,{format:"markdown"})},{name:"entry-points",fn:()=>b.analyze(t)},{name:"symbols",fn:()=>y.analyze(t,{format:"markdown"})},{name:"patterns",fn:()=>$.analyze(t)},{name:"diagram",fn:()=>M.analyze(t,{diagramType:"architecture"})}],l=await Promise.allSettled(C.map(async e=>{const o=Date.now(),s=await e.fn();return{name:e.name,result:s,durationMs:Date.now()-o}})),r=[],w=new Map,_=new Map;for(const e of l)if(e.status==="fulfilled"){const{name:o,result:s,durationMs:c}=e.value,h=s;r.push({name:o,status:"success",output:h.output,durationMs:c}),w.set(o,h.output),_.set(o,h.data)}else{const o=e.reason,s=l.indexOf(e),c=C[s].name;r.push({name:c,status:"failed",output:"",durationMs:0,error:o.message})}const P=Date.now();let T=null;try{let e=await se(t);if((!e||e.edges.length===0)&&(e=await te(t)),e&&e.edges.length>0){T=new Map;for(const o of e.edges){let s=T.get(o.from);s||(s=new Map,T.set(o.from,s));const c=s.get(o.to);if(c)for(const h of o.symbols)c.includes(h)||c.push(h);else s.set(o.to,[...o.symbols])}}}catch{}const k=Date.now()-P,f=Date.now(),x=ce(_,p,T),v=Date.now()-f+k;if(r.push({name:"code-map",status:"success",output:x,durationMs:v}),w.set("code-map",x),T&&T.size>0){const e=le(T,_,p),o=r.find(s=>s.name==="diagram");o&&(o.output=e,w.set("diagram",e))}const j=Date.now(),D=await pe(t,p),m=Date.now()-j;r.push({name:"config-values",status:"success",output:D,durationMs:m}),w.set("config-values",D);const S=ie(r,n,p,_);if(r.push({name:"synthesis-guide",status:"success",output:S,durationMs:0}),w.set("synthesis-guide",S),n==="generate"){if(F(a))for(const s of q(a))(s.endsWith(".md")||s.endsWith(".json"))&&U(O(a,s),{force:!0});V(a,{recursive:!0});const e=new Date().toISOString();for(const[s,c]of w){const h=`${s}.md`,A=O(a,h),E=c.replaceAll(t,p),I=`<!-- Generated: ${e} -->
|
|
41
|
-
<!-- Project: ${p} -->
|
|
42
|
-
<!-- Source: ${t} -->
|
|
43
|
-
|
|
44
|
-
`;B(A,I+E,"utf-8")}const o=[`<!-- Generated: ${e} -->`,`<!-- Project: ${p} -->`,`<!-- Source: ${t} -->`,"",`# ${p} \u2014 Codebase Knowledge`,"","## Contents",""];for(const s of r){const c=`${s.name}.md`,h=L[s.name]??s.name,A=s.status==="success"?"\u2713":"\u2717",E=s.durationMs>0?` (${s.durationMs}ms)`:"";o.push(`- ${A} [${h}](./${c})${E}`)}o.push(""),B(O(a,"README.md"),o.join(`
|
|
45
|
-
`),"utf-8")}return{path:t,mode:n,steps:r,outDir:n==="generate"?a:void 0,totalDurationMs:Date.now()-u}}export{ve as onboard};
|
|
14
|
+
`)}function D(e,t){if(t.has(e))return e;for(let n of[`.ts`,`.tsx`,`.js`,`.jsx`])if(t.has(`${e}${n}`))return`${e}${n}`;return t.has(`${e}/index.ts`)?`${e}/index.ts`:e}const O=new Set([`node_modules`,`.git`,`dist`,`build`,`coverage`,`.turbo`,`.cache`,`cdk.out`,`__pycache__`,`.venv`,`target`,`obj`,`.gradle`]),k=[{glob:/\.env(?:\.\w+)?$/,type:`env`},{glob:/\.env\.example$/,type:`env`},{glob:/package\.json$/,type:`package-json`},{glob:/^(?:app|config|settings|default)\.(?:json|ya?ml|toml)$/i,type:`config`},{glob:/docker-compose\.ya?ml$/,type:`docker`},{glob:/cdk\.json$/,type:`cdk`},{glob:/turbo\.json$/,type:`tooling`},{glob:/application\.(?:properties|ya?ml)$/i,type:`spring`},{glob:/settings\.py$/,type:`django`},{glob:/\.flaskenv$/,type:`env`},{glob:/appsettings\.(?:\w+\.)?json$/i,type:`dotnet`}];async function A(e,t){let n=[],r=await j(e),i=/kb\.config\.json$/;for(let t of r)try{let r=f(e,t).replace(/\\/g,`/`);if(i.test(r))continue;let a=await c(t,`utf-8`),o=M(t);if(r.split(`/`).length-1>1&&o===`tooling`)continue;let s=P(a,o);s.length>0&&n.push({file:r,type:o,values:s})}catch{}return I(n,t)}async function j(e){let t=[],n=async(e,r)=>{if(!(r>3))try{let i=await l(e,{withFileTypes:!0});for(let a of i){if(O.has(a.name))continue;let i=d(e,a.name);a.isDirectory()&&!a.name.startsWith(`.`)?await n(i,r+1):a.isFile()&&k.some(e=>e.glob.test(a.name))&&t.push(i)}}catch{}};return await n(e,0),t}function M(e){let t=u(e);for(let e of k)if(e.glob.test(t))return e.type;return`unknown`}const N=/(?:secret|password|token|key|api.?key|auth|credential|private)/i;function P(e,t){let n=[];if(t===`env`)for(let t of e.split(`
|
|
15
|
+
`)){let e=t.trim();if(!e||e.startsWith(`#`))continue;let r=e.indexOf(`=`);if(r===-1)continue;let i=e.slice(0,r).trim(),a=e.slice(r+1).trim(),o=N.test(i);n.push({key:i,value:o?`***`:a,sensitive:o})}else if(t===`package-json`)try{let t=JSON.parse(e);if(t.scripts)for(let[e,r]of Object.entries(t.scripts))n.push({key:`scripts.${e}`,value:String(r),sensitive:!1});if(t.engines)for(let[e,r]of Object.entries(t.engines))n.push({key:`engines.${e}`,value:String(r),sensitive:!1})}catch{}else if(t===`spring`)for(let t of e.split(`
|
|
16
|
+
`)){let e=t.trim();if(!e||e.startsWith(`#`)||e.startsWith(`---`))continue;let r=e.match(/^([\w.[\]-]+)\s*[=:]\s*(.*)$/);if(r){let e=r[1],t=r[2].trim(),i=N.test(e);n.push({key:e,value:i?`***`:t,sensitive:i})}}else if(t===`json`||t===`config`||t===`cdk`||t===`tooling`||t===`dotnet`)try{F(JSON.parse(e),``,n,0)}catch{}else if(t===`django`)for(let t of e.split(`
|
|
17
|
+
`)){let e=t.match(/^([A-Z_][A-Z0-9_]*)\s*=\s*(.+)$/);if(e){let t=e[1],r=e[2].trim(),i=N.test(t);n.push({key:t,value:i?`***`:r.slice(0,100),sensitive:i})}}return n}function F(e,t,n,r){if(!(r>3)&&typeof e==`object`&&e&&!Array.isArray(e))for(let[i,a]of Object.entries(e)){let e=t?`${t}.${i}`:i;if(typeof a==`object`&&a&&!Array.isArray(a))F(a,e,n,r+1);else{let t=N.test(i),r=Array.isArray(a)?`[${a.length} items]`:String(a);n.push({key:e,value:t?`***`:r.slice(0,120),sensitive:t})}}}function I(e,t){let n=[];if(n.push(`## Configuration Values: ${t}\n`),e.length===0)return n.push(`No configuration files detected.`),n.join(`
|
|
18
|
+
`);n.push(`**${e.length} config files** found\n`);let r=new Map;for(let t of e)r.has(t.type)||r.set(t.type,[]),r.get(t.type)?.push(t);for(let[e,t]of r){if(e===`package-json`&&t.length>2){n.push(`### ${e}\n`);let r=t.find(e=>e.file===`package.json`);if(r){n.push(`#### ${r.file}\n`),n.push(`| Key | Value | Sensitive |`),n.push(`|-----|-------|-----------|`);for(let e of r.values.slice(0,50)){let t=e.value.replace(/\|/g,`\\|`);n.push(`| ${e.key} | ${t} | ${e.sensitive?`⚠️ yes`:`no`} |`)}n.push(``)}let i=t.filter(e=>e.file!==`package.json`);if(i.length>0){let e=new Map;for(let t of i)for(let n of t.values){let t=`${n.key}=${n.value}`;e.set(t,(e.get(t)??0)+1)}let t=Math.max(2,Math.floor(i.length*.5));n.push(`#### Sub-packages (${i.length} packages)\n`);let r=[...e.entries()].filter(([,e])=>e>=t).map(([e])=>{let[t,...n]=e.split(`=`);return{key:t,value:n.join(`=`)}});if(r.length>0){n.push(`**Common scripts** (shared by most sub-packages):
|
|
19
|
+
`),n.push(`| Key | Value |`),n.push(`|-----|-------|`);for(let e of r)n.push(`| ${e.key} | ${e.value.replace(/\|/g,`\\|`)} |`);n.push(``)}let a=new Map;for(let n of i){let r=n.values.filter(n=>{let r=`${n.key}=${n.value}`;return(e.get(r)??0)<t});if(r.length===0)continue;let i=r.map(e=>`${e.key}=${e.value}`).sort().join(`||`),o=a.get(i);o?o.files.push(n.file):a.set(i,{files:[n.file],entries:r.map(e=>({key:e.key,value:e.value}))})}for(let[,e]of a){e.files.length>1?n.push(`**${e.files.length} packages** (${e.files.map(e=>e.split(`/`).slice(-2,-1)[0]||e).join(`, `)}):`):n.push(`**${e.files[0]}**:`),n.push(`| Key | Value |`),n.push(`|-----|-------|`);for(let t of e.entries)n.push(`| ${t.key} | ${t.value.replace(/\|/g,`\\|`)} |`);n.push(``)}}continue}if(t.length>3){let r=t.map(e=>e.values.map(e=>`${e.key}=${e.value}`).sort().join(`||`)),i=r.sort((e,t)=>r.filter(e=>e===t).length-r.filter(t=>t===e).length)[0];if(r.filter(e=>e===i).length>2){n.push(`### ${e}\n`);let a=t[r.indexOf(i)],o=t.filter((e,t)=>r[t]===i).map(e=>e.file),s=t.filter((e,t)=>r[t]!==i);n.push(`**${o.length} identical files**: ${o.join(`, `)}\n`),n.push(`| Key | Value | Sensitive |`),n.push(`|-----|-------|-----------|`);for(let e of a.values.slice(0,30)){let t=e.value.replace(/\|/g,`\\|`);n.push(`| ${e.key} | ${t} | ${e.sensitive?`⚠️ yes`:`no`} |`)}n.push(``);for(let e of s){n.push(`#### ${e.file}\n`),n.push(`| Key | Value | Sensitive |`),n.push(`|-----|-------|-----------|`);for(let t of e.values.slice(0,30)){let e=t.value.replace(/\|/g,`\\|`);n.push(`| ${t.key} | ${e} | ${t.sensitive?`⚠️ yes`:`no`} |`)}n.push(``)}continue}}n.push(`### ${e}\n`);for(let e of t){n.push(`#### ${e.file}\n`),n.push(`| Key | Value | Sensitive |`),n.push(`|-----|-------|-----------|`);for(let t of e.values.slice(0,50)){let e=t.value.replace(/\|/g,`\\|`);n.push(`| ${t.key} | ${e} | ${t.sensitive?`⚠️ yes`:`no`} |`)}e.values.length>50&&n.push(`\n_...and ${e.values.length-50} more values._`),n.push(``)}}let i=e.reduce((e,t)=>e+t.values.filter(e=>e.sensitive).length,0);return i>0&&n.push(`\n**⚠️ ${i} sensitive values detected** (values masked).`),n.join(`
|
|
20
|
+
`)}async function L(c){let l=Date.now(),f=p(c.path),S=u(f),C=c.mode??`memory`,T=c.outDir??d(f,y.aiKb),D=new i,O=new e,k=new a,j=new r,M=new n,N=new t,P=[{name:`structure`,fn:()=>D.analyze(f,{format:`markdown`,maxDepth:3,sourceOnly:!0})},{name:`dependencies`,fn:()=>O.analyze(f,{format:`markdown`})},{name:`entry-points`,fn:()=>M.analyze(f)},{name:`symbols`,fn:()=>k.analyze(f,{format:`markdown`})},{name:`patterns`,fn:()=>j.analyze(f)},{name:`diagram`,fn:()=>N.analyze(f,{diagramType:`architecture`})}],F=await Promise.allSettled(P.map(async e=>{let t=Date.now(),n=await e.fn();return{name:e.name,result:n,durationMs:Date.now()-t}})),I=[],L=new Map,R=new Map;for(let e of F)if(e.status===`fulfilled`){let{name:t,result:n,durationMs:r}=e.value,i=n;I.push({name:t,status:`success`,output:i.output,durationMs:r}),L.set(t,i.output),R.set(t,i.data)}else{let t=e.reason,n=P[F.indexOf(e)].name;I.push({name:n,status:`failed`,output:``,durationMs:0,error:t.message})}let z=Date.now(),B=null;try{let e=await s(f);if((!e||e.edges.length===0)&&(e=await o(f)),e&&e.edges.length>0){B=new Map;for(let t of e.edges){let e=B.get(t.from);e||(e=new Map,B.set(t.from,e));let n=e.get(t.to);if(n)for(let e of t.symbols)n.includes(e)||n.push(e);else e.set(t.to,[...t.symbols])}}}catch{}let V=Date.now()-z,H=Date.now(),U=w(R,S,B),W=Date.now()-H+V;if(I.push({name:`code-map`,status:`success`,output:U,durationMs:W}),L.set(`code-map`,U),B&&B.size>0){let e=E(B,R,S),t=I.find(e=>e.name===`diagram`);t&&(t.output=e,L.set(`diagram`,e))}let G=Date.now(),K=await A(f,S),q=Date.now()-G;I.push({name:`config-values`,status:`success`,output:K,durationMs:q}),L.set(`config-values`,K);let J=x(I,C,S,R);if(I.push({name:`synthesis-guide`,status:`success`,output:J,durationMs:0}),L.set(`synthesis-guide`,J),C===`generate`){if(m(T))for(let e of g(T))(e.endsWith(`.md`)||e.endsWith(`.json`))&&_(d(T,e),{force:!0});h(T,{recursive:!0});let e=new Date().toISOString();for(let[t,n]of L){let r=d(T,`${t}.md`),i=n.replaceAll(f,S);v(r,`<!-- Generated: ${e} -->\n<!-- Project: ${S} -->\n<!-- Source: ${f} -->\n\n`+i,`utf-8`)}let t=[`<!-- Generated: ${e} -->`,`<!-- Project: ${S} -->`,`<!-- Source: ${f} -->`,``,`# ${S} — Codebase Knowledge`,``,`## Contents`,``];for(let e of I){let n=`${e.name}.md`,r=b[e.name]??e.name,i=e.status===`success`?`✓`:`✗`,a=e.durationMs>0?` (${e.durationMs}ms)`:``;t.push(`- ${i} [${r}](./${n})${a}`)}t.push(``),v(d(T,`README.md`),t.join(`
|
|
21
|
+
`),`utf-8`)}return{path:f,mode:C,steps:I,outDir:C===`generate`?T:void 0,totalDurationMs:Date.now()-l}}export{L as onboard};
|
|
@@ -1,80 +1,82 @@
|
|
|
1
|
+
//#region packages/tools/src/parse-output.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* kb_parse_output — Structured parsers for common build tool output.
|
|
3
4
|
*
|
|
4
5
|
* Converts noisy text output from tsc, vitest, biome, and git status
|
|
5
6
|
* into structured JSON that LLM agents can act on directly.
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
interface ParsedError {
|
|
9
|
+
file: string;
|
|
10
|
+
line?: number;
|
|
11
|
+
column?: number;
|
|
12
|
+
severity: 'error' | 'warning' | 'info';
|
|
13
|
+
code?: string;
|
|
14
|
+
message: string;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
interface ParsedTestResult {
|
|
17
|
+
name: string;
|
|
18
|
+
file?: string;
|
|
19
|
+
status: 'pass' | 'fail' | 'skip';
|
|
20
|
+
duration?: number;
|
|
21
|
+
error?: string;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
interface ParsedTestSummary {
|
|
24
|
+
tests: ParsedTestResult[];
|
|
25
|
+
passed: number;
|
|
26
|
+
failed: number;
|
|
27
|
+
skipped: number;
|
|
28
|
+
duration?: number;
|
|
29
|
+
suites?: number;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
interface ParsedGitStatus {
|
|
32
|
+
staged: Array<{
|
|
33
|
+
status: string;
|
|
34
|
+
file: string;
|
|
35
|
+
}>;
|
|
36
|
+
unstaged: Array<{
|
|
37
|
+
status: string;
|
|
38
|
+
file: string;
|
|
39
|
+
}>;
|
|
40
|
+
untracked: string[];
|
|
41
|
+
branch?: string;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
type ParsedOutput = {
|
|
44
|
+
tool: 'tsc';
|
|
45
|
+
errors: ParsedError[];
|
|
45
46
|
} | {
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
tool: 'vitest';
|
|
48
|
+
summary: ParsedTestSummary;
|
|
48
49
|
} | {
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
tool: 'biome';
|
|
51
|
+
errors: ParsedError[];
|
|
51
52
|
} | {
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
tool: 'git-status';
|
|
54
|
+
status: ParsedGitStatus;
|
|
54
55
|
};
|
|
55
56
|
/**
|
|
56
57
|
* Parse `tsc` output into structured errors.
|
|
57
58
|
*
|
|
58
59
|
* Example line: `src/foo.ts(10,5): error TS2339: Property 'x' does not exist`
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
+
declare function parseTsc(output: string): ParsedError[];
|
|
61
62
|
/**
|
|
62
63
|
* Parse vitest run output into structured test results.
|
|
63
64
|
*/
|
|
64
|
-
|
|
65
|
+
declare function parseVitest(output: string): ParsedTestSummary;
|
|
65
66
|
/**
|
|
66
67
|
* Parse biome check/lint output into structured errors.
|
|
67
68
|
*
|
|
68
69
|
* Example: `src/foo.ts:10:5 lint/suspicious/noDoubleEquals ━━━`
|
|
69
70
|
* ` × Use === instead of ==`
|
|
70
71
|
*/
|
|
71
|
-
|
|
72
|
+
declare function parseBiome(output: string): ParsedError[];
|
|
72
73
|
/**
|
|
73
74
|
* Parse `git status --porcelain=v1 -b` output into structured status.
|
|
74
75
|
*/
|
|
75
|
-
|
|
76
|
+
declare function parseGitStatus(output: string): ParsedGitStatus;
|
|
76
77
|
/**
|
|
77
78
|
* Auto-detect the tool from output content and parse accordingly.
|
|
78
79
|
*/
|
|
79
|
-
|
|
80
|
-
//#
|
|
80
|
+
declare function parseOutput(output: string, tool?: string): ParsedOutput;
|
|
81
|
+
//#endregion
|
|
82
|
+
export { ParsedError, ParsedGitStatus, ParsedOutput, ParsedTestResult, ParsedTestSummary, parseBiome, parseGitStatus, parseOutput, parseTsc, parseVitest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
`)){if(!
|
|
1
|
+
function e(e){let t=[];for(let n of e.matchAll(/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+(TS\d+):\s+(.+)$/gm))t.push({file:n[1],line:Number.parseInt(n[2],10),column:Number.parseInt(n[3],10),severity:n[4],code:n[5],message:n[6]});if(t.length===0)for(let n of e.matchAll(/^(.+?):(\d+):(\d+)\s+-\s+(error|warning)\s+(TS\d+):\s+(.+)$/gm))t.push({file:n[1],line:Number.parseInt(n[2],10),column:Number.parseInt(n[3],10),severity:n[4],code:n[5],message:n[6]});return t}function t(e){return e.replace(/\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g,``)}function n(e){let n=t(e),r=[];for(let e of n.matchAll(/^\s*([✓✕×-])\s+(.+?)(?:\s+(\d+)ms)?$/gm)){let t=e[1],n=t===`✓`?`pass`:t===`-`?`skip`:`fail`;r.push({name:e[2].trim(),status:n,duration:e[3]?Number.parseInt(e[3],10):void 0})}for(let e of n.matchAll(/^\s*([✓✕×])\s+(\S+\.test\.\w+)\s+\((\d+)\s+tests?\)\s*(\d+ms)?$/gm)){let t=e[1]===`✓`?`pass`:`fail`;r.push({name:e[2],file:e[2],status:t,duration:e[4]?Number.parseInt(e[4],10):void 0})}let i=/Tests\s+(?:(\d+)\s+passed)?(?:\s*\|\s*)?(?:(\d+)\s+failed)?(?:\s*\|\s*)?(?:(\d+)\s+skipped)?\s*\((\d+)\)/.exec(n),a=i?Number.parseInt(i[1]??`0`,10):r.filter(e=>e.status===`pass`).length,o=i?Number.parseInt(i[2]??`0`,10):r.filter(e=>e.status===`fail`).length,s=i?Number.parseInt(i[3]??`0`,10):r.filter(e=>e.status===`skip`).length,c=/Duration\s+(\d+(?:\.\d+)?)(?:ms|s)/.exec(n),l=c?c[0].includes(`s`)&&!c[0].includes(`ms`)?Number.parseFloat(c[1])*1e3:Number.parseFloat(c[1]):void 0,u=/Test Files\s+(\d+)\s+passed/.exec(n);return{tests:r,passed:a,failed:o,skipped:s,duration:l,suites:u?Number.parseInt(u[1],10):void 0}}function r(e){let t=[];for(let n of e.matchAll(/^(.+?):(\d+):(\d+)\s+([\w/]+)\s+━+$/gm)){let r=n[1],i=Number.parseInt(n[2],10),a=Number.parseInt(n[3],10),o=n[4],s=e.slice((n.index??0)+n[0].length,(n.index??0)+n[0].length+500),c=/^\s*[×!i]\s+(.+)$/m.exec(s),l=c?c[1].trim():o,u=o.includes(`lint`)?`warning`:`error`;t.push({file:r,line:i,column:a,severity:u,code:o,message:l})}return t}function i(e){let t=[],n=[],r=[],i;for(let o of e.split(`
|
|
2
|
+
`)){if(!o)continue;if(o.startsWith(`## `)){i=o.slice(3).split(`...`)[0];continue}let e=o[0],s=o[1],c=o.slice(3).trim();e===`?`&&s===`?`?r.push(c):(e!==` `&&e!==`?`&&t.push({status:a(e),file:c}),s!==` `&&s!==`?`&&n.push({status:a(s),file:c}))}return{staged:t,unstaged:n,untracked:r,branch:i}}function a(e){return{M:`modified`,A:`added`,D:`deleted`,R:`renamed`,C:`copied`,U:`unmerged`}[e]??e}function o(t,a){let o=a??s(t);switch(o){case`tsc`:return{tool:`tsc`,errors:e(t)};case`vitest`:return{tool:`vitest`,summary:n(t)};case`biome`:return{tool:`biome`,errors:r(t)};case`git-status`:return{tool:`git-status`,status:i(t)};default:throw Error(`Unknown tool: ${o}. Supported: tsc, vitest, biome, git-status`)}}function s(e){return e.includes(`error TS`)||/\(\d+,\d+\):\s+error/.test(e)?`tsc`:e.includes(`vitest`)||e.includes(`Test Files`)||e.includes(`✓`)?`vitest`:e.includes(`biome`)||/\w+\/\w+\s+━+/.test(e)?`biome`:/^##\s/.test(e)||/^[MADRCU?! ]{2}\s/.test(e)?`git-status`:`unknown`}export{r as parseBiome,i as parseGitStatus,o as parseOutput,e as parseTsc,n as parseVitest};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region packages/tools/src/path-resolver.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Shared path resolver for MCP tools (E-014).
|
|
3
4
|
* Provides consistent path resolution across all tools.
|
|
@@ -8,5 +9,6 @@
|
|
|
8
9
|
* - Relative paths are resolved against the server's cwd
|
|
9
10
|
* - '.' and empty/undefined default to cwd
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
-
//#
|
|
12
|
+
declare function resolvePath(input?: string): string;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { resolvePath };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isAbsolute as e,resolve as
|
|
1
|
+
import{isAbsolute as e,resolve as t}from"node:path";function n(n){return!n||n===`.`?process.cwd():e(n)?n:t(process.cwd(),n)}export{n as resolvePath};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
//#region packages/tools/src/process-manager.d.ts
|
|
2
|
+
interface ManagedProcess {
|
|
3
|
+
id: string;
|
|
4
|
+
command: string;
|
|
5
|
+
args: string[];
|
|
6
|
+
pid?: number;
|
|
7
|
+
status: 'running' | 'stopped' | 'error';
|
|
8
|
+
startedAt: string;
|
|
9
|
+
exitCode?: number;
|
|
10
|
+
logs: string[];
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
declare function processStart(id: string, command: string, args?: string[], options?: {
|
|
13
|
+
cwd?: string;
|
|
13
14
|
}): ManagedProcess;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//#
|
|
15
|
+
declare function processStop(id: string): ManagedProcess | undefined;
|
|
16
|
+
declare function processStatus(id: string): ManagedProcess | undefined;
|
|
17
|
+
declare function processList(): ManagedProcess[];
|
|
18
|
+
declare function processLogs(id: string, tail?: number): string[];
|
|
19
|
+
//#endregion
|
|
20
|
+
export { ManagedProcess, processList, processLogs, processStart, processStatus, processStop };
|