@vpxa/aikit 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1207 -0
- package/bin/aikit.mjs +10 -0
- package/package.json +92 -0
- package/packages/aikit-client/dist/direct-client.d.ts +37 -0
- package/packages/aikit-client/dist/direct-client.js +1 -0
- package/packages/aikit-client/dist/index.d.ts +5 -0
- package/packages/aikit-client/dist/index.js +1 -0
- package/packages/aikit-client/dist/mcp-client.d.ts +19 -0
- package/packages/aikit-client/dist/mcp-client.js +4 -0
- package/packages/aikit-client/dist/parsers.d.ts +35 -0
- package/packages/aikit-client/dist/parsers.js +2 -0
- package/packages/aikit-client/dist/types.d.ts +62 -0
- package/packages/aikit-client/dist/types.js +1 -0
- package/packages/analyzers/dist/blast-radius-analyzer.d.ts +19 -0
- package/packages/analyzers/dist/blast-radius-analyzer.js +6 -0
- package/packages/analyzers/dist/dependency-analyzer.d.ts +32 -0
- package/packages/analyzers/dist/dependency-analyzer.js +8 -0
- package/packages/analyzers/dist/diagram-generator.d.ts +16 -0
- package/packages/analyzers/dist/diagram-generator.js +2 -0
- package/packages/analyzers/dist/entry-point-analyzer.d.ts +40 -0
- package/packages/analyzers/dist/entry-point-analyzer.js +4 -0
- package/packages/analyzers/dist/index.d.ts +12 -0
- package/packages/analyzers/dist/index.js +1 -0
- package/packages/analyzers/dist/knowledge-producer.d.ts +40 -0
- package/packages/analyzers/dist/knowledge-producer.js +26 -0
- package/packages/analyzers/dist/pattern-analyzer.d.ts +15 -0
- package/packages/analyzers/dist/pattern-analyzer.js +2 -0
- package/packages/analyzers/dist/regex-call-graph.d.ts +10 -0
- package/packages/analyzers/dist/regex-call-graph.js +1 -0
- package/packages/analyzers/dist/structure-analyzer.d.ts +19 -0
- package/packages/analyzers/dist/structure-analyzer.js +4 -0
- package/packages/analyzers/dist/symbol-analyzer.d.ts +14 -0
- package/packages/analyzers/dist/symbol-analyzer.js +9 -0
- package/packages/analyzers/dist/ts-call-graph.d.ts +29 -0
- package/packages/analyzers/dist/ts-call-graph.js +1 -0
- package/packages/analyzers/dist/types.d.ts +110 -0
- package/packages/analyzers/dist/types.js +1 -0
- package/packages/chunker/dist/call-graph-extractor.d.ts +25 -0
- package/packages/chunker/dist/call-graph-extractor.js +1 -0
- package/packages/chunker/dist/chunker-factory.d.ts +19 -0
- package/packages/chunker/dist/chunker-factory.js +1 -0
- package/packages/chunker/dist/chunker.interface.d.ts +13 -0
- package/packages/chunker/dist/chunker.interface.js +1 -0
- package/packages/chunker/dist/code-chunker.d.ts +17 -0
- package/packages/chunker/dist/code-chunker.js +11 -0
- 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 +3 -0
- package/packages/chunker/dist/extractors/types.d.ts +44 -0
- package/packages/chunker/dist/extractors/types.js +1 -0
- package/packages/chunker/dist/generic-chunker.d.ts +15 -0
- package/packages/chunker/dist/generic-chunker.js +5 -0
- package/packages/chunker/dist/index.d.ts +19 -0
- package/packages/chunker/dist/index.js +1 -0
- package/packages/chunker/dist/markdown-chunker.d.ts +17 -0
- package/packages/chunker/dist/markdown-chunker.js +3 -0
- 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-c.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-cpp.wasm +0 -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-kotlin.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-php.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-python.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-ruby.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-rust.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-scala.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-swift.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/aikit-init.d.ts +54 -0
- package/packages/cli/dist/aikit-init.js +1 -0
- package/packages/cli/dist/commands/analyze.d.ts +6 -0
- package/packages/cli/dist/commands/analyze.js +2 -0
- package/packages/cli/dist/commands/context-cmds.d.ts +6 -0
- package/packages/cli/dist/commands/context-cmds.js +1 -0
- package/packages/cli/dist/commands/environment.d.ts +6 -0
- package/packages/cli/dist/commands/environment.js +1 -0
- package/packages/cli/dist/commands/execution.d.ts +6 -0
- package/packages/cli/dist/commands/execution.js +1 -0
- package/packages/cli/dist/commands/flow.d.ts +6 -0
- package/packages/cli/dist/commands/flow.js +1 -0
- package/packages/cli/dist/commands/graph.d.ts +6 -0
- package/packages/cli/dist/commands/graph.js +6 -0
- 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 +41 -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/frontmatter.d.ts +54 -0
- package/packages/cli/dist/commands/init/frontmatter.js +2 -0
- package/packages/cli/dist/commands/init/index.d.ts +36 -0
- package/packages/cli/dist/commands/init/index.js +5 -0
- package/packages/cli/dist/commands/init/manifest.d.ts +71 -0
- package/packages/cli/dist/commands/init/manifest.js +1 -0
- package/packages/cli/dist/commands/init/scaffold.d.ts +46 -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 +194 -0
- package/packages/cli/dist/commands/init/user.d.ts +61 -0
- package/packages/cli/dist/commands/init/user.js +5 -0
- package/packages/cli/dist/commands/knowledge.d.ts +6 -0
- package/packages/cli/dist/commands/knowledge.js +1 -0
- package/packages/cli/dist/commands/search.d.ts +6 -0
- package/packages/cli/dist/commands/search.js +1 -0
- package/packages/cli/dist/commands/system.d.ts +6 -0
- package/packages/cli/dist/commands/system.js +4 -0
- package/packages/cli/dist/commands/upgrade.d.ts +6 -0
- package/packages/cli/dist/commands/upgrade.js +1 -0
- package/packages/cli/dist/commands/workspace.d.ts +6 -0
- package/packages/cli/dist/commands/workspace.js +1 -0
- package/packages/cli/dist/context.d.ts +7 -0
- package/packages/cli/dist/context.js +1 -0
- package/packages/cli/dist/helpers.d.ts +55 -0
- package/packages/cli/dist/helpers.js +5 -0
- package/packages/cli/dist/index.d.ts +10 -0
- package/packages/cli/dist/index.js +3 -0
- package/packages/cli/dist/types.d.ts +9 -0
- package/packages/cli/dist/types.js +1 -0
- package/packages/core/dist/constants.d.ts +74 -0
- package/packages/core/dist/constants.js +1 -0
- package/packages/core/dist/content-detector.d.ts +13 -0
- package/packages/core/dist/content-detector.js +1 -0
- package/packages/core/dist/errors.d.ts +20 -0
- package/packages/core/dist/errors.js +1 -0
- package/packages/core/dist/global-registry.d.ts +63 -0
- package/packages/core/dist/global-registry.js +1 -0
- package/packages/core/dist/index.d.ts +7 -0
- package/packages/core/dist/index.js +1 -0
- package/packages/core/dist/logger.d.ts +32 -0
- package/packages/core/dist/logger.js +1 -0
- package/packages/core/dist/types.d.ts +133 -0
- package/packages/core/dist/types.js +1 -0
- package/packages/dashboard/dist/assets/index-BjA4YODs.js +21 -0
- package/packages/dashboard/dist/assets/index-BjA4YODs.js.map +1 -0
- package/packages/dashboard/dist/assets/index-CHpVij2M.css +1 -0
- package/packages/dashboard/dist/index.html +18 -0
- package/packages/elicitation/dist/build.d.ts +14 -0
- package/packages/elicitation/dist/build.js +1 -0
- package/packages/elicitation/dist/fields.d.ts +32 -0
- package/packages/elicitation/dist/fields.js +1 -0
- package/packages/elicitation/dist/index.d.ts +5 -0
- package/packages/elicitation/dist/index.js +1 -0
- package/packages/elicitation/dist/normalize.d.ts +15 -0
- package/packages/elicitation/dist/normalize.js +1 -0
- package/packages/elicitation/dist/types.d.ts +88 -0
- package/packages/elicitation/dist/types.js +1 -0
- package/packages/embeddings/dist/embedder.interface.d.ts +26 -0
- package/packages/embeddings/dist/embedder.interface.js +1 -0
- package/packages/embeddings/dist/index.d.ts +3 -0
- package/packages/embeddings/dist/index.js +1 -0
- package/packages/embeddings/dist/onnx-embedder.d.ts +22 -0
- package/packages/embeddings/dist/onnx-embedder.js +1 -0
- 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/flows/dist/adapters/claude-plugin.d.ts +12 -0
- package/packages/flows/dist/adapters/claude-plugin.js +1 -0
- package/packages/flows/dist/adapters/copilot.d.ts +10 -0
- package/packages/flows/dist/adapters/copilot.js +1 -0
- package/packages/flows/dist/adapters/index.d.ts +11 -0
- package/packages/flows/dist/adapters/index.js +1 -0
- package/packages/flows/dist/adapters/native.d.ts +10 -0
- package/packages/flows/dist/adapters/native.js +1 -0
- package/packages/flows/dist/builtins.d.ts +16 -0
- package/packages/flows/dist/builtins.js +1 -0
- package/packages/flows/dist/foundation.d.ts +20 -0
- package/packages/flows/dist/foundation.js +11 -0
- package/packages/flows/dist/git.d.ts +34 -0
- package/packages/flows/dist/git.js +1 -0
- package/packages/flows/dist/index.d.ts +12 -0
- package/packages/flows/dist/index.js +1 -0
- package/packages/flows/dist/loader.d.ts +13 -0
- package/packages/flows/dist/loader.js +2 -0
- package/packages/flows/dist/registry.d.ts +23 -0
- package/packages/flows/dist/registry.js +1 -0
- package/packages/flows/dist/state-machine.d.ts +23 -0
- package/packages/flows/dist/state-machine.js +1 -0
- package/packages/flows/dist/symlinks.d.ts +17 -0
- package/packages/flows/dist/symlinks.js +1 -0
- package/packages/flows/dist/types.d.ts +112 -0
- package/packages/flows/dist/types.js +1 -0
- package/packages/indexer/dist/file-hasher.d.ts +13 -0
- package/packages/indexer/dist/file-hasher.js +1 -0
- package/packages/indexer/dist/filesystem-crawler.d.ts +29 -0
- package/packages/indexer/dist/filesystem-crawler.js +1 -0
- package/packages/indexer/dist/graph-extractor.d.ts +18 -0
- package/packages/indexer/dist/graph-extractor.js +1 -0
- package/packages/indexer/dist/hash-cache.d.ts +24 -0
- package/packages/indexer/dist/hash-cache.js +1 -0
- package/packages/indexer/dist/incremental-indexer.d.ts +56 -0
- package/packages/indexer/dist/incremental-indexer.js +1 -0
- package/packages/indexer/dist/index.d.ts +6 -0
- package/packages/indexer/dist/index.js +1 -0
- package/packages/present/dist/index.html +709 -0
- package/packages/server/dist/api.d.ts +3 -0
- package/packages/server/dist/api.js +1 -0
- package/packages/server/dist/auto-gc.d.ts +30 -0
- package/packages/server/dist/auto-gc.js +1 -0
- package/packages/server/dist/completions.d.ts +14 -0
- package/packages/server/dist/completions.js +1 -0
- package/packages/server/dist/config.d.ts +14 -0
- package/packages/server/dist/config.js +1 -0
- 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 +92 -0
- package/packages/server/dist/curated-manager.js +5 -0
- package/packages/server/dist/dashboard-static.d.ts +27 -0
- package/packages/server/dist/dashboard-static.js +1 -0
- package/packages/server/dist/elicitor.d.ts +18 -0
- package/packages/server/dist/elicitor.js +1 -0
- package/packages/server/dist/index.d.ts +1 -0
- package/packages/server/dist/index.js +1 -0
- package/packages/server/dist/mcp-logging.d.ts +11 -0
- package/packages/server/dist/mcp-logging.js +1 -0
- package/packages/server/dist/output-schemas.d.ts +242 -0
- package/packages/server/dist/output-schemas.js +1 -0
- package/packages/server/dist/prompts.d.ts +13 -0
- package/packages/server/dist/prompts.js +13 -0
- package/packages/server/dist/replay-interceptor.d.ts +23 -0
- package/packages/server/dist/replay-interceptor.js +1 -0
- package/packages/server/dist/resource-links.d.ts +34 -0
- package/packages/server/dist/resource-links.js +1 -0
- package/packages/server/dist/resources/curated-resources.d.ts +13 -0
- package/packages/server/dist/resources/curated-resources.js +2 -0
- package/packages/server/dist/resources/resource-notifier.d.ts +45 -0
- package/packages/server/dist/resources/resource-notifier.js +1 -0
- package/packages/server/dist/resources/resources.d.ts +8 -0
- package/packages/server/dist/resources/resources.js +2 -0
- package/packages/server/dist/sampling.d.ts +41 -0
- package/packages/server/dist/sampling.js +2 -0
- package/packages/server/dist/server.d.ts +47 -0
- package/packages/server/dist/server.js +3 -0
- package/packages/server/dist/structured-content-guard.d.ts +26 -0
- package/packages/server/dist/structured-content-guard.js +1 -0
- package/packages/server/dist/task-manager.d.ts +40 -0
- package/packages/server/dist/task-manager.js +1 -0
- package/packages/server/dist/tool-metadata.d.ts +38 -0
- package/packages/server/dist/tool-metadata.js +1 -0
- package/packages/server/dist/tool-prefix.d.ts +12 -0
- package/packages/server/dist/tool-prefix.js +1 -0
- package/packages/server/dist/tools/analyze.tools.d.ts +14 -0
- package/packages/server/dist/tools/analyze.tools.js +8 -0
- package/packages/server/dist/tools/audit.tool.d.ts +8 -0
- package/packages/server/dist/tools/audit.tool.js +1 -0
- package/packages/server/dist/tools/brainstorm.tool.d.ts +7 -0
- package/packages/server/dist/tools/brainstorm.tool.js +9 -0
- 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/context.tools.d.ts +15 -0
- package/packages/server/dist/tools/context.tools.js +10 -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/execution.tools.d.ts +14 -0
- package/packages/server/dist/tools/execution.tools.js +4 -0
- package/packages/server/dist/tools/flow.tools.d.ts +7 -0
- package/packages/server/dist/tools/flow.tools.js +1 -0
- package/packages/server/dist/tools/forge.tools.d.ts +13 -0
- package/packages/server/dist/tools/forge.tools.js +10 -0
- package/packages/server/dist/tools/forget.tool.d.ts +8 -0
- package/packages/server/dist/tools/forget.tool.js +1 -0
- package/packages/server/dist/tools/graph.tool.d.ts +7 -0
- package/packages/server/dist/tools/graph.tool.js +5 -0
- package/packages/server/dist/tools/infra.tools.d.ts +10 -0
- package/packages/server/dist/tools/infra.tools.js +5 -0
- package/packages/server/dist/tools/list.tool.d.ts +7 -0
- package/packages/server/dist/tools/list.tool.js +2 -0
- package/packages/server/dist/tools/lookup.tool.d.ts +7 -0
- package/packages/server/dist/tools/lookup.tool.js +3 -0
- package/packages/server/dist/tools/manipulation.tools.d.ts +10 -0
- package/packages/server/dist/tools/manipulation.tools.js +4 -0
- package/packages/server/dist/tools/onboard.tool.d.ts +9 -0
- package/packages/server/dist/tools/onboard.tool.js +2 -0
- package/packages/server/dist/tools/persistence.tools.d.ts +10 -0
- package/packages/server/dist/tools/persistence.tools.js +5 -0
- package/packages/server/dist/tools/policy.tools.d.ts +7 -0
- package/packages/server/dist/tools/policy.tools.js +3 -0
- package/packages/server/dist/tools/present/browser.d.ts +4 -0
- package/packages/server/dist/tools/present/browser.js +93 -0
- package/packages/server/dist/tools/present/helpers.d.ts +18 -0
- package/packages/server/dist/tools/present/helpers.js +1 -0
- package/packages/server/dist/tools/present/html.d.ts +18 -0
- package/packages/server/dist/tools/present/html.js +5 -0
- package/packages/server/dist/tools/present/index.d.ts +2 -0
- package/packages/server/dist/tools/present/index.js +1 -0
- package/packages/server/dist/tools/present/markdown.d.ts +17 -0
- package/packages/server/dist/tools/present/markdown.js +8 -0
- package/packages/server/dist/tools/present/templates.d.ts +14 -0
- package/packages/server/dist/tools/present/templates.js +472 -0
- package/packages/server/dist/tools/present/tool.d.ts +27 -0
- package/packages/server/dist/tools/present/tool.js +19 -0
- package/packages/server/dist/tools/present-blocks.d.ts +46 -0
- package/packages/server/dist/tools/present-blocks.js +27 -0
- package/packages/server/dist/tools/present-charts.d.ts +31 -0
- package/packages/server/dist/tools/present-charts.js +34 -0
- package/packages/server/dist/tools/present-theme.d.ts +14 -0
- package/packages/server/dist/tools/present-theme.js +395 -0
- package/packages/server/dist/tools/present-utils.d.ts +11 -0
- package/packages/server/dist/tools/present-utils.js +1 -0
- package/packages/server/dist/tools/present.tool.d.ts +2 -0
- package/packages/server/dist/tools/present.tool.js +1 -0
- package/packages/server/dist/tools/produce.tool.d.ts +7 -0
- package/packages/server/dist/tools/produce.tool.js +4 -0
- package/packages/server/dist/tools/read.tool.d.ts +7 -0
- package/packages/server/dist/tools/read.tool.js +2 -0
- package/packages/server/dist/tools/reindex.tool.d.ts +11 -0
- package/packages/server/dist/tools/reindex.tool.js +3 -0
- package/packages/server/dist/tools/remember.tool.d.ts +9 -0
- package/packages/server/dist/tools/remember.tool.js +4 -0
- package/packages/server/dist/tools/replay.tool.d.ts +6 -0
- package/packages/server/dist/tools/replay.tool.js +3 -0
- package/packages/server/dist/tools/restore.tool.d.ts +6 -0
- package/packages/server/dist/tools/restore.tool.js +3 -0
- package/packages/server/dist/tools/search.tool.d.ts +11 -0
- package/packages/server/dist/tools/search.tool.js +10 -0
- package/packages/server/dist/tools/status.tool.d.ts +20 -0
- package/packages/server/dist/tools/status.tool.js +3 -0
- package/packages/server/dist/tools/update.tool.d.ts +8 -0
- package/packages/server/dist/tools/update.tool.js +1 -0
- package/packages/server/dist/tools/utility.tools.d.ts +15 -0
- package/packages/server/dist/tools/utility.tools.js +13 -0
- package/packages/server/dist/version-check.d.ts +32 -0
- package/packages/server/dist/version-check.js +1 -0
- package/packages/store/dist/graph-store.interface.d.ts +118 -0
- package/packages/store/dist/graph-store.interface.js +1 -0
- package/packages/store/dist/index.d.ts +6 -0
- package/packages/store/dist/index.js +1 -0
- package/packages/store/dist/lance-store.d.ts +44 -0
- package/packages/store/dist/lance-store.js +1 -0
- package/packages/store/dist/sqlite-graph-store.d.ts +45 -0
- package/packages/store/dist/sqlite-graph-store.js +58 -0
- package/packages/store/dist/store-factory.d.ts +12 -0
- package/packages/store/dist/store-factory.js +1 -0
- package/packages/store/dist/store.interface.d.ts +54 -0
- package/packages/store/dist/store.interface.js +1 -0
- package/packages/tools/dist/audit.d.ts +65 -0
- package/packages/tools/dist/audit.js +6 -0
- package/packages/tools/dist/batch.d.ts +23 -0
- package/packages/tools/dist/batch.js +1 -0
- package/packages/tools/dist/changelog.d.ts +36 -0
- package/packages/tools/dist/changelog.js +2 -0
- package/packages/tools/dist/check.d.ts +48 -0
- package/packages/tools/dist/check.js +2 -0
- package/packages/tools/dist/checkpoint.d.ts +19 -0
- package/packages/tools/dist/checkpoint.js +1 -0
- package/packages/tools/dist/codemod.d.ts +39 -0
- package/packages/tools/dist/codemod.js +2 -0
- package/packages/tools/dist/compact.d.ts +41 -0
- package/packages/tools/dist/compact.js +3 -0
- package/packages/tools/dist/config-extractor.d.ts +9 -0
- package/packages/tools/dist/config-extractor.js +7 -0
- package/packages/tools/dist/data-transform.d.ts +12 -0
- package/packages/tools/dist/data-transform.js +1 -0
- package/packages/tools/dist/dead-symbols.d.ts +28 -0
- package/packages/tools/dist/dead-symbols.js +2 -0
- package/packages/tools/dist/delegate.d.ts +36 -0
- package/packages/tools/dist/delegate.js +1 -0
- package/packages/tools/dist/diagram-builder.d.ts +9 -0
- package/packages/tools/dist/diagram-builder.js +9 -0
- package/packages/tools/dist/diff-parse.d.ts +28 -0
- package/packages/tools/dist/diff-parse.js +3 -0
- package/packages/tools/dist/digest.d.ts +50 -0
- package/packages/tools/dist/digest.js +6 -0
- 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 +16 -0
- package/packages/tools/dist/encode.js +1 -0
- package/packages/tools/dist/env-info.d.ts +30 -0
- package/packages/tools/dist/env-info.js +1 -0
- package/packages/tools/dist/eval.d.ts +15 -0
- package/packages/tools/dist/eval.js +2 -0
- package/packages/tools/dist/evidence-map.d.ts +92 -0
- package/packages/tools/dist/evidence-map.js +2 -0
- 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 +52 -0
- package/packages/tools/dist/file-summary.js +2 -0
- package/packages/tools/dist/file-walk.d.ts +6 -0
- package/packages/tools/dist/file-walk.js +1 -0
- package/packages/tools/dist/find-examples.d.ts +29 -0
- package/packages/tools/dist/find-examples.js +3 -0
- package/packages/tools/dist/find.d.ts +49 -0
- package/packages/tools/dist/find.js +1 -0
- package/packages/tools/dist/forge-classify.d.ts +44 -0
- package/packages/tools/dist/forge-classify.js +2 -0
- package/packages/tools/dist/forge-ground.d.ts +61 -0
- package/packages/tools/dist/forge-ground.js +1 -0
- package/packages/tools/dist/git-context.d.ts +25 -0
- package/packages/tools/dist/git-context.js +3 -0
- package/packages/tools/dist/graph-query.d.ts +86 -0
- package/packages/tools/dist/graph-query.js +1 -0
- package/packages/tools/dist/guide.d.ts +25 -0
- package/packages/tools/dist/guide.js +1 -0
- package/packages/tools/dist/health.d.ts +16 -0
- package/packages/tools/dist/health.js +2 -0
- package/packages/tools/dist/http-request.d.ts +25 -0
- package/packages/tools/dist/http-request.js +1 -0
- package/packages/tools/dist/index.d.ts +57 -0
- package/packages/tools/dist/index.js +1 -0
- package/packages/tools/dist/lane.d.ts +41 -0
- package/packages/tools/dist/lane.js +6 -0
- package/packages/tools/dist/measure.d.ts +42 -0
- package/packages/tools/dist/measure.js +2 -0
- package/packages/tools/dist/onboard-utils.d.ts +12 -0
- package/packages/tools/dist/onboard-utils.js +1 -0
- package/packages/tools/dist/onboard.d.ts +50 -0
- package/packages/tools/dist/onboard.js +18 -0
- package/packages/tools/dist/parse-output.d.ts +82 -0
- package/packages/tools/dist/parse-output.js +2 -0
- package/packages/tools/dist/path-resolver.d.ts +14 -0
- package/packages/tools/dist/path-resolver.js +1 -0
- package/packages/tools/dist/process-manager.d.ts +20 -0
- package/packages/tools/dist/process-manager.js +1 -0
- package/packages/tools/dist/queue.d.ts +40 -0
- package/packages/tools/dist/queue.js +1 -0
- package/packages/tools/dist/regex-test.d.ts +33 -0
- package/packages/tools/dist/regex-test.js +1 -0
- package/packages/tools/dist/regex-utils.d.ts +8 -0
- package/packages/tools/dist/regex-utils.js +1 -0
- package/packages/tools/dist/rename.d.ts +31 -0
- package/packages/tools/dist/rename.js +2 -0
- package/packages/tools/dist/replay.d.ts +59 -0
- package/packages/tools/dist/replay.js +4 -0
- package/packages/tools/dist/response-envelope.d.ts +43 -0
- package/packages/tools/dist/response-envelope.js +1 -0
- package/packages/tools/dist/restore-points.d.ts +22 -0
- package/packages/tools/dist/restore-points.js +1 -0
- package/packages/tools/dist/schema-validate.d.ts +25 -0
- package/packages/tools/dist/schema-validate.js +1 -0
- package/packages/tools/dist/scope-map.d.ts +51 -0
- package/packages/tools/dist/scope-map.js +1 -0
- package/packages/tools/dist/snippet.d.ts +35 -0
- package/packages/tools/dist/snippet.js +1 -0
- package/packages/tools/dist/stash.d.ts +14 -0
- package/packages/tools/dist/stash.js +1 -0
- package/packages/tools/dist/stratum-card.d.ts +30 -0
- package/packages/tools/dist/stratum-card.js +4 -0
- package/packages/tools/dist/symbol.d.ts +45 -0
- package/packages/tools/dist/symbol.js +3 -0
- package/packages/tools/dist/synthesis-engine.d.ts +13 -0
- package/packages/tools/dist/synthesis-engine.js +6 -0
- package/packages/tools/dist/test-run.d.ts +28 -0
- package/packages/tools/dist/test-run.js +2 -0
- package/packages/tools/dist/text-utils.d.ts +24 -0
- package/packages/tools/dist/text-utils.js +2 -0
- package/packages/tools/dist/time-utils.d.ts +20 -0
- package/packages/tools/dist/time-utils.js +1 -0
- package/packages/tools/dist/trace.d.ts +29 -0
- package/packages/tools/dist/trace.js +2 -0
- package/packages/tools/dist/truncation.d.ts +33 -0
- package/packages/tools/dist/truncation.js +7 -0
- package/packages/tools/dist/watch.d.ts +32 -0
- package/packages/tools/dist/watch.js +1 -0
- package/packages/tools/dist/web-fetch.d.ts +47 -0
- package/packages/tools/dist/web-fetch.js +8 -0
- package/packages/tools/dist/web-search.d.ts +25 -0
- package/packages/tools/dist/web-search.js +1 -0
- package/packages/tools/dist/workset.d.ts +47 -0
- package/packages/tools/dist/workset.js +1 -0
- package/packages/tui/dist/App-DU2KEylW.js +2 -0
- package/packages/tui/dist/App.d.ts +13 -0
- package/packages/tui/dist/App.js +2 -0
- package/packages/tui/dist/CuratedPanel-BIamXLNy.js +2 -0
- package/packages/tui/dist/LogPanel-Bo8a8QXB.js +3 -0
- package/packages/tui/dist/SearchPanel-CpJGczAc.js +2 -0
- package/packages/tui/dist/StatusPanel-BAbUxyqQ.js +2 -0
- package/packages/tui/dist/chunk-D6axbAb-.js +2 -0
- package/packages/tui/dist/devtools-DMOZMn70.js +7 -0
- package/packages/tui/dist/hooks/useKBClient.d.ts +9 -0
- package/packages/tui/dist/hooks/useKBClient.js +2 -0
- package/packages/tui/dist/hooks/usePolling.d.ts +8 -0
- package/packages/tui/dist/hooks/usePolling.js +2 -0
- package/packages/tui/dist/index-BXafekwr.d.ts +64 -0
- package/packages/tui/dist/index.d.ts +7 -0
- package/packages/tui/dist/index.js +2 -0
- package/packages/tui/dist/jsx-runtime-y6Gdq5PZ.js +294 -0
- package/packages/tui/dist/panels/CuratedPanel.d.ts +7 -0
- package/packages/tui/dist/panels/CuratedPanel.js +2 -0
- package/packages/tui/dist/panels/LogPanel.d.ts +7 -0
- package/packages/tui/dist/panels/LogPanel.js +2 -0
- package/packages/tui/dist/panels/SearchPanel.d.ts +7 -0
- package/packages/tui/dist/panels/SearchPanel.js +2 -0
- package/packages/tui/dist/panels/StatusPanel.d.ts +7 -0
- package/packages/tui/dist/panels/StatusPanel.js +2 -0
- package/packages/tui/dist/react-D__J1GQe.js +24 -0
- package/packages/tui/dist/useKBClient-C35iA4uG.js +2 -0
- package/packages/tui/dist/usePolling-BbjnRWgx.js +2 -0
- package/scaffold/README.md +192 -0
- package/scaffold/adapters/claude-code.mjs +56 -0
- package/scaffold/adapters/copilot.mjs +270 -0
- package/scaffold/definitions/agents.mjs +189 -0
- package/scaffold/definitions/bodies.mjs +487 -0
- package/scaffold/definitions/hooks.mjs +43 -0
- package/scaffold/definitions/models.mjs +56 -0
- package/scaffold/definitions/plugins.mjs +38 -0
- package/scaffold/definitions/prompts.mjs +145 -0
- package/scaffold/definitions/protocols.mjs +679 -0
- package/scaffold/definitions/tools.mjs +229 -0
- package/scaffold/flows/aikit-advanced/flow.json +60 -0
- package/scaffold/flows/aikit-advanced/skills/execute/SKILL.md +124 -0
- package/scaffold/flows/aikit-advanced/skills/plan/SKILL.md +100 -0
- package/scaffold/flows/aikit-advanced/skills/spec/SKILL.md +100 -0
- package/scaffold/flows/aikit-advanced/skills/task/SKILL.md +99 -0
- package/scaffold/flows/aikit-advanced/skills/verify/SKILL.md +122 -0
- package/scaffold/flows/aikit-basic/flow.json +36 -0
- package/scaffold/flows/aikit-basic/skills/assess/SKILL.md +82 -0
- package/scaffold/flows/aikit-basic/skills/implement/SKILL.md +105 -0
- package/scaffold/flows/aikit-basic/skills/verify/SKILL.md +96 -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 +34 -0
- package/scaffold/general/agents/Documenter.agent.md +53 -0
- package/scaffold/general/agents/Explorer.agent.md +63 -0
- package/scaffold/general/agents/Frontend.agent.md +29 -0
- package/scaffold/general/agents/Implementer.agent.md +33 -0
- package/scaffold/general/agents/Orchestrator.agent.md +149 -0
- package/scaffold/general/agents/Planner.agent.md +79 -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 +55 -0
- package/scaffold/general/agents/_shared/architect-reviewer-base.md +60 -0
- package/scaffold/general/agents/_shared/code-agent-base.md +262 -0
- package/scaffold/general/agents/_shared/code-reviewer-base.md +64 -0
- package/scaffold/general/agents/_shared/decision-protocol.md +27 -0
- package/scaffold/general/agents/_shared/forge-protocol.md +90 -0
- package/scaffold/general/agents/_shared/researcher-base.md +101 -0
- package/scaffold/general/agents/templates/adr-template.md +28 -0
- package/scaffold/general/agents/templates/execution-state.md +26 -0
- package/scaffold/general/prompts/ask.prompt.md +21 -0
- package/scaffold/general/prompts/debug.prompt.md +25 -0
- package/scaffold/general/prompts/design.prompt.md +23 -0
- package/scaffold/general/prompts/implement.prompt.md +26 -0
- package/scaffold/general/prompts/plan.prompt.md +25 -0
- package/scaffold/general/prompts/review.prompt.md +32 -0
- package/scaffold/general/skills/adr-skill/SKILL.md +329 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-madr.md +89 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-readme.md +20 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-simple.md +46 -0
- package/scaffold/general/skills/adr-skill/references/adr-conventions.md +95 -0
- package/scaffold/general/skills/adr-skill/references/examples.md +193 -0
- package/scaffold/general/skills/adr-skill/references/review-checklist.md +77 -0
- package/scaffold/general/skills/adr-skill/references/template-variants.md +52 -0
- package/scaffold/general/skills/adr-skill/scripts/bootstrap_adr.js +259 -0
- package/scaffold/general/skills/adr-skill/scripts/new_adr.js +391 -0
- package/scaffold/general/skills/adr-skill/scripts/set_adr_status.js +169 -0
- package/scaffold/general/skills/aikit/SKILL.md +521 -0
- package/scaffold/general/skills/brainstorming/SKILL.md +259 -0
- package/scaffold/general/skills/brainstorming/scripts/frame-template.html +365 -0
- package/scaffold/general/skills/brainstorming/scripts/helper.js +216 -0
- package/scaffold/general/skills/brainstorming/scripts/server.cjs +9 -0
- package/scaffold/general/skills/brainstorming/scripts/server.src.cjs +249 -0
- package/scaffold/general/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/scaffold/general/skills/brainstorming/visual-companion.md +430 -0
- package/scaffold/general/skills/c4-architecture/SKILL.md +295 -0
- package/scaffold/general/skills/c4-architecture/references/advanced-patterns.md +552 -0
- package/scaffold/general/skills/c4-architecture/references/c4-syntax.md +492 -0
- package/scaffold/general/skills/c4-architecture/references/common-mistakes.md +437 -0
- package/scaffold/general/skills/lesson-learned/SKILL.md +105 -0
- package/scaffold/general/skills/lesson-learned/references/anti-patterns.md +55 -0
- package/scaffold/general/skills/lesson-learned/references/se-principles.md +109 -0
- package/scaffold/general/skills/multi-agents-development/SKILL.md +435 -0
- package/scaffold/general/skills/multi-agents-development/architecture-review-prompt.md +81 -0
- package/scaffold/general/skills/multi-agents-development/code-quality-review-prompt.md +91 -0
- package/scaffold/general/skills/multi-agents-development/implementer-prompt.md +93 -0
- package/scaffold/general/skills/multi-agents-development/parallel-dispatch-example.md +167 -0
- package/scaffold/general/skills/multi-agents-development/spec-review-prompt.md +81 -0
- package/scaffold/general/skills/present/SKILL.md +424 -0
- package/scaffold/general/skills/requirements-clarity/SKILL.md +324 -0
- package/scaffold/general/skills/session-handoff/SKILL.md +189 -0
- package/scaffold/general/skills/session-handoff/references/handoff-template.md +139 -0
- package/scaffold/general/skills/session-handoff/references/resume-checklist.md +80 -0
- package/scaffold/general/skills/session-handoff/scripts/check_staleness.js +269 -0
- package/scaffold/general/skills/session-handoff/scripts/create_handoff.js +299 -0
- package/scaffold/general/skills/session-handoff/scripts/list_handoffs.js +113 -0
- package/scaffold/general/skills/session-handoff/scripts/validate_handoff.js +241 -0
- package/scaffold/generate.mjs +82 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
//#region packages/enterprise-bridge/src/types.d.ts
|
|
2
|
+
/** ER bridge configuration (subset of KBConfig.er) */
|
|
3
|
+
interface ERBridgeConfig {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
apiKey: string;
|
|
7
|
+
timeoutMs: number;
|
|
8
|
+
cacheTtlMs: number;
|
|
9
|
+
cacheMaxEntries: number;
|
|
10
|
+
fallbackThreshold: number;
|
|
11
|
+
}
|
|
12
|
+
/** Result from ER search API */
|
|
13
|
+
interface ERSearchResult {
|
|
14
|
+
content: string;
|
|
15
|
+
sourcePath: string;
|
|
16
|
+
score: number;
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
/** Response from ER search API (POST /api/v1/search) */
|
|
20
|
+
interface ERSearchResponse {
|
|
21
|
+
sources: Array<{
|
|
22
|
+
content: string;
|
|
23
|
+
metadata: Record<string, string>;
|
|
24
|
+
score?: number;
|
|
25
|
+
confidence?: number;
|
|
26
|
+
}>;
|
|
27
|
+
query?: string;
|
|
28
|
+
searchMode?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Push request to ER */
|
|
31
|
+
interface ERPushRequest {
|
|
32
|
+
title: string;
|
|
33
|
+
content: string;
|
|
34
|
+
category?: string;
|
|
35
|
+
tags?: string[];
|
|
36
|
+
}
|
|
37
|
+
/** Push response from ER */
|
|
38
|
+
interface ERPushResponse {
|
|
39
|
+
pushed: boolean;
|
|
40
|
+
status: 'stored' | 'failed';
|
|
41
|
+
remotePath?: string;
|
|
42
|
+
timestamp: string;
|
|
43
|
+
error?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Transient ER error (429, 5xx, network) — retries exhausted but not a permanent failure */
|
|
46
|
+
declare class ERTransientError extends Error {
|
|
47
|
+
readonly statusCode?: number | undefined;
|
|
48
|
+
constructor(message: string, statusCode?: number | undefined);
|
|
49
|
+
}
|
|
50
|
+
/** Sync status entry for tracking push history */
|
|
51
|
+
interface ERSyncEntry {
|
|
52
|
+
entryId: string;
|
|
53
|
+
title: string;
|
|
54
|
+
pushedAt: string;
|
|
55
|
+
status: 'stored' | 'failed';
|
|
56
|
+
remotePath?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Cache entry wrapping ER search results */
|
|
59
|
+
interface ERCacheEntry {
|
|
60
|
+
results: ERSearchResult[];
|
|
61
|
+
query: string;
|
|
62
|
+
cachedAt: number;
|
|
63
|
+
ttl: number;
|
|
64
|
+
}
|
|
65
|
+
/** Merged search result with source provenance */
|
|
66
|
+
interface MergedSearchResult {
|
|
67
|
+
content: string;
|
|
68
|
+
sourcePath: string;
|
|
69
|
+
score: number;
|
|
70
|
+
source: 'local' | 'er';
|
|
71
|
+
startLine?: number;
|
|
72
|
+
endLine?: number;
|
|
73
|
+
contentType?: string;
|
|
74
|
+
headingPath?: string;
|
|
75
|
+
origin?: string;
|
|
76
|
+
category?: string;
|
|
77
|
+
tags?: string[];
|
|
78
|
+
metadata?: Record<string, unknown>;
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { ERBridgeConfig, ERCacheEntry, ERPushRequest, ERPushResponse, ERSearchResponse, ERSearchResult, ERSyncEntry, ERTransientError, MergedSearchResult };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class extends Error{constructor(e,t){super(e),this.statusCode=t,this.name=`ERTransientError`}};export{e as ERTransientError};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FlowFormatAdapter, FlowManifest } from "../types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/adapters/claude-plugin.d.ts
|
|
4
|
+
declare class ClaudePluginAdapter implements FlowFormatAdapter {
|
|
5
|
+
readonly format: "claude-plugin";
|
|
6
|
+
detect(sourceDir: string): boolean;
|
|
7
|
+
parse(sourceDir: string): Promise<FlowManifest>;
|
|
8
|
+
private discoverSteps;
|
|
9
|
+
private discoverAgents;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ClaudePluginAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as e,readFileSync as t,readdirSync as n}from"node:fs";import{basename as r,join as i}from"node:path";const a=[`spec`,`plan`,`task`,`execute`,`verify`];var o=class{format=`claude-plugin`;detect(t){return e(i(t,`.claude-plugin`,`plugin.json`))}async parse(e){let n=i(e,`.claude-plugin`,`plugin.json`),a=JSON.parse(t(n,`utf-8`)),o=this.discoverSteps(e),s=this.discoverAgents(e);return{name:a.name??r(e),version:a.version??`1.0.0`,description:a.description??``,author:a.author,steps:o,agents:s,artifacts_dir:`.spec`,install:[]}}discoverSteps(t){let r=i(t,`skills`);if(!e(r))return[];let o=n(r,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).sort((e,t)=>{let n=a.indexOf(e),r=a.indexOf(t);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.localeCompare(t):1:-1});return o.map((e,t)=>({id:e,name:e.charAt(0).toUpperCase()+e.slice(1),skill:`skills/${e}/SKILL.md`,produces:[`${e}.md`],requires:t>0?[o[t-1]]:[],agents:[],description:`${e} step`}))}discoverAgents(t){let r=i(t,`agents`);return e(r)?n(r,{withFileTypes:!0}).filter(e=>e.isFile()&&e.name.endsWith(`.md`)).map(e=>`agents/${e.name}`):[]}};export{o as ClaudePluginAdapter};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlowFormatAdapter, FlowManifest } from "../types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/adapters/copilot.d.ts
|
|
4
|
+
declare class CopilotAdapter implements FlowFormatAdapter {
|
|
5
|
+
readonly format: "copilot";
|
|
6
|
+
detect(sourceDir: string): boolean;
|
|
7
|
+
parse(sourceDir: string): Promise<FlowManifest>;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { CopilotAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as e,readdirSync as t}from"node:fs";import{basename as n,join as r}from"node:path";var i=class{format=`copilot`;detect(t){return e(r(t,`.github`,`agents`))}async parse(e){let i=t(r(e,`.github`,`agents`),{withFileTypes:!0}).filter(e=>e.isFile()&&e.name.endsWith(`.md`)).map(e=>`.github/agents/${e.name}`),a=i.map((e,t)=>{let r=n(e,`.md`).toLowerCase().replace(/\.agent$/,``);return{id:r,name:r.charAt(0).toUpperCase()+r.slice(1),skill:e,produces:[`${r}.md`],requires:t>0?[i[t-1].replace(/.*\//,``).replace(/\.md$/,``).toLowerCase()]:[],agents:[e],description:`${r} agent step`}});return{name:n(e),version:`1.0.0`,description:`Copilot agents flow from ${n(e)}`,steps:a,agents:i,artifacts_dir:`.spec`,install:[]}}};export{i as CopilotAdapter};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FlowFormat, FlowFormatAdapter } from "../types.js";
|
|
2
|
+
import { ClaudePluginAdapter } from "./claude-plugin.js";
|
|
3
|
+
import { CopilotAdapter } from "./copilot.js";
|
|
4
|
+
import { NativeAdapter } from "./native.js";
|
|
5
|
+
|
|
6
|
+
//#region packages/flows/src/adapters/index.d.ts
|
|
7
|
+
declare function detectFormat(sourceDir: string): FlowFormat | null;
|
|
8
|
+
declare function getAdapter(format: FlowFormat): FlowFormatAdapter;
|
|
9
|
+
declare function getAdapterForSource(sourceDir: string): FlowFormatAdapter | null;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ClaudePluginAdapter, CopilotAdapter, NativeAdapter, detectFormat, getAdapter, getAdapterForSource };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ClaudePluginAdapter as e}from"./claude-plugin.js";import{CopilotAdapter as t}from"./copilot.js";import{NativeAdapter as n}from"./native.js";const r=[new n,new e,new t];function i(e){for(let t of r)if(t.detect(e))return t.format;return null}function a(e){let t=r.find(t=>t.format===e);if(!t)throw Error(`No adapter for format: ${e}`);return t}function o(e){for(let t of r)if(t.detect(e))return t;return null}export{e as ClaudePluginAdapter,t as CopilotAdapter,n as NativeAdapter,i as detectFormat,a as getAdapter,o as getAdapterForSource};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlowFormatAdapter, FlowManifest } from "../types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/adapters/native.d.ts
|
|
4
|
+
declare class NativeAdapter implements FlowFormatAdapter {
|
|
5
|
+
readonly format: "native";
|
|
6
|
+
detect(sourceDir: string): boolean;
|
|
7
|
+
parse(sourceDir: string): Promise<FlowManifest>;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { NativeAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as e,readFileSync as t}from"node:fs";import{join as n}from"node:path";var r=class{format=`native`;detect(t){return e(n(t,`flow.json`))}async parse(e){let r=t(n(e,`flow.json`),`utf-8`);return JSON.parse(r)}};export{r as NativeAdapter};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FlowManifest } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/builtins.d.ts
|
|
4
|
+
interface BuiltinFlow {
|
|
5
|
+
/** Flow manifest */
|
|
6
|
+
manifest: FlowManifest;
|
|
7
|
+
/** Relative path within the monorepo where scaffold files live */
|
|
8
|
+
scaffoldDir: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Returns all built-in flow definitions bundled with @aikit/flows.
|
|
12
|
+
* These flows are always available, even without installation via `flow add`.
|
|
13
|
+
*/
|
|
14
|
+
declare function getBuiltinFlows(): BuiltinFlow[];
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BuiltinFlow, getBuiltinFlows };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={name:`aikit:basic`,version:`0.1.0`,description:`Quick development flow for bug fixes, small features, and refactoring`,steps:[{id:`assess`,name:`Assessment`,skill:`skills/assess/SKILL.md`,produces:[`assessment.md`],requires:[],agents:[`Explorer`,`Researcher-Alpha`],description:`Understand scope, analyze codebase, identify approach`},{id:`implement`,name:`Implementation`,skill:`skills/implement/SKILL.md`,produces:[`progress.md`],requires:[`assessment.md`],agents:[`Implementer`,`Frontend`],description:`Write code following the assessment plan`},{id:`verify`,name:`Verification`,skill:`skills/verify/SKILL.md`,produces:[`verify-report.md`],requires:[`progress.md`],agents:[`Code-Reviewer-Alpha`,`Security`],description:`Review code, run tests, validate changes`}],agents:[],artifacts_dir:`.spec`,install:[]},t={name:`aikit:advanced`,version:`0.1.0`,description:`Full development flow for new features, API design, and architecture changes`,steps:[{id:`spec`,name:`Specification`,skill:`skills/spec/SKILL.md`,produces:[`spec.md`],requires:[],agents:[`Researcher-Alpha`],description:`Elicit requirements, clarify scope, define acceptance criteria`},{id:`plan`,name:`Planning`,skill:`skills/plan/SKILL.md`,produces:[`plan.md`],requires:[`spec.md`],agents:[`Planner`,`Explorer`],description:`Analyze codebase, design architecture, create implementation plan`},{id:`task`,name:`Task Breakdown`,skill:`skills/task/SKILL.md`,produces:[`tasks.md`],requires:[`plan.md`],agents:[`Planner`,`Architect-Reviewer-Alpha`],description:`Break plan into ordered implementation tasks with dependencies`},{id:`execute`,name:`Execution`,skill:`skills/execute/SKILL.md`,produces:[`progress.md`],requires:[`tasks.md`],agents:[`Orchestrator`,`Implementer`,`Frontend`,`Refactor`],description:`Implement all tasks, write code, write tests`},{id:`verify`,name:`Verification`,skill:`skills/verify/SKILL.md`,produces:[`verify-report.md`],requires:[`progress.md`],agents:[`Code-Reviewer-Alpha`,`Code-Reviewer-Beta`,`Architect-Reviewer-Alpha`,`Architect-Reviewer-Beta`,`Security`],description:`Dual code review, architecture review, security review, test validation`}],agents:[],artifacts_dir:`.spec`,install:[]};function n(){return[{manifest:e,scaffoldDir:`scaffold/flows/aikit-basic`},{manifest:t,scaffoldDir:`scaffold/flows/aikit-advanced`}]}export{n as getBuiltinFlows};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FlowManifest } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/foundation.d.ts
|
|
4
|
+
declare class FoundationIntegration {
|
|
5
|
+
/**
|
|
6
|
+
* Inject foundation preamble into a file.
|
|
7
|
+
* Replaces existing preamble if present, otherwise prepends.
|
|
8
|
+
*/
|
|
9
|
+
injectPreamble(filePath: string, manifest: FlowManifest): void;
|
|
10
|
+
/**
|
|
11
|
+
* Remove foundation preamble from a file.
|
|
12
|
+
*/
|
|
13
|
+
removePreamble(filePath: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get list of IDE instruction files to inject preamble into.
|
|
16
|
+
*/
|
|
17
|
+
getTargetFiles(workspaceRoot: string): string[];
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { FoundationIntegration };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{existsSync as e,readFileSync as t,writeFileSync as n}from"node:fs";import{join as r}from"node:path";const i=`<!-- aikit foundation context -->`,a=`<!-- end foundation context -->`;function o(e){let t=e.artifacts_dir||`.spec`;return`${i}
|
|
2
|
+
You are operating within the @vpxa/aikit framework.
|
|
3
|
+
- Use aikit MCP tools for all search, analysis, and memory operations
|
|
4
|
+
- Follow agents defined in AGENTS.md for delegation
|
|
5
|
+
- Use built-in skills (brainstorming, requirements-clarity, etc.) as needed
|
|
6
|
+
- Track state via the flow state machine (flow_status, flow_step)
|
|
7
|
+
- Active flow: ${e.name} v${e.version}
|
|
8
|
+
- Artifacts go in: ${t}/${e.name}/
|
|
9
|
+
${a}`}var s=class{injectPreamble(r,s){let c=o(s);if(!e(r)){n(r,`${c}\n`,`utf-8`);return}let l=t(r,`utf-8`),u=l.indexOf(i),d=l.indexOf(a);if(u!==-1&&d!==-1){n(r,`${l.slice(0,u)}${c}${l.slice(d+31)}`,`utf-8`);return}n(r,`${c}\n\n${l}`,`utf-8`)}removePreamble(r){if(!e(r))return;let o=t(r,`utf-8`),s=o.indexOf(i),c=o.indexOf(a);s===-1||c===-1||n(r,(o.slice(0,s)+o.slice(c+31)).replace(/^\n+/,``).replace(/\n{3,}/g,`
|
|
10
|
+
|
|
11
|
+
`),`utf-8`)}getTargetFiles(t){let n=[],i=r(t,`.github`,`copilot-instructions.md`);e(i)&&n.push(i);let a=r(t,`CLAUDE.md`);e(a)&&n.push(a);let o=r(t,`AGENTS.md`);return e(o)&&n.push(o),n}};export{s as FoundationIntegration};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FlowResult } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/git.d.ts
|
|
4
|
+
declare class GitInstaller {
|
|
5
|
+
private readonly flowsDir;
|
|
6
|
+
constructor(flowsDir: string);
|
|
7
|
+
/**
|
|
8
|
+
* Clone a git repo into the flows directory.
|
|
9
|
+
* Returns the local install path.
|
|
10
|
+
*/
|
|
11
|
+
clone(repoUrl: string): FlowResult<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Update an existing cloned flow repo.
|
|
14
|
+
*/
|
|
15
|
+
update(installPath: string): FlowResult;
|
|
16
|
+
/**
|
|
17
|
+
* Copy a local directory as a flow source.
|
|
18
|
+
*/
|
|
19
|
+
copyLocal(sourcePath: string, name: string): FlowResult<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Remove installed flow files.
|
|
22
|
+
*/
|
|
23
|
+
remove(installPath: string): FlowResult;
|
|
24
|
+
/**
|
|
25
|
+
* Run install dependencies for a flow.
|
|
26
|
+
* Processes the `install[]` field from flow.json.
|
|
27
|
+
*/
|
|
28
|
+
runInstallDeps(installEntries: string[]): FlowResult;
|
|
29
|
+
/** Extract repo name from git URL */
|
|
30
|
+
private repoNameFromUrl;
|
|
31
|
+
private ensureFlowsDir;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { GitInstaller };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cpSync as e,existsSync as t,mkdirSync as n,rmSync as r}from"node:fs";import{basename as i,join as a}from"node:path";import{execSync as o}from"node:child_process";var s=class{constructor(e){this.flowsDir=e}clone(e){let n=this.repoNameFromUrl(e),r=a(this.flowsDir,n);if(t(r))return{success:!1,error:`Flow "${n}" already installed at ${r}. Use update instead.`};try{return this.ensureFlowsDir(),o(`git clone --depth 1 ${e} ${r}`,{stdio:`pipe`,timeout:6e4}),{success:!0,data:r}}catch(e){return{success:!1,error:`Git clone failed: ${e instanceof Error?e.message:String(e)}`}}}update(e){if(!t(e))return{success:!1,error:`Install path not found: ${e}`};try{return o(`git pull --ff-only`,{cwd:e,stdio:`pipe`,timeout:6e4}),{success:!0}}catch(e){return{success:!1,error:`Git pull failed: ${e instanceof Error?e.message:String(e)}`}}}copyLocal(n,r){let i=a(this.flowsDir,r);if(t(i))return{success:!1,error:`Flow "${r}" already installed at ${i}`};try{return this.ensureFlowsDir(),e(n,i,{recursive:!0}),{success:!0,data:i}}catch(e){return{success:!1,error:`Copy failed: ${e instanceof Error?e.message:String(e)}`}}}remove(e){if(!t(e))return{success:!0};try{return r(e,{recursive:!0,force:!0}),{success:!0}}catch(e){return{success:!1,error:`Remove failed: ${e instanceof Error?e.message:String(e)}`}}}runInstallDeps(e){for(let t of e)try{if(t.startsWith(`npm:`)){o(`npx skills add ${t.slice(4)} -g`,{stdio:`pipe`,timeout:12e4});continue}if(t.endsWith(`.git`)||t.includes(`github.com`)){o(`npx skills add ${t} -g`,{stdio:`pipe`,timeout:12e4});continue}return{success:!1,error:`Unknown install entry format: ${t}`}}catch(e){return{success:!1,error:`Install dependency failed for "${t}": ${e instanceof Error?e.message:String(e)}`}}return{success:!0}}repoNameFromUrl(e){return i(e).replace(/\.git$/,``)}ensureFlowsDir(){t(this.flowsDir)||n(this.flowsDir,{recursive:!0})}};export{s as GitInstaller};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FlowFormat, FlowFormatAdapter, FlowManifest, FlowRegistry, FlowRegistryEntry, FlowResult, FlowSourceType, FlowState, FlowStatus, FlowStep, StepAction } from "./types.js";
|
|
2
|
+
import { ClaudePluginAdapter } from "./adapters/claude-plugin.js";
|
|
3
|
+
import { CopilotAdapter } from "./adapters/copilot.js";
|
|
4
|
+
import { NativeAdapter } from "./adapters/native.js";
|
|
5
|
+
import { BuiltinFlow, getBuiltinFlows } from "./builtins.js";
|
|
6
|
+
import { FoundationIntegration } from "./foundation.js";
|
|
7
|
+
import { GitInstaller } from "./git.js";
|
|
8
|
+
import { FlowLoader } from "./loader.js";
|
|
9
|
+
import { FlowRegistryManager } from "./registry.js";
|
|
10
|
+
import { FlowStateMachine } from "./state-machine.js";
|
|
11
|
+
import { SymlinkManager } from "./symlinks.js";
|
|
12
|
+
export { type BuiltinFlow, ClaudePluginAdapter, CopilotAdapter, type FlowFormat, type FlowFormatAdapter, FlowLoader, type FlowManifest, type FlowRegistry, type FlowRegistryEntry, FlowRegistryManager, type FlowResult, type FlowSourceType, type FlowState, FlowStateMachine, type FlowStatus, type FlowStep, FoundationIntegration, GitInstaller, NativeAdapter, type StepAction, SymlinkManager, getBuiltinFlows };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getBuiltinFlows as e}from"./builtins.js";import{FoundationIntegration as t}from"./foundation.js";import{GitInstaller as n}from"./git.js";import{ClaudePluginAdapter as r}from"./adapters/claude-plugin.js";import{CopilotAdapter as i}from"./adapters/copilot.js";import{NativeAdapter as a}from"./adapters/native.js";import{FlowLoader as o}from"./loader.js";import{FlowRegistryManager as s}from"./registry.js";import{FlowStateMachine as c}from"./state-machine.js";import{SymlinkManager as l}from"./symlinks.js";export{r as ClaudePluginAdapter,i as CopilotAdapter,o as FlowLoader,s as FlowRegistryManager,c as FlowStateMachine,t as FoundationIntegration,n as GitInstaller,a as NativeAdapter,l as SymlinkManager,e as getBuiltinFlows};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FlowFormat, FlowManifest, FlowResult } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/loader.d.ts
|
|
4
|
+
declare class FlowLoader {
|
|
5
|
+
load(sourceDir: string): Promise<FlowResult<{
|
|
6
|
+
manifest: FlowManifest;
|
|
7
|
+
format: FlowFormat;
|
|
8
|
+
}>>;
|
|
9
|
+
loadWithFormat(sourceDir: string, format: FlowFormat): Promise<FlowResult<FlowManifest>>;
|
|
10
|
+
validate(manifest: FlowManifest): FlowResult;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { FlowLoader };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getAdapter as e,getAdapterForSource as t}from"./adapters/index.js";import{existsSync as n}from"node:fs";var r=class{async load(e){if(!n(e))return{success:!1,error:`Source directory not found: ${e}`};let r=t(e);if(!r)return{success:!1,error:`No format adapter matches source: ${e}`};try{let t=await r.parse(e),n=this.validate(t);return n.success?{success:!0,data:{manifest:t,format:r.format}}:n}catch(e){return{success:!1,error:`Failed to parse flow: ${e instanceof Error?e.message:String(e)}`}}}async loadWithFormat(t,n){let r=e(n);try{let e=await r.parse(t),n=this.validate(e);return n.success?{success:!0,data:e}:n}catch(e){return{success:!1,error:`Failed to parse flow: ${e instanceof Error?e.message:String(e)}`}}}validate(e){let t=[];e.name?.trim()||t.push(`Missing flow name`),e.version?.trim()||t.push(`Missing flow version`),e.steps?.length||t.push(`Flow must have at least one step`);let n=new Set(e.steps.map(e=>e.id));for(let r of e.steps??[]){r.id?.trim()||t.push(`Step missing id`),r.skill?.trim()||t.push(`Step "${r.id}" missing skill path`);for(let e of r.requires??[])n.has(e)||t.push(`Step "${r.id}" requires unknown step "${e}"`)}return n.size!==(e.steps?.length??0)&&t.push(`Duplicate step IDs found`),t.length>0?{success:!1,error:`Validation failed:\n${t.join(`
|
|
2
|
+
`)}`}:{success:!0}}};export{r as FlowLoader};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FlowRegistry, FlowRegistryEntry, FlowResult } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/registry.d.ts
|
|
4
|
+
declare class FlowRegistryManager {
|
|
5
|
+
private readonly registryPath;
|
|
6
|
+
constructor(registryPath: string);
|
|
7
|
+
/** Load registry from disk, or create empty if missing */
|
|
8
|
+
load(): FlowRegistry;
|
|
9
|
+
/** Save registry to disk */
|
|
10
|
+
save(registry: FlowRegistry): void;
|
|
11
|
+
/** Register a new flow or update an existing one */
|
|
12
|
+
register(entry: FlowRegistryEntry): FlowResult;
|
|
13
|
+
/** Remove a flow from the registry */
|
|
14
|
+
unregister(name: string): FlowResult;
|
|
15
|
+
/** Get a specific flow entry */
|
|
16
|
+
get(name: string): FlowRegistryEntry | null;
|
|
17
|
+
/** List all registered flows */
|
|
18
|
+
list(): FlowRegistryEntry[];
|
|
19
|
+
/** Check if a flow is registered */
|
|
20
|
+
has(name: string): boolean;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { FlowRegistryManager };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as e,mkdirSync as t,readFileSync as n,writeFileSync as r}from"node:fs";import{dirname as i}from"node:path";var a=class{constructor(e){this.registryPath=e}load(){if(!e(this.registryPath))return{version:1,flows:{}};try{let e=n(this.registryPath,`utf-8`);return JSON.parse(e)}catch{return{version:1,flows:{}}}}save(n){let a=i(this.registryPath);e(a)||t(a,{recursive:!0}),r(this.registryPath,JSON.stringify(n,null,2),`utf-8`)}register(e){let t=this.load();return t.flows[e.name]=e,this.save(t),{success:!0}}unregister(e){let t=this.load();return t.flows[e]?(delete t.flows[e],this.save(t),{success:!0}):{success:!1,error:`Flow "${e}" not found in registry`}}get(e){return this.load().flows[e]??null}list(){let e=this.load();return Object.values(e.flows)}has(e){return e in this.load().flows}};export{a as FlowRegistryManager};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FlowManifest, FlowResult, FlowState, StepAction } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/state-machine.d.ts
|
|
4
|
+
declare class FlowStateMachine {
|
|
5
|
+
private readonly statePath;
|
|
6
|
+
constructor(statePath: string);
|
|
7
|
+
/** Load active flow state from disk, or null if no active flow */
|
|
8
|
+
load(): FlowState | null;
|
|
9
|
+
/** Save state to disk */
|
|
10
|
+
private save;
|
|
11
|
+
/** Start a new flow */
|
|
12
|
+
start(flowName: string, manifest: FlowManifest): FlowResult<FlowState>;
|
|
13
|
+
/** Advance the flow: next, skip, or redo current step */
|
|
14
|
+
step(action: StepAction, manifest: FlowManifest): FlowResult<FlowState>;
|
|
15
|
+
/** Get current flow status */
|
|
16
|
+
getStatus(): FlowResult<FlowState>;
|
|
17
|
+
/** Reset flow state (clear active flow) */
|
|
18
|
+
reset(): FlowResult;
|
|
19
|
+
/** Record an artifact produced by a step */
|
|
20
|
+
recordArtifact(name: string, path: string): FlowResult;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { FlowStateMachine };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as e,mkdirSync as t,readFileSync as n,unlinkSync as r,writeFileSync as i}from"node:fs";import{dirname as a}from"node:path";var o=class{constructor(e){this.statePath=e}load(){if(!e(this.statePath))return null;try{let e=n(this.statePath,`utf-8`);return JSON.parse(e)}catch{return null}}save(n){let r=a(this.statePath);e(r)||t(r,{recursive:!0}),i(this.statePath,JSON.stringify(n,null,2),`utf-8`)}start(e,t){let n=this.load();if(n&&n.status===`active`)return{success:!1,error:`Flow "${n.flow}" is already active. Reset it first.`};if(!t.steps.length)return{success:!1,error:`Flow has no steps`};let r=new Date().toISOString(),i={flow:e,status:`active`,currentStep:t.steps[0].id,completedSteps:[],skippedSteps:[],artifacts:{},startedAt:r,updatedAt:r};return this.save(i),{success:!0,data:i}}step(e,t){let n=this.load();if(!n)return{success:!1,error:`No active flow`};if(n.status!==`active`)return{success:!1,error:`Flow is ${n.status}, not active`};if(!n.currentStep)return{success:!1,error:`No current step`};let r=t.steps.findIndex(e=>e.id===n.currentStep);if(r===-1)return{success:!1,error:`Current step "${n.currentStep}" not found in manifest`};let i=new Date().toISOString();switch(e){case`next`:{n.completedSteps.includes(n.currentStep)||n.completedSteps.push(n.currentStep);let e=r+1;e>=t.steps.length?(n.currentStep=null,n.status=`completed`):n.currentStep=t.steps[e].id;break}case`skip`:{n.skippedSteps.includes(n.currentStep)||n.skippedSteps.push(n.currentStep);let e=r+1;e>=t.steps.length?(n.currentStep=null,n.status=`completed`):n.currentStep=t.steps[e].id;break}case`redo`:n.completedSteps=n.completedSteps.filter(e=>e!==n.currentStep),n.skippedSteps=n.skippedSteps.filter(e=>e!==n.currentStep);break}return n.updatedAt=i,this.save(n),{success:!0,data:n}}getStatus(){let e=this.load();return e?{success:!0,data:e}:{success:!1,error:`No active flow`}}reset(){return e(this.statePath)&&r(this.statePath),{success:!0}}recordArtifact(e,t){let n=this.load();return n?(n.artifacts[e]=t,n.updatedAt=new Date().toISOString(),this.save(n),{success:!0}):{success:!1,error:`No active flow`}}};export{o as FlowStateMachine};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FlowManifest } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/flows/src/symlinks.d.ts
|
|
4
|
+
declare class SymlinkManager {
|
|
5
|
+
/**
|
|
6
|
+
* Create agent symlinks for a flow in the workspace.
|
|
7
|
+
*/
|
|
8
|
+
createSymlinks(workspaceRoot: string, flowName: string, flowInstallPath: string, manifest: FlowManifest): void;
|
|
9
|
+
/**
|
|
10
|
+
* Remove agent symlinks for a flow.
|
|
11
|
+
*/
|
|
12
|
+
removeSymlinks(workspaceRoot: string, flowName: string): void;
|
|
13
|
+
private getTargets;
|
|
14
|
+
private getAgentStem;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { SymlinkManager };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{copyFileSync as e,existsSync as t,mkdirSync as n,readdirSync as r,rmdirSync as i,symlinkSync as a,unlinkSync as o}from"node:fs";import{basename as s,dirname as c,join as l,relative as u}from"node:path";var d=class{createSymlinks(r,i,s,d){let f=this.getTargets(r,i);for(let r of f){t(r.baseDir)||n(r.baseDir,{recursive:!0});for(let n of d.agents){let i=l(s,n);if(!t(i))continue;let d=this.getAgentStem(n),f=l(r.baseDir,`${d}${r.extension}`);t(f)&&o(f);let p=u(c(f),i);try{a(p,f,`file`)}catch{e(i,f)}}}}removeSymlinks(e,n){let a=this.getTargets(e,n);for(let e of a)if(t(e.baseDir))try{let t=r(e.baseDir,{withFileTypes:!0});for(let n of t)!n.isFile()&&!n.isSymbolicLink()||o(l(e.baseDir,n.name));r(e.baseDir).length===0&&i(e.baseDir)}catch{}}getTargets(e,t){return[{ide:`copilot`,baseDir:l(e,`.github`,`agents`,`flows`,t),extension:`.agent.md`},{ide:`claude-code`,baseDir:l(e,`.claude`,`agents`,`flows`,t),extension:`.md`}]}getAgentStem(e){return s(e).replace(/\.agent\.md$/,``).replace(/\.md$/,``)}};export{d as SymlinkManager};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
//#region packages/flows/src/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @aikit/flows — Type definitions for the pluggable flow system.
|
|
4
|
+
*/
|
|
5
|
+
/** A single step in a flow */
|
|
6
|
+
interface FlowStep {
|
|
7
|
+
/** Unique step identifier within the flow (e.g., "spec", "plan", "execute") */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Human-readable step name */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Relative path to the step's SKILL.md file */
|
|
12
|
+
skill: string;
|
|
13
|
+
/** Artifact filenames this step produces */
|
|
14
|
+
produces: string[];
|
|
15
|
+
/** Step IDs this step depends on (must be completed first) */
|
|
16
|
+
requires: string[];
|
|
17
|
+
/** Agent files specific to this step (relative paths) */
|
|
18
|
+
agents: string[];
|
|
19
|
+
/** Step description */
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
/** Flow manifest — the flow.json schema */
|
|
23
|
+
interface FlowManifest {
|
|
24
|
+
/** Flow name (unique identifier) */
|
|
25
|
+
name: string;
|
|
26
|
+
/** Semantic version */
|
|
27
|
+
version: string;
|
|
28
|
+
/** Human-readable description */
|
|
29
|
+
description: string;
|
|
30
|
+
/** Author name or organization */
|
|
31
|
+
author?: string;
|
|
32
|
+
/** Ordered list of steps */
|
|
33
|
+
steps: FlowStep[];
|
|
34
|
+
/** Flow-level agent files (relative paths) */
|
|
35
|
+
agents: string[];
|
|
36
|
+
/** Directory for artifacts (default: ".spec") */
|
|
37
|
+
artifacts_dir: string;
|
|
38
|
+
/** External dependencies to install at flow-add time */
|
|
39
|
+
install: string[];
|
|
40
|
+
}
|
|
41
|
+
/** Source type for flow installation */
|
|
42
|
+
type FlowSourceType = 'builtin' | 'git' | 'local';
|
|
43
|
+
/** Detected format of the flow source */
|
|
44
|
+
type FlowFormat = 'native' | 'claude-plugin' | 'copilot';
|
|
45
|
+
/** Registry entry for an installed flow */
|
|
46
|
+
interface FlowRegistryEntry {
|
|
47
|
+
/** Flow name */
|
|
48
|
+
name: string;
|
|
49
|
+
/** Flow version */
|
|
50
|
+
version: string;
|
|
51
|
+
/** Original source (URL, path, or "builtin") */
|
|
52
|
+
source: string;
|
|
53
|
+
/** How the flow was installed */
|
|
54
|
+
sourceType: FlowSourceType;
|
|
55
|
+
/** Absolute path where flow files are stored */
|
|
56
|
+
installPath: string;
|
|
57
|
+
/** Detected source format */
|
|
58
|
+
format: FlowFormat;
|
|
59
|
+
/** ISO timestamp when registered */
|
|
60
|
+
registeredAt: string;
|
|
61
|
+
/** ISO timestamp of last update */
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
/** Parsed manifest (cached) */
|
|
64
|
+
manifest: FlowManifest;
|
|
65
|
+
}
|
|
66
|
+
/** The flow registry file structure */
|
|
67
|
+
interface FlowRegistry {
|
|
68
|
+
/** Schema version */
|
|
69
|
+
version: 1;
|
|
70
|
+
/** Map of flow name → registry entry */
|
|
71
|
+
flows: Record<string, FlowRegistryEntry>;
|
|
72
|
+
}
|
|
73
|
+
/** Flow execution state */
|
|
74
|
+
type FlowStatus = 'idle' | 'active' | 'completed';
|
|
75
|
+
/** Active flow state (persisted to state.json) */
|
|
76
|
+
interface FlowState {
|
|
77
|
+
/** Which flow is active (name from registry) */
|
|
78
|
+
flow: string;
|
|
79
|
+
/** Current status */
|
|
80
|
+
status: FlowStatus;
|
|
81
|
+
/** Current step ID (null if not started) */
|
|
82
|
+
currentStep: string | null;
|
|
83
|
+
/** Completed step IDs in order */
|
|
84
|
+
completedSteps: string[];
|
|
85
|
+
/** Skipped step IDs */
|
|
86
|
+
skippedSteps: string[];
|
|
87
|
+
/** Map of artifact name → file path */
|
|
88
|
+
artifacts: Record<string, string>;
|
|
89
|
+
/** ISO timestamp when flow was started */
|
|
90
|
+
startedAt: string;
|
|
91
|
+
/** ISO timestamp of last state change */
|
|
92
|
+
updatedAt: string;
|
|
93
|
+
}
|
|
94
|
+
/** Step action for state machine transitions */
|
|
95
|
+
type StepAction = 'next' | 'skip' | 'redo';
|
|
96
|
+
/** Format adapter interface — converts external formats to FlowManifest */
|
|
97
|
+
interface FlowFormatAdapter {
|
|
98
|
+
/** Format name */
|
|
99
|
+
readonly format: FlowFormat;
|
|
100
|
+
/** Check if a directory matches this format */
|
|
101
|
+
detect(sourceDir: string): boolean;
|
|
102
|
+
/** Parse the source directory into a FlowManifest */
|
|
103
|
+
parse(sourceDir: string): Promise<FlowManifest>;
|
|
104
|
+
}
|
|
105
|
+
/** Result of a flow operation */
|
|
106
|
+
interface FlowResult<T = void> {
|
|
107
|
+
success: boolean;
|
|
108
|
+
data?: T;
|
|
109
|
+
error?: string;
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
export { FlowFormat, FlowFormatAdapter, FlowManifest, FlowRegistry, FlowRegistryEntry, FlowResult, FlowSourceType, FlowState, FlowStatus, FlowStep, StepAction };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region packages/indexer/src/file-hasher.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Generate a deterministic hash for a file's content.
|
|
4
|
+
* Used for incremental indexing -- skip files that haven't changed.
|
|
5
|
+
*/
|
|
6
|
+
declare function hashContent(content: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Generate a deterministic ID for a knowledge record.
|
|
9
|
+
* Based on source path + chunk index to ensure idempotent upserts.
|
|
10
|
+
*/
|
|
11
|
+
declare function generateRecordId(sourcePath: string, chunkIndex: number): string;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { generateRecordId, hashContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createHash as e}from"node:crypto";function t(t){return e(`sha256`).update(t).digest(`hex`).slice(0,16)}function n(t,n){let r=`${t}:${n}`;return e(`sha256`).update(r).digest(`hex`).slice(0,16)}export{n as generateRecordId,t as hashContent};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region packages/indexer/src/filesystem-crawler.d.ts
|
|
2
|
+
interface CrawlResult {
|
|
3
|
+
/** File path relative to workspace root */
|
|
4
|
+
relativePath: string;
|
|
5
|
+
/** Absolute file path */
|
|
6
|
+
absolutePath: string;
|
|
7
|
+
/** File content */
|
|
8
|
+
content: string;
|
|
9
|
+
/** File extension (lowercase, with dot) */
|
|
10
|
+
extension: string;
|
|
11
|
+
}
|
|
12
|
+
interface CrawlOptions {
|
|
13
|
+
/** Glob patterns to exclude */
|
|
14
|
+
excludePatterns: string[];
|
|
15
|
+
/** Root directory to crawl */
|
|
16
|
+
rootDir: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Crawl a directory tree and yield files that should be indexed.
|
|
20
|
+
*/
|
|
21
|
+
declare class FilesystemCrawler {
|
|
22
|
+
/** Binary file extensions that should always be skipped */
|
|
23
|
+
private static readonly BINARY_EXTENSIONS;
|
|
24
|
+
crawl(options: CrawlOptions): Promise<CrawlResult[]>;
|
|
25
|
+
private walkDir;
|
|
26
|
+
private isExcluded;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { CrawlOptions, CrawlResult, FilesystemCrawler };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{lstat as e,readFile as t,readdir as n,stat as r}from"node:fs/promises";import{extname as i,join as a,relative as o}from"node:path";import{AIKIT_PATHS as s,FILE_LIMITS as c,createLogger as l}from"../../core/dist/index.js";import{minimatch as u}from"minimatch";const d=l(`indexer`);var f=class l{static BINARY_EXTENSIONS=new Set(`.node,.so,.dylib,.dll,.wasm,.bin,.exe,.png,.jpg,.jpeg,.gif,.bmp,.ico,.webp,.svg,.mp3,.mp4,.wav,.avi,.mov,.flac,.zip,.gz,.tar,.bz2,.7z,.rar,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.ttf,.otf,.woff,.woff2,.eot,.pyc,.class,.o,.obj,.a,.lib`.split(`,`));async crawl(e){let t=[],n=new Set;return await this.walkDir(e.rootDir,e.rootDir,e.excludePatterns,t,n),t}async walkDir(u,f,p,m,h){let g;try{g=await n(u,{withFileTypes:!0})}catch(e){let t=e.code;(t===`EACCES`||t===`EPERM`)&&d.warn(`Permission denied, skipping directory`,{dir:u});return}for(let n of g){let d=a(u,n.name),g=o(f,d).replace(/\\/g,`/`);if(!this.isExcluded(g,p)){if(n.isDirectory()){if(n.name.startsWith(`.`)&&!(n.name===s.ai.slice(1)&&g.startsWith(s.ai)))continue;try{if((await e(d)).isSymbolicLink())continue}catch{continue}let t=d;if(h.has(t))continue;h.add(t),await this.walkDir(d,f,p,m,h)}else if(n.isFile()){let e=i(n.name).toLowerCase();if(l.BINARY_EXTENSIONS.has(e))continue;try{if((await r(d)).size>c.maxFileSizeBytes)continue;let n=await t(d,`utf-8`);if(n.includes(`\0`))continue;m.push({relativePath:g,absolutePath:d,content:n,extension:e})}catch{}}}}}isExcluded(e,t){return t.some(t=>u(e,t,{dot:!0}))}};export{f as FilesystemCrawler};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GraphEdge, GraphNode } from "../../store/dist/index.js";
|
|
2
|
+
|
|
3
|
+
//#region packages/indexer/src/graph-extractor.d.ts
|
|
4
|
+
interface ExtractedGraph {
|
|
5
|
+
nodes: GraphNode[];
|
|
6
|
+
edges: GraphEdge[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Extract graph nodes and edges from a single file's content.
|
|
10
|
+
* Produces:
|
|
11
|
+
* - One "module" node per file
|
|
12
|
+
* - Symbol nodes (function, class, interface, type, const, enum)
|
|
13
|
+
* - "defines" edges from module → symbol
|
|
14
|
+
* - "imports" edges from module → imported module
|
|
15
|
+
*/
|
|
16
|
+
declare function extractGraph(content: string, sourcePath: string): ExtractedGraph;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ExtractedGraph, extractGraph };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createHash as e}from"node:crypto";import{dirname as t,extname as n,join as r}from"node:path";const i=new Set([`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`]),a=[{pattern:/^export\s+(?:async\s+)?function\s+(\w+)/gm,kind:`function`,exported:!0},{pattern:/^export\s+(?:default\s+)?class\s+(\w+)/gm,kind:`class`,exported:!0},{pattern:/^export\s+interface\s+(\w+)/gm,kind:`interface`,exported:!0},{pattern:/^export\s+type\s+(\w+)/gm,kind:`type`,exported:!0},{pattern:/^export\s+(?:const|let)\s+(\w+)/gm,kind:`const`,exported:!0},{pattern:/^export\s+enum\s+(\w+)/gm,kind:`enum`,exported:!0},{pattern:/^(?:async\s+)?function\s+(\w+)/gm,kind:`function`,exported:!1},{pattern:/^class\s+(\w+)/gm,kind:`class`,exported:!1},{pattern:/^interface\s+(\w+)/gm,kind:`interface`,exported:!1},{pattern:/^type\s+(\w+)/gm,kind:`type`,exported:!1},{pattern:/^enum\s+(\w+)/gm,kind:`enum`,exported:!1}],o=[/import\s+(?:(?:type\s+)?(?:(?:\{[^}]*\}|[\w*]+)\s+from\s+)?)['"]([^'"]+)['"]/g,/import\(\s*['"]([^'"]+)['"]\s*\)/g,/require\(\s*['"]([^'"]+)['"]\s*\)/g];function s(t,n,r){return e(`sha256`).update(`${t}:${n}:${r}`).digest(`hex`).slice(0,16)}function c(t,n,r){return e(`sha256`).update(`${t}-${r}-${n}`).digest(`hex`).slice(0,16)}function l(e,n){return r(t(n),e).replace(/\\/g,`/`).replace(/\.(js|jsx|ts|tsx|mjs|cjs)$/,``)}function u(e){return e.replace(/\.(js|jsx|ts|tsx|mjs|cjs)$/,``)}function d(e,t){let r=n(t).toLowerCase();if(!i.has(r))return{nodes:[],edges:[]};let d=[],f=[],p=new Date().toISOString(),m=new Set,h=u(t),g=s(`module`,h,h);d.push({id:g,type:`module`,name:t,properties:{ext:r},sourcePath:t,createdAt:p});for(let{pattern:n,kind:r,exported:i}of a){let a=new RegExp(n.source,n.flags),o;for(;(o=a.exec(e))!==null;){let e=o[1],n=`${r}:${e}`;if(m.has(n))continue;m.add(n);let a=s(r,e,t);d.push({id:a,type:r,name:e,properties:{exported:i},sourcePath:t,createdAt:p}),f.push({id:c(g,a,`defines`),fromId:g,toId:a,type:`defines`,weight:i?1:.5})}}let _=new Set;for(let n of o){let r=new RegExp(n.source,n.flags),i;for(;(i=r.exec(e))!==null;){let e=i[1];if(!e.startsWith(`.`)||_.has(e))continue;_.add(e);let n=l(e,t),r=s(`module`,n,n);f.push({id:c(g,r,`imports`),fromId:g,toId:r,type:`imports`,properties:{source:e}})}}return{nodes:d,edges:f}}export{d as extractGraph};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region packages/indexer/src/hash-cache.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Persistent file hash cache.
|
|
4
|
+
* Stores path->hash mappings in a JSON file to avoid LanceDB round-trips
|
|
5
|
+
* when checking which files have changed during incremental indexing.
|
|
6
|
+
*/
|
|
7
|
+
declare class FileHashCache {
|
|
8
|
+
private cache;
|
|
9
|
+
private readonly filePath;
|
|
10
|
+
private dirty;
|
|
11
|
+
constructor(storeDir: string);
|
|
12
|
+
/** Load cache from disk. Non-fatal if missing or corrupt. */
|
|
13
|
+
load(): void;
|
|
14
|
+
get(path: string): string | undefined;
|
|
15
|
+
set(path: string, hash: string): void;
|
|
16
|
+
delete(path: string): void;
|
|
17
|
+
/** Persist cache to disk if changed. */
|
|
18
|
+
flush(): void;
|
|
19
|
+
/** Clear all entries and delete file. */
|
|
20
|
+
clear(): void;
|
|
21
|
+
get size(): number;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { FileHashCache };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolve as e}from"node:path";import{createLogger as t}from"../../core/dist/index.js";import{existsSync as n,readFileSync as r,writeFileSync as i}from"node:fs";const a=t(`hash-cache`);var o=class{cache;filePath;dirty=!1;constructor(t){this.filePath=e(t,`file-hashes.json`),this.cache=new Map}load(){if(n(this.filePath))try{let e=r(this.filePath,`utf-8`),t=JSON.parse(e);this.cache=new Map(Object.entries(t)),a.info(`Hash cache loaded`,{entries:this.cache.size})}catch(e){a.warn(`Hash cache load failed, starting fresh`,{err:e}),this.cache=new Map}}get(e){return this.cache.get(e)}set(e,t){this.cache.set(e,t),this.dirty=!0}delete(e){this.cache.delete(e)&&(this.dirty=!0)}flush(){if(this.dirty)try{let e={};for(let[t,n]of this.cache)e[t]=n;i(this.filePath,JSON.stringify(e),`utf-8`),this.dirty=!1}catch(e){a.warn(`Hash cache flush failed`,{err:e})}}clear(){this.cache.clear(),this.dirty=!0,this.flush()}get size(){return this.cache.size}};export{o as FileHashCache};
|