synapsexcoder 6.0.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/.opencode/opencode.jsonc +102 -0
- package/README.md +353 -0
- package/dist/agents/agent-config-manager.d.ts +58 -0
- package/dist/agents/agent-config-manager.d.ts.map +1 -0
- package/dist/agents/agent-config-manager.js +313 -0
- package/dist/agents/agent-config-manager.js.map +1 -0
- package/dist/agents/base-agents.d.ts +352 -0
- package/dist/agents/base-agents.d.ts.map +1 -0
- package/dist/agents/base-agents.js +3961 -0
- package/dist/agents/base-agents.js.map +1 -0
- package/dist/agents/gated-subagent.d.ts +126 -0
- package/dist/agents/gated-subagent.d.ts.map +1 -0
- package/dist/agents/gated-subagent.js +591 -0
- package/dist/agents/gated-subagent.js.map +1 -0
- package/dist/agents/gated-subagents.d.ts +130 -0
- package/dist/agents/gated-subagents.d.ts.map +1 -0
- package/dist/agents/gated-subagents.js +2014 -0
- package/dist/agents/gated-subagents.js.map +1 -0
- package/dist/agents/internal-gatekeeper.d.ts +167 -0
- package/dist/agents/internal-gatekeeper.d.ts.map +1 -0
- package/dist/agents/internal-gatekeeper.js +1130 -0
- package/dist/agents/internal-gatekeeper.js.map +1 -0
- package/dist/agents/verification-agent.d.ts +86 -0
- package/dist/agents/verification-agent.d.ts.map +1 -0
- package/dist/agents/verification-agent.js +211 -0
- package/dist/agents/verification-agent.js.map +1 -0
- package/dist/analytics/analytics-types.d.ts +113 -0
- package/dist/analytics/analytics-types.d.ts.map +1 -0
- package/dist/analytics/analytics-types.js +8 -0
- package/dist/analytics/analytics-types.js.map +1 -0
- package/dist/analytics/dashboard-generator.d.ts +35 -0
- package/dist/analytics/dashboard-generator.d.ts.map +1 -0
- package/dist/analytics/dashboard-generator.js +365 -0
- package/dist/analytics/dashboard-generator.js.map +1 -0
- package/dist/analytics/index.d.ts +12 -0
- package/dist/analytics/index.d.ts.map +1 -0
- package/dist/analytics/index.js +12 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/metrics-aggregator.d.ts +88 -0
- package/dist/analytics/metrics-aggregator.d.ts.map +1 -0
- package/dist/analytics/metrics-aggregator.js +280 -0
- package/dist/analytics/metrics-aggregator.js.map +1 -0
- package/dist/cli/index.d.ts +36 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +2677 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/normalize_patch.d.ts +3 -0
- package/dist/cli/normalize_patch.d.ts.map +1 -0
- package/dist/cli/normalize_patch.js +34 -0
- package/dist/cli/normalize_patch.js.map +1 -0
- package/dist/commands/command-processor.d.ts +58 -0
- package/dist/commands/command-processor.d.ts.map +1 -0
- package/dist/commands/command-processor.js +796 -0
- package/dist/commands/command-processor.js.map +1 -0
- package/dist/config/compliance-checker.d.ts +93 -0
- package/dist/config/compliance-checker.d.ts.map +1 -0
- package/dist/config/compliance-checker.js +424 -0
- package/dist/config/compliance-checker.js.map +1 -0
- package/dist/config/enterprise-config.d.ts +173 -0
- package/dist/config/enterprise-config.d.ts.map +1 -0
- package/dist/config/enterprise-config.js +190 -0
- package/dist/config/enterprise-config.js.map +1 -0
- package/dist/config/index.d.ts +13 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +11 -0
- package/dist/config/index.js.map +1 -0
- package/dist/context/context-system.d.ts +97 -0
- package/dist/context/context-system.d.ts.map +1 -0
- package/dist/context/context-system.js +880 -0
- package/dist/context/context-system.js.map +1 -0
- package/dist/context/store.d.ts +123 -0
- package/dist/context/store.d.ts.map +1 -0
- package/dist/context/store.js +281 -0
- package/dist/context/store.js.map +1 -0
- package/dist/dasp/dasp-controller.d.ts +83 -0
- package/dist/dasp/dasp-controller.d.ts.map +1 -0
- package/dist/dasp/dasp-controller.js +190 -0
- package/dist/dasp/dasp-controller.js.map +1 -0
- package/dist/dasp/feedback-adapter.d.ts +56 -0
- package/dist/dasp/feedback-adapter.d.ts.map +1 -0
- package/dist/dasp/feedback-adapter.js +158 -0
- package/dist/dasp/feedback-adapter.js.map +1 -0
- package/dist/dasp/index.d.ts +14 -0
- package/dist/dasp/index.d.ts.map +1 -0
- package/dist/dasp/index.js +10 -0
- package/dist/dasp/index.js.map +1 -0
- package/dist/dasp/prompt-templates.d.ts +38 -0
- package/dist/dasp/prompt-templates.d.ts.map +1 -0
- package/dist/dasp/prompt-templates.js +406 -0
- package/dist/dasp/prompt-templates.js.map +1 -0
- package/dist/dasp/vault-rag-provider.d.ts +51 -0
- package/dist/dasp/vault-rag-provider.d.ts.map +1 -0
- package/dist/dasp/vault-rag-provider.js +125 -0
- package/dist/dasp/vault-rag-provider.js.map +1 -0
- package/dist/distribution/cli-distribution.d.ts +68 -0
- package/dist/distribution/cli-distribution.d.ts.map +1 -0
- package/dist/distribution/cli-distribution.js +941 -0
- package/dist/distribution/cli-distribution.js.map +1 -0
- package/dist/docs/doc-generator.d.ts +78 -0
- package/dist/docs/doc-generator.d.ts.map +1 -0
- package/dist/docs/doc-generator.js +297 -0
- package/dist/docs/doc-generator.js.map +1 -0
- package/dist/docs/index.d.ts +13 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +11 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/docs/site-builder.d.ts +58 -0
- package/dist/docs/site-builder.d.ts.map +1 -0
- package/dist/docs/site-builder.js +229 -0
- package/dist/docs/site-builder.js.map +1 -0
- package/dist/ecosystem/adapters/claude-adapter.d.ts +29 -0
- package/dist/ecosystem/adapters/claude-adapter.d.ts.map +1 -0
- package/dist/ecosystem/adapters/claude-adapter.js +116 -0
- package/dist/ecosystem/adapters/claude-adapter.js.map +1 -0
- package/dist/ecosystem/adapters/cursor-adapter.d.ts +27 -0
- package/dist/ecosystem/adapters/cursor-adapter.d.ts.map +1 -0
- package/dist/ecosystem/adapters/cursor-adapter.js +93 -0
- package/dist/ecosystem/adapters/cursor-adapter.js.map +1 -0
- package/dist/ecosystem/adapters/v0-adapter.d.ts +30 -0
- package/dist/ecosystem/adapters/v0-adapter.d.ts.map +1 -0
- package/dist/ecosystem/adapters/v0-adapter.js +112 -0
- package/dist/ecosystem/adapters/v0-adapter.js.map +1 -0
- package/dist/ecosystem/ecosystem-router.d.ts +80 -0
- package/dist/ecosystem/ecosystem-router.d.ts.map +1 -0
- package/dist/ecosystem/ecosystem-router.js +241 -0
- package/dist/ecosystem/ecosystem-router.js.map +1 -0
- package/dist/ecosystem/ecosystem-types.d.ts +94 -0
- package/dist/ecosystem/ecosystem-types.d.ts.map +1 -0
- package/dist/ecosystem/ecosystem-types.js +27 -0
- package/dist/ecosystem/ecosystem-types.js.map +1 -0
- package/dist/ecosystem/index.d.ts +10 -0
- package/dist/ecosystem/index.d.ts.map +1 -0
- package/dist/ecosystem/index.js +9 -0
- package/dist/ecosystem/index.js.map +1 -0
- package/dist/integration/agentic-integration.d.ts +73 -0
- package/dist/integration/agentic-integration.d.ts.map +1 -0
- package/dist/integration/agentic-integration.js +253 -0
- package/dist/integration/agentic-integration.js.map +1 -0
- package/dist/integration/background-agents-integration.d.ts +54 -0
- package/dist/integration/background-agents-integration.d.ts.map +1 -0
- package/dist/integration/background-agents-integration.js +225 -0
- package/dist/integration/background-agents-integration.js.map +1 -0
- package/dist/integration/dcp-integration.d.ts +81 -0
- package/dist/integration/dcp-integration.d.ts.map +1 -0
- package/dist/integration/dcp-integration.js +189 -0
- package/dist/integration/dcp-integration.js.map +1 -0
- package/dist/integration/firecrawl-integration.d.ts +61 -0
- package/dist/integration/firecrawl-integration.d.ts.map +1 -0
- package/dist/integration/firecrawl-integration.js +246 -0
- package/dist/integration/firecrawl-integration.js.map +1 -0
- package/dist/integration/index.d.ts +40 -0
- package/dist/integration/index.d.ts.map +1 -0
- package/dist/integration/index.js +43 -0
- package/dist/integration/index.js.map +1 -0
- package/dist/integration/integration-hub.d.ts +43 -0
- package/dist/integration/integration-hub.d.ts.map +1 -0
- package/dist/integration/integration-hub.js +507 -0
- package/dist/integration/integration-hub.js.map +1 -0
- package/dist/integration/integration-loader.d.ts +42 -0
- package/dist/integration/integration-loader.d.ts.map +1 -0
- package/dist/integration/integration-loader.js +240 -0
- package/dist/integration/integration-loader.js.map +1 -0
- package/dist/integration/md-table-formatter-integration.d.ts +41 -0
- package/dist/integration/md-table-formatter-integration.d.ts.map +1 -0
- package/dist/integration/md-table-formatter-integration.js +183 -0
- package/dist/integration/md-table-formatter-integration.js.map +1 -0
- package/dist/integration/native/agentic/agentic-engine.d.ts +52 -0
- package/dist/integration/native/agentic/agentic-engine.d.ts.map +1 -0
- package/dist/integration/native/agentic/agentic-engine.js +267 -0
- package/dist/integration/native/agentic/agentic-engine.js.map +1 -0
- package/dist/integration/native/background/background-engine.d.ts +62 -0
- package/dist/integration/native/background/background-engine.d.ts.map +1 -0
- package/dist/integration/native/background/background-engine.js +167 -0
- package/dist/integration/native/background/background-engine.js.map +1 -0
- package/dist/integration/native/dcp/dcp-engine.d.ts +55 -0
- package/dist/integration/native/dcp/dcp-engine.d.ts.map +1 -0
- package/dist/integration/native/dcp/dcp-engine.js +168 -0
- package/dist/integration/native/dcp/dcp-engine.js.map +1 -0
- package/dist/integration/native/firecrawl/firecrawl-engine.d.ts +66 -0
- package/dist/integration/native/firecrawl/firecrawl-engine.d.ts.map +1 -0
- package/dist/integration/native/firecrawl/firecrawl-engine.js +221 -0
- package/dist/integration/native/firecrawl/firecrawl-engine.js.map +1 -0
- package/dist/integration/native/formatter/formatter-engine.d.ts +47 -0
- package/dist/integration/native/formatter/formatter-engine.d.ts.map +1 -0
- package/dist/integration/native/formatter/formatter-engine.js +130 -0
- package/dist/integration/native/formatter/formatter-engine.js.map +1 -0
- package/dist/integration/native/index.d.ts +41 -0
- package/dist/integration/native/index.d.ts.map +1 -0
- package/dist/integration/native/index.js +80 -0
- package/dist/integration/native/index.js.map +1 -0
- package/dist/integration/native/orchestration/orchestration-engine.d.ts +62 -0
- package/dist/integration/native/orchestration/orchestration-engine.d.ts.map +1 -0
- package/dist/integration/native/orchestration/orchestration-engine.js +177 -0
- package/dist/integration/native/orchestration/orchestration-engine.js.map +1 -0
- package/dist/integration/native/pty/pty-engine.d.ts +45 -0
- package/dist/integration/native/pty/pty-engine.d.ts.map +1 -0
- package/dist/integration/native/pty/pty-engine.js +103 -0
- package/dist/integration/native/pty/pty-engine.js.map +1 -0
- package/dist/integration/native/shell-strategy.d.ts +60 -0
- package/dist/integration/native/shell-strategy.d.ts.map +1 -0
- package/dist/integration/native/shell-strategy.js +131 -0
- package/dist/integration/native/shell-strategy.js.map +1 -0
- package/dist/integration/native/skillful/skillful-engine.d.ts +53 -0
- package/dist/integration/native/skillful/skillful-engine.d.ts.map +1 -0
- package/dist/integration/native/skillful/skillful-engine.js +127 -0
- package/dist/integration/native/skillful/skillful-engine.js.map +1 -0
- package/dist/integration/native/subtask2/subtask2-engine.d.ts +50 -0
- package/dist/integration/native/subtask2/subtask2-engine.d.ts.map +1 -0
- package/dist/integration/native/subtask2/subtask2-engine.js +158 -0
- package/dist/integration/native/subtask2/subtask2-engine.js.map +1 -0
- package/dist/integration/native/supermemory/supermemory-engine.d.ts +63 -0
- package/dist/integration/native/supermemory/supermemory-engine.d.ts.map +1 -0
- package/dist/integration/native/supermemory/supermemory-engine.js +127 -0
- package/dist/integration/native/supermemory/supermemory-engine.js.map +1 -0
- package/dist/integration/native/workspace/workspace-engine.d.ts +75 -0
- package/dist/integration/native/workspace/workspace-engine.d.ts.map +1 -0
- package/dist/integration/native/workspace/workspace-engine.js +216 -0
- package/dist/integration/native/workspace/workspace-engine.js.map +1 -0
- package/dist/integration/oh-my-opencode-integration.d.ts +59 -0
- package/dist/integration/oh-my-opencode-integration.d.ts.map +1 -0
- package/dist/integration/oh-my-opencode-integration.js +180 -0
- package/dist/integration/oh-my-opencode-integration.js.map +1 -0
- package/dist/integration/openagents-control-integration.d.ts +81 -0
- package/dist/integration/openagents-control-integration.d.ts.map +1 -0
- package/dist/integration/openagents-control-integration.js +273 -0
- package/dist/integration/openagents-control-integration.js.map +1 -0
- package/dist/integration/pty-integration.d.ts +64 -0
- package/dist/integration/pty-integration.d.ts.map +1 -0
- package/dist/integration/pty-integration.js +180 -0
- package/dist/integration/pty-integration.js.map +1 -0
- package/dist/integration/shell-strategy-integration.d.ts +26 -0
- package/dist/integration/shell-strategy-integration.d.ts.map +1 -0
- package/dist/integration/shell-strategy-integration.js +110 -0
- package/dist/integration/shell-strategy-integration.js.map +1 -0
- package/dist/integration/skillful-integration.d.ts +74 -0
- package/dist/integration/skillful-integration.d.ts.map +1 -0
- package/dist/integration/skillful-integration.js +317 -0
- package/dist/integration/skillful-integration.js.map +1 -0
- package/dist/integration/subtask2-integration.d.ts +71 -0
- package/dist/integration/subtask2-integration.d.ts.map +1 -0
- package/dist/integration/subtask2-integration.js +240 -0
- package/dist/integration/subtask2-integration.js.map +1 -0
- package/dist/integration/supermemory-integration.d.ts +82 -0
- package/dist/integration/supermemory-integration.d.ts.map +1 -0
- package/dist/integration/supermemory-integration.js +252 -0
- package/dist/integration/supermemory-integration.js.map +1 -0
- package/dist/integration/types.d.ts +218 -0
- package/dist/integration/types.d.ts.map +1 -0
- package/dist/integration/types.js +5 -0
- package/dist/integration/types.js.map +1 -0
- package/dist/integration/workspace-integration.d.ts +46 -0
- package/dist/integration/workspace-integration.d.ts.map +1 -0
- package/dist/integration/workspace-integration.js +181 -0
- package/dist/integration/workspace-integration.js.map +1 -0
- package/dist/knowledge-vault/deepwiki-sync.d.ts +99 -0
- package/dist/knowledge-vault/deepwiki-sync.d.ts.map +1 -0
- package/dist/knowledge-vault/deepwiki-sync.js +381 -0
- package/dist/knowledge-vault/deepwiki-sync.js.map +1 -0
- package/dist/knowledge-vault/index.d.ts +11 -0
- package/dist/knowledge-vault/index.d.ts.map +1 -0
- package/dist/knowledge-vault/index.js +8 -0
- package/dist/knowledge-vault/index.js.map +1 -0
- package/dist/knowledge-vault/knowledge-vault.d.ts +38 -0
- package/dist/knowledge-vault/knowledge-vault.d.ts.map +1 -0
- package/dist/knowledge-vault/knowledge-vault.js +284 -0
- package/dist/knowledge-vault/knowledge-vault.js.map +1 -0
- package/dist/knowledge-vault/opencode-doc-ingest.d.ts +23 -0
- package/dist/knowledge-vault/opencode-doc-ingest.d.ts.map +1 -0
- package/dist/knowledge-vault/opencode-doc-ingest.js +48 -0
- package/dist/knowledge-vault/opencode-doc-ingest.js.map +1 -0
- package/dist/knowledge-vault/types.d.ts +61 -0
- package/dist/knowledge-vault/types.d.ts.map +1 -0
- package/dist/knowledge-vault/types.js +5 -0
- package/dist/knowledge-vault/types.js.map +1 -0
- package/dist/knowledge-vault/vault-config.d.ts +12 -0
- package/dist/knowledge-vault/vault-config.d.ts.map +1 -0
- package/dist/knowledge-vault/vault-config.js +24 -0
- package/dist/knowledge-vault/vault-config.js.map +1 -0
- package/dist/mcp/index.d.ts +28 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +29 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/mcp-manager.d.ts +181 -0
- package/dist/mcp/mcp-manager.d.ts.map +1 -0
- package/dist/mcp/mcp-manager.js +621 -0
- package/dist/mcp/mcp-manager.js.map +1 -0
- package/dist/mcp/mcp-types.d.ts +199 -0
- package/dist/mcp/mcp-types.d.ts.map +1 -0
- package/dist/mcp/mcp-types.js +152 -0
- package/dist/mcp/mcp-types.js.map +1 -0
- package/dist/mcp/servers/mcp-server-bridge.d.ts +64 -0
- package/dist/mcp/servers/mcp-server-bridge.d.ts.map +1 -0
- package/dist/mcp/servers/mcp-server-bridge.js +189 -0
- package/dist/mcp/servers/mcp-server-bridge.js.map +1 -0
- package/dist/messages/message-bus.d.ts +148 -0
- package/dist/messages/message-bus.d.ts.map +1 -0
- package/dist/messages/message-bus.js +432 -0
- package/dist/messages/message-bus.js.map +1 -0
- package/dist/modes/custom-mode-registry.d.ts +121 -0
- package/dist/modes/custom-mode-registry.d.ts.map +1 -0
- package/dist/modes/custom-mode-registry.js +306 -0
- package/dist/modes/custom-mode-registry.js.map +1 -0
- package/dist/modes/index.d.ts +10 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/mode-designer.d.ts +89 -0
- package/dist/modes/mode-designer.d.ts.map +1 -0
- package/dist/modes/mode-designer.js +485 -0
- package/dist/modes/mode-designer.js.map +1 -0
- package/dist/modes/mode-manager.d.ts +27 -0
- package/dist/modes/mode-manager.d.ts.map +1 -0
- package/dist/modes/mode-manager.js +68 -0
- package/dist/modes/mode-manager.js.map +1 -0
- package/dist/modes/synapse-modes.d.ts +26 -0
- package/dist/modes/synapse-modes.d.ts.map +1 -0
- package/dist/modes/synapse-modes.js +69 -0
- package/dist/modes/synapse-modes.js.map +1 -0
- package/dist/opencode/agent-delegate.d.ts +3 -0
- package/dist/opencode/agent-delegate.d.ts.map +1 -0
- package/dist/opencode/agent-delegate.js +3 -0
- package/dist/opencode/agent-delegate.js.map +1 -0
- package/dist/opencode/tool-bridge.d.ts +3 -0
- package/dist/opencode/tool-bridge.d.ts.map +1 -0
- package/dist/opencode/tool-bridge.js +3 -0
- package/dist/opencode/tool-bridge.js.map +1 -0
- package/dist/optimization/token-optimizer-v2.d.ts +18 -0
- package/dist/optimization/token-optimizer-v2.d.ts.map +1 -0
- package/dist/optimization/token-optimizer-v2.js +23 -0
- package/dist/optimization/token-optimizer-v2.js.map +1 -0
- package/dist/optimization/token-optimizer.d.ts +90 -0
- package/dist/optimization/token-optimizer.d.ts.map +1 -0
- package/dist/optimization/token-optimizer.js +399 -0
- package/dist/optimization/token-optimizer.js.map +1 -0
- package/dist/parallel/agent-farm.d.ts +123 -0
- package/dist/parallel/agent-farm.d.ts.map +1 -0
- package/dist/parallel/agent-farm.js +501 -0
- package/dist/parallel/agent-farm.js.map +1 -0
- package/dist/parallel/farm-scheduler.d.ts +115 -0
- package/dist/parallel/farm-scheduler.d.ts.map +1 -0
- package/dist/parallel/farm-scheduler.js +356 -0
- package/dist/parallel/farm-scheduler.js.map +1 -0
- package/dist/parallel/farm-types.d.ts +104 -0
- package/dist/parallel/farm-types.d.ts.map +1 -0
- package/dist/parallel/farm-types.js +9 -0
- package/dist/parallel/farm-types.js.map +1 -0
- package/dist/parallel/farm-worker.d.ts +62 -0
- package/dist/parallel/farm-worker.d.ts.map +1 -0
- package/dist/parallel/farm-worker.js +268 -0
- package/dist/parallel/farm-worker.js.map +1 -0
- package/dist/parallel/index.d.ts +14 -0
- package/dist/parallel/index.d.ts.map +1 -0
- package/dist/parallel/index.js +14 -0
- package/dist/parallel/index.js.map +1 -0
- package/dist/plugin/native-tools.d.ts +8 -0
- package/dist/plugin/native-tools.d.ts.map +1 -0
- package/dist/plugin/native-tools.js +147 -0
- package/dist/plugin/native-tools.js.map +1 -0
- package/dist/plugin/opencode-plugin.d.ts +32 -0
- package/dist/plugin/opencode-plugin.d.ts.map +1 -0
- package/dist/plugin/opencode-plugin.js +119 -0
- package/dist/plugin/opencode-plugin.js.map +1 -0
- package/dist/plugins/plugin-system.d.ts +108 -0
- package/dist/plugins/plugin-system.d.ts.map +1 -0
- package/dist/plugins/plugin-system.js +707 -0
- package/dist/plugins/plugin-system.js.map +1 -0
- package/dist/profiler/cpu-profiler.d.ts +53 -0
- package/dist/profiler/cpu-profiler.d.ts.map +1 -0
- package/dist/profiler/cpu-profiler.js +233 -0
- package/dist/profiler/cpu-profiler.js.map +1 -0
- package/dist/profiler/index.d.ts +36 -0
- package/dist/profiler/index.d.ts.map +1 -0
- package/dist/profiler/index.js +122 -0
- package/dist/profiler/index.js.map +1 -0
- package/dist/profiler/memory-profiler.d.ts +45 -0
- package/dist/profiler/memory-profiler.d.ts.map +1 -0
- package/dist/profiler/memory-profiler.js +211 -0
- package/dist/profiler/memory-profiler.js.map +1 -0
- package/dist/profiler/profiler-types.d.ts +234 -0
- package/dist/profiler/profiler-types.d.ts.map +1 -0
- package/dist/profiler/profiler-types.js +89 -0
- package/dist/profiler/profiler-types.js.map +1 -0
- package/dist/profiler/query-profiler.d.ts +48 -0
- package/dist/profiler/query-profiler.d.ts.map +1 -0
- package/dist/profiler/query-profiler.js +210 -0
- package/dist/profiler/query-profiler.js.map +1 -0
- package/dist/profiler/report-generator.d.ts +17 -0
- package/dist/profiler/report-generator.d.ts.map +1 -0
- package/dist/profiler/report-generator.js +329 -0
- package/dist/profiler/report-generator.js.map +1 -0
- package/dist/sdk/api.d.ts +85 -0
- package/dist/sdk/api.d.ts.map +1 -0
- package/dist/sdk/api.js +155 -0
- package/dist/sdk/api.js.map +1 -0
- package/dist/sdk/hooks.d.ts +58 -0
- package/dist/sdk/hooks.d.ts.map +1 -0
- package/dist/sdk/hooks.js +115 -0
- package/dist/sdk/hooks.js.map +1 -0
- package/dist/sdk/index.d.ts +17 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +14 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/plugin-base.d.ts +198 -0
- package/dist/sdk/plugin-base.d.ts.map +1 -0
- package/dist/sdk/plugin-base.js +227 -0
- package/dist/sdk/plugin-base.js.map +1 -0
- package/dist/security/audit-rules.d.ts +12 -0
- package/dist/security/audit-rules.d.ts.map +1 -0
- package/dist/security/audit-rules.js +214 -0
- package/dist/security/audit-rules.js.map +1 -0
- package/dist/security/index.d.ts +13 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +13 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/sarif-exporter.d.ts +36 -0
- package/dist/security/sarif-exporter.d.ts.map +1 -0
- package/dist/security/sarif-exporter.js +216 -0
- package/dist/security/sarif-exporter.js.map +1 -0
- package/dist/security/security-auditor.d.ts +30 -0
- package/dist/security/security-auditor.d.ts.map +1 -0
- package/dist/security/security-auditor.js +295 -0
- package/dist/security/security-auditor.js.map +1 -0
- package/dist/security/security-types.d.ts +132 -0
- package/dist/security/security-types.d.ts.map +1 -0
- package/dist/security/security-types.js +7 -0
- package/dist/security/security-types.js.map +1 -0
- package/dist/synapsexcoder/agent-delegate.d.ts +128 -0
- package/dist/synapsexcoder/agent-delegate.d.ts.map +1 -0
- package/dist/synapsexcoder/agent-delegate.js +837 -0
- package/dist/synapsexcoder/agent-delegate.js.map +1 -0
- package/dist/synapsexcoder/agent-mailbox.d.ts +26 -0
- package/dist/synapsexcoder/agent-mailbox.d.ts.map +1 -0
- package/dist/synapsexcoder/agent-mailbox.js +64 -0
- package/dist/synapsexcoder/agent-mailbox.js.map +1 -0
- package/dist/synapsexcoder/ast-grep/ast-grep-api.d.ts +62 -0
- package/dist/synapsexcoder/ast-grep/ast-grep-api.d.ts.map +1 -0
- package/dist/synapsexcoder/ast-grep/ast-grep-api.js +223 -0
- package/dist/synapsexcoder/ast-grep/ast-grep-api.js.map +1 -0
- package/dist/synapsexcoder/cited-search.d.ts +32 -0
- package/dist/synapsexcoder/cited-search.d.ts.map +1 -0
- package/dist/synapsexcoder/cited-search.js +141 -0
- package/dist/synapsexcoder/cited-search.js.map +1 -0
- package/dist/synapsexcoder/credential-store.d.ts +42 -0
- package/dist/synapsexcoder/credential-store.d.ts.map +1 -0
- package/dist/synapsexcoder/credential-store.js +165 -0
- package/dist/synapsexcoder/credential-store.js.map +1 -0
- package/dist/synapsexcoder/devcontainer-awareness.d.ts +35 -0
- package/dist/synapsexcoder/devcontainer-awareness.d.ts.map +1 -0
- package/dist/synapsexcoder/devcontainer-awareness.js +133 -0
- package/dist/synapsexcoder/devcontainer-awareness.js.map +1 -0
- package/dist/synapsexcoder/execution-loops/helix-loop.d.ts +31 -0
- package/dist/synapsexcoder/execution-loops/helix-loop.d.ts.map +1 -0
- package/dist/synapsexcoder/execution-loops/helix-loop.js +93 -0
- package/dist/synapsexcoder/execution-loops/helix-loop.js.map +1 -0
- package/dist/synapsexcoder/execution-loops/ralp-loop.d.ts +28 -0
- package/dist/synapsexcoder/execution-loops/ralp-loop.d.ts.map +1 -0
- package/dist/synapsexcoder/execution-loops/ralp-loop.js +77 -0
- package/dist/synapsexcoder/execution-loops/ralp-loop.js.map +1 -0
- package/dist/synapsexcoder/feature-names.d.ts +27 -0
- package/dist/synapsexcoder/feature-names.d.ts.map +1 -0
- package/dist/synapsexcoder/feature-names.js +40 -0
- package/dist/synapsexcoder/feature-names.js.map +1 -0
- package/dist/synapsexcoder/index.d.ts +39 -0
- package/dist/synapsexcoder/index.d.ts.map +1 -0
- package/dist/synapsexcoder/index.js +23 -0
- package/dist/synapsexcoder/index.js.map +1 -0
- package/dist/synapsexcoder/knowledge-provider.d.ts +44 -0
- package/dist/synapsexcoder/knowledge-provider.d.ts.map +1 -0
- package/dist/synapsexcoder/knowledge-provider.js +107 -0
- package/dist/synapsexcoder/knowledge-provider.js.map +1 -0
- package/dist/synapsexcoder/lsp/lsp-layer.d.ts +51 -0
- package/dist/synapsexcoder/lsp/lsp-layer.d.ts.map +1 -0
- package/dist/synapsexcoder/lsp/lsp-layer.js +302 -0
- package/dist/synapsexcoder/lsp/lsp-layer.js.map +1 -0
- package/dist/synapsexcoder/migration/opencode-config-migrator.d.ts +37 -0
- package/dist/synapsexcoder/migration/opencode-config-migrator.d.ts.map +1 -0
- package/dist/synapsexcoder/migration/opencode-config-migrator.js +100 -0
- package/dist/synapsexcoder/migration/opencode-config-migrator.js.map +1 -0
- package/dist/synapsexcoder/runtime-environment.d.ts +35 -0
- package/dist/synapsexcoder/runtime-environment.d.ts.map +1 -0
- package/dist/synapsexcoder/runtime-environment.js +108 -0
- package/dist/synapsexcoder/runtime-environment.js.map +1 -0
- package/dist/synapsexcoder/secret-guard.d.ts +18 -0
- package/dist/synapsexcoder/secret-guard.d.ts.map +1 -0
- package/dist/synapsexcoder/secret-guard.js +69 -0
- package/dist/synapsexcoder/secret-guard.js.map +1 -0
- package/dist/synapsexcoder/self-prompt-engine.d.ts +15 -0
- package/dist/synapsexcoder/self-prompt-engine.d.ts.map +1 -0
- package/dist/synapsexcoder/self-prompt-engine.js +11 -0
- package/dist/synapsexcoder/self-prompt-engine.js.map +1 -0
- package/dist/synapsexcoder/session-observability.d.ts +44 -0
- package/dist/synapsexcoder/session-observability.d.ts.map +1 -0
- package/dist/synapsexcoder/session-observability.js +115 -0
- package/dist/synapsexcoder/session-observability.js.map +1 -0
- package/dist/synapsexcoder/specialist-agents.d.ts +38 -0
- package/dist/synapsexcoder/specialist-agents.d.ts.map +1 -0
- package/dist/synapsexcoder/specialist-agents.js +192 -0
- package/dist/synapsexcoder/specialist-agents.js.map +1 -0
- package/dist/synapsexcoder/swarm/kanban-board.d.ts +34 -0
- package/dist/synapsexcoder/swarm/kanban-board.d.ts.map +1 -0
- package/dist/synapsexcoder/swarm/kanban-board.js +85 -0
- package/dist/synapsexcoder/swarm/kanban-board.js.map +1 -0
- package/dist/synapsexcoder/swarm/swarm-mailbox.d.ts +38 -0
- package/dist/synapsexcoder/swarm/swarm-mailbox.d.ts.map +1 -0
- package/dist/synapsexcoder/swarm/swarm-mailbox.js +93 -0
- package/dist/synapsexcoder/swarm/swarm-mailbox.js.map +1 -0
- package/dist/synapsexcoder/tool-bridge.d.ts +277 -0
- package/dist/synapsexcoder/tool-bridge.d.ts.map +1 -0
- package/dist/synapsexcoder/tool-bridge.js +1356 -0
- package/dist/synapsexcoder/tool-bridge.js.map +1 -0
- package/dist/synapsexcoder/tool-routing.d.ts +28 -0
- package/dist/synapsexcoder/tool-routing.d.ts.map +1 -0
- package/dist/synapsexcoder/tool-routing.js +79 -0
- package/dist/synapsexcoder/tool-routing.js.map +1 -0
- package/dist/synapsexcoder/type-injector.d.ts +26 -0
- package/dist/synapsexcoder/type-injector.d.ts.map +1 -0
- package/dist/synapsexcoder/type-injector.js +124 -0
- package/dist/synapsexcoder/type-injector.js.map +1 -0
- package/dist/synapsexcoder/utils/fuzzy-match.d.ts +25 -0
- package/dist/synapsexcoder/utils/fuzzy-match.d.ts.map +1 -0
- package/dist/synapsexcoder/utils/fuzzy-match.js +83 -0
- package/dist/synapsexcoder/utils/fuzzy-match.js.map +1 -0
- package/dist/synapsexcoder/vault-crawl.d.ts +29 -0
- package/dist/synapsexcoder/vault-crawl.d.ts.map +1 -0
- package/dist/synapsexcoder/vault-crawl.js +103 -0
- package/dist/synapsexcoder/vault-crawl.js.map +1 -0
- package/dist/synapsexcoder/verified-apply.d.ts +39 -0
- package/dist/synapsexcoder/verified-apply.d.ts.map +1 -0
- package/dist/synapsexcoder/verified-apply.js +81 -0
- package/dist/synapsexcoder/verified-apply.js.map +1 -0
- package/dist/synapsexcoder/verified-context-editing.d.ts +34 -0
- package/dist/synapsexcoder/verified-context-editing.d.ts.map +1 -0
- package/dist/synapsexcoder/verified-context-editing.js +80 -0
- package/dist/synapsexcoder/verified-context-editing.js.map +1 -0
- package/dist/synapsexcoder/worker-pool.d.ts +47 -0
- package/dist/synapsexcoder/worker-pool.d.ts.map +1 -0
- package/dist/synapsexcoder/worker-pool.js +120 -0
- package/dist/synapsexcoder/worker-pool.js.map +1 -0
- package/dist/synapsexcoder/workspace-intelligence.d.ts +35 -0
- package/dist/synapsexcoder/workspace-intelligence.d.ts.map +1 -0
- package/dist/synapsexcoder/workspace-intelligence.js +126 -0
- package/dist/synapsexcoder/workspace-intelligence.js.map +1 -0
- package/dist/synapsexcoder/worktree-manager.d.ts +31 -0
- package/dist/synapsexcoder/worktree-manager.d.ts.map +1 -0
- package/dist/synapsexcoder/worktree-manager.js +100 -0
- package/dist/synapsexcoder/worktree-manager.js.map +1 -0
- package/dist/team/index.d.ts +17 -0
- package/dist/team/index.d.ts.map +1 -0
- package/dist/team/index.js +13 -0
- package/dist/team/index.js.map +1 -0
- package/dist/team/team-audit.d.ts +120 -0
- package/dist/team/team-audit.d.ts.map +1 -0
- package/dist/team/team-audit.js +357 -0
- package/dist/team/team-audit.js.map +1 -0
- package/dist/team/team-collaboration.d.ts +150 -0
- package/dist/team/team-collaboration.d.ts.map +1 -0
- package/dist/team/team-collaboration.js +495 -0
- package/dist/team/team-collaboration.js.map +1 -0
- package/dist/team/team-rbac.d.ts +84 -0
- package/dist/team/team-rbac.d.ts.map +1 -0
- package/dist/team/team-rbac.js +259 -0
- package/dist/team/team-rbac.js.map +1 -0
- package/dist/team/team-session-manager.d.ts +100 -0
- package/dist/team/team-session-manager.d.ts.map +1 -0
- package/dist/team/team-session-manager.js +255 -0
- package/dist/team/team-session-manager.js.map +1 -0
- package/dist/thoughts/thoughts-manager.d.ts +52 -0
- package/dist/thoughts/thoughts-manager.d.ts.map +1 -0
- package/dist/thoughts/thoughts-manager.js +271 -0
- package/dist/thoughts/thoughts-manager.js.map +1 -0
- package/dist/tools/api-validator/index.d.ts +97 -0
- package/dist/tools/api-validator/index.d.ts.map +1 -0
- package/dist/tools/api-validator/index.js +312 -0
- package/dist/tools/api-validator/index.js.map +1 -0
- package/dist/tools/code-archaeology/index.d.ts +193 -0
- package/dist/tools/code-archaeology/index.d.ts.map +1 -0
- package/dist/tools/code-archaeology/index.js +468 -0
- package/dist/tools/code-archaeology/index.js.map +1 -0
- package/dist/tools/codebase-search/index.d.ts +126 -0
- package/dist/tools/codebase-search/index.d.ts.map +1 -0
- package/dist/tools/codebase-search/index.js +437 -0
- package/dist/tools/codebase-search/index.js.map +1 -0
- package/dist/tools/context/index.d.ts +162 -0
- package/dist/tools/context/index.d.ts.map +1 -0
- package/dist/tools/context/index.js +332 -0
- package/dist/tools/context/index.js.map +1 -0
- package/dist/tools/deepwiki/analyzer.d.ts +167 -0
- package/dist/tools/deepwiki/analyzer.d.ts.map +1 -0
- package/dist/tools/deepwiki/analyzer.js +925 -0
- package/dist/tools/deepwiki/analyzer.js.map +1 -0
- package/dist/tools/deepwiki/extractor.d.ts +151 -0
- package/dist/tools/deepwiki/extractor.d.ts.map +1 -0
- package/dist/tools/deepwiki/extractor.js +923 -0
- package/dist/tools/deepwiki/extractor.js.map +1 -0
- package/dist/tools/deepwiki/generator.d.ts +89 -0
- package/dist/tools/deepwiki/generator.d.ts.map +1 -0
- package/dist/tools/deepwiki/generator.js +638 -0
- package/dist/tools/deepwiki/generator.js.map +1 -0
- package/dist/tools/deepwiki/index.d.ts +96 -0
- package/dist/tools/deepwiki/index.d.ts.map +1 -0
- package/dist/tools/deepwiki/index.js +282 -0
- package/dist/tools/deepwiki/index.js.map +1 -0
- package/dist/tools/deepwiki/types.d.ts +370 -0
- package/dist/tools/deepwiki/types.d.ts.map +1 -0
- package/dist/tools/deepwiki/types.js +21 -0
- package/dist/tools/deepwiki/types.js.map +1 -0
- package/dist/tools/dependency-mapper/index.d.ts +212 -0
- package/dist/tools/dependency-mapper/index.d.ts.map +1 -0
- package/dist/tools/dependency-mapper/index.js +592 -0
- package/dist/tools/dependency-mapper/index.js.map +1 -0
- package/dist/tools/memory/index.d.ts +120 -0
- package/dist/tools/memory/index.d.ts.map +1 -0
- package/dist/tools/memory/index.js +275 -0
- package/dist/tools/memory/index.js.map +1 -0
- package/dist/tools/normalize_patch.d.ts +3 -0
- package/dist/tools/normalize_patch.d.ts.map +1 -0
- package/dist/tools/normalize_patch.js +22 -0
- package/dist/tools/normalize_patch.js.map +1 -0
- package/dist/tools/pattern-detector/index.d.ts +105 -0
- package/dist/tools/pattern-detector/index.d.ts.map +1 -0
- package/dist/tools/pattern-detector/index.js +526 -0
- package/dist/tools/pattern-detector/index.js.map +1 -0
- package/dist/tools/performance-profiler/index.d.ts +50 -0
- package/dist/tools/performance-profiler/index.d.ts.map +1 -0
- package/dist/tools/performance-profiler/index.js +164 -0
- package/dist/tools/performance-profiler/index.js.map +1 -0
- package/dist/tools/refactoring-engine/index.d.ts +63 -0
- package/dist/tools/refactoring-engine/index.d.ts.map +1 -0
- package/dist/tools/refactoring-engine/index.js +270 -0
- package/dist/tools/refactoring-engine/index.js.map +1 -0
- package/dist/tools/registry.d.ts +36 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +499 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/test-generator/index.d.ts +152 -0
- package/dist/tools/test-generator/index.d.ts.map +1 -0
- package/dist/tools/test-generator/index.js +448 -0
- package/dist/tools/test-generator/index.js.map +1 -0
- package/dist/types/index.d.ts +565 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/path-validator.d.ts +94 -0
- package/dist/utils/path-validator.d.ts.map +1 -0
- package/dist/utils/path-validator.js +192 -0
- package/dist/utils/path-validator.js.map +1 -0
- package/dist/utils/secure-exec.d.ts +92 -0
- package/dist/utils/secure-exec.d.ts.map +1 -0
- package/dist/utils/secure-exec.js +230 -0
- package/dist/utils/secure-exec.js.map +1 -0
- package/dist/verification/claim-parser.d.ts +37 -0
- package/dist/verification/claim-parser.d.ts.map +1 -0
- package/dist/verification/claim-parser.js +231 -0
- package/dist/verification/claim-parser.js.map +1 -0
- package/dist/verification/cross-reference-engine.d.ts +55 -0
- package/dist/verification/cross-reference-engine.d.ts.map +1 -0
- package/dist/verification/cross-reference-engine.js +149 -0
- package/dist/verification/cross-reference-engine.js.map +1 -0
- package/dist/verification/discrepancy-tracker.d.ts +73 -0
- package/dist/verification/discrepancy-tracker.d.ts.map +1 -0
- package/dist/verification/discrepancy-tracker.js +196 -0
- package/dist/verification/discrepancy-tracker.js.map +1 -0
- package/dist/verification/feature-reconciler.d.ts +90 -0
- package/dist/verification/feature-reconciler.d.ts.map +1 -0
- package/dist/verification/feature-reconciler.js +264 -0
- package/dist/verification/feature-reconciler.js.map +1 -0
- package/dist/verification/index.d.ts +16 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +19 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/integration-verifier.d.ts +66 -0
- package/dist/verification/integration-verifier.d.ts.map +1 -0
- package/dist/verification/integration-verifier.js +210 -0
- package/dist/verification/integration-verifier.js.map +1 -0
- package/dist/verification/recursive-audit-loop.d.ts +56 -0
- package/dist/verification/recursive-audit-loop.d.ts.map +1 -0
- package/dist/verification/recursive-audit-loop.js +136 -0
- package/dist/verification/recursive-audit-loop.js.map +1 -0
- package/dist/verification/runtime-verifier.d.ts +37 -0
- package/dist/verification/runtime-verifier.d.ts.map +1 -0
- package/dist/verification/runtime-verifier.js +221 -0
- package/dist/verification/runtime-verifier.js.map +1 -0
- package/dist/verification/types.d.ts +88 -0
- package/dist/verification/types.d.ts.map +1 -0
- package/dist/verification/types.js +5 -0
- package/dist/verification/types.js.map +1 -0
- package/dist/verification/verification-engine.d.ts +48 -0
- package/dist/verification/verification-engine.d.ts.map +1 -0
- package/dist/verification/verification-engine.js +203 -0
- package/dist/verification/verification-engine.js.map +1 -0
- package/opencode-agents/synapse-analyzer.md +64 -0
- package/opencode-agents/synapse-debugger.md +43 -0
- package/opencode-agents/synapse-diff-validator.md +42 -0
- package/opencode-agents/synapse-gatekeeper.md +273 -0
- package/opencode-agents/synapse-master.md +167 -0
- package/opencode-agents/synapse-planner.md +55 -0
- package/opencode-agents/synapse-researcher.md +61 -0
- package/opencode-agents/synapse-reviewer.md +64 -0
- package/opencode-agents/synapse-rewriter.md +62 -0
- package/opencode-agents/synapse-strategist.md +50 -0
- package/opencode-agents/synapse-test-runner.md +43 -0
- package/opencode-agents/synapse-ui-designer.md +61 -0
- package/opencode-agents/synapse-verifier.md +544 -0
- package/package.json +108 -0
- package/src/plugin/opencode-plugin.ts +141 -0
|
@@ -0,0 +1,796 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Processor - Workflow Commands System
|
|
3
|
+
*/
|
|
4
|
+
import { join } from "path";
|
|
5
|
+
export class CommandProcessor {
|
|
6
|
+
masterAgent;
|
|
7
|
+
commands = new Map();
|
|
8
|
+
constructor(masterAgent) {
|
|
9
|
+
this.masterAgent = masterAgent;
|
|
10
|
+
this.registerDefaultCommands();
|
|
11
|
+
}
|
|
12
|
+
registerCommand(command) {
|
|
13
|
+
this.commands.set(command.name, command);
|
|
14
|
+
}
|
|
15
|
+
registerDefaultCommands() {
|
|
16
|
+
this.registerCommand({
|
|
17
|
+
name: "add-context",
|
|
18
|
+
description: "Add context pattern",
|
|
19
|
+
usage: "/add-context <type> <name> <description>",
|
|
20
|
+
handler: this.handleAddContext.bind(this),
|
|
21
|
+
});
|
|
22
|
+
this.registerCommand({
|
|
23
|
+
name: "list-context",
|
|
24
|
+
description: "List context patterns",
|
|
25
|
+
usage: "/list-context [type]",
|
|
26
|
+
handler: this.handleListContext.bind(this),
|
|
27
|
+
});
|
|
28
|
+
this.registerCommand({
|
|
29
|
+
name: "add-thought",
|
|
30
|
+
description: "Add a thought",
|
|
31
|
+
usage: "/add-thought <type> <title> <content>",
|
|
32
|
+
handler: this.handleAddThought.bind(this),
|
|
33
|
+
});
|
|
34
|
+
this.registerCommand({
|
|
35
|
+
name: "list-thoughts",
|
|
36
|
+
description: "List thoughts",
|
|
37
|
+
usage: "/list-thoughts [type]",
|
|
38
|
+
handler: this.handleListThoughts.bind(this),
|
|
39
|
+
});
|
|
40
|
+
this.registerCommand({
|
|
41
|
+
name: "list-agents",
|
|
42
|
+
description: "List agents",
|
|
43
|
+
usage: "/list-agents [type]",
|
|
44
|
+
handler: this.handleListAgents.bind(this),
|
|
45
|
+
});
|
|
46
|
+
this.registerCommand({
|
|
47
|
+
name: "create-agent",
|
|
48
|
+
description: "Create agent from markdown",
|
|
49
|
+
usage: "/create-agent <definition-id>",
|
|
50
|
+
handler: this.handleCreateAgent.bind(this),
|
|
51
|
+
});
|
|
52
|
+
this.registerCommand({
|
|
53
|
+
name: "status",
|
|
54
|
+
description: "Show system status",
|
|
55
|
+
usage: "/status",
|
|
56
|
+
handler: this.handleStatus.bind(this),
|
|
57
|
+
});
|
|
58
|
+
this.registerCommand({
|
|
59
|
+
name: "commit",
|
|
60
|
+
description: "Commit knowledge/context changes",
|
|
61
|
+
usage: "/commit [message]",
|
|
62
|
+
handler: this.handleCommit.bind(this),
|
|
63
|
+
});
|
|
64
|
+
this.registerCommand({
|
|
65
|
+
name: "help",
|
|
66
|
+
description: "Show available commands",
|
|
67
|
+
usage: "/help [command]",
|
|
68
|
+
handler: this.handleHelp.bind(this),
|
|
69
|
+
});
|
|
70
|
+
this.registerCommand({
|
|
71
|
+
name: "create-session",
|
|
72
|
+
description: "Create a team session",
|
|
73
|
+
usage: "/create-session <name> <description>",
|
|
74
|
+
handler: this.handleCreateSession.bind(this),
|
|
75
|
+
});
|
|
76
|
+
this.registerCommand({
|
|
77
|
+
name: "join-session",
|
|
78
|
+
description: "Join a team session",
|
|
79
|
+
usage: "/join-session <session-id>",
|
|
80
|
+
handler: this.handleJoinSession.bind(this),
|
|
81
|
+
});
|
|
82
|
+
this.registerCommand({
|
|
83
|
+
name: "list-sessions",
|
|
84
|
+
description: "List team sessions",
|
|
85
|
+
usage: "/list-sessions",
|
|
86
|
+
handler: this.handleListSessions.bind(this),
|
|
87
|
+
});
|
|
88
|
+
this.registerCommand({
|
|
89
|
+
name: "create-repo",
|
|
90
|
+
description: "Create a shared repository",
|
|
91
|
+
usage: "/create-repo <name> <type> <description>",
|
|
92
|
+
handler: this.handleCreateRepository.bind(this),
|
|
93
|
+
});
|
|
94
|
+
this.registerCommand({
|
|
95
|
+
name: "share-item",
|
|
96
|
+
description: "Share an item to a repo",
|
|
97
|
+
usage: "/share-item <repo-id> <item-id>",
|
|
98
|
+
handler: this.handleShareItem.bind(this),
|
|
99
|
+
});
|
|
100
|
+
this.registerCommand({
|
|
101
|
+
name: "team-activity",
|
|
102
|
+
description: "Show team activity feed",
|
|
103
|
+
usage: "/team-activity [session-id]",
|
|
104
|
+
handler: this.handleTeamActivity.bind(this),
|
|
105
|
+
});
|
|
106
|
+
this.registerCommand({
|
|
107
|
+
name: "list-plugins",
|
|
108
|
+
description: "List installed plugins",
|
|
109
|
+
usage: "/list-plugins",
|
|
110
|
+
handler: this.handleListPlugins.bind(this),
|
|
111
|
+
});
|
|
112
|
+
this.registerCommand({
|
|
113
|
+
name: "enable-plugin",
|
|
114
|
+
description: "Enable plugin",
|
|
115
|
+
usage: "/enable-plugin <plugin-id>",
|
|
116
|
+
handler: this.handleEnablePlugin.bind(this),
|
|
117
|
+
});
|
|
118
|
+
this.registerCommand({
|
|
119
|
+
name: "disable-plugin",
|
|
120
|
+
description: "Disable plugin",
|
|
121
|
+
usage: "/disable-plugin <plugin-id>",
|
|
122
|
+
handler: this.handleDisablePlugin.bind(this),
|
|
123
|
+
});
|
|
124
|
+
this.registerCommand({
|
|
125
|
+
name: "create-plugin",
|
|
126
|
+
description: "Create plugin scaffold",
|
|
127
|
+
usage: "/create-plugin <type> <name>",
|
|
128
|
+
handler: this.handleCreatePlugin.bind(this),
|
|
129
|
+
});
|
|
130
|
+
this.registerCommand({
|
|
131
|
+
name: "token-stats",
|
|
132
|
+
description: "Show token stats",
|
|
133
|
+
usage: "/token-stats",
|
|
134
|
+
handler: this.handleTokenStats.bind(this),
|
|
135
|
+
});
|
|
136
|
+
this.registerCommand({
|
|
137
|
+
name: "optimize-context",
|
|
138
|
+
description: "Optimize context content",
|
|
139
|
+
usage: "/optimize-context <content>",
|
|
140
|
+
handler: this.handleOptimizeContext.bind(this),
|
|
141
|
+
});
|
|
142
|
+
// Verification commands (Synapse v4)
|
|
143
|
+
this.registerCommand({
|
|
144
|
+
name: "verify",
|
|
145
|
+
description: "Run repository verification",
|
|
146
|
+
usage: "/verify [options]",
|
|
147
|
+
handler: this.handleVerify.bind(this),
|
|
148
|
+
});
|
|
149
|
+
this.registerCommand({
|
|
150
|
+
name: "verify-file",
|
|
151
|
+
description: "Verify a specific file",
|
|
152
|
+
usage: "/verify-file <path>",
|
|
153
|
+
handler: this.handleVerifyFile.bind(this),
|
|
154
|
+
});
|
|
155
|
+
this.registerCommand({
|
|
156
|
+
name: "verify-claims",
|
|
157
|
+
description: "Verify specific claims",
|
|
158
|
+
usage: "/verify-claim <claim-id>",
|
|
159
|
+
handler: this.handleVerifyClaim.bind(this),
|
|
160
|
+
});
|
|
161
|
+
this.registerCommand({
|
|
162
|
+
name: "audit",
|
|
163
|
+
description: "Run recursive audit",
|
|
164
|
+
usage: "/audit [depth]",
|
|
165
|
+
handler: this.handleAudit.bind(this),
|
|
166
|
+
});
|
|
167
|
+
// Phase 0 loop command stubs
|
|
168
|
+
this.registerCommand({
|
|
169
|
+
name: "SynapeXHelix",
|
|
170
|
+
description: "Continuous helical refinement loop (plan→execute→verify→re-plan)",
|
|
171
|
+
usage: "/SynapeXHelix <goal>",
|
|
172
|
+
handler: this.handleSynapeXHelix.bind(this),
|
|
173
|
+
});
|
|
174
|
+
this.registerCommand({
|
|
175
|
+
name: "SynapseXRalpLoop",
|
|
176
|
+
description: "Recursive Audit-Learn-Plan loop",
|
|
177
|
+
usage: "/SynapseXRalpLoop <scope>",
|
|
178
|
+
handler: this.handleSynapseXRalpLoop.bind(this),
|
|
179
|
+
});
|
|
180
|
+
// Knowledge vault slash aliases
|
|
181
|
+
this.registerCommand({
|
|
182
|
+
name: "vault",
|
|
183
|
+
description: "Knowledge vault search",
|
|
184
|
+
usage: "/vault search <query>",
|
|
185
|
+
handler: this.handleVaultSearch.bind(this),
|
|
186
|
+
});
|
|
187
|
+
// Phase 2 native plugin commands
|
|
188
|
+
this.registerCommand({
|
|
189
|
+
name: "env",
|
|
190
|
+
description: "Runtime environment manager",
|
|
191
|
+
usage: "/env create|list|destroy <args>",
|
|
192
|
+
handler: this.handleEnv.bind(this),
|
|
193
|
+
});
|
|
194
|
+
this.registerCommand({
|
|
195
|
+
name: "cited-search",
|
|
196
|
+
description: "Web search with vault citation storage",
|
|
197
|
+
usage: "/cited-search <query>",
|
|
198
|
+
handler: this.handleCitedSearch.bind(this),
|
|
199
|
+
});
|
|
200
|
+
this.registerCommand({
|
|
201
|
+
name: "worktree",
|
|
202
|
+
description: "Git worktree management",
|
|
203
|
+
usage: "/worktree list|create|remove <args>",
|
|
204
|
+
handler: this.handleWorktree.bind(this),
|
|
205
|
+
});
|
|
206
|
+
this.registerCommand({
|
|
207
|
+
name: "observability",
|
|
208
|
+
description: "Session observability export",
|
|
209
|
+
usage: "/observability export <session-id>",
|
|
210
|
+
handler: this.handleObservability.bind(this),
|
|
211
|
+
});
|
|
212
|
+
this.registerCommand({
|
|
213
|
+
name: "migrate",
|
|
214
|
+
description: "Migrate OpenCode config to SynapseXcoder",
|
|
215
|
+
usage: "/migrate [config-path]",
|
|
216
|
+
handler: this.handleMigrate.bind(this),
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
async processCommand(input) {
|
|
220
|
+
const trimmed = input.trim();
|
|
221
|
+
if (!trimmed.startsWith("/"))
|
|
222
|
+
return { success: false, output: "Commands must start with /" };
|
|
223
|
+
const [commandName, ...args] = trimmed.slice(1).split(/\s+/);
|
|
224
|
+
const command = this.commands.get(commandName.toLowerCase());
|
|
225
|
+
if (!command)
|
|
226
|
+
return { success: false, output: `Unknown command: ${commandName}` };
|
|
227
|
+
return command.handler(args, this.masterAgent);
|
|
228
|
+
}
|
|
229
|
+
async handleAddContext(args, masterAgent) {
|
|
230
|
+
if (args.length < 3)
|
|
231
|
+
return {
|
|
232
|
+
success: false,
|
|
233
|
+
output: "Usage: /add-context <type> <name> <description>",
|
|
234
|
+
};
|
|
235
|
+
const [type, name, ...descParts] = args;
|
|
236
|
+
const patternId = masterAgent.getContextSystem().addPattern({
|
|
237
|
+
type: type,
|
|
238
|
+
name,
|
|
239
|
+
description: descParts.join(" "),
|
|
240
|
+
examples: [],
|
|
241
|
+
tags: ["manual"],
|
|
242
|
+
});
|
|
243
|
+
return {
|
|
244
|
+
success: true,
|
|
245
|
+
output: `Context pattern added: ${patternId}`,
|
|
246
|
+
data: { patternId },
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
async handleListContext(args, masterAgent) {
|
|
250
|
+
const patterns = args[0]
|
|
251
|
+
? masterAgent
|
|
252
|
+
.getContextSystem()
|
|
253
|
+
.findRelevantPatterns({ type: args[0] })
|
|
254
|
+
: masterAgent.getContextSystem().getProjectContext().patterns;
|
|
255
|
+
if (patterns.length === 0)
|
|
256
|
+
return { success: true, output: "No context patterns found." };
|
|
257
|
+
const output = patterns
|
|
258
|
+
.slice(0, 10)
|
|
259
|
+
.map((p) => `• ${p.name} (${p.type})\n ${p.description}`)
|
|
260
|
+
.join("\n\n");
|
|
261
|
+
return { success: true, output };
|
|
262
|
+
}
|
|
263
|
+
async handleAddThought(args, masterAgent) {
|
|
264
|
+
if (args.length < 3)
|
|
265
|
+
return {
|
|
266
|
+
success: false,
|
|
267
|
+
output: "Usage: /add-thought <type> <title> <content>",
|
|
268
|
+
};
|
|
269
|
+
const [type, title, ...contentParts] = args;
|
|
270
|
+
const thoughtId = masterAgent.getThoughtsManager().createThought({
|
|
271
|
+
title,
|
|
272
|
+
type: type,
|
|
273
|
+
content: contentParts.join(" "),
|
|
274
|
+
tags: ["manual"],
|
|
275
|
+
});
|
|
276
|
+
return {
|
|
277
|
+
success: true,
|
|
278
|
+
output: `Thought added: ${thoughtId}`,
|
|
279
|
+
data: { thoughtId },
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
async handleListThoughts(args, masterAgent) {
|
|
283
|
+
const thoughts = args[0]
|
|
284
|
+
? masterAgent.getThoughtsManager().getThoughtsByType(args[0])
|
|
285
|
+
: masterAgent.getThoughtsManager().getRecentThoughts(10);
|
|
286
|
+
if (thoughts.length === 0)
|
|
287
|
+
return { success: true, output: "No thoughts found." };
|
|
288
|
+
return {
|
|
289
|
+
success: true,
|
|
290
|
+
output: thoughts
|
|
291
|
+
.map((t) => `• ${t.title} (${t.type})\n ${t.content.slice(0, 100)}`)
|
|
292
|
+
.join("\n\n"),
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
async handleListAgents(args, masterAgent) {
|
|
296
|
+
const agents = args[0]
|
|
297
|
+
? masterAgent
|
|
298
|
+
.getAgentConfigManager()
|
|
299
|
+
.getAgentDefinitionsByType(args[0])
|
|
300
|
+
: masterAgent.getAgentConfigManager().getAllAgentDefinitions();
|
|
301
|
+
if (agents.length === 0)
|
|
302
|
+
return { success: true, output: "No agent definitions found." };
|
|
303
|
+
return {
|
|
304
|
+
success: true,
|
|
305
|
+
output: agents
|
|
306
|
+
.map((a) => `• ${a.name} (${a.type})\n ${a.description}`)
|
|
307
|
+
.join("\n\n"),
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
async handleCreateAgent(args, masterAgent) {
|
|
311
|
+
if (args.length < 1)
|
|
312
|
+
return { success: false, output: "Usage: /create-agent <definition-id>" };
|
|
313
|
+
const agent = masterAgent
|
|
314
|
+
.getAgentConfigManager()
|
|
315
|
+
.createAgentFromDefinition(args[0], null, null);
|
|
316
|
+
return {
|
|
317
|
+
success: true,
|
|
318
|
+
output: `Agent created from definition: ${args[0]}`,
|
|
319
|
+
data: { agentId: agent.id, agentType: agent.type },
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
async handleStatus(_args, masterAgent) {
|
|
323
|
+
const status = masterAgent.getStatus();
|
|
324
|
+
const thoughtsStats = masterAgent.getThoughtsManager().getStats();
|
|
325
|
+
return {
|
|
326
|
+
success: true,
|
|
327
|
+
output: `Master: ${status.status}\nActive Sub-agents: ${masterAgent.getActiveSubAgents().size}\nKnowledge Base: ${thoughtsStats.total} thoughts`,
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
async handleCommit(args, masterAgent) {
|
|
331
|
+
const message = args.join(" ") || "Knowledge and context updates";
|
|
332
|
+
masterAgent.getContextSystem().updateProjectInfo({});
|
|
333
|
+
return { success: true, output: `Committed changes: ${message}` };
|
|
334
|
+
}
|
|
335
|
+
async handleHelp(args, _masterAgent) {
|
|
336
|
+
if (args.length > 0) {
|
|
337
|
+
const command = this.commands.get(args[0]);
|
|
338
|
+
return command
|
|
339
|
+
? {
|
|
340
|
+
success: true,
|
|
341
|
+
output: `${command.name}: ${command.description}\nUsage: ${command.usage}`,
|
|
342
|
+
}
|
|
343
|
+
: { success: false, output: `Unknown command: ${args[0]}` };
|
|
344
|
+
}
|
|
345
|
+
return {
|
|
346
|
+
success: true,
|
|
347
|
+
output: Array.from(this.commands.values())
|
|
348
|
+
.map((c) => `/${c.name}: ${c.description}`)
|
|
349
|
+
.join("\n"),
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
async handleCreateSession(args, masterAgent) {
|
|
353
|
+
if (args.length < 2)
|
|
354
|
+
return {
|
|
355
|
+
success: false,
|
|
356
|
+
output: "Usage: /create-session <name> <description>",
|
|
357
|
+
};
|
|
358
|
+
const [name, ...descParts] = args;
|
|
359
|
+
const sessionId = masterAgent.getTeamSystem().createSession({
|
|
360
|
+
name,
|
|
361
|
+
description: descParts.join(" "),
|
|
362
|
+
ownerId: "default-user",
|
|
363
|
+
members: ["default-user"],
|
|
364
|
+
status: "active",
|
|
365
|
+
settings: {
|
|
366
|
+
allowGuestAccess: false,
|
|
367
|
+
requireApproval: true,
|
|
368
|
+
maxMembers: 10,
|
|
369
|
+
},
|
|
370
|
+
});
|
|
371
|
+
return {
|
|
372
|
+
success: true,
|
|
373
|
+
output: `Team session created: ${sessionId}`,
|
|
374
|
+
data: { sessionId },
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
async handleJoinSession(args, masterAgent) {
|
|
378
|
+
if (args.length < 1)
|
|
379
|
+
return { success: false, output: "Usage: /join-session <session-id>" };
|
|
380
|
+
return masterAgent.getTeamSystem().joinSession(args[0], "default-user")
|
|
381
|
+
? { success: true, output: `Joined session: ${args[0]}` }
|
|
382
|
+
: { success: false, output: `Failed to join session: ${args[0]}` };
|
|
383
|
+
}
|
|
384
|
+
async handleListSessions(_args, masterAgent) {
|
|
385
|
+
const sessions = masterAgent.getTeamSystem().listActiveSessions();
|
|
386
|
+
if (sessions.length === 0)
|
|
387
|
+
return { success: true, output: "No active team sessions found." };
|
|
388
|
+
return {
|
|
389
|
+
success: true,
|
|
390
|
+
output: sessions
|
|
391
|
+
.map((s) => `• ${s.name} (${s.id})\n ${s.description}`)
|
|
392
|
+
.join("\n\n"),
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
async handleCreateRepository(args, masterAgent) {
|
|
396
|
+
if (args.length < 3)
|
|
397
|
+
return {
|
|
398
|
+
success: false,
|
|
399
|
+
output: "Usage: /create-repo <name> <type> <description>",
|
|
400
|
+
};
|
|
401
|
+
const [name, type, ...descParts] = args;
|
|
402
|
+
const repoId = masterAgent.getTeamSystem().createRepository({
|
|
403
|
+
name,
|
|
404
|
+
description: descParts.join(" "),
|
|
405
|
+
ownerId: "default-user",
|
|
406
|
+
type: type,
|
|
407
|
+
visibility: "team",
|
|
408
|
+
items: [],
|
|
409
|
+
collaborators: [
|
|
410
|
+
{ userId: "default-user", role: "owner", joinedAt: Date.now() },
|
|
411
|
+
],
|
|
412
|
+
});
|
|
413
|
+
return {
|
|
414
|
+
success: true,
|
|
415
|
+
output: `Repository created: ${repoId}`,
|
|
416
|
+
data: { repoId },
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
async handleShareItem(args, masterAgent) {
|
|
420
|
+
if (args.length < 2)
|
|
421
|
+
return {
|
|
422
|
+
success: false,
|
|
423
|
+
output: "Usage: /share-item <repo-id> <item-id>",
|
|
424
|
+
};
|
|
425
|
+
return masterAgent
|
|
426
|
+
.getTeamSystem()
|
|
427
|
+
.addToRepository(args[0], args[1], "default-user")
|
|
428
|
+
? {
|
|
429
|
+
success: true,
|
|
430
|
+
output: `Shared item ${args[1]} to repository ${args[0]}`,
|
|
431
|
+
}
|
|
432
|
+
: { success: false, output: "Failed to share item" };
|
|
433
|
+
}
|
|
434
|
+
async handleTeamActivity(args, masterAgent) {
|
|
435
|
+
const activities = masterAgent
|
|
436
|
+
.getTeamSystem()
|
|
437
|
+
.getActivities(args[0] || undefined, 10);
|
|
438
|
+
if (activities.length === 0)
|
|
439
|
+
return { success: true, output: "No recent team activities found." };
|
|
440
|
+
return {
|
|
441
|
+
success: true,
|
|
442
|
+
output: activities.map((a) => `• ${a.description}`).join("\n"),
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
async handleListPlugins(_args, masterAgent) {
|
|
446
|
+
const plugins = masterAgent.getPluginManager().listPlugins();
|
|
447
|
+
if (plugins.length === 0)
|
|
448
|
+
return { success: true, output: "No plugins installed." };
|
|
449
|
+
return {
|
|
450
|
+
success: true,
|
|
451
|
+
output: plugins
|
|
452
|
+
.map((p) => `• ${p.manifest.name} v${p.manifest.version} - ${p.enabled ? "enabled" : "disabled"}`)
|
|
453
|
+
.join("\n"),
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
async handleEnablePlugin(args, masterAgent) {
|
|
457
|
+
if (args.length < 1)
|
|
458
|
+
return { success: false, output: "Usage: /enable-plugin <plugin-id>" };
|
|
459
|
+
return masterAgent.getPluginManager().enablePlugin(args[0])
|
|
460
|
+
? { success: true, output: `Plugin ${args[0]} enabled` }
|
|
461
|
+
: { success: false, output: `Plugin ${args[0]} not found` };
|
|
462
|
+
}
|
|
463
|
+
async handleDisablePlugin(args, masterAgent) {
|
|
464
|
+
if (args.length < 1)
|
|
465
|
+
return { success: false, output: "Usage: /disable-plugin <plugin-id>" };
|
|
466
|
+
return masterAgent.getPluginManager().disablePlugin(args[0])
|
|
467
|
+
? { success: true, output: `Plugin ${args[0]} disabled` }
|
|
468
|
+
: { success: false, output: `Plugin ${args[0]} not found` };
|
|
469
|
+
}
|
|
470
|
+
async handleCreatePlugin(args, masterAgent) {
|
|
471
|
+
if (args.length < 2)
|
|
472
|
+
return { success: false, output: "Usage: /create-plugin <type> <name>" };
|
|
473
|
+
const [type] = args;
|
|
474
|
+
const scaffold = masterAgent
|
|
475
|
+
.getPluginManager()
|
|
476
|
+
.createPluginTemplate(type);
|
|
477
|
+
return {
|
|
478
|
+
success: true,
|
|
479
|
+
output: scaffold,
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
async handleTokenStats(_args, masterAgent) {
|
|
483
|
+
const stats = masterAgent.getTokenOptimizer().getCacheStats();
|
|
484
|
+
const efficiency = masterAgent.getTokenOptimizer().analyzeEfficiency();
|
|
485
|
+
return {
|
|
486
|
+
success: true,
|
|
487
|
+
output: `Compressed Contexts: ${stats.compressedContexts}\nTokens Saved: ${stats.totalTokensSaved}\nCompression Ratio: ${efficiency.averageCompressionRatio.toFixed(2)}x`,
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
async handleOptimizeContext(args, masterAgent) {
|
|
491
|
+
if (args.length < 1)
|
|
492
|
+
return { success: false, output: "Usage: /optimize-context <content>" };
|
|
493
|
+
const compressed = await masterAgent
|
|
494
|
+
.getTokenOptimizer()
|
|
495
|
+
.compressContext(args.join(" "));
|
|
496
|
+
return {
|
|
497
|
+
success: true,
|
|
498
|
+
output: `Original: ${compressed.originalSize} tokens\nCompressed: ${compressed.compressedSize} tokens\nRatio: ${compressed.compressionRatio.toFixed(2)}x\n\n${compressed.summary}`,
|
|
499
|
+
data: { compressed },
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
// Verification command handlers (Synapse v4)
|
|
503
|
+
async handleVerify(args, _masterAgent) {
|
|
504
|
+
try {
|
|
505
|
+
const { createVerificationAgent } = await import("../agents/verification-agent.js");
|
|
506
|
+
const { MessageBus } = await import("../messages/message-bus.js");
|
|
507
|
+
const { OpenCodeToolBridge } = await import("../synapsexcoder/tool-bridge.js");
|
|
508
|
+
const options = {};
|
|
509
|
+
for (let i = 0; i < args.length; i += 2) {
|
|
510
|
+
if (args[i]?.startsWith("--")) {
|
|
511
|
+
options[args[i].slice(2)] = args[i + 1] || "";
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
const config = {
|
|
515
|
+
repositoryRoot: options.root || process.cwd(),
|
|
516
|
+
recursiveDepth: parseInt(options.depth || "3", 10),
|
|
517
|
+
autoFix: options.fix === "true",
|
|
518
|
+
claimParser: { enabled: true, sources: ["src", "docs"] },
|
|
519
|
+
runtimeVerifier: { enabled: true, checkImports: true, checkExports: true, checkAsyncFlows: true },
|
|
520
|
+
integrationVerifier: { enabled: true, checkApiChains: true, checkStatePropagation: true, checkEventWiring: true },
|
|
521
|
+
crossReference: { enabled: true, checkDocsVsCode: true, checkTestsVsBehavior: true, checkConfigsVsDeploy: true },
|
|
522
|
+
recursiveAudit: { enabled: true, maxDepth: parseInt(options.depth || "3", 10), failFast: false },
|
|
523
|
+
};
|
|
524
|
+
const agent = createVerificationAgent(config, new MessageBus(), new OpenCodeToolBridge());
|
|
525
|
+
const report = await agent.execute({ type: "verify_repository" });
|
|
526
|
+
return {
|
|
527
|
+
success: report.status === "pass",
|
|
528
|
+
output: `Status: ${report.status.toUpperCase()}\nClaims Parsed: ${report.claimsParsed}\nClaims Verified: ${report.claimsVerified}\nDiscrepancies Found: ${report.discrepanciesFound}\nDiscrepancies Resolved: ${report.discrepanciesResolved}\nRecursive Passes: ${report.recursivePasses}`,
|
|
529
|
+
data: { report },
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
catch (error) {
|
|
533
|
+
return {
|
|
534
|
+
success: false,
|
|
535
|
+
output: `Verification failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
async handleVerifyFile(args, _masterAgent) {
|
|
540
|
+
try {
|
|
541
|
+
const { createVerificationAgent } = await import("../agents/verification-agent.js");
|
|
542
|
+
const { MessageBus } = await import("../messages/message-bus.js");
|
|
543
|
+
const { OpenCodeToolBridge } = await import("../synapsexcoder/tool-bridge.js");
|
|
544
|
+
if (args.length < 1)
|
|
545
|
+
return { success: false, output: "Usage: /verify-file <path>" };
|
|
546
|
+
const filePath = args[0];
|
|
547
|
+
const config = {
|
|
548
|
+
repositoryRoot: process.cwd(),
|
|
549
|
+
recursiveDepth: 1,
|
|
550
|
+
autoFix: false,
|
|
551
|
+
claimParser: { enabled: true, sources: [] },
|
|
552
|
+
runtimeVerifier: { enabled: true, checkImports: true, checkExports: true, checkAsyncFlows: false },
|
|
553
|
+
integrationVerifier: { enabled: false, checkApiChains: false, checkStatePropagation: false, checkEventWiring: false },
|
|
554
|
+
crossReference: { enabled: true, checkDocsVsCode: true, checkTestsVsBehavior: false, checkConfigsVsDeploy: false },
|
|
555
|
+
recursiveAudit: { enabled: false, maxDepth: 1, failFast: false },
|
|
556
|
+
};
|
|
557
|
+
const agent = createVerificationAgent(config, new MessageBus(), new OpenCodeToolBridge());
|
|
558
|
+
await agent.verifyFile(filePath);
|
|
559
|
+
return {
|
|
560
|
+
success: true,
|
|
561
|
+
output: `File verified: ${filePath}`,
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
catch (error) {
|
|
565
|
+
return {
|
|
566
|
+
success: false,
|
|
567
|
+
output: `Verification failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
async handleVerifyClaim(args, _masterAgent) {
|
|
572
|
+
try {
|
|
573
|
+
if (args.length < 1)
|
|
574
|
+
return { success: false, output: "Usage: /verify-claim <claim-id>" };
|
|
575
|
+
const claimId = args[0];
|
|
576
|
+
return {
|
|
577
|
+
success: true,
|
|
578
|
+
output: `Verifying claim: ${claimId}`,
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
catch (error) {
|
|
582
|
+
return {
|
|
583
|
+
success: false,
|
|
584
|
+
output: `Verification failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
async handleAudit(args, _masterAgent) {
|
|
589
|
+
try {
|
|
590
|
+
const { createVerificationAgent } = await import("../agents/verification-agent.js");
|
|
591
|
+
const { MessageBus } = await import("../messages/message-bus.js");
|
|
592
|
+
const { OpenCodeToolBridge } = await import("../synapsexcoder/tool-bridge.js");
|
|
593
|
+
const depth = parseInt(args[0] || "5", 10);
|
|
594
|
+
const config = {
|
|
595
|
+
repositoryRoot: process.cwd(),
|
|
596
|
+
recursiveDepth: depth,
|
|
597
|
+
autoFix: false,
|
|
598
|
+
claimParser: { enabled: true, sources: ["src", "docs"] },
|
|
599
|
+
runtimeVerifier: { enabled: true, checkImports: true, checkExports: true, checkAsyncFlows: true },
|
|
600
|
+
integrationVerifier: { enabled: true, checkApiChains: true, checkStatePropagation: true, checkEventWiring: true },
|
|
601
|
+
crossReference: { enabled: true, checkDocsVsCode: true, checkTestsVsBehavior: true, checkConfigsVsDeploy: true },
|
|
602
|
+
recursiveAudit: { enabled: true, maxDepth: depth, failFast: false },
|
|
603
|
+
};
|
|
604
|
+
const agent = createVerificationAgent(config, new MessageBus(), new OpenCodeToolBridge());
|
|
605
|
+
await agent.execute({ type: "recursive_audit" });
|
|
606
|
+
const report = agent.getReport();
|
|
607
|
+
const stats = agent.getStats();
|
|
608
|
+
return {
|
|
609
|
+
success: true,
|
|
610
|
+
output: `Audit Complete\nPasses: ${report?.recursivePasses || 0}\nDiscrepancies Found: ${stats.total}\nDiscrepancies Resolved: ${stats.resolved}`,
|
|
611
|
+
data: { stats },
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
catch (error) {
|
|
615
|
+
return {
|
|
616
|
+
success: false,
|
|
617
|
+
output: `Audit failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
async handleSynapeXHelix(args, masterAgent) {
|
|
622
|
+
const goal = args.join(" ") || "(no goal specified)";
|
|
623
|
+
try {
|
|
624
|
+
const { runHelixLoop } = await import("../synapsexcoder/execution-loops/helix-loop.js");
|
|
625
|
+
const result = await runHelixLoop(goal, masterAgent, { maxIterations: 3 });
|
|
626
|
+
const lines = result.iterations.map((it) => ` [${it.iteration}] ${it.phase}: ${it.output.slice(0, 120)}...`);
|
|
627
|
+
return {
|
|
628
|
+
success: true,
|
|
629
|
+
output: `SynapeXHelix complete — converged: ${result.converged}, ` +
|
|
630
|
+
`iterations: ${result.totalIterations}, session: ${result.sessionId}\n` +
|
|
631
|
+
lines.join("\n"),
|
|
632
|
+
data: result,
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
catch (error) {
|
|
636
|
+
return {
|
|
637
|
+
success: false,
|
|
638
|
+
output: `SynapeXHelix failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
async handleSynapseXRalpLoop(args, masterAgent) {
|
|
643
|
+
const scope = args.join(" ") || process.cwd();
|
|
644
|
+
try {
|
|
645
|
+
const { runRalpLoop } = await import("../synapsexcoder/execution-loops/ralp-loop.js");
|
|
646
|
+
const result = await runRalpLoop(scope, masterAgent, { maxDepth: 2 });
|
|
647
|
+
const lines = result.iterations.map((it) => ` [${it.iteration}] ${it.phase}: ${it.findings.join("; ")}`);
|
|
648
|
+
return {
|
|
649
|
+
success: true,
|
|
650
|
+
output: `SynapseXRalpLoop complete — ${result.totalFindings} finding(s), ` +
|
|
651
|
+
`session: ${result.sessionId}\n` +
|
|
652
|
+
lines.join("\n"),
|
|
653
|
+
data: result,
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
catch (error) {
|
|
657
|
+
return {
|
|
658
|
+
success: false,
|
|
659
|
+
output: `SynapseXRalpLoop failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
async handleVaultSearch(args, _masterAgent) {
|
|
664
|
+
if (args[0]?.toLowerCase() !== "search" || !args[1]) {
|
|
665
|
+
return {
|
|
666
|
+
success: false,
|
|
667
|
+
output: "Usage: /vault search <query>",
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
try {
|
|
671
|
+
const { KnowledgeVault } = await import("../knowledge-vault/index.js");
|
|
672
|
+
const vault = new KnowledgeVault();
|
|
673
|
+
vault.rebuildManifest();
|
|
674
|
+
const query = args.slice(1).join(" ");
|
|
675
|
+
const results = vault.search(query, 10);
|
|
676
|
+
if (results.length === 0) {
|
|
677
|
+
return { success: true, output: `No vault matches for: ${query}` };
|
|
678
|
+
}
|
|
679
|
+
const lines = results.map((r) => `[${r.score}] ${r.entry.title}${r.entry.sourceUrl ? ` — ${r.entry.sourceUrl}` : ""}`);
|
|
680
|
+
return {
|
|
681
|
+
success: true,
|
|
682
|
+
output: `Vault search (${results.length}):\n${lines.join("\n")}`,
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
catch (error) {
|
|
686
|
+
return {
|
|
687
|
+
success: false,
|
|
688
|
+
output: `Vault search failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
async handleEnv(args, _masterAgent) {
|
|
693
|
+
const { getRuntimeEnvironmentManager } = await import("../synapsexcoder/runtime-environment.js");
|
|
694
|
+
const mgr = getRuntimeEnvironmentManager();
|
|
695
|
+
const sub = args[0]?.toLowerCase();
|
|
696
|
+
if (sub === "create") {
|
|
697
|
+
const name = args[1] || `env-${Date.now()}`;
|
|
698
|
+
const template = args[2] || "blank";
|
|
699
|
+
const env = mgr.create({ name, template });
|
|
700
|
+
return { success: true, output: `Created environment ${env.id} (${env.name}) at ${env.path}`, data: env };
|
|
701
|
+
}
|
|
702
|
+
if (sub === "list") {
|
|
703
|
+
const envs = mgr.list();
|
|
704
|
+
if (envs.length === 0)
|
|
705
|
+
return { success: true, output: "No active environments." };
|
|
706
|
+
const lines = envs.map((e) => ` ${e.id} — ${e.name} (${e.path})`);
|
|
707
|
+
return { success: true, output: `Environments:\n${lines.join("\n")}` };
|
|
708
|
+
}
|
|
709
|
+
if (sub === "destroy") {
|
|
710
|
+
const id = args[1];
|
|
711
|
+
if (!id)
|
|
712
|
+
return { success: false, output: "Usage: /env destroy <id>" };
|
|
713
|
+
const ok = mgr.destroy(id);
|
|
714
|
+
return { success: ok, output: ok ? `Destroyed environment ${id}` : `Environment not found: ${id}` };
|
|
715
|
+
}
|
|
716
|
+
return { success: false, output: "Usage: /env create|list|destroy <args>" };
|
|
717
|
+
}
|
|
718
|
+
async handleCitedSearch(args, _masterAgent) {
|
|
719
|
+
const query = args.join(" ");
|
|
720
|
+
if (!query)
|
|
721
|
+
return { success: false, output: "Usage: /cited-search <query>" };
|
|
722
|
+
try {
|
|
723
|
+
const { getCitedSearchEngine } = await import("../synapsexcoder/cited-search.js");
|
|
724
|
+
const engine = getCitedSearchEngine();
|
|
725
|
+
const result = await engine.search(query, 3);
|
|
726
|
+
const citations = engine.formatCitations(result.results);
|
|
727
|
+
return {
|
|
728
|
+
success: true,
|
|
729
|
+
output: `Cited search: ${result.results.length} result(s), ${result.storedInVault} stored in vault\n${citations}`,
|
|
730
|
+
data: result,
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
catch (error) {
|
|
734
|
+
return { success: false, output: `Cited search failed: ${error instanceof Error ? error.message : String(error)}` };
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
async handleWorktree(args, _masterAgent) {
|
|
738
|
+
const { getWorktreeManager } = await import("../synapsexcoder/worktree-manager.js");
|
|
739
|
+
const mgr = getWorktreeManager();
|
|
740
|
+
const sub = args[0]?.toLowerCase();
|
|
741
|
+
if (sub === "list") {
|
|
742
|
+
const trees = mgr.list();
|
|
743
|
+
if (trees.length === 0)
|
|
744
|
+
return { success: true, output: "No worktrees (or not a git repo)." };
|
|
745
|
+
const lines = trees.map((w) => ` ${w.branch ?? "detached"} — ${w.path}`);
|
|
746
|
+
return { success: true, output: `Worktrees:\n${lines.join("\n")}` };
|
|
747
|
+
}
|
|
748
|
+
if (sub === "create") {
|
|
749
|
+
const branch = args[1];
|
|
750
|
+
if (!branch)
|
|
751
|
+
return { success: false, output: "Usage: /worktree create <branch> [path]" };
|
|
752
|
+
try {
|
|
753
|
+
const wt = mgr.create({ branch, path: args[2] });
|
|
754
|
+
return { success: true, output: `Created worktree ${wt.branch} at ${wt.path}`, data: wt };
|
|
755
|
+
}
|
|
756
|
+
catch (error) {
|
|
757
|
+
return { success: false, output: `Worktree create failed: ${error instanceof Error ? error.message : String(error)}` };
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
if (sub === "remove") {
|
|
761
|
+
const path = args[1];
|
|
762
|
+
if (!path)
|
|
763
|
+
return { success: false, output: "Usage: /worktree remove <path>" };
|
|
764
|
+
const ok = mgr.remove(path, args[2] === "--force");
|
|
765
|
+
return { success: ok, output: ok ? `Removed worktree ${path}` : `Failed to remove ${path}` };
|
|
766
|
+
}
|
|
767
|
+
return { success: false, output: "Usage: /worktree list|create|remove <args>" };
|
|
768
|
+
}
|
|
769
|
+
async handleObservability(args, _masterAgent) {
|
|
770
|
+
const { getSessionObservability } = await import("../synapsexcoder/session-observability.js");
|
|
771
|
+
const obs = getSessionObservability();
|
|
772
|
+
if (args[0]?.toLowerCase() === "export" && args[1]) {
|
|
773
|
+
const path = obs.exportSession(args[1]);
|
|
774
|
+
return { success: true, output: `Exported session ${args[1]} to ${path}` };
|
|
775
|
+
}
|
|
776
|
+
const sessionId = obs.startSession();
|
|
777
|
+
return { success: true, output: `Started observability session: ${sessionId}` };
|
|
778
|
+
}
|
|
779
|
+
async handleMigrate(args, _masterAgent) {
|
|
780
|
+
const { migrateOpenCodeConfig } = await import("../synapsexcoder/migration/opencode-config-migrator.js");
|
|
781
|
+
const source = args[0] || join(process.cwd(), ".opencode", "opencode.jsonc");
|
|
782
|
+
const result = migrateOpenCodeConfig(source);
|
|
783
|
+
const lines = [...result.changes, ...result.warnings.map((w) => `WARN: ${w}`)];
|
|
784
|
+
return {
|
|
785
|
+
success: result.success,
|
|
786
|
+
output: result.success
|
|
787
|
+
? `Migration complete:\n${lines.join("\n")}`
|
|
788
|
+
: `Migration failed:\n${lines.join("\n")}`,
|
|
789
|
+
data: result,
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
export function createCommandProcessor(masterAgent) {
|
|
794
|
+
return new CommandProcessor(masterAgent);
|
|
795
|
+
}
|
|
796
|
+
//# sourceMappingURL=command-processor.js.map
|