@weavelogic/knowledge-graph-agent 0.2.0 → 0.4.0
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 +972 -303
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/additionalItems.js +5 -0
- package/dist/_virtual/additionalItems.js.map +1 -0
- package/dist/_virtual/additionalProperties.js +5 -0
- package/dist/_virtual/additionalProperties.js.map +1 -0
- package/dist/_virtual/ajv.js +6 -0
- package/dist/_virtual/ajv.js.map +1 -0
- package/dist/_virtual/ajv2.js +5 -0
- package/dist/_virtual/ajv2.js.map +1 -0
- package/dist/_virtual/allOf.js +5 -0
- package/dist/_virtual/allOf.js.map +1 -0
- package/dist/_virtual/anyOf.js +5 -0
- package/dist/_virtual/anyOf.js.map +1 -0
- package/dist/_virtual/applicability.js +5 -0
- package/dist/_virtual/applicability.js.map +1 -0
- package/dist/_virtual/boolSchema.js +5 -0
- package/dist/_virtual/boolSchema.js.map +1 -0
- package/dist/_virtual/code.js +5 -0
- package/dist/_virtual/code.js.map +1 -0
- package/dist/_virtual/code2.js +5 -0
- package/dist/_virtual/code2.js.map +1 -0
- package/dist/_virtual/const.js +5 -0
- package/dist/_virtual/const.js.map +1 -0
- package/dist/_virtual/contains.js +5 -0
- package/dist/_virtual/contains.js.map +1 -0
- package/dist/_virtual/core.js +5 -0
- package/dist/_virtual/core.js.map +1 -0
- package/dist/_virtual/dataType.js +5 -0
- package/dist/_virtual/dataType.js.map +1 -0
- package/dist/_virtual/defaults.js +5 -0
- package/dist/_virtual/defaults.js.map +1 -0
- package/dist/_virtual/dependencies.js +5 -0
- package/dist/_virtual/dependencies.js.map +1 -0
- package/dist/_virtual/draft7.js +5 -0
- package/dist/_virtual/draft7.js.map +1 -0
- package/dist/_virtual/enum.js +5 -0
- package/dist/_virtual/enum.js.map +1 -0
- package/dist/_virtual/equal.js +5 -0
- package/dist/_virtual/equal.js.map +1 -0
- package/dist/_virtual/errors.js +5 -0
- package/dist/_virtual/errors.js.map +1 -0
- package/dist/_virtual/format.js +5 -0
- package/dist/_virtual/format.js.map +1 -0
- package/dist/_virtual/formats.js +5 -0
- package/dist/_virtual/formats.js.map +1 -0
- package/dist/_virtual/id.js +5 -0
- package/dist/_virtual/id.js.map +1 -0
- package/dist/_virtual/if.js +5 -0
- package/dist/_virtual/if.js.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index10.js +5 -0
- package/dist/_virtual/index10.js.map +1 -0
- package/dist/_virtual/index11.js +5 -0
- package/dist/_virtual/index11.js.map +1 -0
- package/dist/_virtual/index12.js +5 -0
- package/dist/_virtual/index12.js.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.js +5 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.js +5 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/index5.js +5 -0
- package/dist/_virtual/index5.js.map +1 -0
- package/dist/_virtual/index6.js +5 -0
- package/dist/_virtual/index6.js.map +1 -0
- package/dist/_virtual/index7.js +5 -0
- package/dist/_virtual/index7.js.map +1 -0
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index8.js.map +1 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/index9.js.map +1 -0
- package/dist/_virtual/items.js +5 -0
- package/dist/_virtual/items.js.map +1 -0
- package/dist/_virtual/items2020.js +5 -0
- package/dist/_virtual/items2020.js.map +1 -0
- package/dist/_virtual/keyword.js +5 -0
- package/dist/_virtual/keyword.js.map +1 -0
- package/dist/_virtual/limit.js +5 -0
- package/dist/_virtual/limit.js.map +1 -0
- package/dist/_virtual/limitItems.js +5 -0
- package/dist/_virtual/limitItems.js.map +1 -0
- package/dist/_virtual/limitLength.js +5 -0
- package/dist/_virtual/limitLength.js.map +1 -0
- package/dist/_virtual/limitNumber.js +5 -0
- package/dist/_virtual/limitNumber.js.map +1 -0
- package/dist/_virtual/limitProperties.js +5 -0
- package/dist/_virtual/limitProperties.js.map +1 -0
- package/dist/_virtual/metadata.js +5 -0
- package/dist/_virtual/metadata.js.map +1 -0
- package/dist/_virtual/multipleOf.js +5 -0
- package/dist/_virtual/multipleOf.js.map +1 -0
- package/dist/_virtual/names.js +5 -0
- package/dist/_virtual/names.js.map +1 -0
- package/dist/_virtual/not.js +5 -0
- package/dist/_virtual/not.js.map +1 -0
- package/dist/_virtual/oneOf.js +5 -0
- package/dist/_virtual/oneOf.js.map +1 -0
- package/dist/_virtual/pattern.js +5 -0
- package/dist/_virtual/pattern.js.map +1 -0
- package/dist/_virtual/patternProperties.js +5 -0
- package/dist/_virtual/patternProperties.js.map +1 -0
- package/dist/_virtual/prefixItems.js +5 -0
- package/dist/_virtual/prefixItems.js.map +1 -0
- package/dist/_virtual/properties.js +5 -0
- package/dist/_virtual/properties.js.map +1 -0
- package/dist/_virtual/propertyNames.js +5 -0
- package/dist/_virtual/propertyNames.js.map +1 -0
- package/dist/_virtual/ref.js +5 -0
- package/dist/_virtual/ref.js.map +1 -0
- package/dist/_virtual/ref_error.js +5 -0
- package/dist/_virtual/ref_error.js.map +1 -0
- package/dist/_virtual/required.js +5 -0
- package/dist/_virtual/required.js.map +1 -0
- package/dist/_virtual/resolve.js +5 -0
- package/dist/_virtual/resolve.js.map +1 -0
- package/dist/_virtual/rules.js +5 -0
- package/dist/_virtual/rules.js.map +1 -0
- package/dist/_virtual/scope.js +5 -0
- package/dist/_virtual/scope.js.map +1 -0
- package/dist/_virtual/subschema.js +5 -0
- package/dist/_virtual/subschema.js.map +1 -0
- package/dist/_virtual/thenElse.js +5 -0
- package/dist/_virtual/thenElse.js.map +1 -0
- package/dist/_virtual/types.js +5 -0
- package/dist/_virtual/types.js.map +1 -0
- package/dist/_virtual/ucs2length.js +5 -0
- package/dist/_virtual/ucs2length.js.map +1 -0
- package/dist/_virtual/uniqueItems.js +5 -0
- package/dist/_virtual/uniqueItems.js.map +1 -0
- package/dist/_virtual/uri.js +5 -0
- package/dist/_virtual/uri.js.map +1 -0
- package/dist/_virtual/util.js +5 -0
- package/dist/_virtual/util.js.map +1 -0
- package/dist/_virtual/validation_error.js +5 -0
- package/dist/_virtual/validation_error.js.map +1 -0
- package/dist/agents/analyst-agent.d.ts +230 -0
- package/dist/agents/analyst-agent.d.ts.map +1 -0
- package/dist/agents/analyst-agent.js +793 -0
- package/dist/agents/analyst-agent.js.map +1 -0
- package/dist/agents/architect-agent.d.ts +248 -0
- package/dist/agents/architect-agent.d.ts.map +1 -0
- package/dist/agents/architect-agent.js +685 -0
- package/dist/agents/architect-agent.js.map +1 -0
- package/dist/agents/base-agent.d.ts +169 -0
- package/dist/agents/base-agent.d.ts.map +1 -0
- package/dist/agents/base-agent.js +441 -0
- package/dist/agents/base-agent.js.map +1 -0
- package/dist/agents/coder-agent.d.ts +191 -0
- package/dist/agents/coder-agent.d.ts.map +1 -0
- package/dist/agents/coder-agent.js +1008 -0
- package/dist/agents/coder-agent.js.map +1 -0
- package/dist/agents/index.d.ts +18 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +40 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/registry.d.ts +213 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +419 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/researcher-agent.d.ts +226 -0
- package/dist/agents/researcher-agent.d.ts.map +1 -0
- package/dist/agents/researcher-agent.js +572 -0
- package/dist/agents/researcher-agent.js.map +1 -0
- package/dist/agents/rules-engine.d.ts +320 -0
- package/dist/agents/rules-engine.d.ts.map +1 -0
- package/dist/agents/rules-engine.js +552 -0
- package/dist/agents/rules-engine.js.map +1 -0
- package/dist/agents/tester-agent.d.ts +219 -0
- package/dist/agents/tester-agent.d.ts.map +1 -0
- package/dist/agents/tester-agent.js +683 -0
- package/dist/agents/tester-agent.js.map +1 -0
- package/dist/agents/types.d.ts +425 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +57 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/audit/config.d.ts +150 -0
- package/dist/audit/config.d.ts.map +1 -0
- package/dist/audit/config.js +111 -0
- package/dist/audit/config.js.map +1 -0
- package/dist/audit/index.d.ts +38 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/services/audit-chain.d.ts +276 -0
- package/dist/audit/services/audit-chain.d.ts.map +1 -0
- package/dist/audit/services/audit-chain.js +502 -0
- package/dist/audit/services/audit-chain.js.map +1 -0
- package/dist/audit/services/index.d.ts +11 -0
- package/dist/audit/services/index.d.ts.map +1 -0
- package/dist/audit/services/syndication.d.ts +334 -0
- package/dist/audit/services/syndication.d.ts.map +1 -0
- package/dist/audit/services/syndication.js +589 -0
- package/dist/audit/services/syndication.js.map +1 -0
- package/dist/audit/types.d.ts +453 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/caching/index.d.ts +55 -0
- package/dist/caching/index.d.ts.map +1 -0
- package/dist/caching/index.js +206 -0
- package/dist/caching/index.js.map +1 -0
- package/dist/caching/lru-cache.d.ts +254 -0
- package/dist/caching/lru-cache.d.ts.map +1 -0
- package/dist/caching/types.d.ts +95 -0
- package/dist/caching/types.d.ts.map +1 -0
- package/dist/chunking/chunker.d.ts +94 -0
- package/dist/chunking/chunker.d.ts.map +1 -0
- package/dist/chunking/index.d.ts +125 -0
- package/dist/chunking/index.d.ts.map +1 -0
- package/dist/chunking/index.js +283 -0
- package/dist/chunking/index.js.map +1 -0
- package/dist/chunking/types.d.ts +92 -0
- package/dist/chunking/types.d.ts.map +1 -0
- package/dist/cli/commands/audit.d.ts +21 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +621 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/commit.d.ts +11 -0
- package/dist/cli/commands/commit.d.ts.map +1 -0
- package/dist/cli/commands/commit.js +379 -0
- package/dist/cli/commands/commit.js.map +1 -0
- package/dist/cli/commands/config.d.ts +8 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +107 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/cultivate.d.ts +16 -0
- package/dist/cli/commands/cultivate.d.ts.map +1 -0
- package/dist/cli/commands/cultivate.js +254 -0
- package/dist/cli/commands/cultivate.js.map +1 -0
- package/dist/cli/commands/diagnostics.d.ts +8 -0
- package/dist/cli/commands/diagnostics.d.ts.map +1 -0
- package/dist/cli/commands/diagnostics.js +140 -0
- package/dist/cli/commands/diagnostics.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +13 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/init-primitives.d.ts +19 -0
- package/dist/cli/commands/init-primitives.d.ts.map +1 -0
- package/dist/cli/commands/init-primitives.js +208 -0
- package/dist/cli/commands/init-primitives.js.map +1 -0
- package/dist/cli/commands/sop.d.ts +14 -0
- package/dist/cli/commands/sop.d.ts.map +1 -0
- package/dist/cli/commands/sop.js +598 -0
- package/dist/cli/commands/sop.js.map +1 -0
- package/dist/cli/commands/vector.d.ts +14 -0
- package/dist/cli/commands/vector.d.ts.map +1 -0
- package/dist/cli/commands/vector.js +429 -0
- package/dist/cli/commands/vector.js.map +1 -0
- package/dist/cli/commands/workflow.d.ts +12 -0
- package/dist/cli/commands/workflow.d.ts.map +1 -0
- package/dist/cli/commands/workflow.js +471 -0
- package/dist/cli/commands/workflow.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +66 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +153 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +141 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/manager.d.ts +136 -0
- package/dist/config/manager.d.ts.map +1 -0
- package/dist/config/types.d.ts +127 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/core/cache.d.ts +185 -0
- package/dist/core/cache.d.ts.map +1 -0
- package/dist/core/cache.js +435 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/cultivation/deep-analyzer.d.ts +129 -0
- package/dist/cultivation/deep-analyzer.d.ts.map +1 -0
- package/dist/cultivation/deep-analyzer.js +322 -0
- package/dist/cultivation/deep-analyzer.js.map +1 -0
- package/dist/cultivation/index.d.ts +13 -0
- package/dist/cultivation/index.d.ts.map +1 -0
- package/dist/cultivation/seed-generator.d.ts +92 -0
- package/dist/cultivation/seed-generator.d.ts.map +1 -0
- package/dist/cultivation/seed-generator.js +1033 -0
- package/dist/cultivation/seed-generator.js.map +1 -0
- package/dist/cultivation/types.d.ts +230 -0
- package/dist/cultivation/types.d.ts.map +1 -0
- package/dist/database/schemas/index.d.ts +85 -0
- package/dist/database/schemas/index.d.ts.map +1 -0
- package/dist/generators/claude-md.d.ts +7 -0
- package/dist/generators/claude-md.d.ts.map +1 -1
- package/dist/generators/claude-md.js.map +1 -1
- package/dist/generators/docs-init.d.ts +6 -0
- package/dist/generators/docs-init.d.ts.map +1 -1
- package/dist/generators/docs-init.js.map +1 -1
- package/dist/health/checks.d.ts +135 -0
- package/dist/health/checks.d.ts.map +1 -0
- package/dist/health/index.d.ts +119 -0
- package/dist/health/index.d.ts.map +1 -0
- package/dist/health/index.js +191 -0
- package/dist/health/index.js.map +1 -0
- package/dist/health/monitor.d.ts +146 -0
- package/dist/health/monitor.d.ts.map +1 -0
- package/dist/health/types.d.ts +135 -0
- package/dist/health/types.d.ts.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +182 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/auto-commit.d.ts +175 -0
- package/dist/integrations/auto-commit.d.ts.map +1 -0
- package/dist/integrations/auto-commit.js +399 -0
- package/dist/integrations/auto-commit.js.map +1 -0
- package/dist/integrations/git.d.ts +299 -0
- package/dist/integrations/git.d.ts.map +1 -0
- package/dist/integrations/git.js +465 -0
- package/dist/integrations/git.js.map +1 -0
- package/dist/mcp-server/bin.d.ts +11 -0
- package/dist/mcp-server/bin.d.ts.map +1 -0
- package/dist/mcp-server/handlers/index.d.ts +57 -0
- package/dist/mcp-server/handlers/index.d.ts.map +1 -0
- package/dist/mcp-server/handlers/index.js +235 -0
- package/dist/mcp-server/handlers/index.js.map +1 -0
- package/dist/mcp-server/index.d.ts +28 -0
- package/dist/mcp-server/index.d.ts.map +1 -0
- package/dist/mcp-server/server.d.ts +133 -0
- package/dist/mcp-server/server.d.ts.map +1 -0
- package/dist/mcp-server/server.js +280 -0
- package/dist/mcp-server/server.js.map +1 -0
- package/dist/mcp-server/tools/agents/index.d.ts +10 -0
- package/dist/mcp-server/tools/agents/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/agents/list.d.ts +19 -0
- package/dist/mcp-server/tools/agents/list.d.ts.map +1 -0
- package/dist/mcp-server/tools/agents/spawn.d.ts +19 -0
- package/dist/mcp-server/tools/agents/spawn.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/checkpoint.d.ts +58 -0
- package/dist/mcp-server/tools/audit/checkpoint.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/checkpoint.js +73 -0
- package/dist/mcp-server/tools/audit/checkpoint.js.map +1 -0
- package/dist/mcp-server/tools/audit/index.d.ts +53 -0
- package/dist/mcp-server/tools/audit/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/index.js +12 -0
- package/dist/mcp-server/tools/audit/index.js.map +1 -0
- package/dist/mcp-server/tools/audit/query.d.ts +58 -0
- package/dist/mcp-server/tools/audit/query.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/query.js +125 -0
- package/dist/mcp-server/tools/audit/query.js.map +1 -0
- package/dist/mcp-server/tools/audit/sync.d.ts +58 -0
- package/dist/mcp-server/tools/audit/sync.d.ts.map +1 -0
- package/dist/mcp-server/tools/audit/sync.js +126 -0
- package/dist/mcp-server/tools/audit/sync.js.map +1 -0
- package/dist/mcp-server/tools/graph/generate.d.ts +21 -0
- package/dist/mcp-server/tools/graph/generate.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/index.d.ts +11 -0
- package/dist/mcp-server/tools/graph/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/query.d.ts +22 -0
- package/dist/mcp-server/tools/graph/query.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/stats.d.ts +22 -0
- package/dist/mcp-server/tools/graph/stats.d.ts.map +1 -0
- package/dist/mcp-server/tools/health.d.ts +21 -0
- package/dist/mcp-server/tools/health.d.ts.map +1 -0
- package/dist/mcp-server/tools/index.d.ts +16 -0
- package/dist/mcp-server/tools/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/registry.d.ts +90 -0
- package/dist/mcp-server/tools/registry.d.ts.map +1 -0
- package/dist/mcp-server/tools/registry.js +753 -0
- package/dist/mcp-server/tools/registry.js.map +1 -0
- package/dist/mcp-server/tools/search/index.d.ts +10 -0
- package/dist/mcp-server/tools/search/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/search/nodes.d.ts +22 -0
- package/dist/mcp-server/tools/search/nodes.d.ts.map +1 -0
- package/dist/mcp-server/tools/search/tags.d.ts +22 -0
- package/dist/mcp-server/tools/search/tags.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/index.d.ts +12 -0
- package/dist/mcp-server/tools/vector/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/index.js +12 -0
- package/dist/mcp-server/tools/vector/index.js.map +1 -0
- package/dist/mcp-server/tools/vector/search.d.ts +41 -0
- package/dist/mcp-server/tools/vector/search.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/search.js +224 -0
- package/dist/mcp-server/tools/vector/search.js.map +1 -0
- package/dist/mcp-server/tools/vector/trajectory.d.ts +39 -0
- package/dist/mcp-server/tools/vector/trajectory.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/trajectory.js +170 -0
- package/dist/mcp-server/tools/vector/trajectory.js.map +1 -0
- package/dist/mcp-server/tools/vector/upsert.d.ts +44 -0
- package/dist/mcp-server/tools/vector/upsert.d.ts.map +1 -0
- package/dist/mcp-server/tools/vector/upsert.js +175 -0
- package/dist/mcp-server/tools/vector/upsert.js.map +1 -0
- package/dist/mcp-server/tools/workflow/index.d.ts +29 -0
- package/dist/mcp-server/tools/workflow/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/workflow/index.js +12 -0
- package/dist/mcp-server/tools/workflow/index.js.map +1 -0
- package/dist/mcp-server/tools/workflow/list.d.ts +41 -0
- package/dist/mcp-server/tools/workflow/list.d.ts.map +1 -0
- package/dist/mcp-server/tools/workflow/list.js +195 -0
- package/dist/mcp-server/tools/workflow/list.js.map +1 -0
- package/dist/mcp-server/tools/workflow/start.d.ts +40 -0
- package/dist/mcp-server/tools/workflow/start.d.ts.map +1 -0
- package/dist/mcp-server/tools/workflow/start.js +165 -0
- package/dist/mcp-server/tools/workflow/start.js.map +1 -0
- package/dist/mcp-server/tools/workflow/status.d.ts +38 -0
- package/dist/mcp-server/tools/workflow/status.d.ts.map +1 -0
- package/dist/mcp-server/tools/workflow/status.js +97 -0
- package/dist/mcp-server/tools/workflow/status.js.map +1 -0
- package/dist/mcp-server/types/index.d.ts +286 -0
- package/dist/mcp-server/types/index.d.ts.map +1 -0
- package/dist/memory/index.d.ts +10 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/vault-sync.d.ts +212 -0
- package/dist/memory/vault-sync.d.ts.map +1 -0
- package/dist/memory/vault-sync.js +463 -0
- package/dist/memory/vault-sync.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +296 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +71 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +26 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +407 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1332 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +71 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
- package/dist/node_modules/ajv/dist/ajv.js +84 -0
- package/dist/node_modules/ajv/dist/ajv.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/code.js +160 -0
- package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/index.js +728 -0
- package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js +152 -0
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/errors.js +131 -0
- package/dist/node_modules/ajv/dist/compile/errors.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/index.js +234 -0
- package/dist/node_modules/ajv/dist/compile/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/names.js +44 -0
- package/dist/node_modules/ajv/dist/compile/names.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/ref_error.js +22 -0
- package/dist/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/resolve.js +163 -0
- package/dist/node_modules/ajv/dist/compile/resolve.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/rules.js +35 -0
- package/dist/node_modules/ajv/dist/compile/rules.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/util.js +173 -0
- package/dist/node_modules/ajv/dist/compile/util.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js +27 -0
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +58 -0
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js +193 -0
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js +43 -0
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/index.js +522 -0
- package/dist/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js +126 -0
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js +89 -0
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
- package/dist/node_modules/ajv/dist/core.js +628 -0
- package/dist/node_modules/ajv/dist/core.js.map +1 -0
- package/dist/node_modules/ajv/dist/refs/data.json.js +24 -0
- package/dist/node_modules/ajv/dist/refs/data.json.js.map +1 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +25 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/equal.js +16 -0
- package/dist/node_modules/ajv/dist/runtime/equal.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js +30 -0
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/uri.js +16 -0
- package/dist/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/validation_error.js +20 -0
- package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +59 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +114 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +32 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +22 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +100 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +103 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +75 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +68 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +64 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +43 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +36 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +64 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +81 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +22 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +66 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +49 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +23 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/code.js +140 -0
- package/dist/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js +19 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js +27 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +132 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +114 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +18 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js +31 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js +95 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js +16 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js +27 -0
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +36 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +56 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +52 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +39 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +37 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +33 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +89 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +75 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/formats.js +209 -0
- package/dist/node_modules/ajv-formats/dist/formats.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/index.js +51 -0
- package/dist/node_modules/ajv-formats/dist/index.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/limit.js +80 -0
- package/dist/node_modules/ajv-formats/dist/limit.js.map +1 -0
- package/dist/node_modules/fast-deep-equal/index.js +39 -0
- package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
- package/dist/node_modules/fast-uri/index.js +261 -0
- package/dist/node_modules/fast-uri/index.js.map +1 -0
- package/dist/node_modules/fast-uri/lib/schemes.js +215 -0
- package/dist/node_modules/fast-uri/lib/schemes.js.map +1 -0
- package/dist/node_modules/fast-uri/lib/utils.js +261 -0
- package/dist/node_modules/fast-uri/lib/utils.js.map +1 -0
- package/dist/node_modules/json-schema-traverse/index.js +92 -0
- package/dist/node_modules/json-schema-traverse/index.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/errors.js +37 -0
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/iso.js +43 -0
- package/dist/node_modules/zod/v4/classic/iso.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.js +13 -0
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +688 -0
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/api.js +492 -0
- package/dist/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.js +405 -0
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/zod/v4/core/core.js +58 -0
- package/dist/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.js +38 -0
- package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.js +82 -0
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +60 -0
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.js +87 -0
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.js +52 -0
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.js +1283 -0
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/util.js +341 -0
- package/dist/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +2 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
- package/dist/reasoning/index.d.ts +74 -0
- package/dist/reasoning/index.d.ts.map +1 -0
- package/dist/reasoning/index.js +124 -0
- package/dist/reasoning/index.js.map +1 -0
- package/dist/reasoning/tracker.d.ts +210 -0
- package/dist/reasoning/tracker.d.ts.map +1 -0
- package/dist/reasoning/types.d.ts +146 -0
- package/dist/reasoning/types.d.ts.map +1 -0
- package/dist/recovery/backup.d.ts +110 -0
- package/dist/recovery/backup.d.ts.map +1 -0
- package/dist/recovery/index.d.ts +70 -0
- package/dist/recovery/index.d.ts.map +1 -0
- package/dist/recovery/index.js +186 -0
- package/dist/recovery/index.js.map +1 -0
- package/dist/recovery/integrity.d.ts +74 -0
- package/dist/recovery/integrity.d.ts.map +1 -0
- package/dist/recovery/types.d.ts +94 -0
- package/dist/recovery/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +130 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +134 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/manager.d.ts +140 -0
- package/dist/services/manager.d.ts.map +1 -0
- package/dist/services/types.d.ts +106 -0
- package/dist/services/types.d.ts.map +1 -0
- package/dist/services/watchers.d.ts +95 -0
- package/dist/services/watchers.d.ts.map +1 -0
- package/dist/sops/compliance-checker.d.ts +83 -0
- package/dist/sops/compliance-checker.d.ts.map +1 -0
- package/dist/sops/compliance-checker.js +399 -0
- package/dist/sops/compliance-checker.js.map +1 -0
- package/dist/sops/gap-analyzer.d.ts +124 -0
- package/dist/sops/gap-analyzer.d.ts.map +1 -0
- package/dist/sops/gap-analyzer.js +313 -0
- package/dist/sops/gap-analyzer.js.map +1 -0
- package/dist/sops/index.d.ts +14 -0
- package/dist/sops/index.d.ts.map +1 -0
- package/dist/sops/overlay-manager.d.ts +115 -0
- package/dist/sops/overlay-manager.d.ts.map +1 -0
- package/dist/sops/overlay-manager.js +394 -0
- package/dist/sops/overlay-manager.js.map +1 -0
- package/dist/sops/registry.d.ts +73 -0
- package/dist/sops/registry.d.ts.map +1 -0
- package/dist/sops/registry.js +919 -0
- package/dist/sops/registry.js.map +1 -0
- package/dist/sops/types.d.ts +377 -0
- package/dist/sops/types.d.ts.map +1 -0
- package/dist/sops/types.js +46 -0
- package/dist/sops/types.js.map +1 -0
- package/dist/utils/error-recovery.d.ts +230 -0
- package/dist/utils/error-recovery.d.ts.map +1 -0
- package/dist/utils/error-recovery.js +228 -0
- package/dist/utils/error-recovery.js.map +1 -0
- package/dist/utils/error-taxonomy.d.ts +149 -0
- package/dist/utils/error-taxonomy.d.ts.map +1 -0
- package/dist/utils/error-taxonomy.js +260 -0
- package/dist/utils/error-taxonomy.js.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +139 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +311 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/vector/config.d.ts +300 -0
- package/dist/vector/config.d.ts.map +1 -0
- package/dist/vector/config.js +124 -0
- package/dist/vector/config.js.map +1 -0
- package/dist/vector/index.d.ts +50 -0
- package/dist/vector/index.d.ts.map +1 -0
- package/dist/vector/services/index.d.ts +13 -0
- package/dist/vector/services/index.d.ts.map +1 -0
- package/dist/vector/services/trajectory-tracker.d.ts +405 -0
- package/dist/vector/services/trajectory-tracker.d.ts.map +1 -0
- package/dist/vector/services/trajectory-tracker.js +445 -0
- package/dist/vector/services/trajectory-tracker.js.map +1 -0
- package/dist/vector/services/vector-store.d.ts +339 -0
- package/dist/vector/services/vector-store.d.ts.map +1 -0
- package/dist/vector/services/vector-store.js +748 -0
- package/dist/vector/services/vector-store.js.map +1 -0
- package/dist/vector/types.d.ts +677 -0
- package/dist/vector/types.d.ts.map +1 -0
- package/dist/workflow/adapters/goap-adapter.d.ts +196 -0
- package/dist/workflow/adapters/goap-adapter.d.ts.map +1 -0
- package/dist/workflow/adapters/goap-adapter.js +706 -0
- package/dist/workflow/adapters/goap-adapter.js.map +1 -0
- package/dist/workflow/adapters/index.d.ts +10 -0
- package/dist/workflow/adapters/index.d.ts.map +1 -0
- package/dist/workflow/config.d.ts +135 -0
- package/dist/workflow/config.d.ts.map +1 -0
- package/dist/workflow/config.js +92 -0
- package/dist/workflow/config.js.map +1 -0
- package/dist/workflow/handlers/index.d.ts +9 -0
- package/dist/workflow/handlers/index.d.ts.map +1 -0
- package/dist/workflow/handlers/webhook-handlers.d.ts +397 -0
- package/dist/workflow/handlers/webhook-handlers.d.ts.map +1 -0
- package/dist/workflow/handlers/webhook-handlers.js +454 -0
- package/dist/workflow/handlers/webhook-handlers.js.map +1 -0
- package/dist/workflow/index.d.ts +42 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/services/index.d.ts +9 -0
- package/dist/workflow/services/index.d.ts.map +1 -0
- package/dist/workflow/services/workflow-service.d.ts +318 -0
- package/dist/workflow/services/workflow-service.d.ts.map +1 -0
- package/dist/workflow/services/workflow-service.js +577 -0
- package/dist/workflow/services/workflow-service.js.map +1 -0
- package/dist/workflow/types.d.ts +470 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow/workflows/realtime-collab.d.ts +245 -0
- package/dist/workflow/workflows/realtime-collab.d.ts.map +1 -0
- package/dist/workflows/index.d.ts +11 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/registry.d.ts +118 -0
- package/dist/workflows/registry.d.ts.map +1 -0
- package/dist/workflows/registry.js +575 -0
- package/dist/workflows/registry.js.map +1 -0
- package/dist/workflows/types.d.ts +322 -0
- package/dist/workflows/types.d.ts.map +1 -0
- package/dist/workflows/types.js +16 -0
- package/dist/workflows/types.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
# @weavelogic/knowledge-graph-agent
|
|
2
2
|
|
|
3
|
-
A powerful NPM library for creating and managing knowledge graphs for Claude Code. Integrates with Obsidian-style documentation
|
|
3
|
+
A powerful NPM library for creating and managing knowledge graphs for Claude Code. Integrates with Obsidian-style documentation, claude-flow for AI coordination, and provides enterprise-grade features for production deployments.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@weavelogic/knowledge-graph-agent)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
## Features
|
|
8
|
+
## Features at a Glance
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **Full-Text Search** - SQLite-backed search across all documentation
|
|
10
|
+
| Phase | Feature Area | Description |
|
|
11
|
+
|-------|--------------|-------------|
|
|
12
|
+
| 1 | Cultivation System | Codebase analysis, seed generation, deep analysis |
|
|
13
|
+
| 2 | Core Features | Agent system, rules engine, workflows, MCP server |
|
|
14
|
+
| 3 | Advanced Integration | Service management, config migrations, health monitoring |
|
|
15
|
+
| 4 | Enterprise Features | Chunking, backup/recovery, advanced caching, diagnostics |
|
|
16
|
+
| 5 | External Integrations | Workflow DevKit, RuVector semantic search, Exochain audit trail |
|
|
18
17
|
|
|
19
18
|
## Installation
|
|
20
19
|
|
|
@@ -30,426 +29,1096 @@ npx @weavelogic/knowledge-graph-agent init
|
|
|
30
29
|
|
|
31
30
|
## Quick Start
|
|
32
31
|
|
|
33
|
-
### 1. Initialize Knowledge Graph
|
|
34
|
-
|
|
35
32
|
```bash
|
|
36
|
-
# Initialize in
|
|
33
|
+
# Initialize knowledge graph in project
|
|
37
34
|
kg init
|
|
38
35
|
|
|
39
|
-
#
|
|
40
|
-
kg init
|
|
36
|
+
# Bootstrap primitives from codebase analysis
|
|
37
|
+
kg init-primitives
|
|
38
|
+
|
|
39
|
+
# Generate knowledge graph
|
|
40
|
+
kg graph
|
|
41
|
+
|
|
42
|
+
# Start MCP server for Claude integration
|
|
43
|
+
kg mcp start
|
|
41
44
|
```
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
---
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
## Phase 1: Cultivation System
|
|
49
|
+
|
|
50
|
+
### SeedGenerator
|
|
51
|
+
|
|
52
|
+
Analyzes codebases to bootstrap knowledge graphs with primitive nodes.
|
|
53
|
+
|
|
54
|
+
**Supported Ecosystems:**
|
|
55
|
+
- **Node.js**: `package.json` dependencies
|
|
56
|
+
- **Python**: `requirements.txt`, `pyproject.toml`
|
|
57
|
+
- **PHP**: `composer.json`
|
|
58
|
+
- **Rust**: `Cargo.toml`
|
|
59
|
+
- **Go**: `go.mod`
|
|
60
|
+
- **Java**: `pom.xml`, `build.gradle`
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { SeedGenerator, analyzeSeed, initPrimitives } from '@weavelogic/knowledge-graph-agent';
|
|
48
64
|
|
|
49
|
-
|
|
50
|
-
|
|
65
|
+
// Full analysis
|
|
66
|
+
const analysis = await analyzeSeed('/project', 'docs');
|
|
67
|
+
console.log(`Found ${analysis.frameworks.length} frameworks`);
|
|
68
|
+
console.log(`Found ${analysis.dependencies.length} dependencies`);
|
|
69
|
+
console.log(`Found ${analysis.services.length} services`);
|
|
51
70
|
|
|
71
|
+
// Generate primitive nodes
|
|
72
|
+
const result = await initPrimitives('/project', 'docs', { dryRun: false });
|
|
73
|
+
console.log(`Generated ${result.documentsGenerated.length} documents`);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### DeepAnalyzer with claude-flow Integration
|
|
77
|
+
|
|
78
|
+
Advanced codebase analysis using multi-agent orchestration.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
52
81
|
# Deep analysis with claude-flow agents
|
|
53
82
|
kg analyze deep
|
|
54
83
|
|
|
55
|
-
# Generate analysis report
|
|
56
|
-
kg analyze report
|
|
84
|
+
# Generate analysis report
|
|
57
85
|
kg analyze report --json
|
|
58
86
|
```
|
|
59
87
|
|
|
60
|
-
###
|
|
88
|
+
### Shadow Cache for File Tracking
|
|
61
89
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
90
|
+
Tracks file changes efficiently using SHA-256 hashing.
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
import { ShadowCache } from '@weavelogic/knowledge-graph-agent';
|
|
65
94
|
|
|
66
|
-
|
|
67
|
-
|
|
95
|
+
const cache = new ShadowCache('/project/.kg');
|
|
96
|
+
const changed = await cache.getChangedFiles('/project/docs');
|
|
97
|
+
console.log(`${changed.length} files changed since last sync`);
|
|
68
98
|
```
|
|
69
99
|
|
|
70
|
-
###
|
|
100
|
+
### CLI Commands (Phase 1)
|
|
71
101
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
kg
|
|
102
|
+
| Command | Description |
|
|
103
|
+
|---------|-------------|
|
|
104
|
+
| `kg init-primitives` | Bootstrap primitives from codebase analysis |
|
|
105
|
+
| `kg init-primitives --dry-run` | Preview without writing files |
|
|
106
|
+
| `kg analyze-codebase` | Analyze dependencies and services |
|
|
107
|
+
| `kg cultivate` | Run cultivation pipeline |
|
|
108
|
+
| `kg cultivate --deep` | Deep analysis with agents |
|
|
75
109
|
|
|
76
|
-
|
|
77
|
-
kg graph --update
|
|
78
|
-
```
|
|
110
|
+
---
|
|
79
111
|
|
|
80
|
-
|
|
112
|
+
## Phase 2: Core Features
|
|
81
113
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
114
|
+
### Agent System
|
|
115
|
+
|
|
116
|
+
A comprehensive agent framework with specialized agents for different tasks.
|
|
117
|
+
|
|
118
|
+
**Agent Types:**
|
|
119
|
+
- `ResearcherAgent` - Research and information gathering
|
|
120
|
+
- `CoderAgent` - Code generation and modification
|
|
121
|
+
- `TesterAgent` - Test creation and validation
|
|
122
|
+
- `AnalystAgent` - Analysis and recommendations
|
|
123
|
+
- `ArchitectAgent` - System design and architecture
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import {
|
|
127
|
+
BaseAgent,
|
|
128
|
+
getRegistry,
|
|
129
|
+
AgentType,
|
|
130
|
+
createTask
|
|
131
|
+
} from '@weavelogic/knowledge-graph-agent';
|
|
132
|
+
|
|
133
|
+
// Get the agent registry
|
|
134
|
+
const registry = getRegistry();
|
|
85
135
|
|
|
86
|
-
|
|
87
|
-
|
|
136
|
+
// Spawn a researcher agent
|
|
137
|
+
const agent = await registry.spawn(AgentType.RESEARCHER, {
|
|
138
|
+
name: 'docs-researcher',
|
|
139
|
+
claudeFlow: { enabled: true, namespace: 'kg' },
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// Execute a task
|
|
143
|
+
const task = createTask('Research authentication patterns', {
|
|
144
|
+
priority: TaskPriority.HIGH,
|
|
145
|
+
input: { topic: 'OAuth2' },
|
|
146
|
+
});
|
|
88
147
|
|
|
89
|
-
|
|
90
|
-
|
|
148
|
+
const result = await agent.execute(task);
|
|
149
|
+
console.log(result.data);
|
|
91
150
|
```
|
|
92
151
|
|
|
93
|
-
|
|
152
|
+
**BaseAgent Features:**
|
|
153
|
+
- Task execution with timeout and retry handling
|
|
154
|
+
- Input validation
|
|
155
|
+
- Output formatting
|
|
156
|
+
- Error handling and logging
|
|
157
|
+
- Claude-flow hooks integration
|
|
158
|
+
- Message passing between agents
|
|
94
159
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
160
|
+
### RulesEngine for Automation
|
|
161
|
+
|
|
162
|
+
Define and execute automation rules based on triggers and conditions.
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
import { RulesEngine, RuleType, TriggerType } from '@weavelogic/knowledge-graph-agent';
|
|
166
|
+
|
|
167
|
+
const engine = new RulesEngine();
|
|
98
168
|
|
|
99
|
-
|
|
100
|
-
|
|
169
|
+
engine.registerRule({
|
|
170
|
+
id: 'auto-tag',
|
|
171
|
+
name: 'Auto-tag documentation',
|
|
172
|
+
type: RuleType.TRANSFORM,
|
|
173
|
+
trigger: { type: TriggerType.FILE_CHANGE, pattern: 'docs/**/*.md' },
|
|
174
|
+
condition: (context) => context.file.endsWith('.md'),
|
|
175
|
+
action: async (context) => { /* auto-tag logic */ },
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
engine.start();
|
|
101
179
|
```
|
|
102
180
|
|
|
103
|
-
###
|
|
181
|
+
### Workflow Registry
|
|
104
182
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
183
|
+
Multi-step workflow orchestration with dependencies.
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
import { WorkflowRegistry } from '@weavelogic/knowledge-graph-agent';
|
|
187
|
+
|
|
188
|
+
const registry = new WorkflowRegistry();
|
|
189
|
+
|
|
190
|
+
registry.register({
|
|
191
|
+
id: 'documentation-sync',
|
|
192
|
+
name: 'Documentation Sync',
|
|
193
|
+
steps: [
|
|
194
|
+
{ id: 'analyze', action: 'analyze-docs' },
|
|
195
|
+
{ id: 'generate', action: 'generate-graph', dependsOn: ['analyze'] },
|
|
196
|
+
{ id: 'sync', action: 'sync-memory', dependsOn: ['generate'] },
|
|
197
|
+
],
|
|
198
|
+
});
|
|
108
199
|
|
|
109
|
-
|
|
110
|
-
kg sync --show-commands
|
|
200
|
+
await registry.execute('documentation-sync', { projectRoot: '/project' });
|
|
111
201
|
```
|
|
112
202
|
|
|
113
|
-
|
|
203
|
+
### VaultMemorySync
|
|
114
204
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
| `kg frontmatter update` | Update/regenerate frontmatter |
|
|
128
|
-
| `kg claude update` | Update CLAUDE.md |
|
|
129
|
-
| `kg claude preview` | Preview CLAUDE.md content |
|
|
130
|
-
| `kg sync` | Sync with claude-flow memory |
|
|
131
|
-
| `kg stats` | Display graph statistics |
|
|
132
|
-
| `kg search <query>` | Search the knowledge graph |
|
|
205
|
+
Synchronize knowledge graph with claude-flow memory.
|
|
206
|
+
|
|
207
|
+
```typescript
|
|
208
|
+
import { VaultMemorySync } from '@weavelogic/knowledge-graph-agent';
|
|
209
|
+
|
|
210
|
+
const sync = new VaultMemorySync({
|
|
211
|
+
vaultPath: '/project/docs',
|
|
212
|
+
namespace: 'knowledge-graph',
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
await sync.syncAll();
|
|
216
|
+
```
|
|
133
217
|
|
|
134
|
-
|
|
218
|
+
### Git Integration
|
|
135
219
|
|
|
136
|
-
|
|
220
|
+
Automatic commit message generation and staged changes analysis.
|
|
137
221
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
7. **Links to originals** for reference back to source documentation
|
|
222
|
+
```bash
|
|
223
|
+
# Show status with suggested commit message
|
|
224
|
+
kg commit
|
|
225
|
+
|
|
226
|
+
# Auto-commit with generated message
|
|
227
|
+
kg commit -a
|
|
145
228
|
|
|
146
|
-
|
|
229
|
+
# Interactive commit mode
|
|
230
|
+
kg commit -i
|
|
147
231
|
|
|
232
|
+
# Show recent commits
|
|
233
|
+
kg commit log
|
|
148
234
|
```
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
│ ├── _MOC.md
|
|
157
|
-
│ └── *.md
|
|
158
|
-
├── services/
|
|
159
|
-
├── features/
|
|
160
|
-
├── integrations/
|
|
161
|
-
├── standards/
|
|
162
|
-
├── guides/
|
|
163
|
-
├── references/
|
|
164
|
-
├── _templates/
|
|
165
|
-
├── _attachments/
|
|
166
|
-
└── _archive/
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
import { analyzeGitChanges, generateCommitMessage } from '@weavelogic/knowledge-graph-agent';
|
|
238
|
+
|
|
239
|
+
const changes = await analyzeGitChanges('/project');
|
|
240
|
+
const message = generateCommitMessage(changes);
|
|
241
|
+
console.log(message);
|
|
167
242
|
```
|
|
168
243
|
|
|
169
|
-
###
|
|
244
|
+
### MCP Server with 30+ Tools
|
|
170
245
|
|
|
171
|
-
|
|
246
|
+
Model Context Protocol server for Claude integration.
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# Start MCP server
|
|
250
|
+
kg mcp start
|
|
251
|
+
|
|
252
|
+
# Or via npx
|
|
253
|
+
npx @weavelogic/knowledge-graph-agent mcp start
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**Available MCP Tools:**
|
|
257
|
+
|
|
258
|
+
| Category | Tools |
|
|
259
|
+
|----------|-------|
|
|
260
|
+
| Graph | `kg_query`, `kg_stats`, `kg_get_node`, `kg_list_tags` |
|
|
261
|
+
| Cache | `kg_cache_stats` |
|
|
262
|
+
| Agents | `kg_agent_spawn`, `kg_agent_list` |
|
|
263
|
+
| System | `kg_health`, `kg_health_check` |
|
|
264
|
+
| Search | `kg_search_nodes`, `kg_search_tags` |
|
|
265
|
+
| Workflow | `kg_workflow_start`, `kg_workflow_status`, `kg_workflow_list` |
|
|
266
|
+
| Vector | `kg_vector_search`, `kg_vector_upsert` |
|
|
267
|
+
| Trajectory | `kg_trajectory_list` |
|
|
268
|
+
| Audit | `kg_audit_query`, `kg_audit_checkpoint` |
|
|
269
|
+
| Sync | `kg_sync_status` |
|
|
172
270
|
|
|
173
|
-
```markdown
|
|
174
|
-
---
|
|
175
|
-
title: "Document Title"
|
|
176
|
-
type: concept
|
|
177
|
-
status: active
|
|
178
|
-
tags:
|
|
179
|
-
- tag1
|
|
180
|
-
- tag2
|
|
181
|
-
category: concepts
|
|
182
|
-
description: "Auto-generated summary"
|
|
183
|
-
created: 2025-01-01
|
|
184
|
-
updated: 2025-01-01
|
|
185
|
-
original: "docs/original-file.md"
|
|
186
|
-
related:
|
|
187
|
-
- "[[Related Document]]"
|
|
188
271
|
---
|
|
189
272
|
|
|
190
|
-
|
|
273
|
+
## Phase 3: Advanced Integration
|
|
191
274
|
|
|
192
|
-
|
|
275
|
+
### ServiceManager
|
|
193
276
|
|
|
194
|
-
|
|
277
|
+
Centralized management for background services with health monitoring.
|
|
195
278
|
|
|
196
|
-
|
|
197
|
-
|
|
279
|
+
```typescript
|
|
280
|
+
import { createServiceManager, ServiceHandler } from '@weavelogic/knowledge-graph-agent';
|
|
281
|
+
|
|
282
|
+
const manager = createServiceManager();
|
|
283
|
+
|
|
284
|
+
// Register a service
|
|
285
|
+
await manager.register(
|
|
286
|
+
{
|
|
287
|
+
id: 'file-watcher',
|
|
288
|
+
name: 'File Watcher',
|
|
289
|
+
type: 'watcher',
|
|
290
|
+
autoStart: true,
|
|
291
|
+
healthCheckInterval: 60000,
|
|
292
|
+
restartOnFailure: true,
|
|
293
|
+
maxRestarts: 3,
|
|
294
|
+
},
|
|
295
|
+
myWatcherService
|
|
296
|
+
);
|
|
198
297
|
|
|
199
|
-
|
|
298
|
+
// Listen for events
|
|
299
|
+
manager.on('started', (state) => console.log(`${state.name} started`));
|
|
300
|
+
manager.on('healthCheck', ({ id, healthy }) => console.log(`${id}: ${healthy}`));
|
|
200
301
|
|
|
201
|
-
|
|
202
|
-
|
|
302
|
+
// Graceful shutdown
|
|
303
|
+
process.on('SIGTERM', () => manager.shutdown());
|
|
304
|
+
```
|
|
203
305
|
|
|
204
|
-
|
|
306
|
+
### ConfigManager with Migrations
|
|
205
307
|
|
|
206
|
-
|
|
207
|
-
- [[Related Document 2]]
|
|
308
|
+
Configuration management with version migrations and validation.
|
|
208
309
|
|
|
209
|
-
|
|
310
|
+
```typescript
|
|
311
|
+
import { createConfigManager } from '@weavelogic/knowledge-graph-agent';
|
|
210
312
|
|
|
211
|
-
|
|
212
|
-
> - Area needing investigation
|
|
313
|
+
const config = createConfigManager('/project');
|
|
213
314
|
|
|
214
|
-
|
|
315
|
+
// Get configuration
|
|
316
|
+
const dbConfig = config.get('database');
|
|
317
|
+
console.log(dbConfig.path);
|
|
215
318
|
|
|
216
|
-
|
|
217
|
-
|
|
319
|
+
// Update configuration
|
|
320
|
+
config.update({
|
|
321
|
+
cache: { maxSize: 2000, evictionPolicy: 'lfu' },
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
// Register and run migrations
|
|
325
|
+
config.registerMigration({
|
|
326
|
+
version: '1.1.0',
|
|
327
|
+
up: (cfg) => ({ ...cfg, newField: 'value' }),
|
|
328
|
+
down: (cfg) => { const { newField, ...rest } = cfg; return rest; },
|
|
329
|
+
});
|
|
218
330
|
|
|
219
|
-
|
|
331
|
+
config.migrate('1.1.0');
|
|
220
332
|
|
|
221
|
-
|
|
333
|
+
// Validate configuration
|
|
334
|
+
const { valid, errors } = config.validate();
|
|
222
335
|
```
|
|
223
336
|
|
|
224
|
-
|
|
337
|
+
### HealthMonitor
|
|
338
|
+
|
|
339
|
+
System health monitoring with alerts and history.
|
|
225
340
|
|
|
226
341
|
```typescript
|
|
227
|
-
import {
|
|
228
|
-
createKnowledgeGraph,
|
|
229
|
-
createDatabase,
|
|
230
|
-
initDocs,
|
|
231
|
-
generateClaudeMd,
|
|
232
|
-
quickInit,
|
|
233
|
-
// New in v0.2.0
|
|
234
|
-
analyzeDocs,
|
|
235
|
-
convertDocs,
|
|
236
|
-
addFrontmatter,
|
|
237
|
-
} from '@weavelogic/knowledge-graph-agent';
|
|
342
|
+
import { createHealthMonitor, createMemoryCheck, createDatabaseCheck } from '@weavelogic/knowledge-graph-agent';
|
|
238
343
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
updateClaudeMd: true,
|
|
245
|
-
});
|
|
344
|
+
const monitor = createHealthMonitor({ checkInterval: 30000 });
|
|
345
|
+
|
|
346
|
+
// Register health checks
|
|
347
|
+
monitor.registerCheck(createMemoryCheck(85)); // Alert at 85% heap usage
|
|
348
|
+
monitor.registerCheck(createDatabaseCheck('/project/.kg/knowledge.db'));
|
|
246
349
|
|
|
247
|
-
//
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
targetDir: 'docs-nn',
|
|
251
|
-
projectRoot: '/path/to/project',
|
|
252
|
-
useClaudeFlow: false,
|
|
253
|
-
createMOC: true,
|
|
254
|
-
linkOriginal: true,
|
|
255
|
-
dryRun: false,
|
|
350
|
+
// Listen for alerts
|
|
351
|
+
monitor.on('alert', (alert) => {
|
|
352
|
+
console.error(`[${alert.severity}] ${alert.component}: ${alert.message}`);
|
|
256
353
|
});
|
|
257
354
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
355
|
+
// Start monitoring
|
|
356
|
+
monitor.start();
|
|
357
|
+
|
|
358
|
+
// Get current health
|
|
359
|
+
const health = await monitor.runAllChecks();
|
|
360
|
+
console.log(`System status: ${health.status}`);
|
|
361
|
+
console.log(`Uptime: ${health.uptime}ms`);
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### DecisionTracker for Explainability
|
|
261
365
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
366
|
+
Track and explain AI reasoning and decisions.
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
import { createDecisionTracker } from '@weavelogic/knowledge-graph-agent';
|
|
370
|
+
|
|
371
|
+
const tracker = createDecisionTracker();
|
|
372
|
+
|
|
373
|
+
// Start a reasoning chain
|
|
374
|
+
const chainId = tracker.startChain('Process user query');
|
|
375
|
+
|
|
376
|
+
// Record decisions
|
|
377
|
+
const decision = tracker.recordDecision({
|
|
378
|
+
action: 'Extract entities from query',
|
|
379
|
+
reasoning: [
|
|
380
|
+
'Query contains multiple noun phrases',
|
|
381
|
+
'NLP analysis identified 3 potential entities',
|
|
382
|
+
'Confidence scores above threshold',
|
|
383
|
+
],
|
|
384
|
+
confidence: 'high',
|
|
385
|
+
context: {
|
|
386
|
+
trigger: 'user_query',
|
|
387
|
+
inputs: { query: 'Tell me about React and TypeScript' },
|
|
388
|
+
constraints: ['max 10 entities'],
|
|
389
|
+
alternatives: [],
|
|
390
|
+
},
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
// Record outcome
|
|
394
|
+
tracker.recordOutcome(decision.id, {
|
|
395
|
+
success: true,
|
|
396
|
+
result: { entities: ['React', 'TypeScript'] },
|
|
397
|
+
duration: 150,
|
|
398
|
+
sideEffects: [],
|
|
268
399
|
});
|
|
269
400
|
|
|
270
|
-
//
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
401
|
+
// Get explanation
|
|
402
|
+
console.log(tracker.explainDecision(decision.id));
|
|
403
|
+
|
|
404
|
+
// End chain
|
|
405
|
+
tracker.endChain(chainId);
|
|
406
|
+
|
|
407
|
+
// Get statistics
|
|
408
|
+
const stats = tracker.getStats();
|
|
409
|
+
console.log(`Success rate: ${stats.successRate * 100}%`);
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Phase 4: Enterprise Features
|
|
415
|
+
|
|
416
|
+
### Chunker for Large Documents
|
|
417
|
+
|
|
418
|
+
Split large documents into manageable chunks with multiple strategies.
|
|
419
|
+
|
|
420
|
+
**Strategies:**
|
|
421
|
+
- `fixed` - Character-based chunking with overlap
|
|
422
|
+
- `semantic` - Paragraph-based chunking
|
|
423
|
+
- `markdown` - Respects markdown structure (headers, sections)
|
|
424
|
+
- `code` - Preserves code blocks as atomic units
|
|
425
|
+
- `adaptive` - Auto-selects best strategy based on content
|
|
426
|
+
|
|
427
|
+
```typescript
|
|
428
|
+
import { createChunker, chunkDocument } from '@weavelogic/knowledge-graph-agent';
|
|
429
|
+
|
|
430
|
+
// Quick usage
|
|
431
|
+
const result = chunkDocument(largeMarkdownContent, {
|
|
432
|
+
strategy: 'adaptive',
|
|
433
|
+
maxSize: 2000,
|
|
434
|
+
overlap: 50,
|
|
276
435
|
});
|
|
277
436
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
const graph = createKnowledgeGraph('my-project', '/project/root');
|
|
437
|
+
console.log(`Split into ${result.chunks.length} chunks`);
|
|
438
|
+
console.log(`Processing time: ${result.processingTime}ms`);
|
|
281
439
|
|
|
282
|
-
//
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
includeExamples: true,
|
|
440
|
+
// With configuration
|
|
441
|
+
const chunker = createChunker({
|
|
442
|
+
defaultStrategy: 'markdown',
|
|
443
|
+
defaultMaxSize: 4000,
|
|
287
444
|
});
|
|
288
445
|
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
446
|
+
const chunks = chunker.chunk(content);
|
|
447
|
+
for (const chunk of chunks) {
|
|
448
|
+
console.log(`Chunk ${chunk.id}: ${chunk.metadata.wordCount} words`);
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### BackupManager with Compression
|
|
453
|
+
|
|
454
|
+
Automatic backup with gzip compression and checksums.
|
|
455
|
+
|
|
456
|
+
```typescript
|
|
457
|
+
import { createBackupManager } from '@weavelogic/knowledge-graph-agent';
|
|
458
|
+
|
|
459
|
+
const backup = createBackupManager('/project/.kg/knowledge.db', {
|
|
460
|
+
enabled: true,
|
|
461
|
+
interval: 86400000, // 24 hours
|
|
462
|
+
maxBackups: 5,
|
|
463
|
+
compress: true,
|
|
464
|
+
backupPath: '/project/.kg/backups',
|
|
294
465
|
});
|
|
466
|
+
|
|
467
|
+
// Create backup
|
|
468
|
+
const info = await backup.createBackup();
|
|
469
|
+
console.log(`Backup created: ${info.id}`);
|
|
470
|
+
console.log(`Size: ${info.size} bytes`);
|
|
471
|
+
console.log(`Checksum: ${info.checksum}`);
|
|
472
|
+
|
|
473
|
+
// List backups
|
|
474
|
+
const backups = backup.listBackups();
|
|
475
|
+
for (const b of backups) {
|
|
476
|
+
console.log(`${b.id}: ${b.timestamp.toISOString()}`);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// Restore from backup
|
|
480
|
+
await backup.restore(backups[0].id);
|
|
481
|
+
|
|
482
|
+
// Start automatic backups
|
|
483
|
+
backup.startAutoBackup();
|
|
295
484
|
```
|
|
296
485
|
|
|
297
|
-
|
|
486
|
+
### IntegrityChecker for Database Validation
|
|
487
|
+
|
|
488
|
+
Comprehensive database integrity checking and repair.
|
|
489
|
+
|
|
490
|
+
```typescript
|
|
491
|
+
import { createIntegrityChecker, checkDatabaseIntegrity } from '@weavelogic/knowledge-graph-agent';
|
|
492
|
+
|
|
493
|
+
// Quick check
|
|
494
|
+
const result = checkDatabaseIntegrity('/project/.kg/knowledge.db');
|
|
495
|
+
console.log(`Valid: ${result.valid}`);
|
|
496
|
+
console.log(`Errors: ${result.errors.length}`);
|
|
497
|
+
console.log(`Warnings: ${result.warnings.length}`);
|
|
498
|
+
|
|
499
|
+
// Detailed check with repair
|
|
500
|
+
const checker = createIntegrityChecker('/project/.kg/knowledge.db');
|
|
501
|
+
const check = checker.check();
|
|
502
|
+
|
|
503
|
+
for (const table of check.tables) {
|
|
504
|
+
console.log(`${table.name}: ${table.rowCount} rows, valid: ${table.valid}`);
|
|
505
|
+
if (!table.valid) {
|
|
506
|
+
console.log(` Issues: ${table.issues.join(', ')}`);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
298
509
|
|
|
299
|
-
|
|
510
|
+
// Repair database
|
|
511
|
+
if (!check.valid) {
|
|
512
|
+
const repaired = checker.repair();
|
|
513
|
+
console.log(`Repair ${repaired ? 'successful' : 'failed'}`);
|
|
514
|
+
}
|
|
300
515
|
|
|
516
|
+
// Get database stats
|
|
517
|
+
const stats = checker.getStats();
|
|
518
|
+
console.log(`Pages: ${stats.pageCount}, Free: ${stats.freePages}`);
|
|
519
|
+
console.log(`WAL mode: ${stats.walMode}`);
|
|
301
520
|
```
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
521
|
+
|
|
522
|
+
### AdvancedCache with Multiple Eviction Policies
|
|
523
|
+
|
|
524
|
+
High-performance caching with LRU, LFU, FIFO, and TTL eviction.
|
|
525
|
+
|
|
526
|
+
```typescript
|
|
527
|
+
import { createAdvancedCache } from '@weavelogic/knowledge-graph-agent';
|
|
528
|
+
|
|
529
|
+
const cache = createAdvancedCache<User>({
|
|
530
|
+
maxSize: 50 * 1024 * 1024, // 50MB
|
|
531
|
+
maxEntries: 1000,
|
|
532
|
+
defaultTTL: 300000, // 5 minutes
|
|
533
|
+
evictionPolicy: 'lru', // 'lru' | 'lfu' | 'fifo' | 'ttl'
|
|
534
|
+
onEvict: (key, value) => console.log(`Evicted: ${key}`),
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// Basic operations
|
|
538
|
+
cache.set('user:123', userData, { tags: ['user', 'active'] });
|
|
539
|
+
const user = cache.get<User>('user:123');
|
|
540
|
+
|
|
541
|
+
// Tag-based operations
|
|
542
|
+
const activeUsers = cache.getByTag('active');
|
|
543
|
+
cache.deleteByTag('user');
|
|
544
|
+
|
|
545
|
+
// Get or set with factory
|
|
546
|
+
const result = await cache.getOrSet('expensive:key', async () => {
|
|
547
|
+
return await expensiveComputation();
|
|
548
|
+
}, { ttl: 60000 });
|
|
549
|
+
|
|
550
|
+
// Statistics
|
|
551
|
+
const stats = cache.getStats();
|
|
552
|
+
console.log(`Hit rate: ${(stats.hitRate * 100).toFixed(1)}%`);
|
|
553
|
+
console.log(`Evictions: ${stats.evictions}`);
|
|
554
|
+
|
|
555
|
+
// Change policy at runtime
|
|
556
|
+
cache.setEvictionPolicy('lfu');
|
|
331
557
|
```
|
|
332
558
|
|
|
333
|
-
|
|
559
|
+
### Diagnostics CLI
|
|
560
|
+
|
|
561
|
+
Comprehensive troubleshooting tools.
|
|
562
|
+
|
|
563
|
+
```bash
|
|
564
|
+
# Run full diagnostics
|
|
565
|
+
kg diag run
|
|
566
|
+
|
|
567
|
+
# Attempt to fix issues
|
|
568
|
+
kg diag run --fix
|
|
569
|
+
|
|
570
|
+
# Check system health
|
|
571
|
+
kg diag health
|
|
572
|
+
|
|
573
|
+
# Repair database issues
|
|
574
|
+
kg diag repair
|
|
334
575
|
|
|
335
|
-
|
|
576
|
+
# Create database backup
|
|
577
|
+
kg diag backup
|
|
336
578
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
| `concept` | Abstract concepts and ideas |
|
|
340
|
-
| `technical` | Technical components and implementations |
|
|
341
|
-
| `feature` | Product features and capabilities |
|
|
342
|
-
| `primitive` | Base technology primitives |
|
|
343
|
-
| `service` | Backend services and APIs |
|
|
344
|
-
| `guide` | How-to guides and tutorials |
|
|
345
|
-
| `standard` | Coding standards and conventions |
|
|
346
|
-
| `integration` | External integrations |
|
|
579
|
+
# List existing backups
|
|
580
|
+
kg diag backup --list
|
|
347
581
|
|
|
348
|
-
|
|
582
|
+
# Show system information
|
|
583
|
+
kg diag info
|
|
584
|
+
```
|
|
349
585
|
|
|
350
|
-
```yaml
|
|
351
586
|
---
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
587
|
+
|
|
588
|
+
## Phase 5: External Integrations
|
|
589
|
+
|
|
590
|
+
### Workflow DevKit Integration (useworkflow.dev)
|
|
591
|
+
|
|
592
|
+
Integration with the Workflow DevKit for durable workflow orchestration with Postgres persistence.
|
|
593
|
+
|
|
594
|
+
**Key Concepts:**
|
|
595
|
+
- **Postgres World**: Durable state persistence with transactional guarantees
|
|
596
|
+
- **"use workflow" / "use step" directives**: Declarative workflow definition
|
|
597
|
+
- **DurableAgent**: Agents that survive restarts and can resume from any step
|
|
598
|
+
- **GOAP Planning**: Goal-Oriented Action Planning for intelligent task decomposition
|
|
599
|
+
|
|
600
|
+
```typescript
|
|
601
|
+
import { WorkflowManager } from '@weavelogic/knowledge-graph-agent';
|
|
602
|
+
|
|
603
|
+
const workflow = new WorkflowManager({
|
|
604
|
+
postgres: process.env.DATABASE_URL,
|
|
605
|
+
durableAgents: true,
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
// Start a durable workflow
|
|
609
|
+
const execution = await workflow.start('document-analysis', {
|
|
610
|
+
input: { path: '/docs' },
|
|
611
|
+
resumable: true,
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
// Check workflow status
|
|
615
|
+
const status = await workflow.getStatus(execution.id);
|
|
616
|
+
console.log(`Step ${status.currentStep}/${status.totalSteps}: ${status.state}`);
|
|
617
|
+
|
|
618
|
+
// List active workflows
|
|
619
|
+
const active = await workflow.list({ status: 'running' });
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
**CLI Commands:**
|
|
623
|
+
|
|
624
|
+
| Command | Description |
|
|
625
|
+
|---------|-------------|
|
|
626
|
+
| `kg workflow start <name>` | Start a named workflow |
|
|
627
|
+
| `kg workflow status <id>` | Get workflow execution status |
|
|
628
|
+
| `kg workflow list` | List active workflow executions |
|
|
629
|
+
| `kg workflow resume <id>` | Resume a paused workflow |
|
|
630
|
+
| `kg workflow cancel <id>` | Cancel a running workflow |
|
|
631
|
+
| `kg workflow history <name>` | Show workflow execution history |
|
|
632
|
+
| `kg workflow steps <name>` | List steps in a workflow definition |
|
|
633
|
+
|
|
634
|
+
**MCP Tools:**
|
|
635
|
+
- `kg_workflow_start` - Start a workflow execution
|
|
636
|
+
- `kg_workflow_status` - Get execution status and progress
|
|
637
|
+
- `kg_workflow_list` - List workflows with filtering
|
|
638
|
+
|
|
363
639
|
---
|
|
640
|
+
|
|
641
|
+
### RuVector Integration
|
|
642
|
+
|
|
643
|
+
High-performance semantic vector search with HNSW indexing and trajectory tracking for self-learning agents.
|
|
644
|
+
|
|
645
|
+
**Key Features:**
|
|
646
|
+
- **HNSW Approximate Nearest Neighbor**: Sub-millisecond search on millions of vectors
|
|
647
|
+
- **Hybrid Search**: Combines vector similarity with keyword matching
|
|
648
|
+
- **Trajectory Tracking**: Records decision paths for experience replay
|
|
649
|
+
- **Self-Learning**: Agents improve through trajectory analysis
|
|
650
|
+
|
|
651
|
+
```typescript
|
|
652
|
+
import { VectorStore, TrajectoryTracker } from '@weavelogic/knowledge-graph-agent';
|
|
653
|
+
|
|
654
|
+
// Initialize vector store
|
|
655
|
+
const vectors = new VectorStore({
|
|
656
|
+
dimensions: 1536,
|
|
657
|
+
metric: 'cosine',
|
|
658
|
+
hnswConfig: { m: 16, efConstruction: 200 },
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
// Upsert vectors with metadata
|
|
662
|
+
await vectors.upsert([
|
|
663
|
+
{ id: 'doc-1', values: embedding, metadata: { type: 'concept', tags: ['api'] } },
|
|
664
|
+
]);
|
|
665
|
+
|
|
666
|
+
// Semantic search
|
|
667
|
+
const results = await vectors.search(queryEmbedding, {
|
|
668
|
+
topK: 10,
|
|
669
|
+
filter: { type: 'concept' },
|
|
670
|
+
includeMetadata: true,
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
// Hybrid search (vector + keyword)
|
|
674
|
+
const hybridResults = await vectors.hybridSearch({
|
|
675
|
+
vector: queryEmbedding,
|
|
676
|
+
keywords: ['authentication', 'oauth'],
|
|
677
|
+
alpha: 0.7, // Weight: 70% vector, 30% keyword
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
// Trajectory tracking for self-learning
|
|
681
|
+
const tracker = new TrajectoryTracker();
|
|
682
|
+
tracker.recordStep({
|
|
683
|
+
state: { context: 'user-query' },
|
|
684
|
+
action: 'search-knowledge-graph',
|
|
685
|
+
reward: 0.8,
|
|
686
|
+
nextState: { context: 'results-found' },
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
const trajectories = tracker.list({ minReward: 0.7 });
|
|
364
690
|
```
|
|
365
691
|
|
|
366
|
-
|
|
692
|
+
**CLI Commands:**
|
|
367
693
|
|
|
368
|
-
|
|
694
|
+
| Command | Description |
|
|
695
|
+
|---------|-------------|
|
|
696
|
+
| `kg vector search <query>` | Semantic search across knowledge graph |
|
|
697
|
+
| `kg vector upsert <file>` | Add/update vectors from file |
|
|
698
|
+
| `kg vector delete <ids>` | Delete vectors by ID |
|
|
699
|
+
| `kg vector stats` | Show vector index statistics |
|
|
700
|
+
| `kg trajectory list` | List recorded trajectories |
|
|
701
|
+
| `kg trajectory analyze` | Analyze trajectory patterns |
|
|
702
|
+
| `kg trajectory export` | Export trajectories for training |
|
|
703
|
+
| `kg trajectory prune` | Remove low-value trajectories |
|
|
704
|
+
|
|
705
|
+
**MCP Tools:**
|
|
706
|
+
- `kg_vector_search` - Semantic search with filters
|
|
707
|
+
- `kg_vector_upsert` - Add or update vectors
|
|
708
|
+
- `kg_trajectory_list` - List agent trajectories
|
|
369
709
|
|
|
370
|
-
|
|
371
|
-
- **Cross-Session Context**: Access knowledge across Claude sessions
|
|
372
|
-
- **Agent Coordination**: Share knowledge between swarm agents
|
|
373
|
-
- **Deep Analysis**: Use claude-flow agents for comprehensive documentation analysis
|
|
710
|
+
---
|
|
374
711
|
|
|
375
|
-
###
|
|
712
|
+
### Exochain Integration
|
|
376
713
|
|
|
377
|
-
|
|
378
|
-
// Store node in memory
|
|
379
|
-
mcp__claude-flow__memory_usage {
|
|
380
|
-
action: "store",
|
|
381
|
-
key: "node/<id>",
|
|
382
|
-
namespace: "knowledge-graph",
|
|
383
|
-
value: { ... }
|
|
384
|
-
}
|
|
714
|
+
Cryptographically verifiable audit trail with DAG-BFT consensus for distributed knowledge graph operations.
|
|
385
715
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
716
|
+
**Key Features:**
|
|
717
|
+
- **DAG-BFT Consensus**: Byzantine Fault Tolerant ordering without leader
|
|
718
|
+
- **Hybrid Logical Clocks (HLC)**: Causally consistent timestamps
|
|
719
|
+
- **BLAKE3 Hashing**: Fast cryptographic content addressing
|
|
720
|
+
- **Ed25519 Signatures**: Agent-signed operations
|
|
721
|
+
- **Syndication**: Replicate audit logs across nodes
|
|
392
722
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
723
|
+
```typescript
|
|
724
|
+
import { AuditTrail, SyncManager } from '@weavelogic/knowledge-graph-agent';
|
|
725
|
+
|
|
726
|
+
// Initialize audit trail
|
|
727
|
+
const audit = new AuditTrail({
|
|
728
|
+
signingKey: process.env.AGENT_PRIVATE_KEY,
|
|
729
|
+
hlcEnabled: true,
|
|
730
|
+
dagBftQuorum: 3,
|
|
731
|
+
});
|
|
732
|
+
|
|
733
|
+
// Record an audited operation
|
|
734
|
+
const checkpoint = await audit.checkpoint({
|
|
735
|
+
operation: 'node_created',
|
|
736
|
+
nodeId: 'concept-123',
|
|
737
|
+
agent: 'coder-agent',
|
|
738
|
+
data: { title: 'Authentication Flow' },
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
console.log(`Checkpoint: ${checkpoint.hash}`);
|
|
742
|
+
console.log(`HLC: ${checkpoint.hlc}`);
|
|
743
|
+
console.log(`Signature: ${checkpoint.signature}`);
|
|
744
|
+
|
|
745
|
+
// Query audit trail
|
|
746
|
+
const history = await audit.query({
|
|
747
|
+
nodeId: 'concept-123',
|
|
748
|
+
since: '2024-01-01',
|
|
749
|
+
operations: ['node_created', 'node_updated'],
|
|
750
|
+
});
|
|
751
|
+
|
|
752
|
+
// Sync with remote nodes
|
|
753
|
+
const sync = new SyncManager({
|
|
754
|
+
peers: ['node1.example.com', 'node2.example.com'],
|
|
755
|
+
syndication: true,
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
const status = await sync.getStatus();
|
|
759
|
+
console.log(`Synced: ${status.lastSyncedHash}`);
|
|
760
|
+
console.log(`Peers: ${status.connectedPeers}/${status.totalPeers}`);
|
|
398
761
|
```
|
|
399
762
|
|
|
763
|
+
**CLI Commands:**
|
|
764
|
+
|
|
765
|
+
| Command | Description |
|
|
766
|
+
|---------|-------------|
|
|
767
|
+
| `kg audit query` | Query audit trail with filters |
|
|
768
|
+
| `kg audit checkpoint` | Create a manual checkpoint |
|
|
769
|
+
| `kg audit verify <hash>` | Verify checkpoint integrity |
|
|
770
|
+
| `kg audit export` | Export audit log |
|
|
771
|
+
| `kg audit stats` | Show audit trail statistics |
|
|
772
|
+
| `kg sync status` | Show synchronization status |
|
|
773
|
+
| `kg sync peers` | List connected peers |
|
|
774
|
+
| `kg sync force` | Force synchronization |
|
|
775
|
+
|
|
776
|
+
**MCP Tools:**
|
|
777
|
+
- `kg_audit_query` - Query audit trail
|
|
778
|
+
- `kg_audit_checkpoint` - Create checkpoint
|
|
779
|
+
- `kg_sync_status` - Get sync status
|
|
780
|
+
|
|
781
|
+
---
|
|
782
|
+
|
|
783
|
+
## CLI Commands Reference
|
|
784
|
+
|
|
785
|
+
### Initialization
|
|
786
|
+
|
|
787
|
+
| Command | Description |
|
|
788
|
+
|---------|-------------|
|
|
789
|
+
| `kg init` | Initialize knowledge graph in project |
|
|
790
|
+
| `kg init-primitives` | Bootstrap primitives from codebase |
|
|
791
|
+
| `kg init-primitives --dry-run` | Preview without writing files |
|
|
792
|
+
| `kg analyze-codebase` | Analyze dependencies and services |
|
|
793
|
+
|
|
794
|
+
### Knowledge Graph
|
|
795
|
+
|
|
796
|
+
| Command | Description |
|
|
797
|
+
|---------|-------------|
|
|
798
|
+
| `kg graph` | Generate/update knowledge graph |
|
|
799
|
+
| `kg graph --update` | Incremental update |
|
|
800
|
+
| `kg stats` | Display graph statistics |
|
|
801
|
+
| `kg search <query>` | Search the knowledge graph |
|
|
802
|
+
|
|
803
|
+
### Documentation
|
|
804
|
+
|
|
805
|
+
| Command | Description |
|
|
806
|
+
|---------|-------------|
|
|
807
|
+
| `kg docs init` | Initialize docs directory |
|
|
808
|
+
| `kg docs status` | Show documentation status |
|
|
809
|
+
| `kg analyze` | Analyze & migrate to knowledge graph |
|
|
810
|
+
| `kg analyze deep` | Deep analysis with claude-flow |
|
|
811
|
+
| `kg analyze report` | Generate analysis report |
|
|
812
|
+
| `kg convert docs` | Convert docs/ to docs-nn/ |
|
|
813
|
+
|
|
814
|
+
### Frontmatter
|
|
815
|
+
|
|
816
|
+
| Command | Description |
|
|
817
|
+
|---------|-------------|
|
|
818
|
+
| `kg frontmatter add` | Add frontmatter to markdown files |
|
|
819
|
+
| `kg frontmatter validate` | Validate frontmatter |
|
|
820
|
+
| `kg frontmatter update` | Update/regenerate frontmatter |
|
|
821
|
+
|
|
822
|
+
### SOP Compliance
|
|
823
|
+
|
|
824
|
+
| Command | Description |
|
|
825
|
+
|---------|-------------|
|
|
826
|
+
| `kg sop init` | Initialize SOP standards layer |
|
|
827
|
+
| `kg sop check` | Check compliance against SOPs |
|
|
828
|
+
| `kg sop gaps` | Analyze compliance gaps |
|
|
829
|
+
| `kg sop report` | Generate compliance report |
|
|
830
|
+
| `kg sop list` | List available SOPs |
|
|
831
|
+
|
|
832
|
+
### Claude Integration
|
|
833
|
+
|
|
834
|
+
| Command | Description |
|
|
835
|
+
|---------|-------------|
|
|
836
|
+
| `kg claude update` | Update CLAUDE.md |
|
|
837
|
+
| `kg claude preview` | Preview CLAUDE.md content |
|
|
838
|
+
| `kg sync` | Sync with claude-flow memory |
|
|
839
|
+
|
|
840
|
+
### Git Integration
|
|
841
|
+
|
|
842
|
+
| Command | Description |
|
|
843
|
+
|---------|-------------|
|
|
844
|
+
| `kg commit` | Show status with suggested message |
|
|
845
|
+
| `kg commit -a` | Auto-commit with generated message |
|
|
846
|
+
| `kg commit -i` | Interactive commit mode |
|
|
847
|
+
| `kg commit -m "msg"` | Commit with custom message |
|
|
848
|
+
| `kg commit status` | Show git status with analysis |
|
|
849
|
+
| `kg commit log` | Show recent commits |
|
|
850
|
+
| `kg commit diff` | Show diff of changes |
|
|
851
|
+
|
|
852
|
+
### Configuration
|
|
853
|
+
|
|
854
|
+
| Command | Description |
|
|
855
|
+
|---------|-------------|
|
|
856
|
+
| `kg config show` | Show current configuration |
|
|
857
|
+
| `kg config set <key> <value>` | Set configuration value |
|
|
858
|
+
| `kg config reset` | Reset to defaults |
|
|
859
|
+
|
|
860
|
+
### Diagnostics
|
|
861
|
+
|
|
862
|
+
| Command | Description |
|
|
863
|
+
|---------|-------------|
|
|
864
|
+
| `kg diag run` | Run full diagnostics |
|
|
865
|
+
| `kg diag run --fix` | Attempt to fix issues |
|
|
866
|
+
| `kg diag health` | Check system health |
|
|
867
|
+
| `kg diag repair` | Repair database issues |
|
|
868
|
+
| `kg diag backup` | Create database backup |
|
|
869
|
+
| `kg diag backup --list` | List existing backups |
|
|
870
|
+
| `kg diag info` | Show system information |
|
|
871
|
+
|
|
872
|
+
### Workflow (Phase 5)
|
|
873
|
+
|
|
874
|
+
| Command | Description |
|
|
875
|
+
|---------|-------------|
|
|
876
|
+
| `kg workflow start <name>` | Start a named workflow |
|
|
877
|
+
| `kg workflow status <id>` | Get workflow execution status |
|
|
878
|
+
| `kg workflow list` | List active workflow executions |
|
|
879
|
+
| `kg workflow resume <id>` | Resume a paused workflow |
|
|
880
|
+
| `kg workflow cancel <id>` | Cancel a running workflow |
|
|
881
|
+
| `kg workflow history <name>` | Show workflow execution history |
|
|
882
|
+
| `kg workflow steps <name>` | List steps in a workflow definition |
|
|
883
|
+
|
|
884
|
+
### Vector Search (Phase 5)
|
|
885
|
+
|
|
886
|
+
| Command | Description |
|
|
887
|
+
|---------|-------------|
|
|
888
|
+
| `kg vector search <query>` | Semantic search across knowledge graph |
|
|
889
|
+
| `kg vector upsert <file>` | Add/update vectors from file |
|
|
890
|
+
| `kg vector delete <ids>` | Delete vectors by ID |
|
|
891
|
+
| `kg vector stats` | Show vector index statistics |
|
|
892
|
+
|
|
893
|
+
### Trajectory (Phase 5)
|
|
894
|
+
|
|
895
|
+
| Command | Description |
|
|
896
|
+
|---------|-------------|
|
|
897
|
+
| `kg trajectory list` | List recorded trajectories |
|
|
898
|
+
| `kg trajectory analyze` | Analyze trajectory patterns |
|
|
899
|
+
| `kg trajectory export` | Export trajectories for training |
|
|
900
|
+
| `kg trajectory prune` | Remove low-value trajectories |
|
|
901
|
+
|
|
902
|
+
### Audit Trail (Phase 5)
|
|
903
|
+
|
|
904
|
+
| Command | Description |
|
|
905
|
+
|---------|-------------|
|
|
906
|
+
| `kg audit query` | Query audit trail with filters |
|
|
907
|
+
| `kg audit checkpoint` | Create a manual checkpoint |
|
|
908
|
+
| `kg audit verify <hash>` | Verify checkpoint integrity |
|
|
909
|
+
| `kg audit export` | Export audit log |
|
|
910
|
+
| `kg audit stats` | Show audit trail statistics |
|
|
911
|
+
|
|
912
|
+
### Synchronization (Phase 5)
|
|
913
|
+
|
|
914
|
+
| Command | Description |
|
|
915
|
+
|---------|-------------|
|
|
916
|
+
| `kg sync status` | Show synchronization status |
|
|
917
|
+
| `kg sync peers` | List connected peers |
|
|
918
|
+
| `kg sync force` | Force synchronization |
|
|
919
|
+
|
|
920
|
+
---
|
|
921
|
+
|
|
400
922
|
## Configuration
|
|
401
923
|
|
|
402
924
|
Create `.kg/config.json` to customize behavior:
|
|
403
925
|
|
|
404
926
|
```json
|
|
405
927
|
{
|
|
928
|
+
"version": "1.0.0",
|
|
406
929
|
"projectRoot": ".",
|
|
407
|
-
"
|
|
408
|
-
"graph": {
|
|
409
|
-
"includePatterns": ["**/*.md"],
|
|
410
|
-
"excludePatterns": ["node_modules/**", "dist/**"]
|
|
411
|
-
},
|
|
930
|
+
"docsPath": "docs",
|
|
412
931
|
"database": {
|
|
413
|
-
"path": ".kg/knowledge.db"
|
|
932
|
+
"path": ".kg/knowledge.db",
|
|
933
|
+
"autoBackup": true,
|
|
934
|
+
"backupInterval": 86400000,
|
|
935
|
+
"maxBackups": 5
|
|
414
936
|
},
|
|
415
|
-
"
|
|
937
|
+
"cache": {
|
|
416
938
|
"enabled": true,
|
|
417
|
-
"
|
|
418
|
-
"
|
|
939
|
+
"maxSize": 1000,
|
|
940
|
+
"ttl": 3600000,
|
|
941
|
+
"evictionPolicy": "lru"
|
|
942
|
+
},
|
|
943
|
+
"agents": {
|
|
944
|
+
"maxConcurrent": 5,
|
|
945
|
+
"defaultTimeout": 30000,
|
|
946
|
+
"retryAttempts": 3,
|
|
947
|
+
"claudeFlowEnabled": true
|
|
948
|
+
},
|
|
949
|
+
"services": {
|
|
950
|
+
"watcherEnabled": true,
|
|
951
|
+
"schedulerEnabled": true,
|
|
952
|
+
"syncEnabled": true,
|
|
953
|
+
"healthCheckInterval": 60000
|
|
954
|
+
},
|
|
955
|
+
"logging": {
|
|
956
|
+
"level": "info",
|
|
957
|
+
"format": "text"
|
|
419
958
|
},
|
|
420
959
|
"analyzer": {
|
|
421
960
|
"targetDir": "docs-nn",
|
|
422
961
|
"createMOC": true,
|
|
423
962
|
"linkOriginal": true
|
|
963
|
+
},
|
|
964
|
+
"claudeFlow": {
|
|
965
|
+
"enabled": true,
|
|
966
|
+
"namespace": "knowledge-graph",
|
|
967
|
+
"syncOnChange": true
|
|
424
968
|
}
|
|
425
969
|
}
|
|
426
970
|
```
|
|
427
971
|
|
|
428
|
-
|
|
972
|
+
---
|
|
973
|
+
|
|
974
|
+
## Programmatic Usage
|
|
975
|
+
|
|
976
|
+
```typescript
|
|
977
|
+
import {
|
|
978
|
+
// Core
|
|
979
|
+
createKnowledgeGraph,
|
|
980
|
+
createDatabase,
|
|
981
|
+
|
|
982
|
+
// Initialization
|
|
983
|
+
quickInit,
|
|
984
|
+
initDocs,
|
|
985
|
+
generateClaudeMd,
|
|
429
986
|
|
|
430
|
-
|
|
987
|
+
// Analysis
|
|
988
|
+
analyzeDocs,
|
|
989
|
+
convertDocs,
|
|
990
|
+
addFrontmatter,
|
|
991
|
+
analyzeSeed,
|
|
992
|
+
initPrimitives,
|
|
993
|
+
|
|
994
|
+
// Agents
|
|
995
|
+
BaseAgent,
|
|
996
|
+
getRegistry,
|
|
997
|
+
AgentType,
|
|
998
|
+
createTask,
|
|
999
|
+
|
|
1000
|
+
// Services
|
|
1001
|
+
createServiceManager,
|
|
1002
|
+
createConfigManager,
|
|
1003
|
+
createHealthMonitor,
|
|
1004
|
+
|
|
1005
|
+
// Enterprise
|
|
1006
|
+
createChunker,
|
|
1007
|
+
createBackupManager,
|
|
1008
|
+
createIntegrityChecker,
|
|
1009
|
+
createAdvancedCache,
|
|
1010
|
+
|
|
1011
|
+
// Reasoning
|
|
1012
|
+
createDecisionTracker,
|
|
1013
|
+
|
|
1014
|
+
// Phase 5 - Workflow DevKit
|
|
1015
|
+
WorkflowManager,
|
|
1016
|
+
DurableAgent,
|
|
1017
|
+
GOAPPlanner,
|
|
1018
|
+
|
|
1019
|
+
// Phase 5 - RuVector
|
|
1020
|
+
VectorStore,
|
|
1021
|
+
TrajectoryTracker,
|
|
1022
|
+
|
|
1023
|
+
// Phase 5 - Exochain
|
|
1024
|
+
AuditTrail,
|
|
1025
|
+
SyncManager,
|
|
1026
|
+
|
|
1027
|
+
// Types
|
|
1028
|
+
type KGConfiguration,
|
|
1029
|
+
type AgentConfig,
|
|
1030
|
+
type ChunkOptions,
|
|
1031
|
+
type WorkflowExecution,
|
|
1032
|
+
type VectorSearchResult,
|
|
1033
|
+
type Trajectory,
|
|
1034
|
+
type AuditCheckpoint,
|
|
1035
|
+
} from '@weavelogic/knowledge-graph-agent';
|
|
1036
|
+
```
|
|
431
1037
|
|
|
432
|
-
|
|
433
|
-
- **NEW**: `kg analyze deep` for claude-flow powered deep analysis
|
|
434
|
-
- **NEW**: `kg analyze report` for generating analysis reports
|
|
435
|
-
- **NEW**: `kg convert docs` for converting existing documentation
|
|
436
|
-
- **NEW**: `kg frontmatter add/validate/update` commands
|
|
437
|
-
- **NEW**: Automatic categorization based on content analysis
|
|
438
|
-
- **NEW**: MOC (Map of Content) generation for navigation
|
|
439
|
-
- **NEW**: Obsidian-style callouts (`> [!info]`, `> [!warning]`)
|
|
440
|
-
- **NEW**: Research area detection and TODO extraction
|
|
441
|
-
- **NEW**: Cross-reference building between related documents
|
|
442
|
-
- **IMPROVED**: Enhanced frontmatter generation with more fields
|
|
1038
|
+
---
|
|
443
1039
|
|
|
444
|
-
|
|
1040
|
+
## Changelog
|
|
445
1041
|
|
|
446
|
-
-
|
|
447
|
-
|
|
1042
|
+
### v0.5.0 (Phase 5 - External Integrations)
|
|
1043
|
+
|
|
1044
|
+
- **NEW**: Workflow DevKit integration with MCP tools and CLI commands
|
|
1045
|
+
- `WorkflowManager` with Postgres World persistence
|
|
1046
|
+
- DurableAgent support for resumable workflows
|
|
1047
|
+
- GOAP planning for intelligent task decomposition
|
|
1048
|
+
- **NEW**: RuVector semantic search with trajectory tracking
|
|
1049
|
+
- `VectorStore` with HNSW approximate nearest neighbor search
|
|
1050
|
+
- Hybrid search combining vector similarity and keyword matching
|
|
1051
|
+
- `TrajectoryTracker` for self-learning agents
|
|
1052
|
+
- **NEW**: Exochain audit trail with DAG-BFT consensus
|
|
1053
|
+
- `AuditTrail` with Hybrid Logical Clocks (HLC)
|
|
1054
|
+
- BLAKE3 hashing and Ed25519 signatures
|
|
1055
|
+
- `SyncManager` for peer syndication
|
|
1056
|
+
- **NEW**: 9 new MCP tools (`kg_workflow_start`, `kg_workflow_status`, `kg_workflow_list`, `kg_vector_search`, `kg_vector_upsert`, `kg_trajectory_list`, `kg_audit_query`, `kg_audit_checkpoint`, `kg_sync_status`)
|
|
1057
|
+
- **NEW**: 22 new CLI subcommands across `workflow`, `vector`, `trajectory`, `audit`, and `sync` command groups
|
|
1058
|
+
- **NEW**: 249 new integration tests for external integrations
|
|
1059
|
+
|
|
1060
|
+
### v0.4.0 (Phase 4 - Enterprise Features)
|
|
1061
|
+
|
|
1062
|
+
- **NEW**: `Chunker` with 5 chunking strategies (fixed, semantic, markdown, code, adaptive)
|
|
1063
|
+
- **NEW**: `BackupManager` with gzip compression and SHA-256 checksums
|
|
1064
|
+
- **NEW**: `IntegrityChecker` for database validation and repair
|
|
1065
|
+
- **NEW**: `AdvancedCache` with LRU/LFU/FIFO/TTL eviction policies
|
|
1066
|
+
- **NEW**: `kg diag` CLI commands for diagnostics and troubleshooting
|
|
1067
|
+
- **NEW**: Tag-based cache operations
|
|
1068
|
+
- **NEW**: Automatic backup scheduling
|
|
1069
|
+
|
|
1070
|
+
### v0.3.0 (Phase 3 - Advanced Integration)
|
|
1071
|
+
|
|
1072
|
+
- **NEW**: `ServiceManager` for background process management
|
|
1073
|
+
- **NEW**: `ConfigManager` with migration support and validation
|
|
1074
|
+
- **NEW**: `HealthMonitor` with component health checks and alerts
|
|
1075
|
+
- **NEW**: `DecisionTracker` for AI reasoning explainability
|
|
1076
|
+
- **NEW**: `kg config` CLI commands
|
|
1077
|
+
- **IMPROVED**: Health check history and performance metrics
|
|
1078
|
+
|
|
1079
|
+
### v0.2.0 (Phase 2 - Core Features)
|
|
1080
|
+
|
|
1081
|
+
- **NEW**: Agent system with BaseAgent and specialized agents
|
|
1082
|
+
- **NEW**: `RulesEngine` for automation
|
|
1083
|
+
- **NEW**: `WorkflowRegistry` for multi-step workflows
|
|
1084
|
+
- **NEW**: `VaultMemorySync` for memory synchronization
|
|
1085
|
+
- **NEW**: Git integration with auto-commit
|
|
1086
|
+
- **NEW**: MCP Server with 20+ tools
|
|
1087
|
+
- **NEW**: `kg commit` CLI commands
|
|
1088
|
+
|
|
1089
|
+
### v0.1.0 (Phase 1 - Cultivation System)
|
|
1090
|
+
|
|
1091
|
+
- **NEW**: `SeedGenerator` for codebase analysis
|
|
1092
|
+
- **NEW**: `DeepAnalyzer` with claude-flow integration
|
|
1093
|
+
- **NEW**: `init-primitives` and `cultivate` CLI commands
|
|
1094
|
+
- **NEW**: Shadow Cache for file change tracking
|
|
1095
|
+
- Initial knowledge graph generation
|
|
448
1096
|
- Docs initialization
|
|
449
1097
|
- CLAUDE.md management
|
|
450
|
-
- Claude-flow integration
|
|
451
1098
|
- Full-text search
|
|
452
1099
|
|
|
1100
|
+
---
|
|
1101
|
+
|
|
1102
|
+
## Roadmap
|
|
1103
|
+
|
|
1104
|
+
### Completed Features
|
|
1105
|
+
|
|
1106
|
+
- [x] Real-time collaboration support (implemented via webhook handlers in v0.5.0)
|
|
1107
|
+
- [x] Webhook integrations (implemented in v0.5.0)
|
|
1108
|
+
|
|
1109
|
+
### Planned Features
|
|
1110
|
+
|
|
1111
|
+
- [ ] Plugin system for custom analyzers
|
|
1112
|
+
- [ ] GraphQL API for queries
|
|
1113
|
+
- [ ] Web dashboard for visualization
|
|
1114
|
+
- [ ] Distributed caching with Redis
|
|
1115
|
+
|
|
1116
|
+
### Deprecated Features
|
|
1117
|
+
|
|
1118
|
+
- None currently
|
|
1119
|
+
|
|
1120
|
+
---
|
|
1121
|
+
|
|
453
1122
|
## API Reference
|
|
454
1123
|
|
|
455
1124
|
See [docs/API.md](./docs/API.md) for detailed API documentation.
|