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 @@
|
|
|
1
|
+
{"version":3,"file":"path-validator.d.ts","sourceRoot":"","sources":["../../src/utils/path-validator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,cAAc,aA+BxB,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,oBAAoB,aAK7B,CAAC;AAML;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,MAAM,CAkBR;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAUA;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB;IACD,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAUA;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAE5D;AAMD;;GAEG;AACH,eAAO,MAAM,qBAAqB,mGAYxB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,wBAAwB,mDAM3B,CAAC;;;;;;;;;;;;;AAMX,wBAWE"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path Validation Utility
|
|
3
|
+
*
|
|
4
|
+
* Provides secure path validation to prevent path traversal attacks.
|
|
5
|
+
* Uses Zod for schema validation and path normalization.
|
|
6
|
+
*/
|
|
7
|
+
import path from "path";
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// Schemas
|
|
11
|
+
// ============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Schema for validating file paths against common attack patterns
|
|
14
|
+
*/
|
|
15
|
+
export const SafePathSchema = z
|
|
16
|
+
.string()
|
|
17
|
+
.min(1, "Path cannot be empty")
|
|
18
|
+
.max(4096, "Path too long")
|
|
19
|
+
.refine((p) => !p.includes(".."), {
|
|
20
|
+
message: "Path traversal detected: '..' not allowed",
|
|
21
|
+
})
|
|
22
|
+
.refine((p) => !p.includes("\0"), {
|
|
23
|
+
message: "Null byte detected in path",
|
|
24
|
+
})
|
|
25
|
+
.refine((p) => {
|
|
26
|
+
// Block common dangerous system paths
|
|
27
|
+
const dangerous = [
|
|
28
|
+
/^\/etc\//i,
|
|
29
|
+
/^\/proc\//i,
|
|
30
|
+
/^\/sys\//i,
|
|
31
|
+
/^\/dev\//i,
|
|
32
|
+
/^C:\\Windows/i,
|
|
33
|
+
/^C:\\Program Files/i,
|
|
34
|
+
/authorized_keys$/i,
|
|
35
|
+
/\/\.ssh\//i,
|
|
36
|
+
/\.env$/i,
|
|
37
|
+
/passwd$/i,
|
|
38
|
+
/shadow$/i,
|
|
39
|
+
];
|
|
40
|
+
return !dangerous.some((regex) => regex.test(p));
|
|
41
|
+
}, {
|
|
42
|
+
message: "Access to system directories denied",
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Schema for validating command arguments
|
|
46
|
+
*/
|
|
47
|
+
export const SafeCommandArgSchema = z
|
|
48
|
+
.string()
|
|
49
|
+
.max(10000, "Command argument too long")
|
|
50
|
+
.refine((arg) => !arg.includes("\0"), {
|
|
51
|
+
message: "Null byte detected in command argument",
|
|
52
|
+
});
|
|
53
|
+
// ============================================================================
|
|
54
|
+
// Validation Functions
|
|
55
|
+
// ============================================================================
|
|
56
|
+
/**
|
|
57
|
+
* Validates and resolves a user-provided path against an allowed base directory.
|
|
58
|
+
*
|
|
59
|
+
* @param userPath - The user-provided path to validate
|
|
60
|
+
* @param allowedBase - The base directory that the path must be within
|
|
61
|
+
* @returns The validated and resolved absolute path
|
|
62
|
+
* @throws Error if the path is invalid or attempts traversal
|
|
63
|
+
*/
|
|
64
|
+
export function validateAndResolve(userPath, allowedBase) {
|
|
65
|
+
// Validate input schema
|
|
66
|
+
SafePathSchema.parse(userPath);
|
|
67
|
+
// Normalize and resolve to absolute path
|
|
68
|
+
const normalized = path.normalize(userPath);
|
|
69
|
+
const resolved = path.resolve(allowedBase, normalized);
|
|
70
|
+
const baseResolved = path.resolve(allowedBase);
|
|
71
|
+
// Ensure the resolved path is within the allowed base directory
|
|
72
|
+
const relativePath = path.relative(baseResolved, resolved);
|
|
73
|
+
if (relativePath.startsWith("..") || path.isAbsolute(relativePath)) {
|
|
74
|
+
throw new Error(`Path traversal attempt detected: path must be within ${allowedBase}`);
|
|
75
|
+
}
|
|
76
|
+
return resolved;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Validates a path without requiring a base directory.
|
|
80
|
+
* Only checks for common attack patterns.
|
|
81
|
+
*
|
|
82
|
+
* @param userPath - The path to validate
|
|
83
|
+
* @returns The normalized path
|
|
84
|
+
* @throws Error if the path contains dangerous patterns
|
|
85
|
+
*/
|
|
86
|
+
export function validatePath(userPath) {
|
|
87
|
+
SafePathSchema.parse(userPath);
|
|
88
|
+
return path.normalize(userPath);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Checks if a path is safe without throwing errors.
|
|
92
|
+
*
|
|
93
|
+
* @param userPath - The path to check
|
|
94
|
+
* @returns Object with valid flag and optional error message
|
|
95
|
+
*/
|
|
96
|
+
export function checkPath(userPath) {
|
|
97
|
+
try {
|
|
98
|
+
const normalized = validatePath(userPath);
|
|
99
|
+
return { valid: true, normalized };
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
return {
|
|
103
|
+
valid: false,
|
|
104
|
+
error: error instanceof Error ? error.message : String(error),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Validates a path is within a base directory without throwing errors.
|
|
110
|
+
*
|
|
111
|
+
* @param userPath - The path to check
|
|
112
|
+
* @param allowedBase - The base directory
|
|
113
|
+
* @returns Object with valid flag and optional error/resolved path
|
|
114
|
+
*/
|
|
115
|
+
export function checkPathInBase(userPath, allowedBase) {
|
|
116
|
+
try {
|
|
117
|
+
const resolved = validateAndResolve(userPath, allowedBase);
|
|
118
|
+
return { valid: true, resolved };
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
return {
|
|
122
|
+
valid: false,
|
|
123
|
+
error: error instanceof Error ? error.message : String(error),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Validates a command argument for safe execution.
|
|
129
|
+
*
|
|
130
|
+
* @param arg - The command argument to validate
|
|
131
|
+
* @returns The validated argument
|
|
132
|
+
* @throws Error if the argument contains dangerous patterns
|
|
133
|
+
*/
|
|
134
|
+
export function validateCommandArg(arg) {
|
|
135
|
+
SafeCommandArgSchema.parse(arg);
|
|
136
|
+
return arg;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Validates multiple command arguments.
|
|
140
|
+
*
|
|
141
|
+
* @param args - Array of command arguments to validate
|
|
142
|
+
* @returns Array of validated arguments
|
|
143
|
+
* @throws Error if any argument contains dangerous patterns
|
|
144
|
+
*/
|
|
145
|
+
export function validateCommandArgs(args) {
|
|
146
|
+
return args.map(validateCommandArg);
|
|
147
|
+
}
|
|
148
|
+
// ============================================================================
|
|
149
|
+
// Blocked Patterns
|
|
150
|
+
// ============================================================================
|
|
151
|
+
/**
|
|
152
|
+
* Patterns that are always blocked in file paths
|
|
153
|
+
*/
|
|
154
|
+
export const BLOCKED_PATH_PATTERNS = [
|
|
155
|
+
/\.\./, // Path traversal
|
|
156
|
+
/\0/, // Null byte
|
|
157
|
+
/^\/etc\//i, // System config
|
|
158
|
+
/^\/proc\//i, // Process info
|
|
159
|
+
/^\/sys\//i, // System info
|
|
160
|
+
/^\/dev\//i, // Device files
|
|
161
|
+
/authorized_keys$/i,
|
|
162
|
+
/\/\.ssh\//i,
|
|
163
|
+
/\/\.env$/i,
|
|
164
|
+
/passwd$/i,
|
|
165
|
+
/shadow$/i,
|
|
166
|
+
];
|
|
167
|
+
/**
|
|
168
|
+
* Patterns that are blocked in command arguments
|
|
169
|
+
*/
|
|
170
|
+
export const BLOCKED_COMMAND_PATTERNS = [
|
|
171
|
+
/\0/, // Null byte
|
|
172
|
+
/;\s*rm\s+-rf/i, // Destructive commands
|
|
173
|
+
/\|\s*sh/i, // Piped execution
|
|
174
|
+
/`.*`/, // Command substitution
|
|
175
|
+
/\$\(/, // Command substitution
|
|
176
|
+
];
|
|
177
|
+
// ============================================================================
|
|
178
|
+
// Exports
|
|
179
|
+
// ============================================================================
|
|
180
|
+
export default {
|
|
181
|
+
SafePathSchema,
|
|
182
|
+
SafeCommandArgSchema,
|
|
183
|
+
validateAndResolve,
|
|
184
|
+
validatePath,
|
|
185
|
+
checkPath,
|
|
186
|
+
checkPathInBase,
|
|
187
|
+
validateCommandArg,
|
|
188
|
+
validateCommandArgs,
|
|
189
|
+
BLOCKED_PATH_PATTERNS,
|
|
190
|
+
BLOCKED_COMMAND_PATTERNS,
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=path-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-validator.js","sourceRoot":"","sources":["../../src/utils/path-validator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;KAC9B,GAAG,CAAC,IAAI,EAAE,eAAe,CAAC;KAC1B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;IAChC,OAAO,EAAE,2CAA2C;CACrD,CAAC;KACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;IAChC,OAAO,EAAE,4BAA4B;CACtC,CAAC;KACD,MAAM,CACL,CA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AAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAChD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;AACtC,CAAC;AAED,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,iBAAiB;IACzB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,gBAAgB;IAC7B,YAAY,EAAE,eAAe;IAC7B,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,eAAe;IAC5B,mBAAmB;IACnB,YAAY;IACZ,WAAW;IACX,UAAU;IACV,UAAU;CACF,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,YAAY;IAClB,eAAe,EAAE,uBAAuB;IACxC,UAAU,EAAE,kBAAkB;IAC9B,MAAM,EAAE,uBAAuB;IAC/B,MAAM,EAAE,uBAAuB;CACvB,CAAC;AAEX,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,eAAe;IACb,cAAc;IACd,oBAAoB;IACpB,kBAAkB;IAClB,YAAY;IACZ,SAAS;IACT,eAAe;IACf,kBAAkB;IAClB,mBAAmB;IACnB,qBAAqB;IACrB,wBAAwB;CACzB,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secure Command Execution Utility
|
|
3
|
+
*
|
|
4
|
+
* Provides safe command execution using spawn with array arguments
|
|
5
|
+
* instead of string interpolation to prevent command injection.
|
|
6
|
+
*/
|
|
7
|
+
export interface SecureExecOptions {
|
|
8
|
+
/** Working directory for the command */
|
|
9
|
+
cwd?: string;
|
|
10
|
+
/** Timeout in milliseconds */
|
|
11
|
+
timeout?: number;
|
|
12
|
+
/** Environment variables to merge with process.env */
|
|
13
|
+
env?: Record<string, string>;
|
|
14
|
+
/** Allowlist of permitted commands (if set, only these commands can run) */
|
|
15
|
+
allowedCommands?: string[];
|
|
16
|
+
/** Whether to capture stderr separately */
|
|
17
|
+
captureStderr?: boolean;
|
|
18
|
+
/** Maximum output size in bytes (default: 10MB) */
|
|
19
|
+
maxOutputSize?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface SecureExecResult {
|
|
22
|
+
stdout: string;
|
|
23
|
+
stderr: string;
|
|
24
|
+
exitCode: number;
|
|
25
|
+
timedOut: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Executes a command securely using spawn with array arguments.
|
|
29
|
+
*
|
|
30
|
+
* This function NEVER uses shell interpretation, preventing command injection.
|
|
31
|
+
* All arguments are passed directly to the process without shell parsing.
|
|
32
|
+
*
|
|
33
|
+
* @param command - The command to execute (must be an executable, not a shell built-in)
|
|
34
|
+
* @param args - Array of arguments to pass to the command
|
|
35
|
+
* @param options - Execution options
|
|
36
|
+
* @returns Promise resolving to execution result
|
|
37
|
+
*/
|
|
38
|
+
export declare function secureExec(command: string, args: string[], options?: SecureExecOptions): Promise<SecureExecResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Executes a bash command securely.
|
|
41
|
+
* Uses bash with -c but passes the command as a single argument (not interpolated).
|
|
42
|
+
*
|
|
43
|
+
* @param command - The bash command string to execute
|
|
44
|
+
* @param options - Execution options
|
|
45
|
+
* @returns Promise resolving to execution result
|
|
46
|
+
*/
|
|
47
|
+
export declare function secureBash(command: string, options?: SecureExecOptions): Promise<SecureExecResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Executes an npm command securely.
|
|
50
|
+
*
|
|
51
|
+
* @param npmCommand - The npm subcommand (e.g., 'install', 'test')
|
|
52
|
+
* @param args - Arguments to pass to npm
|
|
53
|
+
* @param options - Execution options
|
|
54
|
+
* @returns Promise resolving to execution result
|
|
55
|
+
*/
|
|
56
|
+
export declare function secureNpm(npmCommand: string, args?: string[], options?: SecureExecOptions): Promise<SecureExecResult>;
|
|
57
|
+
/**
|
|
58
|
+
* Executes a git command securely.
|
|
59
|
+
*
|
|
60
|
+
* @param args - Arguments to pass to git
|
|
61
|
+
* @param options - Execution options
|
|
62
|
+
* @returns Promise resolving to execution result
|
|
63
|
+
*/
|
|
64
|
+
export declare function secureGit(args: string[], options?: SecureExecOptions): Promise<SecureExecResult>;
|
|
65
|
+
/**
|
|
66
|
+
* Executes a command and returns only stdout.
|
|
67
|
+
* Throws if the command fails.
|
|
68
|
+
*
|
|
69
|
+
* @param command - The command to execute
|
|
70
|
+
* @param args - Arguments to pass to the command
|
|
71
|
+
* @param options - Execution options
|
|
72
|
+
* @returns Promise resolving to stdout string
|
|
73
|
+
*/
|
|
74
|
+
export declare function secureExecOutput(command: string, args: string[], options?: SecureExecOptions): Promise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Validates that a command string doesn't contain dangerous patterns.
|
|
77
|
+
*
|
|
78
|
+
* @param command - The command string to validate
|
|
79
|
+
* @returns true if the command is safe
|
|
80
|
+
* @throws Error if the command contains dangerous patterns
|
|
81
|
+
*/
|
|
82
|
+
export declare function validateCommandString(command: string): boolean;
|
|
83
|
+
declare const _default: {
|
|
84
|
+
secureExec: typeof secureExec;
|
|
85
|
+
secureBash: typeof secureBash;
|
|
86
|
+
secureNpm: typeof secureNpm;
|
|
87
|
+
secureGit: typeof secureGit;
|
|
88
|
+
secureExecOutput: typeof secureExecOutput;
|
|
89
|
+
validateCommandString: typeof validateCommandString;
|
|
90
|
+
};
|
|
91
|
+
export default _default;
|
|
92
|
+
//# sourceMappingURL=secure-exec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-exec.d.ts","sourceRoot":"","sources":["../../src/utils/secure-exec.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8BAA8B;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OAAO,EAAE,MAAM,GAAG,OAAO,CAS9D;;;;;;;;;AAMD,wBAOE"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secure Command Execution Utility
|
|
3
|
+
*
|
|
4
|
+
* Provides safe command execution using spawn with array arguments
|
|
5
|
+
* instead of string interpolation to prevent command injection.
|
|
6
|
+
*/
|
|
7
|
+
import { spawn } from "child_process";
|
|
8
|
+
import { validateCommandArgs } from "./path-validator.js";
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// Constants
|
|
11
|
+
// ============================================================================
|
|
12
|
+
const DEFAULT_MAX_OUTPUT_SIZE = 10 * 1024 * 1024; // 10MB
|
|
13
|
+
const DEFAULT_TIMEOUT = 60000; // 60 seconds
|
|
14
|
+
/**
|
|
15
|
+
* Default commands allowed when no explicit allowlist is provided.
|
|
16
|
+
* All other commands require an explicit allowedCommands option.
|
|
17
|
+
*/
|
|
18
|
+
const DEFAULT_ALLOWED_COMMANDS = [
|
|
19
|
+
"git",
|
|
20
|
+
"npm",
|
|
21
|
+
"node",
|
|
22
|
+
"npx",
|
|
23
|
+
"tsx",
|
|
24
|
+
"bash",
|
|
25
|
+
"cat",
|
|
26
|
+
"echo",
|
|
27
|
+
"ls",
|
|
28
|
+
"sleep",
|
|
29
|
+
"which",
|
|
30
|
+
];
|
|
31
|
+
// ============================================================================
|
|
32
|
+
// Core Execution Function
|
|
33
|
+
// ============================================================================
|
|
34
|
+
/**
|
|
35
|
+
* Executes a command securely using spawn with array arguments.
|
|
36
|
+
*
|
|
37
|
+
* This function NEVER uses shell interpretation, preventing command injection.
|
|
38
|
+
* All arguments are passed directly to the process without shell parsing.
|
|
39
|
+
*
|
|
40
|
+
* @param command - The command to execute (must be an executable, not a shell built-in)
|
|
41
|
+
* @param args - Array of arguments to pass to the command
|
|
42
|
+
* @param options - Execution options
|
|
43
|
+
* @returns Promise resolving to execution result
|
|
44
|
+
*/
|
|
45
|
+
export async function secureExec(command, args, options = {}) {
|
|
46
|
+
// Validate command against allowlist (default or explicit)
|
|
47
|
+
const allowlist = options.allowedCommands ?? DEFAULT_ALLOWED_COMMANDS;
|
|
48
|
+
if (!allowlist.includes(command)) {
|
|
49
|
+
throw new Error(`Command '${command}' not in allowlist. Use allowedCommands option to permit this command. ` +
|
|
50
|
+
`Default allowed: ${DEFAULT_ALLOWED_COMMANDS.join(", ")}`);
|
|
51
|
+
}
|
|
52
|
+
// Validate all arguments for safety
|
|
53
|
+
const sanitizedArgs = validateCommandArgs(args);
|
|
54
|
+
// Set defaults
|
|
55
|
+
const maxOutputSize = options.maxOutputSize ?? DEFAULT_MAX_OUTPUT_SIZE;
|
|
56
|
+
const timeout = options.timeout ?? DEFAULT_TIMEOUT;
|
|
57
|
+
return new Promise((resolve, reject) => {
|
|
58
|
+
const spawnOptions = {
|
|
59
|
+
cwd: options.cwd || process.cwd(),
|
|
60
|
+
env: { ...process.env, ...options.env },
|
|
61
|
+
// CRITICAL: Never use shell interpretation
|
|
62
|
+
shell: false,
|
|
63
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
64
|
+
};
|
|
65
|
+
const proc = spawn(command, sanitizedArgs, spawnOptions);
|
|
66
|
+
let stdout = "";
|
|
67
|
+
let stderr = "";
|
|
68
|
+
let timedOut = false;
|
|
69
|
+
let killed = false;
|
|
70
|
+
// Set up timeout
|
|
71
|
+
const timeoutId = setTimeout(() => {
|
|
72
|
+
timedOut = true;
|
|
73
|
+
killed = true;
|
|
74
|
+
proc.kill("SIGTERM");
|
|
75
|
+
// Force kill after 5 seconds if SIGTERM doesn't work
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
if (!proc.killed) {
|
|
78
|
+
proc.kill("SIGKILL");
|
|
79
|
+
}
|
|
80
|
+
}, 5000);
|
|
81
|
+
}, timeout);
|
|
82
|
+
// Capture stdout with size limit
|
|
83
|
+
proc.stdout?.on("data", (data) => {
|
|
84
|
+
if (stdout.length < maxOutputSize) {
|
|
85
|
+
stdout += data.toString();
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
// Capture stderr with size limit
|
|
89
|
+
proc.stderr?.on("data", (data) => {
|
|
90
|
+
if (stderr.length < maxOutputSize) {
|
|
91
|
+
stderr += data.toString();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
// Handle process completion
|
|
95
|
+
proc.on("close", (code) => {
|
|
96
|
+
clearTimeout(timeoutId);
|
|
97
|
+
resolve({
|
|
98
|
+
stdout,
|
|
99
|
+
stderr,
|
|
100
|
+
exitCode: code ?? (killed ? 1 : 0),
|
|
101
|
+
timedOut,
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
// Handle process errors
|
|
105
|
+
proc.on("error", (error) => {
|
|
106
|
+
clearTimeout(timeoutId);
|
|
107
|
+
reject(new Error(`Failed to execute '${command}': ${error.message}`));
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
// ============================================================================
|
|
112
|
+
// Convenience Functions
|
|
113
|
+
// ============================================================================
|
|
114
|
+
/**
|
|
115
|
+
* Executes a bash command securely.
|
|
116
|
+
* Uses bash with -c but passes the command as a single argument (not interpolated).
|
|
117
|
+
*
|
|
118
|
+
* @param command - The bash command string to execute
|
|
119
|
+
* @param options - Execution options
|
|
120
|
+
* @returns Promise resolving to execution result
|
|
121
|
+
*/
|
|
122
|
+
export async function secureBash(command, options = {}) {
|
|
123
|
+
// Validate the command string itself
|
|
124
|
+
if (command.includes("\0")) {
|
|
125
|
+
throw new Error("Null byte detected in command");
|
|
126
|
+
}
|
|
127
|
+
// Check for dangerous patterns before execution
|
|
128
|
+
validateCommandString(command);
|
|
129
|
+
// Use bash -c with the command as a separate argument
|
|
130
|
+
// This is safer than string interpolation because spawn doesn't use shell interpretation
|
|
131
|
+
return secureExec("bash", ["-c", command], options);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Executes an npm command securely.
|
|
135
|
+
*
|
|
136
|
+
* @param npmCommand - The npm subcommand (e.g., 'install', 'test')
|
|
137
|
+
* @param args - Arguments to pass to npm
|
|
138
|
+
* @param options - Execution options
|
|
139
|
+
* @returns Promise resolving to execution result
|
|
140
|
+
*/
|
|
141
|
+
export async function secureNpm(npmCommand, args = [], options = {}) {
|
|
142
|
+
return secureExec("npm", [npmCommand, ...args], options);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Executes a git command securely.
|
|
146
|
+
*
|
|
147
|
+
* @param args - Arguments to pass to git
|
|
148
|
+
* @param options - Execution options
|
|
149
|
+
* @returns Promise resolving to execution result
|
|
150
|
+
*/
|
|
151
|
+
export async function secureGit(args, options = {}) {
|
|
152
|
+
return secureExec("git", args, options);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Executes a command and returns only stdout.
|
|
156
|
+
* Throws if the command fails.
|
|
157
|
+
*
|
|
158
|
+
* @param command - The command to execute
|
|
159
|
+
* @param args - Arguments to pass to the command
|
|
160
|
+
* @param options - Execution options
|
|
161
|
+
* @returns Promise resolving to stdout string
|
|
162
|
+
*/
|
|
163
|
+
export async function secureExecOutput(command, args, options = {}) {
|
|
164
|
+
const result = await secureExec(command, args, options);
|
|
165
|
+
if (result.exitCode !== 0) {
|
|
166
|
+
throw new Error(`Command '${command}' failed with exit code ${result.exitCode}: ${result.stderr}`);
|
|
167
|
+
}
|
|
168
|
+
return result.stdout;
|
|
169
|
+
}
|
|
170
|
+
// ============================================================================
|
|
171
|
+
// Command Validation
|
|
172
|
+
// ============================================================================
|
|
173
|
+
/**
|
|
174
|
+
* Dangerous command patterns that should be blocked
|
|
175
|
+
*/
|
|
176
|
+
const DANGEROUS_COMMAND_PATTERNS = [
|
|
177
|
+
// Destructive file operations
|
|
178
|
+
/;\s*rm\s+-rf\s+\//i,
|
|
179
|
+
/&&\s*rm\s+-rf\s+\//i,
|
|
180
|
+
/;\s*mkfs/i,
|
|
181
|
+
/;\s*dd\s+if/i,
|
|
182
|
+
/;\s*format\s+/i,
|
|
183
|
+
// Remote code execution via pipe-to-shell
|
|
184
|
+
/\|\s*sh\b/i,
|
|
185
|
+
/\|\s*bash\b/i,
|
|
186
|
+
/\|\s*zsh\b/i,
|
|
187
|
+
/\|\s*powershell\b/i,
|
|
188
|
+
/\|\s*pwsh\b/i,
|
|
189
|
+
// Command substitution
|
|
190
|
+
/`.*`/,
|
|
191
|
+
/\$\(/,
|
|
192
|
+
// System config tampering
|
|
193
|
+
/>\s*\/etc\//i,
|
|
194
|
+
/>\s*\/boot\//i,
|
|
195
|
+
/>\s*\/dev\//i,
|
|
196
|
+
// Remote download + execute
|
|
197
|
+
/curl.*\|\s*(sh|bash|zsh)\b/i,
|
|
198
|
+
/wget.*\|\s*(sh|bash|zsh)\b/i,
|
|
199
|
+
// Privilege escalation
|
|
200
|
+
/chmod\s+4777/i,
|
|
201
|
+
/chown\s+root/i,
|
|
202
|
+
/chmod\s+777\s+\/etc/i,
|
|
203
|
+
];
|
|
204
|
+
/**
|
|
205
|
+
* Validates that a command string doesn't contain dangerous patterns.
|
|
206
|
+
*
|
|
207
|
+
* @param command - The command string to validate
|
|
208
|
+
* @returns true if the command is safe
|
|
209
|
+
* @throws Error if the command contains dangerous patterns
|
|
210
|
+
*/
|
|
211
|
+
export function validateCommandString(command) {
|
|
212
|
+
for (const pattern of DANGEROUS_COMMAND_PATTERNS) {
|
|
213
|
+
if (pattern.test(command)) {
|
|
214
|
+
throw new Error(`Command contains potentially dangerous pattern: ${pattern.source}`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
// ============================================================================
|
|
220
|
+
// Exports
|
|
221
|
+
// ============================================================================
|
|
222
|
+
export default {
|
|
223
|
+
secureExec,
|
|
224
|
+
secureBash,
|
|
225
|
+
secureNpm,
|
|
226
|
+
secureGit,
|
|
227
|
+
secureExecOutput,
|
|
228
|
+
validateCommandString,
|
|
229
|
+
};
|
|
230
|
+
//# sourceMappingURL=secure-exec.js.map
|
|
@@ -0,0 +1 @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qB,CAAC,OAAe;IACnD,KAAK,MAAM,OAAO,IAAI,0BAA0B,EAAE,CAAC;QACjD,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CACb,mDAAmD,OAAO,CAAC,MAAM,EAAE,CACpE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,eAAe;IACb,UAAU;IACV,UAAU;IACV,SAAS;IACT,SAAS;IACT,gBAAgB;IAChB,qBAAqB;CACtB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claim Parser — Extract verification claims from all sources
|
|
3
|
+
*
|
|
4
|
+
* Parses and extracts claims from:
|
|
5
|
+
* - markdown files (docs, README, etc.)
|
|
6
|
+
* - TODO/FIXME files
|
|
7
|
+
* - changelogs
|
|
8
|
+
* - architecture docs
|
|
9
|
+
* - reviews and summaries
|
|
10
|
+
* - inline comments
|
|
11
|
+
* - issue references
|
|
12
|
+
* - planning docs
|
|
13
|
+
*/
|
|
14
|
+
import { VerificationClaim } from "./types.js";
|
|
15
|
+
export declare class ClaimParser {
|
|
16
|
+
private readonly docExtensions;
|
|
17
|
+
private readonly codeExtensions;
|
|
18
|
+
/**
|
|
19
|
+
* Parse claims from an entire directory recursively
|
|
20
|
+
*/
|
|
21
|
+
parseFromDirectory(directoryPath: string): Promise<VerificationClaim[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Parse claims from a single file
|
|
24
|
+
*/
|
|
25
|
+
parseFromFile(filePath: string): Promise<VerificationClaim[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Build verification map from claims
|
|
28
|
+
*/
|
|
29
|
+
buildVerificationMap(claims: VerificationClaim[]): Map<string, VerificationClaim[]>;
|
|
30
|
+
private parseFromMarkdown;
|
|
31
|
+
private parseFromCode;
|
|
32
|
+
private parseFromComments;
|
|
33
|
+
private getExtension;
|
|
34
|
+
private inferSystemsFromContent;
|
|
35
|
+
private inferSystemsFromFilePath;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=claim-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claim-parser.d.ts","sourceRoot":"","sources":["../../src/verification/claim-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmC;IACjE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA0E;IAEzG;;OAEG;IACG,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAiC7E;;OAEG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAqCnE;;OAEG;IACH,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAcnF,OAAO,CAAC,iBAAiB;IA2CzB,OAAO,CAAC,aAAa;IAuBrB,OAAO,CAAC,iBAAiB;IA+BzB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,wBAAwB;CAejC"}
|