@dcyfr/ai 2.1.3 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +91 -0
- package/README.md +75 -10
- package/config/default.json +11 -5
- package/config/default.yaml +13 -5
- package/dist/.tsbuildinfo +1 -0
- package/dist/ai/agents/agent-loader.d.ts.map +1 -1
- package/dist/ai/agents/agent-loader.js +1 -0
- package/dist/ai/agents/agent-loader.js.map +1 -1
- package/dist/ai/agents/agent-registry.d.ts.map +1 -1
- package/dist/ai/agents/agent-registry.js.map +1 -1
- package/dist/ai/agents/agent-router.d.ts +3 -3
- package/dist/ai/agents/agent-router.d.ts.map +1 -1
- package/dist/ai/agents/agent-router.js +6 -7
- package/dist/ai/agents/agent-router.js.map +1 -1
- package/dist/ai/config/schema.js +3 -3
- package/dist/ai/config/schema.js.map +1 -1
- package/dist/ai/core/provider-registry.d.ts.map +1 -1
- package/dist/ai/core/provider-registry.js +47 -16
- package/dist/ai/core/provider-registry.js.map +1 -1
- package/dist/ai/core/telemetry-engine.d.ts.map +1 -1
- package/dist/ai/core/telemetry-engine.js +5 -3
- package/dist/ai/core/telemetry-engine.js.map +1 -1
- package/dist/ai/delegation/capability-bootstrap.js +1 -1
- package/dist/ai/delegation/capability-bootstrap.js.map +1 -1
- package/dist/ai/delegation/contract-manager.d.ts +54 -5
- package/dist/ai/delegation/contract-manager.d.ts.map +1 -1
- package/dist/ai/delegation/contract-manager.js +122 -7
- package/dist/ai/delegation/contract-manager.js.map +1 -1
- package/dist/ai/delegation/feature-flags.d.ts +1 -1
- package/dist/ai/delegation/feature-flags.d.ts.map +1 -1
- package/dist/ai/delegation/feature-flags.js +3 -1
- package/dist/ai/delegation/feature-flags.js.map +1 -1
- package/dist/ai/delegation/index.d.ts +1 -0
- package/dist/ai/delegation/index.d.ts.map +1 -1
- package/dist/ai/delegation/index.js +2 -0
- package/dist/ai/delegation/index.js.map +1 -1
- package/dist/ai/delegation/monitoring.d.ts.map +1 -1
- package/dist/ai/delegation/monitoring.js +1 -0
- package/dist/ai/delegation/monitoring.js.map +1 -1
- package/dist/ai/delegation/session-manager.d.ts +16 -1
- package/dist/ai/delegation/session-manager.d.ts.map +1 -1
- package/dist/ai/delegation/session-manager.js +10 -1
- package/dist/ai/delegation/session-manager.js.map +1 -1
- package/dist/ai/delegation/session-queue.d.ts.map +1 -1
- package/dist/ai/delegation/session-queue.js.map +1 -1
- package/dist/ai/examples/integration-demo.d.ts.map +1 -1
- package/dist/ai/examples/integration-demo.js +1 -0
- package/dist/ai/examples/integration-demo.js.map +1 -1
- package/dist/ai/index.d.ts +7 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +8 -0
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/mcp/mcp-registry.d.ts.map +1 -1
- package/dist/ai/mcp/mcp-registry.js +1 -1
- package/dist/ai/mcp/mcp-registry.js.map +1 -1
- package/dist/ai/mcp/servers/analytics/index.d.ts.map +1 -1
- package/dist/ai/mcp/servers/analytics/index.js +1 -0
- package/dist/ai/mcp/servers/analytics/index.js.map +1 -1
- package/dist/ai/mcp/servers/content-manager/index.d.ts.map +1 -1
- package/dist/ai/mcp/servers/delegation-monitor/index.js +27 -27
- package/dist/ai/mcp/servers/delegation-monitor/index.js.map +1 -1
- package/dist/ai/mcp/servers/design-tokens/index.js +1 -1
- package/dist/ai/mcp/servers/design-tokens/index.js.map +1 -1
- package/dist/ai/mcp/servers/promptintel/index.d.ts.map +1 -1
- package/dist/ai/mcp/servers/promptintel/index.js +2 -1
- package/dist/ai/mcp/servers/promptintel/index.js.map +1 -1
- package/dist/ai/mcp/servers/shared/rate-limiter.d.ts.map +1 -1
- package/dist/ai/mcp/servers/shared/rate-limiter.js +1 -0
- package/dist/ai/mcp/servers/shared/rate-limiter.js.map +1 -1
- package/dist/ai/mcp/servers/shared/redis-client.d.ts.map +1 -1
- package/dist/ai/mcp/servers/shared/redis-client.js +2 -0
- package/dist/ai/mcp/servers/shared/redis-client.js.map +1 -1
- package/dist/ai/mcp/servers/shared/utils.js +12 -18
- package/dist/ai/mcp/servers/shared/utils.js.map +1 -1
- package/dist/ai/memory/dcyfr-memory.d.ts.map +1 -1
- package/dist/ai/memory/dcyfr-memory.js +11 -1
- package/dist/ai/memory/dcyfr-memory.js.map +1 -1
- package/dist/ai/memory/file-memory-adapter.d.ts +103 -0
- package/dist/ai/memory/file-memory-adapter.d.ts.map +1 -0
- package/dist/ai/memory/file-memory-adapter.js +532 -0
- package/dist/ai/memory/file-memory-adapter.js.map +1 -0
- package/dist/ai/memory/index.d.ts +6 -0
- package/dist/ai/memory/index.d.ts.map +1 -1
- package/dist/ai/memory/index.js +6 -0
- package/dist/ai/memory/index.js.map +1 -1
- package/dist/ai/memory/mem0-client.d.ts.map +1 -1
- package/dist/ai/memory/mem0-client.js +5 -2
- package/dist/ai/memory/mem0-client.js.map +1 -1
- package/dist/ai/memory/sqlite-index.d.ts +89 -0
- package/dist/ai/memory/sqlite-index.d.ts.map +1 -0
- package/dist/ai/memory/sqlite-index.js +295 -0
- package/dist/ai/memory/sqlite-index.js.map +1 -0
- package/dist/ai/memory/types.d.ts.map +1 -1
- package/dist/ai/memory/types.js +1 -0
- package/dist/ai/memory/types.js.map +1 -1
- package/dist/ai/memory/working-memory-persistence.d.ts +79 -0
- package/dist/ai/memory/working-memory-persistence.d.ts.map +1 -0
- package/dist/ai/memory/working-memory-persistence.js +220 -0
- package/dist/ai/memory/working-memory-persistence.js.map +1 -0
- package/dist/ai/permissions/attenuation-engine.d.ts.map +1 -1
- package/dist/ai/permissions/attenuation-engine.js.map +1 -1
- package/dist/ai/reputation/reputation-engine.d.ts +4 -0
- package/dist/ai/reputation/reputation-engine.d.ts.map +1 -1
- package/dist/ai/reputation/reputation-engine.js +1 -0
- package/dist/ai/reputation/reputation-engine.js.map +1 -1
- package/dist/ai/runtime/agent-runtime.d.ts.map +1 -1
- package/dist/ai/runtime/agent-runtime.js +9 -5
- package/dist/ai/runtime/agent-runtime.js.map +1 -1
- package/dist/ai/src/batch-processor.d.ts +6 -6
- package/dist/ai/src/batch-processor.d.ts.map +1 -1
- package/dist/ai/src/batch-processor.js +11 -4
- package/dist/ai/src/batch-processor.js.map +1 -1
- package/dist/ai/src/capability-bootstrap.d.ts.map +1 -1
- package/dist/ai/src/capability-bootstrap.js +1 -0
- package/dist/ai/src/capability-bootstrap.js.map +1 -1
- package/dist/ai/src/capability-registry.js +1 -1
- package/dist/ai/src/capability-registry.js.map +1 -1
- package/dist/ai/src/cli/telemetry-dashboard.d.ts +0 -11
- package/dist/ai/src/cli/telemetry-dashboard.d.ts.map +1 -1
- package/dist/ai/src/cli/telemetry-dashboard.js +12 -6
- package/dist/ai/src/cli/telemetry-dashboard.js.map +1 -1
- package/dist/ai/src/compaction/context-compactor.d.ts +149 -0
- package/dist/ai/src/compaction/context-compactor.d.ts.map +1 -0
- package/dist/ai/src/compaction/context-compactor.js +302 -0
- package/dist/ai/src/compaction/context-compactor.js.map +1 -0
- package/dist/ai/src/compaction/index.d.ts +11 -0
- package/dist/ai/src/compaction/index.d.ts.map +1 -0
- package/dist/ai/src/compaction/index.js +11 -0
- package/dist/ai/src/compaction/index.js.map +1 -0
- package/dist/ai/src/compaction/memory-compaction.d.ts +138 -0
- package/dist/ai/src/compaction/memory-compaction.d.ts.map +1 -0
- package/dist/ai/src/compaction/memory-compaction.js +630 -0
- package/dist/ai/src/compaction/memory-compaction.js.map +1 -0
- package/dist/ai/src/container/agent-container-dispatcher.d.ts +154 -0
- package/dist/ai/src/container/agent-container-dispatcher.d.ts.map +1 -0
- package/dist/ai/src/container/agent-container-dispatcher.js +329 -0
- package/dist/ai/src/container/agent-container-dispatcher.js.map +1 -0
- package/dist/ai/src/container/backend-factory.d.ts +89 -0
- package/dist/ai/src/container/backend-factory.d.ts.map +1 -0
- package/dist/ai/src/container/backend-factory.js +169 -0
- package/dist/ai/src/container/backend-factory.js.map +1 -0
- package/dist/ai/src/container/index.d.ts +13 -0
- package/dist/ai/src/container/index.d.ts.map +1 -0
- package/dist/ai/src/container/index.js +13 -0
- package/dist/ai/src/container/index.js.map +1 -0
- package/dist/ai/src/container/kubernetes-backend.d.ts +23 -0
- package/dist/ai/src/container/kubernetes-backend.d.ts.map +1 -0
- package/dist/ai/src/container/kubernetes-backend.js +39 -0
- package/dist/ai/src/container/kubernetes-backend.js.map +1 -0
- package/dist/ai/src/container/local-docker-backend.d.ts +77 -0
- package/dist/ai/src/container/local-docker-backend.d.ts.map +1 -0
- package/dist/ai/src/container/local-docker-backend.js +362 -0
- package/dist/ai/src/container/local-docker-backend.js.map +1 -0
- package/dist/ai/src/container/remote-docker-backend.d.ts +35 -0
- package/dist/ai/src/container/remote-docker-backend.d.ts.map +1 -0
- package/dist/ai/src/container/remote-docker-backend.js +189 -0
- package/dist/ai/src/container/remote-docker-backend.js.map +1 -0
- package/dist/ai/src/container/types.d.ts +270 -0
- package/dist/ai/src/container/types.d.ts.map +1 -0
- package/dist/ai/src/container/types.js +86 -0
- package/dist/ai/src/container/types.js.map +1 -0
- package/dist/ai/src/delegation/feature-flags.d.ts.map +1 -1
- package/dist/ai/src/delegation/feature-flags.js +1 -0
- package/dist/ai/src/delegation/feature-flags.js.map +1 -1
- package/dist/ai/src/delegation/liability-firebreak.d.ts.map +1 -1
- package/dist/ai/src/delegation/liability-firebreak.js +1 -0
- package/dist/ai/src/delegation/liability-firebreak.js.map +1 -1
- package/dist/ai/src/delegation/security-threat-model.d.ts.map +1 -1
- package/dist/ai/src/delegation/security-threat-model.js +1 -1
- package/dist/ai/src/delegation/security-threat-model.js.map +1 -1
- package/dist/ai/src/delegation-capability-integration.d.ts +1 -1
- package/dist/ai/src/delegation-capability-integration.d.ts.map +1 -1
- package/dist/ai/src/delegation-capability-integration.js +2 -7
- package/dist/ai/src/delegation-capability-integration.js.map +1 -1
- package/dist/ai/src/end-to-end-workflow-orchestrator.d.ts.map +1 -1
- package/dist/ai/src/end-to-end-workflow-orchestrator.js +2 -1
- package/dist/ai/src/end-to-end-workflow-orchestrator.js.map +1 -1
- package/dist/ai/src/enhanced-capability-detection.d.ts +1 -1
- package/dist/ai/src/enhanced-capability-detection.d.ts.map +1 -1
- package/dist/ai/src/enhanced-capability-detection.js +1 -1
- package/dist/ai/src/enhanced-capability-detection.js.map +1 -1
- package/dist/ai/src/gateway/index.d.ts +6 -0
- package/dist/ai/src/gateway/index.d.ts.map +1 -0
- package/dist/ai/src/gateway/index.js +6 -0
- package/dist/ai/src/gateway/index.js.map +1 -0
- package/dist/ai/src/gateway/message-gateway.d.ts +296 -0
- package/dist/ai/src/gateway/message-gateway.d.ts.map +1 -0
- package/dist/ai/src/gateway/message-gateway.js +415 -0
- package/dist/ai/src/gateway/message-gateway.js.map +1 -0
- package/dist/ai/src/intelligent-cache-manager.d.ts.map +1 -1
- package/dist/ai/src/intelligent-cache-manager.js +2 -1
- package/dist/ai/src/intelligent-cache-manager.js.map +1 -1
- package/dist/ai/src/mcp/index.d.ts +10 -0
- package/dist/ai/src/mcp/index.d.ts.map +1 -0
- package/dist/ai/src/mcp/index.js +10 -0
- package/dist/ai/src/mcp/index.js.map +1 -0
- package/dist/ai/src/mcp/mcp-tool-bridge.d.ts +186 -0
- package/dist/ai/src/mcp/mcp-tool-bridge.d.ts.map +1 -0
- package/dist/ai/src/mcp/mcp-tool-bridge.js +292 -0
- package/dist/ai/src/mcp/mcp-tool-bridge.js.map +1 -0
- package/dist/ai/src/mcp-auto-configuration.d.ts.map +1 -1
- package/dist/ai/src/mcp-auto-configuration.js +2 -1
- package/dist/ai/src/mcp-auto-configuration.js.map +1 -1
- package/dist/ai/src/performance-profiler.d.ts.map +1 -1
- package/dist/ai/src/performance-profiler.js +1 -0
- package/dist/ai/src/performance-profiler.js.map +1 -1
- package/dist/ai/src/plugins/anomaly/anomaly-detector.d.ts +58 -0
- package/dist/ai/src/plugins/anomaly/anomaly-detector.d.ts.map +1 -0
- package/dist/ai/src/plugins/anomaly/anomaly-detector.js +101 -0
- package/dist/ai/src/plugins/anomaly/anomaly-detector.js.map +1 -0
- package/dist/ai/src/plugins/anomaly/anomaly-monitor.d.ts +145 -0
- package/dist/ai/src/plugins/anomaly/anomaly-monitor.d.ts.map +1 -0
- package/dist/ai/src/plugins/anomaly/anomaly-monitor.js +245 -0
- package/dist/ai/src/plugins/anomaly/anomaly-monitor.js.map +1 -0
- package/dist/ai/src/plugins/anomaly/behavior-baseline.d.ts +79 -0
- package/dist/ai/src/plugins/anomaly/behavior-baseline.d.ts.map +1 -0
- package/dist/ai/src/plugins/anomaly/behavior-baseline.js +161 -0
- package/dist/ai/src/plugins/anomaly/behavior-baseline.js.map +1 -0
- package/dist/ai/src/plugins/anomaly/index.d.ts +15 -0
- package/dist/ai/src/plugins/anomaly/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/anomaly/index.js +12 -0
- package/dist/ai/src/plugins/anomaly/index.js.map +1 -0
- package/dist/ai/src/plugins/anomaly/types.d.ts +150 -0
- package/dist/ai/src/plugins/anomaly/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/anomaly/types.js +68 -0
- package/dist/ai/src/plugins/anomaly/types.js.map +1 -0
- package/dist/ai/src/plugins/certification/certification-manager.d.ts +102 -0
- package/dist/ai/src/plugins/certification/certification-manager.d.ts.map +1 -0
- package/dist/ai/src/plugins/certification/certification-manager.js +321 -0
- package/dist/ai/src/plugins/certification/certification-manager.js.map +1 -0
- package/dist/ai/src/plugins/certification/index.d.ts +12 -0
- package/dist/ai/src/plugins/certification/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/certification/index.js +10 -0
- package/dist/ai/src/plugins/certification/index.js.map +1 -0
- package/dist/ai/src/plugins/certification/types.d.ts +128 -0
- package/dist/ai/src/plugins/certification/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/certification/types.js +201 -0
- package/dist/ai/src/plugins/certification/types.js.map +1 -0
- package/dist/ai/src/plugins/escalation/escalation-trigger.d.ts +155 -0
- package/dist/ai/src/plugins/escalation/escalation-trigger.d.ts.map +1 -0
- package/dist/ai/src/plugins/escalation/escalation-trigger.js +183 -0
- package/dist/ai/src/plugins/escalation/escalation-trigger.js.map +1 -0
- package/dist/ai/src/plugins/escalation/index.d.ts +11 -0
- package/dist/ai/src/plugins/escalation/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/escalation/index.js +10 -0
- package/dist/ai/src/plugins/escalation/index.js.map +1 -0
- package/dist/ai/src/plugins/incidents/incident-response-manager.d.ts +165 -0
- package/dist/ai/src/plugins/incidents/incident-response-manager.d.ts.map +1 -0
- package/dist/ai/src/plugins/incidents/incident-response-manager.js +462 -0
- package/dist/ai/src/plugins/incidents/incident-response-manager.js.map +1 -0
- package/dist/ai/src/plugins/incidents/index.d.ts +8 -0
- package/dist/ai/src/plugins/incidents/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/incidents/index.js +7 -0
- package/dist/ai/src/plugins/incidents/index.js.map +1 -0
- package/dist/ai/src/plugins/incidents/types.d.ts +183 -0
- package/dist/ai/src/plugins/incidents/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/incidents/types.js +55 -0
- package/dist/ai/src/plugins/incidents/types.js.map +1 -0
- package/dist/ai/src/plugins/permissions/index.d.ts +17 -0
- package/dist/ai/src/plugins/permissions/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/permissions/index.js +14 -0
- package/dist/ai/src/plugins/permissions/index.js.map +1 -0
- package/dist/ai/src/plugins/permissions/permission-attenuator.d.ts +29 -0
- package/dist/ai/src/plugins/permissions/permission-attenuator.d.ts.map +1 -0
- package/dist/ai/src/plugins/permissions/permission-attenuator.js +190 -0
- package/dist/ai/src/plugins/permissions/permission-attenuator.js.map +1 -0
- package/dist/ai/src/plugins/permissions/permission-audit-logger.d.ts +72 -0
- package/dist/ai/src/plugins/permissions/permission-audit-logger.d.ts.map +1 -0
- package/dist/ai/src/plugins/permissions/permission-audit-logger.js +176 -0
- package/dist/ai/src/plugins/permissions/permission-audit-logger.js.map +1 -0
- package/dist/ai/src/plugins/permissions/permission-enforcer.d.ts +99 -0
- package/dist/ai/src/plugins/permissions/permission-enforcer.d.ts.map +1 -0
- package/dist/ai/src/plugins/permissions/permission-enforcer.js +151 -0
- package/dist/ai/src/plugins/permissions/permission-enforcer.js.map +1 -0
- package/dist/ai/src/plugins/permissions/plugin-permission-validator.d.ts +39 -0
- package/dist/ai/src/plugins/permissions/plugin-permission-validator.d.ts.map +1 -0
- package/dist/ai/src/plugins/permissions/plugin-permission-validator.js +296 -0
- package/dist/ai/src/plugins/permissions/plugin-permission-validator.js.map +1 -0
- package/dist/ai/src/plugins/permissions/types.d.ts +116 -0
- package/dist/ai/src/plugins/permissions/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/permissions/types.js +36 -0
- package/dist/ai/src/plugins/permissions/types.js.map +1 -0
- package/dist/ai/src/plugins/reputation/index.d.ts +9 -0
- package/dist/ai/src/plugins/reputation/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/reputation/index.js +8 -0
- package/dist/ai/src/plugins/reputation/index.js.map +1 -0
- package/dist/ai/src/plugins/reputation/plugin-reputation-db.d.ts +29 -0
- package/dist/ai/src/plugins/reputation/plugin-reputation-db.d.ts.map +1 -0
- package/dist/ai/src/plugins/reputation/plugin-reputation-db.js +120 -0
- package/dist/ai/src/plugins/reputation/plugin-reputation-db.js.map +1 -0
- package/dist/ai/src/plugins/reputation/plugin-reputation-engine.d.ts +115 -0
- package/dist/ai/src/plugins/reputation/plugin-reputation-engine.d.ts.map +1 -0
- package/dist/ai/src/plugins/reputation/plugin-reputation-engine.js +528 -0
- package/dist/ai/src/plugins/reputation/plugin-reputation-engine.js.map +1 -0
- package/dist/ai/src/plugins/reputation/types.d.ts +149 -0
- package/dist/ai/src/plugins/reputation/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/reputation/types.js +14 -0
- package/dist/ai/src/plugins/reputation/types.js.map +1 -0
- package/dist/ai/src/plugins/reviews/index.d.ts +11 -0
- package/dist/ai/src/plugins/reviews/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/reviews/index.js +10 -0
- package/dist/ai/src/plugins/reviews/index.js.map +1 -0
- package/dist/ai/src/plugins/reviews/plugin-rating-aggregator.d.ts +116 -0
- package/dist/ai/src/plugins/reviews/plugin-rating-aggregator.d.ts.map +1 -0
- package/dist/ai/src/plugins/reviews/plugin-rating-aggregator.js +282 -0
- package/dist/ai/src/plugins/reviews/plugin-rating-aggregator.js.map +1 -0
- package/dist/ai/src/plugins/reviews/types.d.ts +113 -0
- package/dist/ai/src/plugins/reviews/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/reviews/types.js +55 -0
- package/dist/ai/src/plugins/reviews/types.js.map +1 -0
- package/dist/ai/src/plugins/runtime/docker-plugin-runner.d.ts +77 -0
- package/dist/ai/src/plugins/runtime/docker-plugin-runner.d.ts.map +1 -0
- package/dist/ai/src/plugins/runtime/docker-plugin-runner.js +248 -0
- package/dist/ai/src/plugins/runtime/docker-plugin-runner.js.map +1 -0
- package/dist/ai/src/plugins/runtime/gvisor-plugin-runner.d.ts +99 -0
- package/dist/ai/src/plugins/runtime/gvisor-plugin-runner.d.ts.map +1 -0
- package/dist/ai/src/plugins/runtime/gvisor-plugin-runner.js +158 -0
- package/dist/ai/src/plugins/runtime/gvisor-plugin-runner.js.map +1 -0
- package/dist/ai/src/plugins/runtime/index.d.ts +13 -0
- package/dist/ai/src/plugins/runtime/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/runtime/index.js +11 -0
- package/dist/ai/src/plugins/runtime/index.js.map +1 -0
- package/dist/ai/src/plugins/runtime/types.d.ts +143 -0
- package/dist/ai/src/plugins/runtime/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/runtime/types.js +19 -0
- package/dist/ai/src/plugins/runtime/types.js.map +1 -0
- package/dist/ai/src/plugins/runtime/wasm-plugin-runner.d.ts +104 -0
- package/dist/ai/src/plugins/runtime/wasm-plugin-runner.d.ts.map +1 -0
- package/dist/ai/src/plugins/runtime/wasm-plugin-runner.js +307 -0
- package/dist/ai/src/plugins/runtime/wasm-plugin-runner.js.map +1 -0
- package/dist/ai/src/plugins/security/index.d.ts +24 -0
- package/dist/ai/src/plugins/security/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/index.js +23 -0
- package/dist/ai/src/plugins/security/index.js.map +1 -0
- package/dist/ai/src/plugins/security/license-checker.d.ts +26 -0
- package/dist/ai/src/plugins/security/license-checker.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/license-checker.js +137 -0
- package/dist/ai/src/plugins/security/license-checker.js.map +1 -0
- package/dist/ai/src/plugins/security/malware-scanner.d.ts +19 -0
- package/dist/ai/src/plugins/security/malware-scanner.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/malware-scanner.js +121 -0
- package/dist/ai/src/plugins/security/malware-scanner.js.map +1 -0
- package/dist/ai/src/plugins/security/plugin-security-scanner.d.ts +36 -0
- package/dist/ai/src/plugins/security/plugin-security-scanner.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/plugin-security-scanner.js +160 -0
- package/dist/ai/src/plugins/security/plugin-security-scanner.js.map +1 -0
- package/dist/ai/src/plugins/security/sbom-generator.d.ts +23 -0
- package/dist/ai/src/plugins/security/sbom-generator.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/sbom-generator.js +115 -0
- package/dist/ai/src/plugins/security/sbom-generator.js.map +1 -0
- package/dist/ai/src/plugins/security/secret-detector.d.ts +19 -0
- package/dist/ai/src/plugins/security/secret-detector.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/secret-detector.js +204 -0
- package/dist/ai/src/plugins/security/secret-detector.js.map +1 -0
- package/dist/ai/src/plugins/security/signature-verifier.d.ts +21 -0
- package/dist/ai/src/plugins/security/signature-verifier.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/signature-verifier.js +75 -0
- package/dist/ai/src/plugins/security/signature-verifier.js.map +1 -0
- package/dist/ai/src/plugins/security/sonarcloud-client.d.ts +20 -0
- package/dist/ai/src/plugins/security/sonarcloud-client.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/sonarcloud-client.js +106 -0
- package/dist/ai/src/plugins/security/sonarcloud-client.js.map +1 -0
- package/dist/ai/src/plugins/security/trust-score.d.ts +58 -0
- package/dist/ai/src/plugins/security/trust-score.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/trust-score.js +173 -0
- package/dist/ai/src/plugins/security/trust-score.js.map +1 -0
- package/dist/ai/src/plugins/security/types.d.ts +220 -0
- package/dist/ai/src/plugins/security/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/types.js +12 -0
- package/dist/ai/src/plugins/security/types.js.map +1 -0
- package/dist/ai/src/plugins/security/vulnerability-scanner.d.ts +22 -0
- package/dist/ai/src/plugins/security/vulnerability-scanner.d.ts.map +1 -0
- package/dist/ai/src/plugins/security/vulnerability-scanner.js +109 -0
- package/dist/ai/src/plugins/security/vulnerability-scanner.js.map +1 -0
- package/dist/ai/src/plugins/tlp/index.d.ts +17 -0
- package/dist/ai/src/plugins/tlp/index.d.ts.map +1 -0
- package/dist/ai/src/plugins/tlp/index.js +17 -0
- package/dist/ai/src/plugins/tlp/index.js.map +1 -0
- package/dist/ai/src/plugins/tlp/tlp-classifier.d.ts +55 -0
- package/dist/ai/src/plugins/tlp/tlp-classifier.d.ts.map +1 -0
- package/dist/ai/src/plugins/tlp/tlp-classifier.js +232 -0
- package/dist/ai/src/plugins/tlp/tlp-classifier.js.map +1 -0
- package/dist/ai/src/plugins/tlp/tlp-validator.d.ts +97 -0
- package/dist/ai/src/plugins/tlp/tlp-validator.d.ts.map +1 -0
- package/dist/ai/src/plugins/tlp/tlp-validator.js +120 -0
- package/dist/ai/src/plugins/tlp/tlp-validator.js.map +1 -0
- package/dist/ai/src/plugins/tlp/types.d.ts +84 -0
- package/dist/ai/src/plugins/tlp/types.d.ts.map +1 -0
- package/dist/ai/src/plugins/tlp/types.js +20 -0
- package/dist/ai/src/plugins/tlp/types.js.map +1 -0
- package/dist/ai/src/resource-monitor.d.ts +1 -1
- package/dist/ai/src/resource-monitor.d.ts.map +1 -1
- package/dist/ai/src/resource-monitor.js +4 -3
- package/dist/ai/src/resource-monitor.js.map +1 -1
- package/dist/ai/src/runtime/agent-runtime.d.ts +77 -0
- package/dist/ai/src/runtime/agent-runtime.d.ts.map +1 -1
- package/dist/ai/src/runtime/agent-runtime.js +138 -2
- package/dist/ai/src/runtime/agent-runtime.js.map +1 -1
- package/dist/ai/src/scheduler/agent-scheduler.d.ts +365 -0
- package/dist/ai/src/scheduler/agent-scheduler.d.ts.map +1 -0
- package/dist/ai/src/scheduler/agent-scheduler.js +610 -0
- package/dist/ai/src/scheduler/agent-scheduler.js.map +1 -0
- package/dist/ai/src/scheduler/index.d.ts +6 -0
- package/dist/ai/src/scheduler/index.d.ts.map +1 -0
- package/dist/ai/src/scheduler/index.js +6 -0
- package/dist/ai/src/scheduler/index.js.map +1 -0
- package/dist/ai/src/session/index.d.ts +6 -0
- package/dist/ai/src/session/index.d.ts.map +1 -0
- package/dist/ai/src/session/index.js +6 -0
- package/dist/ai/src/session/index.js.map +1 -0
- package/dist/ai/src/session/session-manager.d.ts +380 -0
- package/dist/ai/src/session/session-manager.d.ts.map +1 -0
- package/dist/ai/src/session/session-manager.js +625 -0
- package/dist/ai/src/session/session-manager.js.map +1 -0
- package/dist/ai/src/skills/index.d.ts +10 -0
- package/dist/ai/src/skills/index.d.ts.map +1 -0
- package/dist/ai/src/skills/index.js +10 -0
- package/dist/ai/src/skills/index.js.map +1 -0
- package/dist/ai/src/skills/skill-registry.d.ts +181 -0
- package/dist/ai/src/skills/skill-registry.d.ts.map +1 -0
- package/dist/ai/src/skills/skill-registry.js +465 -0
- package/dist/ai/src/skills/skill-registry.js.map +1 -0
- package/dist/ai/src/telemetry/delegation-telemetry.d.ts.map +1 -1
- package/dist/ai/src/telemetry/delegation-telemetry.js +1 -0
- package/dist/ai/src/telemetry/delegation-telemetry.js.map +1 -1
- package/dist/ai/src/telemetry/runtime-telemetry-integration.d.ts +1 -1
- package/dist/ai/src/telemetry/runtime-telemetry-integration.d.ts.map +1 -1
- package/dist/ai/src/telemetry/runtime-telemetry-integration.js +3 -2
- package/dist/ai/src/telemetry/runtime-telemetry-integration.js.map +1 -1
- package/dist/ai/src/telemetry/telemetry-utils.d.ts.map +1 -1
- package/dist/ai/src/telemetry/telemetry-utils.js +1 -0
- package/dist/ai/src/telemetry/telemetry-utils.js.map +1 -1
- package/dist/ai/src/types/agent-capabilities.d.ts.map +1 -1
- package/dist/ai/src/types/agent-capabilities.js +1 -0
- package/dist/ai/src/types/agent-capabilities.js.map +1 -1
- package/dist/ai/src/types/delegation-contracts.d.ts +92 -0
- package/dist/ai/src/types/delegation-contracts.d.ts.map +1 -1
- package/dist/ai/src/types/delegation-contracts.js.map +1 -1
- package/dist/ai/src/validation-pipeline-integration.d.ts.map +1 -1
- package/dist/ai/src/validation-pipeline-integration.js +1 -2
- package/dist/ai/src/validation-pipeline-integration.js.map +1 -1
- package/dist/ai/src/verification/multi-modal-formatters.d.ts +1 -1
- package/dist/ai/src/verification/multi-modal-formatters.d.ts.map +1 -1
- package/dist/ai/src/verification/multi-modal-formatters.js +3 -2
- package/dist/ai/src/verification/multi-modal-formatters.js.map +1 -1
- package/dist/ai/src/verification/output-formatter.d.ts +1 -1
- package/dist/ai/src/verification/output-formatter.d.ts.map +1 -1
- package/dist/ai/src/verification/output-formatter.js +2 -1
- package/dist/ai/src/verification/output-formatter.js.map +1 -1
- package/dist/ai/src/verification/parser-integration.d.ts.map +1 -1
- package/dist/ai/src/verification/parser-integration.js.map +1 -1
- package/dist/ai/types/agent-capabilities.d.ts +7 -0
- package/dist/ai/types/agent-capabilities.d.ts.map +1 -1
- package/dist/ai/types/delegation-contracts.d.ts +75 -0
- package/dist/ai/types/delegation-contracts.d.ts.map +1 -1
- package/dist/ai/types/index.d.ts +3 -3
- package/dist/ai/types/index.d.ts.map +1 -1
- package/dist/ai/types/index.js.map +1 -1
- package/dist/ai/types/permission-tokens.d.ts +23 -0
- package/dist/ai/types/permission-tokens.d.ts.map +1 -1
- package/dist/ai/types/permission-tokens.js +65 -1
- package/dist/ai/types/permission-tokens.js.map +1 -1
- package/dist/ai/validation/validation-framework.d.ts.map +1 -1
- package/dist/ai/verification/policy-framework.d.ts +1 -1
- package/dist/ai/verification/policy-framework.d.ts.map +1 -1
- package/dist/ai/verification/policy-framework.js +4 -4
- package/dist/ai/verification/policy-framework.js.map +1 -1
- package/package.json +38 -9
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gVisor Plugin Runner
|
|
3
|
+
*
|
|
4
|
+
* Extends DockerPluginRunner with gVisor (runsc) runtime support.
|
|
5
|
+
* Enforces TLP-based runtime selection:
|
|
6
|
+
* - TLP:CLEAR / TLP:GREEN → standard Docker (no gVisor required)
|
|
7
|
+
* - TLP:AMBER → gVisor preferred; gracefully falls back to Docker
|
|
8
|
+
* - TLP:RED → gVisor required; throws if unavailable
|
|
9
|
+
*
|
|
10
|
+
* gVisor (runsc) provides an additional kernel isolation layer on top of
|
|
11
|
+
* Docker by intercepting all guest system calls via a user-space kernel.
|
|
12
|
+
* This significantly reduces the attack surface for privilege escalation
|
|
13
|
+
* exploits in high-sensitivity (AMBER/RED) plugin workloads.
|
|
14
|
+
*
|
|
15
|
+
* Specification: Plugin Marketplace Security — Phase 15 (gVisor Integration)
|
|
16
|
+
*
|
|
17
|
+
* @see https://gvisor.dev/docs/
|
|
18
|
+
* @module plugins/runtime/gvisor-plugin-runner
|
|
19
|
+
* @version 1.0.0
|
|
20
|
+
* @date 2026-02-28
|
|
21
|
+
* @license MIT
|
|
22
|
+
*/
|
|
23
|
+
import { execFile } from 'node:child_process';
|
|
24
|
+
import { promisify } from 'node:util';
|
|
25
|
+
import { DockerPluginRunner } from './docker-plugin-runner.js';
|
|
26
|
+
const execFileAsync = promisify(execFile);
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// Error classes
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
/**
|
|
31
|
+
* Thrown when a TLP:RED plugin cannot be executed because the gVisor
|
|
32
|
+
* runtime (runsc) is not available on the host machine.
|
|
33
|
+
*
|
|
34
|
+
* TLP:RED plugins are blocked unconditionally if gVisor is absent —
|
|
35
|
+
* unlike TLP:AMBER which falls back to standard Docker with a warning.
|
|
36
|
+
*/
|
|
37
|
+
export class GVisorRequiredError extends Error {
|
|
38
|
+
code = 'GVISOR_REQUIRED';
|
|
39
|
+
constructor(message) {
|
|
40
|
+
super(message);
|
|
41
|
+
this.name = 'GVisorRequiredError';
|
|
42
|
+
// Maintain proper prototype chain in compiled JS
|
|
43
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
// GVisorPluginRunner
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
/**
|
|
50
|
+
* Plugin runner with gVisor (runsc) isolation support and TLP enforcement.
|
|
51
|
+
*
|
|
52
|
+
* Inherits all standard Docker sandbox behaviour from DockerPluginRunner and
|
|
53
|
+
* adds:
|
|
54
|
+
* 1. Lightweight PATH-based gVisor detection (no Docker daemon required).
|
|
55
|
+
* 2. `runWithTlp()` — TLP-aware `run()` wrapper that automatically selects
|
|
56
|
+
* `--runtime=runsc` for AMBER/RED plugins and enforces blocking for RED
|
|
57
|
+
* when gVisor is absent.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const runner = new GVisorPluginRunner();
|
|
62
|
+
* const result = await runner.runWithTlp(
|
|
63
|
+
* { image: 'dcyfr-plugin-sandbox:latest', command: ['node', 'dist/index.js'] },
|
|
64
|
+
* 'TLP:AMBER',
|
|
65
|
+
* );
|
|
66
|
+
* console.log(result.runtimeUsed); // 'gvisor' | 'docker'
|
|
67
|
+
* console.log(result.tlpLevel); // 'TLP:AMBER'
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export class GVisorPluginRunner extends DockerPluginRunner {
|
|
71
|
+
// --------------------------------------------------------------------------
|
|
72
|
+
// Public API
|
|
73
|
+
// --------------------------------------------------------------------------
|
|
74
|
+
/**
|
|
75
|
+
* Probe whether the gVisor `runsc` binary is present on this machine.
|
|
76
|
+
*
|
|
77
|
+
* Uses a two-stage lightweight check — no Docker daemon required:
|
|
78
|
+
* 1. `which runsc` — succeeds on most Linux/macOS installations.
|
|
79
|
+
* 2. `runsc --version` — fallback for non-standard PATH configurations.
|
|
80
|
+
*
|
|
81
|
+
* This is faster than DockerPluginRunner.isGVisorAvailable() which spins
|
|
82
|
+
* up a full container and pulls `hello-world`. Use this method for all
|
|
83
|
+
* availability checks before scheduling plugin workloads.
|
|
84
|
+
*/
|
|
85
|
+
async isGVisorAvailable() {
|
|
86
|
+
// Stage 1: which runsc
|
|
87
|
+
try {
|
|
88
|
+
await execFileAsync('which', ['runsc']);
|
|
89
|
+
return { available: true };
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
// Fall through to stage 2
|
|
93
|
+
}
|
|
94
|
+
// Stage 2: runsc --version (handles non-standard PATH setups)
|
|
95
|
+
try {
|
|
96
|
+
await execFileAsync('runsc', ['--version']);
|
|
97
|
+
return { available: true };
|
|
98
|
+
}
|
|
99
|
+
catch (error_) {
|
|
100
|
+
const msg = error_ instanceof Error ? error_.message : String(error_);
|
|
101
|
+
return {
|
|
102
|
+
available: false,
|
|
103
|
+
error: `runsc not found in PATH: ${msg}`,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Execute a plugin with TLP-level-aware runtime selection.
|
|
109
|
+
*
|
|
110
|
+
* Runtime selection table:
|
|
111
|
+
*
|
|
112
|
+
* | TLP Level | gVisor Available | Behaviour |
|
|
113
|
+
* |-------------|------------------|--------------------------------------------|
|
|
114
|
+
* | CLEAR/GREEN | any | Standard Docker (--runtime flag omitted) |
|
|
115
|
+
* | AMBER | yes | gVisor (--runtime=runsc) |
|
|
116
|
+
* | AMBER | no | Docker fallback; warning prepended to stderr |
|
|
117
|
+
* | RED | yes | gVisor (--runtime=runsc) |
|
|
118
|
+
* | RED | no | Throws GVisorRequiredError — BLOCKED |
|
|
119
|
+
*
|
|
120
|
+
* @param config Standard SandboxConfig. The `useGVisor` field is managed
|
|
121
|
+
* automatically and should be omitted by callers.
|
|
122
|
+
* @param tlpLevel Plugin data classification. Defaults to 'TLP:CLEAR'.
|
|
123
|
+
* @returns SandboxResult enriched with `runtimeUsed` and `tlpLevel`.
|
|
124
|
+
* @throws {GVisorRequiredError} When tlpLevel is 'TLP:RED' and gVisor is unavailable.
|
|
125
|
+
*/
|
|
126
|
+
async runWithTlp(config, tlpLevel = 'TLP:CLEAR') {
|
|
127
|
+
const requiresGVisor = tlpLevel === 'TLP:AMBER' || tlpLevel === 'TLP:RED';
|
|
128
|
+
if (!requiresGVisor) {
|
|
129
|
+
// TLP:CLEAR or TLP:GREEN — standard Docker, gVisor not needed
|
|
130
|
+
const result = await this.run({ ...config, useGVisor: false });
|
|
131
|
+
return { ...result, runtimeUsed: 'docker', tlpLevel };
|
|
132
|
+
}
|
|
133
|
+
const probe = await this.isGVisorAvailable();
|
|
134
|
+
if (probe.available) {
|
|
135
|
+
// gVisor present — enable --runtime=runsc
|
|
136
|
+
const result = await this.run({ ...config, useGVisor: true });
|
|
137
|
+
return { ...result, runtimeUsed: 'gvisor', tlpLevel };
|
|
138
|
+
}
|
|
139
|
+
// gVisor unavailable -------------------------------------------------------
|
|
140
|
+
if (tlpLevel === 'TLP:RED') {
|
|
141
|
+
throw new GVisorRequiredError(`TLP:RED plugin requires gVisor isolation but runsc is not available: ` +
|
|
142
|
+
`${probe.error ?? 'unknown reason'}. ` +
|
|
143
|
+
`Install gVisor on your host: https://gvisor.dev/docs/user_guide/install/`);
|
|
144
|
+
}
|
|
145
|
+
// TLP:AMBER fallback — run with standard Docker but prepend a clear warning
|
|
146
|
+
const fallbackResult = await this.run({ ...config, useGVisor: false });
|
|
147
|
+
const warning = `[DCYFR WARNING] gVisor unavailable (${probe.error ?? 'runsc not in PATH'}). ` +
|
|
148
|
+
`TLP:AMBER plugin running in standard Docker — isolation reduced. ` +
|
|
149
|
+
`Install gVisor for full isolation: https://gvisor.dev/docs/user_guide/install/\n`;
|
|
150
|
+
return {
|
|
151
|
+
...fallbackResult,
|
|
152
|
+
runtimeUsed: 'docker',
|
|
153
|
+
tlpLevel,
|
|
154
|
+
stderr: warning + fallbackResult.stderr,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=gvisor-plugin-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gvisor-plugin-runner.js","sourceRoot":"","sources":["../../../../../packages/ai/src/plugins/runtime/gvisor-plugin-runner.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Runtime System
|
|
3
|
+
*
|
|
4
|
+
* Exports the Docker sandbox runner and all associated types.
|
|
5
|
+
*
|
|
6
|
+
* @module plugins/runtime
|
|
7
|
+
*/
|
|
8
|
+
export { DEFAULT_RESOURCE_LIMITS } from './types.js';
|
|
9
|
+
export type { SandboxResourceLimits, SandboxConfig, SandboxResult, DockerProbeResult, GVisorProbeResult, } from './types.js';
|
|
10
|
+
export { DockerPluginRunner, parseDurationMs, normalizeMemory } from './docker-plugin-runner.js';
|
|
11
|
+
export { GVisorPluginRunner, GVisorRequiredError } from './gvisor-plugin-runner.js';
|
|
12
|
+
export type { GVisorSandboxResult } from './gvisor-plugin-runner.js';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/ai/src/plugins/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACpF,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Runtime System
|
|
3
|
+
*
|
|
4
|
+
* Exports the Docker sandbox runner and all associated types.
|
|
5
|
+
*
|
|
6
|
+
* @module plugins/runtime
|
|
7
|
+
*/
|
|
8
|
+
export { DEFAULT_RESOURCE_LIMITS } from './types.js';
|
|
9
|
+
export { DockerPluginRunner, parseDurationMs, normalizeMemory } from './docker-plugin-runner.js';
|
|
10
|
+
export { GVisorPluginRunner, GVisorRequiredError } from './gvisor-plugin-runner.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/ai/src/plugins/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAQrD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Docker Sandbox Runner — Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the plugin runtime isolation layer.
|
|
5
|
+
* Matches the Plugin Runtime Isolation Specification.
|
|
6
|
+
*
|
|
7
|
+
* @module plugins/runtime/types
|
|
8
|
+
* @version 1.0.0
|
|
9
|
+
* @date 2026-02-28
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/
|
|
12
|
+
/** Resource constraints declared by a plugin (or applied as defaults). */
|
|
13
|
+
export interface SandboxResourceLimits {
|
|
14
|
+
/**
|
|
15
|
+
* Maximum memory allocation. Docker `--memory` format.
|
|
16
|
+
* Examples: "512MB", "1GB", "256m"
|
|
17
|
+
* @default "512MB"
|
|
18
|
+
*/
|
|
19
|
+
maxMemory: string;
|
|
20
|
+
/**
|
|
21
|
+
* Maximum CPU share as a fraction of a single core (0.0–∞).
|
|
22
|
+
* Mapped to Docker `--cpus`.
|
|
23
|
+
* @default 0.5
|
|
24
|
+
*/
|
|
25
|
+
maxCpu: number;
|
|
26
|
+
/**
|
|
27
|
+
* Wall-clock execution time limit. Supports "5m", "30s", "1h".
|
|
28
|
+
* Plugin receives SIGTERM at this limit; SIGKILL after 10 seconds more.
|
|
29
|
+
* @default "5m"
|
|
30
|
+
*/
|
|
31
|
+
maxExecutionTime: string;
|
|
32
|
+
/**
|
|
33
|
+
* Maximum temporary disk space for the writable `/tmp` tmpfs mount.
|
|
34
|
+
* Examples: "64MB", "1GB"
|
|
35
|
+
* @default "1GB"
|
|
36
|
+
*/
|
|
37
|
+
maxDiskSpace: string;
|
|
38
|
+
}
|
|
39
|
+
/** Defaults applied when a plugin omits `resourceLimits` fields. */
|
|
40
|
+
export declare const DEFAULT_RESOURCE_LIMITS: Readonly<SandboxResourceLimits>;
|
|
41
|
+
/** Configuration for a single plugin sandbox execution. */
|
|
42
|
+
export interface SandboxConfig {
|
|
43
|
+
/**
|
|
44
|
+
* Docker image to use. Must exist locally or be pullable.
|
|
45
|
+
* Typically `dcyfr-plugin-sandbox:latest` for untrusted plugins.
|
|
46
|
+
*/
|
|
47
|
+
image: string;
|
|
48
|
+
/**
|
|
49
|
+
* Command + arguments to run inside the container.
|
|
50
|
+
* E.g. `["node", "dist/index.js"]`
|
|
51
|
+
*/
|
|
52
|
+
command: string[];
|
|
53
|
+
/**
|
|
54
|
+
* Environment variables injected into the container.
|
|
55
|
+
* Keys/values must not contain secrets unless the plugin
|
|
56
|
+
* has been granted `data.allowSecretAccess`.
|
|
57
|
+
*/
|
|
58
|
+
env?: Record<string, string>;
|
|
59
|
+
/**
|
|
60
|
+
* Whether to permit outbound network access.
|
|
61
|
+
* When false (default), runs with `--network=none`.
|
|
62
|
+
*/
|
|
63
|
+
networkPermitted?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to permit writes to the plugin work directory.
|
|
66
|
+
* When false (default), runs with `--read-only`.
|
|
67
|
+
* A writable `/tmp` tmpfs is always provided.
|
|
68
|
+
*/
|
|
69
|
+
writePermitted?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Host paths to bind-mount as writable volumes inside the container.
|
|
72
|
+
* Only meaningful when `writePermitted` is true.
|
|
73
|
+
* Format: `["/host/path:/container/path"]`
|
|
74
|
+
*/
|
|
75
|
+
writableMounts?: string[];
|
|
76
|
+
/** Resource limits merged over `DEFAULT_RESOURCE_LIMITS`. */
|
|
77
|
+
resourceLimits?: Partial<SandboxResourceLimits>;
|
|
78
|
+
/** Working directory inside the container. Defaults to `/plugin`. */
|
|
79
|
+
workDir?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Use gVisor (runsc) runtime for enhanced isolation.
|
|
82
|
+
* Required for TLP:AMBER/RED plugins. Falls back to standard Docker
|
|
83
|
+
* if gVisor is unavailable.
|
|
84
|
+
*/
|
|
85
|
+
useGVisor?: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** Result returned once a sandboxed plugin finishes (or is killed). */
|
|
88
|
+
export interface SandboxResult {
|
|
89
|
+
/** Process exit code. null if killed before exit. */
|
|
90
|
+
exitCode: number | null;
|
|
91
|
+
/** Captured stdout (UTF-8). */
|
|
92
|
+
stdout: string;
|
|
93
|
+
/** Captured stderr (UTF-8). */
|
|
94
|
+
stderr: string;
|
|
95
|
+
/** True if the container was killed due to the execution time limit. */
|
|
96
|
+
timedOut: boolean;
|
|
97
|
+
/** Auto-generated name used for this container run. */
|
|
98
|
+
containerName: string;
|
|
99
|
+
/** Wall-clock milliseconds from `docker run` spawn to process exit. */
|
|
100
|
+
executionTimeMs: number;
|
|
101
|
+
}
|
|
102
|
+
/** Result of a Docker availability probe. */
|
|
103
|
+
export interface DockerProbeResult {
|
|
104
|
+
available: boolean;
|
|
105
|
+
/** Docker version string, e.g. "Docker version 27.x.y" */
|
|
106
|
+
version?: string;
|
|
107
|
+
/** Human-readable error if Docker is unavailable. */
|
|
108
|
+
error?: string;
|
|
109
|
+
}
|
|
110
|
+
/** Result of a gVisor availability probe. */
|
|
111
|
+
export interface GVisorProbeResult {
|
|
112
|
+
available: boolean;
|
|
113
|
+
error?: string;
|
|
114
|
+
}
|
|
115
|
+
/** Result of a WebAssembly availability probe. */
|
|
116
|
+
export interface WasmProbeResult {
|
|
117
|
+
available: boolean;
|
|
118
|
+
/** Node.js version with WASI support info */
|
|
119
|
+
version?: string;
|
|
120
|
+
/** Human-readable error if WASM/WASI is unavailable */
|
|
121
|
+
error?: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* WebAssembly-specific sandbox configuration
|
|
125
|
+
* Extends base SandboxConfig with WASM linear memory and preopen settings
|
|
126
|
+
*/
|
|
127
|
+
export interface WasmSandboxConfig {
|
|
128
|
+
/** Path to the compiled .wasm file */
|
|
129
|
+
wasmPath: string;
|
|
130
|
+
/** Initial linear memory pages (64KB per page). Default: 256 (16MB) */
|
|
131
|
+
initialMemoryPages?: number;
|
|
132
|
+
/** Maximum linear memory pages (64KB per page). Default: 1024 (64MB) */
|
|
133
|
+
maxMemoryPages?: number;
|
|
134
|
+
/** Filesystem directories to preopen (grant read/write access) */
|
|
135
|
+
preopens?: Record<string, string>;
|
|
136
|
+
/** Arguments passed to the WASM module's main function */
|
|
137
|
+
args?: string[];
|
|
138
|
+
/** Environment variables injected into WASI */
|
|
139
|
+
env?: Record<string, string>;
|
|
140
|
+
/** Resource limits (memory/CPU/time) */
|
|
141
|
+
resourceLimits?: Partial<SandboxResourceLimits>;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/ai/src/plugins/runtime/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,oEAAoE;AACpE,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,qBAAqB,CAKnE,CAAC;AAMF,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B,6DAA6D;IAC7D,cAAc,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAEhD,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAMD,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,QAAQ,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,eAAe,EAAE,MAAM,CAAC;CACzB;AAMD,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAKD,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,wCAAwC;IACxC,cAAc,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACjD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Docker Sandbox Runner — Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the plugin runtime isolation layer.
|
|
5
|
+
* Matches the Plugin Runtime Isolation Specification.
|
|
6
|
+
*
|
|
7
|
+
* @module plugins/runtime/types
|
|
8
|
+
* @version 1.0.0
|
|
9
|
+
* @date 2026-02-28
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/
|
|
12
|
+
/** Defaults applied when a plugin omits `resourceLimits` fields. */
|
|
13
|
+
export const DEFAULT_RESOURCE_LIMITS = {
|
|
14
|
+
maxMemory: '512MB',
|
|
15
|
+
maxCpu: 0.5,
|
|
16
|
+
maxExecutionTime: '5m',
|
|
17
|
+
maxDiskSpace: '1GB',
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../packages/ai/src/plugins/runtime/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAqCH,oEAAoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAoC;IACtE,SAAS,EAAE,OAAO;IAClB,MAAM,EAAE,GAAG;IACX,gBAAgB,EAAE,IAAI;IACtB,YAAY,EAAE,KAAK;CACpB,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebAssembly Plugin Runner
|
|
3
|
+
*
|
|
4
|
+
* Executes plugins compiled to WebAssembly using WASI (WebAssembly System Interface).
|
|
5
|
+
* Provides near-native performance with configurable linear memory limits,
|
|
6
|
+
* filesystem preopening, and environment variable injection.
|
|
7
|
+
*
|
|
8
|
+
* Specification: Plugin Runtime Isolation Specification (plugin-runtime-isolation)
|
|
9
|
+
*
|
|
10
|
+
* @module plugins/runtime/wasm-plugin-runner
|
|
11
|
+
* @version 1.0.0
|
|
12
|
+
* @date 2026-03-01
|
|
13
|
+
* @license MIT
|
|
14
|
+
*/
|
|
15
|
+
declare namespace WebAssembly {
|
|
16
|
+
type BufferSrc = ArrayBufferLike | ArrayBufferView;
|
|
17
|
+
class Module {
|
|
18
|
+
constructor(bytes: BufferSrc);
|
|
19
|
+
}
|
|
20
|
+
class Instance {
|
|
21
|
+
constructor(module: Module, importObject?: Record<string, Record<string, unknown>>);
|
|
22
|
+
readonly exports: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
class Memory {
|
|
25
|
+
constructor(descriptor: {
|
|
26
|
+
initial: number;
|
|
27
|
+
maximum?: number;
|
|
28
|
+
shared?: boolean;
|
|
29
|
+
});
|
|
30
|
+
readonly buffer: ArrayBuffer;
|
|
31
|
+
}
|
|
32
|
+
function compile(bytes: BufferSrc): Promise<Module>;
|
|
33
|
+
function instantiate(module: Module, importObject?: Record<string, Record<string, unknown>>): Promise<Instance>;
|
|
34
|
+
}
|
|
35
|
+
import { WASI } from 'node:wasi';
|
|
36
|
+
import type { SandboxConfig, SandboxResult, WasmProbeResult } from './types.js';
|
|
37
|
+
export interface WasmModuleInstance {
|
|
38
|
+
/** Compiled WebAssembly module */
|
|
39
|
+
module: WebAssembly.Module;
|
|
40
|
+
/** Instantiated WASM instance with WASI imports */
|
|
41
|
+
instance: WebAssembly.Instance;
|
|
42
|
+
/** WASI interface for system calls */
|
|
43
|
+
wasi: WASI;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Configuration for WebAssembly plugin execution
|
|
47
|
+
* Extends the base SandboxConfig with WASM-specific settings
|
|
48
|
+
*/
|
|
49
|
+
export interface WasmExecutionConfig extends Omit<SandboxConfig, 'image' | 'command'> {
|
|
50
|
+
/** Path to the compiled .wasm file */
|
|
51
|
+
wasmPath: string;
|
|
52
|
+
/** Initial linear memory pages (64KB per page). Default: 256 (16MB) */
|
|
53
|
+
initialMemoryPages?: number;
|
|
54
|
+
/** Maximum linear memory pages (64KB per page). Default: 1024 (64MB) */
|
|
55
|
+
maxMemoryPages?: number;
|
|
56
|
+
/** Filesystem directories to preopen (grant read/write access) */
|
|
57
|
+
preopens?: Record<string, string>;
|
|
58
|
+
/** Arguments passed to the WASM module's main function */
|
|
59
|
+
args?: string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* WebAssembly Plugin Runner
|
|
63
|
+
*
|
|
64
|
+
* Executes plugins compiled to WebAssembly with WASI support.
|
|
65
|
+
* Provides:
|
|
66
|
+
* - Linear memory limits (configurable initial/max pages)
|
|
67
|
+
* - Filesystem access control via preopens
|
|
68
|
+
* - Environment variable injection
|
|
69
|
+
* - Execution time limits with timeout
|
|
70
|
+
* - Isolated execution (no network access by default)
|
|
71
|
+
*
|
|
72
|
+
* Performance Target: <5% overhead vs native execution
|
|
73
|
+
*/
|
|
74
|
+
export declare class WasmPluginRunner {
|
|
75
|
+
/** Check if WebAssembly support is available in the current Node.js version */
|
|
76
|
+
static probe(): Promise<WasmProbeResult>;
|
|
77
|
+
/**
|
|
78
|
+
* Load and compile a WebAssembly module from disk
|
|
79
|
+
*
|
|
80
|
+
* @param config - WASM execution configuration
|
|
81
|
+
* @returns Compiled module instance with WASI
|
|
82
|
+
*/
|
|
83
|
+
private static loadModule;
|
|
84
|
+
/**
|
|
85
|
+
* Execute a WebAssembly plugin with resource limits and timeout
|
|
86
|
+
*
|
|
87
|
+
* @param config - WASM execution configuration
|
|
88
|
+
* @returns Execution result with stdout, stderr, exit code, and timing
|
|
89
|
+
*/
|
|
90
|
+
static run(config: WasmExecutionConfig): Promise<SandboxResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Create a WASM execution config from a standard SandboxConfig
|
|
93
|
+
*
|
|
94
|
+
* This adapter allows using WasmPluginRunner with the same config
|
|
95
|
+
* interface as DockerPluginRunner.
|
|
96
|
+
*
|
|
97
|
+
* @param config - Standard sandbox config
|
|
98
|
+
* @param wasmPath - Path to the compiled .wasm file
|
|
99
|
+
* @returns WASM-specific execution config
|
|
100
|
+
*/
|
|
101
|
+
static fromSandboxConfig(config: SandboxConfig, wasmPath: string): WasmExecutionConfig;
|
|
102
|
+
}
|
|
103
|
+
export type { WasmProbeResult, WasmSandboxConfig } from './types.js';
|
|
104
|
+
//# sourceMappingURL=wasm-plugin-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasm-plugin-runner.d.ts","sourceRoot":"","sources":["../../../../../packages/ai/src/plugins/runtime/wasm-plugin-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,OAAO,WAAW,WAAW,CAAC;IAC5B,KAAK,SAAS,GAAG,eAAe,GAAG,eAAe,CAAC;IAEnD,MAAM,MAAM;oBACE,KAAK,EAAE,SAAS;KAC7B;IACD,MAAM,QAAQ;oBAEV,MAAM,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAExD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC3C;IACD,MAAM,MAAM;oBACE,UAAU,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,OAAO,CAAA;SAAE;QAC/E,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;KAC9B;IACD,SAAS,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpD,SAAS,WAAW,CAClB,MAAM,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACrD,OAAO,CAAC,QAAQ,CAAC,CAAC;CACtB;AAED,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,eAAe,EAChB,MAAM,YAAY,CAAC;AAMpB,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC;IAC3B,mDAAmD;IACnD,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC;IAC/B,sCAAsC;IACtC,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC;IACnF,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AA2ED;;;;;;;;;;;;GAYG;AACH,qBAAa,gBAAgB;IAC3B,+EAA+E;WAClE,KAAK,IAAI,OAAO,CAAC,eAAe,CAAC;IAyC9C;;;;;OAKG;mBACkB,UAAU;IAsC/B;;;;;OAKG;WACU,GAAG,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;IA4GrE;;;;;;;;;OASG;IACH,MAAM,CAAC,iBAAiB,CACtB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,MAAM,GACf,mBAAmB;CAmBvB;AAOD,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|