@dcyfr/ai 1.0.4 → 2.1.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/CHANGELOG.md +106 -0
- package/README.md +381 -9
- package/dist/ai/agents/agent-loader.d.ts +12 -0
- package/dist/ai/agents/agent-loader.d.ts.map +1 -1
- package/dist/ai/agents/agent-loader.js +74 -65
- package/dist/ai/agents/agent-loader.js.map +1 -1
- package/dist/ai/agents/agent-registry.d.ts +2 -0
- package/dist/ai/agents/agent-registry.d.ts.map +1 -1
- package/dist/ai/agents/agent-registry.js +15 -14
- package/dist/ai/agents/agent-registry.js.map +1 -1
- package/dist/ai/agents/agent-router.d.ts +20 -5
- package/dist/ai/agents/agent-router.d.ts.map +1 -1
- package/dist/ai/agents/agent-router.js +89 -43
- package/dist/ai/agents/agent-router.js.map +1 -1
- package/dist/ai/agents/index.d.ts +6 -1
- package/dist/ai/agents/index.d.ts.map +1 -1
- package/dist/ai/agents/index.js +9 -3
- package/dist/ai/agents/index.js.map +1 -1
- package/dist/ai/agents/instruction-template.d.ts +45 -0
- package/dist/ai/agents/instruction-template.d.ts.map +1 -0
- package/dist/ai/agents/instruction-template.js +197 -0
- package/dist/ai/agents/instruction-template.js.map +1 -0
- package/dist/ai/agents/persona-resolver.d.ts +90 -0
- package/dist/ai/agents/persona-resolver.d.ts.map +1 -0
- package/dist/ai/agents/persona-resolver.js +121 -0
- package/dist/ai/agents/persona-resolver.js.map +1 -0
- package/dist/ai/agents/schema.d.ts +166 -0
- package/dist/ai/agents/schema.d.ts.map +1 -0
- package/dist/ai/agents/schema.js +94 -0
- package/dist/ai/agents/schema.js.map +1 -0
- package/dist/ai/agents/types.d.ts +102 -0
- package/dist/ai/agents/types.d.ts.map +1 -1
- package/dist/ai/agents-builtin/architecture/index.js +3 -3
- package/dist/ai/agents-builtin/content/index.js +1 -1
- package/dist/ai/agents-builtin/data/index.js +1 -1
- package/dist/ai/agents-builtin/development/index.js +4 -4
- package/dist/ai/agents-builtin/devops/index.js +1 -1
- package/dist/ai/agents-builtin/index.js +33 -33
- package/dist/ai/agents-builtin/performance/index.js +1 -1
- package/dist/ai/agents-builtin/research/index.js +1 -1
- package/dist/ai/agents-builtin/security/index.js +1 -1
- package/dist/ai/agents-builtin/testing/index.js +2 -2
- package/dist/ai/config/loader.d.ts.map +1 -1
- package/dist/ai/config/loader.js +6 -3
- package/dist/ai/config/loader.js.map +1 -1
- package/dist/ai/config/schema.d.ts +242 -1156
- package/dist/ai/config/schema.d.ts.map +1 -1
- package/dist/ai/config/schema.js +69 -20
- package/dist/ai/config/schema.js.map +1 -1
- package/dist/ai/core/provider-registry.d.ts +32 -0
- package/dist/ai/core/provider-registry.d.ts.map +1 -1
- package/dist/ai/core/provider-registry.js +189 -14
- package/dist/ai/core/provider-registry.js.map +1 -1
- package/dist/ai/core/telemetry-engine.d.ts +26 -0
- package/dist/ai/core/telemetry-engine.d.ts.map +1 -1
- package/dist/ai/core/telemetry-engine.js +81 -1
- package/dist/ai/core/telemetry-engine.js.map +1 -1
- package/dist/ai/delegation/agent-registry.d.ts +143 -0
- package/dist/ai/delegation/agent-registry.d.ts.map +1 -0
- package/dist/ai/delegation/agent-registry.js +231 -0
- package/dist/ai/delegation/agent-registry.js.map +1 -0
- package/dist/ai/delegation/blast-radius-tracker.d.ts +65 -0
- package/dist/ai/delegation/blast-radius-tracker.d.ts.map +1 -0
- package/dist/ai/delegation/blast-radius-tracker.js +81 -0
- package/dist/ai/delegation/blast-radius-tracker.js.map +1 -0
- package/dist/ai/delegation/capability-bootstrap.d.ts +40 -0
- package/dist/ai/delegation/capability-bootstrap.d.ts.map +1 -0
- package/dist/ai/delegation/capability-bootstrap.js +431 -0
- package/dist/ai/delegation/capability-bootstrap.js.map +1 -0
- package/dist/ai/delegation/capability-registry.d.ts +81 -0
- package/dist/ai/delegation/capability-registry.d.ts.map +1 -0
- package/dist/ai/delegation/capability-registry.js +339 -0
- package/dist/ai/delegation/capability-registry.js.map +1 -0
- package/dist/ai/delegation/chain-tracker.d.ts +152 -0
- package/dist/ai/delegation/chain-tracker.d.ts.map +1 -0
- package/dist/ai/delegation/chain-tracker.js +336 -0
- package/dist/ai/delegation/chain-tracker.js.map +1 -0
- package/dist/ai/delegation/circuit-breaker.d.ts +59 -0
- package/dist/ai/delegation/circuit-breaker.d.ts.map +1 -0
- package/dist/ai/delegation/circuit-breaker.js +153 -0
- package/dist/ai/delegation/circuit-breaker.js.map +1 -0
- package/dist/ai/delegation/contract-manager.d.ts +415 -0
- package/dist/ai/delegation/contract-manager.d.ts.map +1 -0
- package/dist/ai/delegation/contract-manager.js +1258 -0
- package/dist/ai/delegation/contract-manager.js.map +1 -0
- package/dist/ai/delegation/delegation-manager.d.ts +505 -0
- package/dist/ai/delegation/delegation-manager.d.ts.map +1 -0
- package/dist/ai/delegation/delegation-manager.js +773 -0
- package/dist/ai/delegation/delegation-manager.js.map +1 -0
- package/dist/ai/delegation/event-schemas.d.ts +101 -0
- package/dist/ai/delegation/event-schemas.d.ts.map +1 -0
- package/dist/ai/delegation/event-schemas.js +59 -0
- package/dist/ai/delegation/event-schemas.js.map +1 -0
- package/dist/ai/delegation/execution-mode-dashboard.d.ts +109 -0
- package/dist/ai/delegation/execution-mode-dashboard.d.ts.map +1 -0
- package/dist/ai/delegation/execution-mode-dashboard.js +167 -0
- package/dist/ai/delegation/execution-mode-dashboard.js.map +1 -0
- package/dist/ai/delegation/feature-flags.d.ts +191 -0
- package/dist/ai/delegation/feature-flags.d.ts.map +1 -0
- package/dist/ai/delegation/feature-flags.js +332 -0
- package/dist/ai/delegation/feature-flags.js.map +1 -0
- package/dist/ai/delegation/index.d.ts +51 -0
- package/dist/ai/delegation/index.d.ts.map +1 -0
- package/dist/ai/delegation/index.js +39 -0
- package/dist/ai/delegation/index.js.map +1 -0
- package/dist/ai/delegation/middleware/chain-depth-middleware.d.ts +39 -0
- package/dist/ai/delegation/middleware/chain-depth-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/chain-depth-middleware.js +77 -0
- package/dist/ai/delegation/middleware/chain-depth-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/chain-tracker-middleware.d.ts +46 -0
- package/dist/ai/delegation/middleware/chain-tracker-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/chain-tracker-middleware.js +89 -0
- package/dist/ai/delegation/middleware/chain-tracker-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/content-policy-middleware.d.ts +31 -0
- package/dist/ai/delegation/middleware/content-policy-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/content-policy-middleware.js +82 -0
- package/dist/ai/delegation/middleware/content-policy-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/feature-flag-middleware.d.ts +46 -0
- package/dist/ai/delegation/middleware/feature-flag-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/feature-flag-middleware.js +59 -0
- package/dist/ai/delegation/middleware/feature-flag-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/identity-middleware.d.ts +23 -0
- package/dist/ai/delegation/middleware/identity-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/identity-middleware.js +64 -0
- package/dist/ai/delegation/middleware/identity-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/permissions-middleware.d.ts +48 -0
- package/dist/ai/delegation/middleware/permissions-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/permissions-middleware.js +107 -0
- package/dist/ai/delegation/middleware/permissions-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/rate-limiter-middleware.d.ts +38 -0
- package/dist/ai/delegation/middleware/rate-limiter-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/rate-limiter-middleware.js +65 -0
- package/dist/ai/delegation/middleware/rate-limiter-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/reputation-middleware.d.ts +39 -0
- package/dist/ai/delegation/middleware/reputation-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/reputation-middleware.js +75 -0
- package/dist/ai/delegation/middleware/reputation-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/resource-limiter-middleware.d.ts +52 -0
- package/dist/ai/delegation/middleware/resource-limiter-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/resource-limiter-middleware.js +112 -0
- package/dist/ai/delegation/middleware/resource-limiter-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/threat-validator-middleware.d.ts +23 -0
- package/dist/ai/delegation/middleware/threat-validator-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/threat-validator-middleware.js +83 -0
- package/dist/ai/delegation/middleware/threat-validator-middleware.js.map +1 -0
- package/dist/ai/delegation/middleware/tlp-middleware.d.ts +23 -0
- package/dist/ai/delegation/middleware/tlp-middleware.d.ts.map +1 -0
- package/dist/ai/delegation/middleware/tlp-middleware.js +59 -0
- package/dist/ai/delegation/middleware/tlp-middleware.js.map +1 -0
- package/dist/ai/delegation/monitoring.d.ts +298 -0
- package/dist/ai/delegation/monitoring.d.ts.map +1 -0
- package/dist/ai/delegation/monitoring.js +584 -0
- package/dist/ai/delegation/monitoring.js.map +1 -0
- package/dist/ai/delegation/security-middleware-chain.d.ts +71 -0
- package/dist/ai/delegation/security-middleware-chain.d.ts.map +1 -0
- package/dist/ai/delegation/security-middleware-chain.js +163 -0
- package/dist/ai/delegation/security-middleware-chain.js.map +1 -0
- package/dist/ai/delegation/session-checkpoint.d.ts +77 -0
- package/dist/ai/delegation/session-checkpoint.d.ts.map +1 -0
- package/dist/ai/delegation/session-checkpoint.js +131 -0
- package/dist/ai/delegation/session-checkpoint.js.map +1 -0
- package/dist/ai/delegation/session-manager.d.ts +131 -0
- package/dist/ai/delegation/session-manager.d.ts.map +1 -0
- package/dist/ai/delegation/session-manager.js +243 -0
- package/dist/ai/delegation/session-manager.js.map +1 -0
- package/dist/ai/delegation/session-queue.d.ts +95 -0
- package/dist/ai/delegation/session-queue.d.ts.map +1 -0
- package/dist/ai/delegation/session-queue.js +136 -0
- package/dist/ai/delegation/session-queue.js.map +1 -0
- package/dist/ai/delegation/timeout-watchdog.d.ts +60 -0
- package/dist/ai/delegation/timeout-watchdog.d.ts.map +1 -0
- package/dist/ai/delegation/timeout-watchdog.js +100 -0
- package/dist/ai/delegation/timeout-watchdog.js.map +1 -0
- package/dist/ai/examples/integration-demo.d.ts +27 -0
- package/dist/ai/examples/integration-demo.d.ts.map +1 -0
- package/dist/ai/examples/integration-demo.js +536 -0
- package/dist/ai/examples/integration-demo.js.map +1 -0
- package/dist/ai/index.d.ts +25 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +31 -11
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/mcp/servers/analytics/index.js +67 -11
- 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/content-manager/index.js +50 -4
- package/dist/ai/mcp/servers/content-manager/index.js.map +1 -1
- package/dist/ai/mcp/servers/delegation-monitor/index.d.ts +36 -0
- package/dist/ai/mcp/servers/delegation-monitor/index.d.ts.map +1 -0
- package/dist/ai/mcp/servers/delegation-monitor/index.js +757 -0
- package/dist/ai/mcp/servers/delegation-monitor/index.js.map +1 -0
- package/dist/ai/mcp/servers/design-tokens/index.d.ts.map +1 -1
- package/dist/ai/mcp/servers/design-tokens/index.js +62 -39
- package/dist/ai/mcp/servers/design-tokens/index.js.map +1 -1
- package/dist/ai/mcp/servers/promptintel/index.js +15 -3
- 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 +3 -1
- 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 +54 -47
- package/dist/ai/mcp/servers/shared/redis-client.js.map +1 -1
- package/dist/ai/mcp/servers/shared/types.d.ts +9 -0
- package/dist/ai/mcp/servers/shared/types.d.ts.map +1 -1
- package/dist/ai/mcp/servers/shared/utils.d.ts +9 -1
- package/dist/ai/mcp/servers/shared/utils.d.ts.map +1 -1
- package/dist/ai/mcp/servers/shared/utils.js +52 -2
- package/dist/ai/mcp/servers/shared/utils.js.map +1 -1
- package/dist/ai/memory/config.d.ts +18 -3
- package/dist/ai/memory/config.d.ts.map +1 -1
- package/dist/ai/memory/config.js +61 -15
- package/dist/ai/memory/config.js.map +1 -1
- package/dist/ai/memory/dcyfr-memory.d.ts +4 -0
- package/dist/ai/memory/dcyfr-memory.d.ts.map +1 -1
- package/dist/ai/memory/dcyfr-memory.js +44 -6
- package/dist/ai/memory/dcyfr-memory.js.map +1 -1
- package/dist/ai/memory/mem0-client.d.ts.map +1 -1
- package/dist/ai/memory/mem0-client.js +53 -14
- package/dist/ai/memory/mem0-client.js.map +1 -1
- package/dist/ai/permissions/attenuation-engine.d.ts +159 -0
- package/dist/ai/permissions/attenuation-engine.d.ts.map +1 -0
- package/dist/ai/permissions/attenuation-engine.js +511 -0
- package/dist/ai/permissions/attenuation-engine.js.map +1 -0
- package/dist/ai/plugins/plugin-loader.d.ts +4 -0
- package/dist/ai/plugins/plugin-loader.d.ts.map +1 -1
- package/dist/ai/plugins/plugin-loader.js +28 -28
- package/dist/ai/plugins/plugin-loader.js.map +1 -1
- package/dist/ai/reputation/execution-mode-reputation.d.ts +104 -0
- package/dist/ai/reputation/execution-mode-reputation.d.ts.map +1 -0
- package/dist/ai/reputation/execution-mode-reputation.js +142 -0
- package/dist/ai/reputation/execution-mode-reputation.js.map +1 -0
- package/dist/ai/reputation/reputation-engine.d.ts +204 -0
- package/dist/ai/reputation/reputation-engine.d.ts.map +1 -0
- package/dist/ai/reputation/reputation-engine.js +426 -0
- package/dist/ai/reputation/reputation-engine.js.map +1 -0
- package/dist/ai/runtime/agent-runtime.d.ts +193 -0
- package/dist/ai/runtime/agent-runtime.d.ts.map +1 -0
- package/dist/ai/runtime/agent-runtime.js +1009 -0
- package/dist/ai/runtime/agent-runtime.js.map +1 -0
- package/dist/ai/runtime/index.d.ts +11 -0
- package/dist/ai/runtime/index.d.ts.map +1 -0
- package/dist/ai/runtime/index.js +9 -0
- package/dist/ai/runtime/index.js.map +1 -0
- package/dist/ai/runtime/telemetry-schema.d.ts +192 -0
- package/dist/ai/runtime/telemetry-schema.d.ts.map +1 -0
- package/dist/ai/runtime/telemetry-schema.js +200 -0
- package/dist/ai/runtime/telemetry-schema.js.map +1 -0
- package/dist/ai/runtime/types.d.ts +236 -0
- package/dist/ai/runtime/types.d.ts.map +1 -0
- package/dist/ai/runtime/types.js +10 -0
- package/dist/ai/runtime/types.js.map +1 -0
- package/dist/ai/src/batch-processor.d.ts +298 -0
- package/dist/ai/src/batch-processor.d.ts.map +1 -0
- package/dist/ai/src/batch-processor.js +520 -0
- package/dist/ai/src/batch-processor.js.map +1 -0
- package/dist/ai/src/capability-bootstrap.d.ts +222 -0
- package/dist/ai/src/capability-bootstrap.d.ts.map +1 -0
- package/dist/ai/src/capability-bootstrap.js +421 -0
- package/dist/ai/src/capability-bootstrap.js.map +1 -0
- package/dist/ai/src/capability-manifest-generator.d.ts +52 -0
- package/dist/ai/src/capability-manifest-generator.d.ts.map +1 -0
- package/dist/ai/src/capability-manifest-generator.js +691 -0
- package/dist/ai/src/capability-manifest-generator.js.map +1 -0
- package/dist/ai/src/capability-registry.d.ts +157 -0
- package/dist/ai/src/capability-registry.d.ts.map +1 -0
- package/dist/ai/src/capability-registry.js +577 -0
- package/dist/ai/src/capability-registry.js.map +1 -0
- package/dist/ai/src/cli/telemetry-dashboard.d.ts +132 -0
- package/dist/ai/src/cli/telemetry-dashboard.d.ts.map +1 -0
- package/dist/ai/src/cli/telemetry-dashboard.js +565 -0
- package/dist/ai/src/cli/telemetry-dashboard.js.map +1 -0
- package/dist/ai/src/delegation/feature-flags.d.ts +213 -0
- package/dist/ai/src/delegation/feature-flags.d.ts.map +1 -0
- package/dist/ai/src/delegation/feature-flags.js +395 -0
- package/dist/ai/src/delegation/feature-flags.js.map +1 -0
- package/dist/ai/src/delegation/liability-firebreak.d.ts +303 -0
- package/dist/ai/src/delegation/liability-firebreak.d.ts.map +1 -0
- package/dist/ai/src/delegation/liability-firebreak.js +643 -0
- package/dist/ai/src/delegation/liability-firebreak.js.map +1 -0
- package/dist/ai/src/delegation/security-threat-model.d.ts +171 -0
- package/dist/ai/src/delegation/security-threat-model.d.ts.map +1 -0
- package/dist/ai/src/delegation/security-threat-model.js +723 -0
- package/dist/ai/src/delegation/security-threat-model.js.map +1 -0
- package/dist/ai/src/delegation/tlp-enforcement.d.ts +146 -0
- package/dist/ai/src/delegation/tlp-enforcement.d.ts.map +1 -0
- package/dist/ai/src/delegation/tlp-enforcement.js +382 -0
- package/dist/ai/src/delegation/tlp-enforcement.js.map +1 -0
- package/dist/ai/src/delegation-capability-integration.d.ts +154 -0
- package/dist/ai/src/delegation-capability-integration.d.ts.map +1 -0
- package/dist/ai/src/delegation-capability-integration.js +351 -0
- package/dist/ai/src/delegation-capability-integration.js.map +1 -0
- package/dist/ai/src/end-to-end-workflow-orchestrator.d.ts +325 -0
- package/dist/ai/src/end-to-end-workflow-orchestrator.d.ts.map +1 -0
- package/dist/ai/src/end-to-end-workflow-orchestrator.js +801 -0
- package/dist/ai/src/end-to-end-workflow-orchestrator.js.map +1 -0
- package/dist/ai/src/enhanced-capability-detection.d.ts +237 -0
- package/dist/ai/src/enhanced-capability-detection.d.ts.map +1 -0
- package/dist/ai/src/enhanced-capability-detection.js +448 -0
- package/dist/ai/src/enhanced-capability-detection.js.map +1 -0
- package/dist/ai/src/intelligent-cache-manager.d.ts +327 -0
- package/dist/ai/src/intelligent-cache-manager.d.ts.map +1 -0
- package/dist/ai/src/intelligent-cache-manager.js +634 -0
- package/dist/ai/src/intelligent-cache-manager.js.map +1 -0
- package/dist/ai/src/mcp-auto-configuration.d.ts +232 -0
- package/dist/ai/src/mcp-auto-configuration.d.ts.map +1 -0
- package/dist/ai/src/mcp-auto-configuration.js +445 -0
- package/dist/ai/src/mcp-auto-configuration.js.map +1 -0
- package/dist/ai/src/performance-profiler.d.ts +351 -0
- package/dist/ai/src/performance-profiler.d.ts.map +1 -0
- package/dist/ai/src/performance-profiler.js +475 -0
- package/dist/ai/src/performance-profiler.js.map +1 -0
- package/dist/ai/src/personas/hooks/before-llm-call.d.ts +96 -0
- package/dist/ai/src/personas/hooks/before-llm-call.d.ts.map +1 -0
- package/dist/ai/src/personas/hooks/before-llm-call.js +83 -0
- package/dist/ai/src/personas/hooks/before-llm-call.js.map +1 -0
- package/dist/ai/src/personas/index.d.ts +10 -0
- package/dist/ai/src/personas/index.d.ts.map +1 -0
- package/dist/ai/src/personas/index.js +10 -0
- package/dist/ai/src/personas/index.js.map +1 -0
- package/dist/ai/src/personas/persona-loader.d.ts +42 -0
- package/dist/ai/src/personas/persona-loader.d.ts.map +1 -0
- package/dist/ai/src/personas/persona-loader.js +162 -0
- package/dist/ai/src/personas/persona-loader.js.map +1 -0
- package/dist/ai/src/personas/types.d.ts +199 -0
- package/dist/ai/src/personas/types.d.ts.map +1 -0
- package/dist/ai/src/personas/types.js +7 -0
- package/dist/ai/src/personas/types.js.map +1 -0
- package/dist/ai/src/personas/voice-resolver.d.ts +40 -0
- package/dist/ai/src/personas/voice-resolver.d.ts.map +1 -0
- package/dist/ai/src/personas/voice-resolver.js +201 -0
- package/dist/ai/src/personas/voice-resolver.js.map +1 -0
- package/dist/ai/src/resource-monitor.d.ts +311 -0
- package/dist/ai/src/resource-monitor.d.ts.map +1 -0
- package/dist/ai/src/resource-monitor.js +475 -0
- package/dist/ai/src/resource-monitor.js.map +1 -0
- package/dist/ai/src/runtime/agent-runtime.d.ts +340 -0
- package/dist/ai/src/runtime/agent-runtime.d.ts.map +1 -0
- package/dist/ai/src/runtime/agent-runtime.js +1084 -0
- package/dist/ai/src/runtime/agent-runtime.js.map +1 -0
- package/dist/ai/src/telemetry/delegation-telemetry.d.ts +287 -0
- package/dist/ai/src/telemetry/delegation-telemetry.d.ts.map +1 -0
- package/dist/ai/src/telemetry/delegation-telemetry.js +389 -0
- package/dist/ai/src/telemetry/delegation-telemetry.js.map +1 -0
- package/dist/ai/src/telemetry/index.d.ts +48 -0
- package/dist/ai/src/telemetry/index.d.ts.map +1 -0
- package/dist/ai/src/telemetry/index.js +48 -0
- package/dist/ai/src/telemetry/index.js.map +1 -0
- package/dist/ai/src/telemetry/runtime-telemetry-integration.d.ts +67 -0
- package/dist/ai/src/telemetry/runtime-telemetry-integration.d.ts.map +1 -0
- package/dist/ai/src/telemetry/runtime-telemetry-integration.js +415 -0
- package/dist/ai/src/telemetry/runtime-telemetry-integration.js.map +1 -0
- package/dist/ai/src/telemetry/telemetry-utils.d.ts +119 -0
- package/dist/ai/src/telemetry/telemetry-utils.d.ts.map +1 -0
- package/dist/ai/src/telemetry/telemetry-utils.js +250 -0
- package/dist/ai/src/telemetry/telemetry-utils.js.map +1 -0
- package/dist/ai/src/types/agent-capabilities.d.ts +227 -0
- package/dist/ai/src/types/agent-capabilities.d.ts.map +1 -0
- package/dist/ai/src/types/agent-capabilities.js +11 -0
- package/dist/ai/src/types/agent-capabilities.js.map +1 -0
- package/dist/ai/src/types/context-verification.d.ts +158 -0
- package/dist/ai/src/types/context-verification.d.ts.map +1 -0
- package/dist/ai/src/types/context-verification.js +73 -0
- package/dist/ai/src/types/context-verification.js.map +1 -0
- package/dist/ai/src/types/delegation-contracts.d.ts +296 -0
- package/dist/ai/src/types/delegation-contracts.d.ts.map +1 -0
- package/dist/ai/src/types/delegation-contracts.js +17 -0
- package/dist/ai/src/types/delegation-contracts.js.map +1 -0
- package/dist/ai/src/validation-pipeline-integration.d.ts +266 -0
- package/dist/ai/src/validation-pipeline-integration.d.ts.map +1 -0
- package/dist/ai/src/validation-pipeline-integration.js +695 -0
- package/dist/ai/src/validation-pipeline-integration.js.map +1 -0
- package/dist/ai/src/verification/multi-modal-formatters.d.ts +57 -0
- package/dist/ai/src/verification/multi-modal-formatters.d.ts.map +1 -0
- package/dist/ai/src/verification/multi-modal-formatters.js +655 -0
- package/dist/ai/src/verification/multi-modal-formatters.js.map +1 -0
- package/dist/ai/src/verification/output-formatter.d.ts +186 -0
- package/dist/ai/src/verification/output-formatter.d.ts.map +1 -0
- package/dist/ai/src/verification/output-formatter.js +296 -0
- package/dist/ai/src/verification/output-formatter.js.map +1 -0
- package/dist/ai/src/verification/parser-integration.d.ts +137 -0
- package/dist/ai/src/verification/parser-integration.d.ts.map +1 -0
- package/dist/ai/src/verification/parser-integration.js +273 -0
- package/dist/ai/src/verification/parser-integration.js.map +1 -0
- package/dist/ai/types/agent-capabilities.d.ts +387 -0
- package/dist/ai/types/agent-capabilities.d.ts.map +1 -0
- package/dist/ai/types/agent-capabilities.js +32 -0
- package/dist/ai/types/agent-capabilities.js.map +1 -0
- package/dist/ai/types/delegation-contracts.d.ts +291 -0
- package/dist/ai/types/delegation-contracts.d.ts.map +1 -0
- package/dist/ai/types/delegation-contracts.js +14 -0
- package/dist/ai/types/delegation-contracts.js.map +1 -0
- package/dist/ai/types/index.d.ts +4 -1
- package/dist/ai/types/index.d.ts.map +1 -1
- package/dist/ai/types/index.js +4 -1
- package/dist/ai/types/index.js.map +1 -1
- package/dist/ai/types/permission-tokens.d.ts +365 -0
- package/dist/ai/types/permission-tokens.d.ts.map +1 -0
- package/dist/ai/types/permission-tokens.js +13 -0
- package/dist/ai/types/permission-tokens.js.map +1 -0
- package/dist/ai/types/security-middleware.d.ts +130 -0
- package/dist/ai/types/security-middleware.d.ts.map +1 -0
- package/dist/ai/types/security-middleware.js +13 -0
- package/dist/ai/types/security-middleware.js.map +1 -0
- package/dist/ai/utils/storage.d.ts.map +1 -1
- package/dist/ai/utils/storage.js +6 -3
- package/dist/ai/utils/storage.js.map +1 -1
- package/dist/ai/validation/validation-framework.js +1 -1
- package/dist/ai/verification/policy-framework.d.ts +161 -0
- package/dist/ai/verification/policy-framework.d.ts.map +1 -0
- package/dist/ai/verification/policy-framework.js +436 -0
- package/dist/ai/verification/policy-framework.js.map +1 -0
- package/package.json +35 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,111 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`7660a35`](https://github.com/dcyfr/dcyfr-ai/commit/7660a35224e577cd61ec002949ea0328c5d67891) Thanks [@dcyfr](https://github.com/dcyfr)! - Delegation framework improvements
|
|
8
|
+
|
|
9
|
+
- Fixed 584 TypeScript errors to 0 across the workspace
|
|
10
|
+
- Added SQLite-based delegation contract persistence with better-sqlite3
|
|
11
|
+
- Implemented delegation telemetry module for monitoring agent performance
|
|
12
|
+
- Enhanced capability registry with bulk operations and improved search
|
|
13
|
+
- Achieved 75.3% delegation test pass rate (332/441 tests passing)
|
|
14
|
+
- Added comprehensive delegation documentation and examples
|
|
15
|
+
|
|
16
|
+
This represents a major stability and functionality improvement to the delegation framework.
|
|
17
|
+
|
|
18
|
+
- [`45e3e87`](https://github.com/dcyfr/dcyfr-ai/commit/45e3e87320ac85d21320c01ed2b7d1d8d2e0b2dd) Thanks [@dcyfr](https://github.com/dcyfr)! - Ralph Loop V2: prompt rewriting, pattern learning, and token budget management
|
|
19
|
+
|
|
20
|
+
- Added `DelegationManager.rewritePrompt()` with four failure-aware strategies: `wrong_direction`, `missing_context`, `wrong_format`, and `stuck_on_complexity` — each queries the memory layer for relevant context before rewriting
|
|
21
|
+
- Added `DelegationManager.runWithRetry()` for automatic retry with exponential backoff, rewriting on each attempt; emits structured `RetryResult` with per-attempt logs and Telegram escalation on persistent failure
|
|
22
|
+
- Added `DelegationManager.learnPattern()` and `queryHighConfidencePattern()` for persistent prompt pattern storage; high-confidence patterns (5+ successes) are applied as shortcuts before full rewrite
|
|
23
|
+
- Added token budget management: `estimateTokens()`, `TokenBudgetInfo` interface, automatic trimming to 80% of the model context window, and verbatim preservation of the 3 most recent injected blocks
|
|
24
|
+
- Exported `TokenBudgetInfo`, `PromptPattern`, `PatternLearningOptions`, `RetryOptions`, `RetryAttempt`, `RetryResult`, `RewriteTask`, `RewriteResult`, `FailureAnalysis` from `@dcyfr/ai`
|
|
25
|
+
- 111 new tests across 5 test files covering all new delegation manager capabilities
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- [`486b11b`](https://github.com/dcyfr/dcyfr-ai/commit/486b11bee8c4abb88f9eacc2bd16daa72e15c437) Thanks [@dcyfr](https://github.com/dcyfr)! - # Security Update
|
|
30
|
+
|
|
31
|
+
Upgrade @qdrant/js-client-rest from 1.13.0 to 1.16.2 to fix 3 moderate-severity undici vulnerabilities:
|
|
32
|
+
|
|
33
|
+
- GHSA-g9mf-h72j-4rw9 (unbounded decompression in HTTP responses)
|
|
34
|
+
- GHSA-cxrh-j4jr-qwg3 (DoS via bad certificate data)
|
|
35
|
+
|
|
36
|
+
This is a minor version bump with no breaking API changes.
|
|
37
|
+
|
|
38
|
+
- [`29cd73f`](https://github.com/dcyfr/dcyfr-ai/commit/29cd73fccd4771f52367667bb117bd47f78293d7) Thanks [@dcyfr](https://github.com/dcyfr)! - security: upgrade fastmcp 3.30.1→3.33.0 and downgrade mem0ai 2.2.2→1.0.39 to fix axios vulnerabilities
|
|
39
|
+
|
|
40
|
+
Fixed 3 high-severity axios vulnerabilities (GHSA-jr5f-v2jv-69x6 SSRF, GHSA-4hjh-wcwx-xvwj DoS, GHSA-43fc-jf86-j433 DoS) by downgrading mem0ai which had pinned axios@1.7.7. Also upgraded fastmcp to latest version (3.33.0) to improve MCP server performance.
|
|
41
|
+
|
|
42
|
+
Security improvements:
|
|
43
|
+
|
|
44
|
+
- Removed axios@1.7.7 (vulnerable) from mem0ai dependency tree
|
|
45
|
+
- All axios instances now at 1.13.5+ (safe versions)
|
|
46
|
+
- Workspace vulnerability count reduced from 22 → 18
|
|
47
|
+
- High-severity vulnerabilities reduced from 7 → 5
|
|
48
|
+
|
|
49
|
+
Breaking changes:
|
|
50
|
+
|
|
51
|
+
- mem0ai downgraded from 2.2.2 → 1.0.39 (MAJOR version downgrade)
|
|
52
|
+
- Limited API compatibility risk due to custom abstraction layer in packages/ai/memory/mem0-client.ts
|
|
53
|
+
- All tests passing (921/921)
|
|
54
|
+
|
|
55
|
+
## [1.0.4] - 2026-02-12
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
59
|
+
#### Version Compatibility Protection
|
|
60
|
+
|
|
61
|
+
- **Version Skew Protection**: AgentRuntime now performs automatic version compatibility checking during initialization
|
|
62
|
+
- **Version Mismatch Warnings**: Clear warning logs when @dcyfr/ai and @dcyfr/ai-agents versions may be incompatible
|
|
63
|
+
- **Compatibility Rules**:
|
|
64
|
+
- Major versions must match (1.x.x with 1.x.x)
|
|
65
|
+
- Runtime can be newer minor version than agents
|
|
66
|
+
- Warnings for agents more than 2 minor versions ahead of runtime
|
|
67
|
+
|
|
68
|
+
#### Upgrade Paths
|
|
69
|
+
|
|
70
|
+
When upgrading from older versions, follow these compatibility guidelines:
|
|
71
|
+
|
|
72
|
+
**Same Major Version (Recommended)**
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# For @dcyfr/ai-agents v1.0.x projects
|
|
76
|
+
npm install @dcyfr/ai@^1.0.4
|
|
77
|
+
|
|
78
|
+
# Check compatibility
|
|
79
|
+
npm list @dcyfr/ai @dcyfr/ai-agents
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Version Mismatch Resolution**
|
|
83
|
+
|
|
84
|
+
- If you see "Version Mismatch Warning" logs, upgrade both packages to latest:
|
|
85
|
+
```bash
|
|
86
|
+
npm install @dcyfr/ai@latest @dcyfr/ai-agents@latest
|
|
87
|
+
```
|
|
88
|
+
- For major version differences, check migration guides in documentation
|
|
89
|
+
|
|
90
|
+
**Enterprise Environments**
|
|
91
|
+
|
|
92
|
+
- Pin exact versions in package-lock.json for consistent deployments
|
|
93
|
+
- Test version combinations in staging before production deployment
|
|
94
|
+
- Monitor AgentRuntime initialization logs for version warnings
|
|
95
|
+
|
|
96
|
+
### Breaking Changes
|
|
97
|
+
|
|
98
|
+
None. This release maintains full backward compatibility.
|
|
99
|
+
|
|
100
|
+
### Migration Guide
|
|
101
|
+
|
|
102
|
+
No migration required. Version checking is automatic and non-breaking.
|
|
103
|
+
If you encounter version warnings:
|
|
104
|
+
|
|
105
|
+
1. Update both @dcyfr/ai and @dcyfr/ai-agents to latest versions
|
|
106
|
+
2. Test your agents with the new versions
|
|
107
|
+
3. Update peer dependency constraints if needed
|
|
108
|
+
|
|
3
109
|
## 1.0.3
|
|
4
110
|
|
|
5
111
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @dcyfr/ai
|
|
2
2
|
|
|
3
|
+
[](https://deepwiki.com/dcyfr/dcyfr-ai)
|
|
4
|
+
|
|
3
5
|
> Portable AI agent framework with plugin architecture for multi-provider integration, telemetry tracking, and quality validation.
|
|
4
6
|
|
|
5
7
|
[](https://www.npmjs.com/package/@dcyfr/ai)
|
|
@@ -10,6 +12,36 @@
|
|
|
10
12
|
|
|
11
13
|
Portable AI agent framework with plugin architecture for managing multiple AI providers, tracking telemetry, and ensuring quality compliance.
|
|
12
14
|
|
|
15
|
+
## 🔍 @dcyfr/ai vs. Alternatives
|
|
16
|
+
|
|
17
|
+
| Feature | @dcyfr/ai | LangChain | Vercel AI SDK | AutoGPT |
|
|
18
|
+
| ------------------ | ------------------- | ------------ | ------------- | ------------ |
|
|
19
|
+
| Multi-Provider | ✅ | ✅ | ✅ | ❌ |
|
|
20
|
+
| Plugin System | ✅ Custom | ✅ Complex | ❌ | ❌ |
|
|
21
|
+
| Telemetry | ✅ Built-in | ❌ | ❌ | ❌ |
|
|
22
|
+
| Zero Config | ✅ | ❌ | ✅ | ❌ |
|
|
23
|
+
| Bundle Size | ~200KB gzipped | ~2.3MB | ~450KB | N/A |
|
|
24
|
+
| TypeScript | ✅ Strict | Partial | ✅ | ❌ |
|
|
25
|
+
| Quality Gates | ✅ | ❌ | ❌ | ❌ |
|
|
26
|
+
| Config System | YAML/JSON/package | Code-only | Code-only | JSON |
|
|
27
|
+
| Learning Curve | Low | High | Low | High |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 📊 npm Statistics
|
|
32
|
+
|
|
33
|
+
[](https://www.npmjs.com/package/@dcyfr/ai)
|
|
34
|
+
[](https://www.npmjs.com/package/@dcyfr/ai)
|
|
35
|
+
[](https://bundlephobia.com/package/@dcyfr/ai)
|
|
36
|
+
|
|
37
|
+
- **Weekly Downloads:** Check [npm stats](https://www.npmjs.com/package/@dcyfr/ai)
|
|
38
|
+
- **Dependencies:** 12 production dependencies (zero bloat)
|
|
39
|
+
- **Bundle Size:** ~200KB gzipped with tree shaking
|
|
40
|
+
- **TypeScript:** Full type definitions included
|
|
41
|
+
- **ESM Support:** ✅ Full ESM modules with tree shaking
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
13
45
|
## Table of Contents
|
|
14
46
|
|
|
15
47
|
<details>
|
|
@@ -46,7 +78,8 @@ Portable AI agent framework with plugin architecture for managing multiple AI pr
|
|
|
46
78
|
## Features
|
|
47
79
|
|
|
48
80
|
- 🔌 **Plugin Architecture** - Extensible validation system with custom agents
|
|
49
|
-
- 🔄 **Multi-Provider Support** -
|
|
81
|
+
- 🔄 **Multi-Provider Support** - OpenAI, Anthropic, Ollama, Msty Vibe CLI Proxy, GitHub Copilot
|
|
82
|
+
- 🎯 **Msty Vibe Integration** - Unified multi-model routing with local OpenAI-compatible endpoint
|
|
50
83
|
- ⚙️ **Configuration System** - YAML/JSON config with three-layer merge
|
|
51
84
|
- 📊 **Comprehensive Telemetry** - Track usage, costs, quality metrics, performance
|
|
52
85
|
- ✅ **Validation Framework** - Quality gates with parallel/serial execution
|
|
@@ -122,6 +155,343 @@ npx @dcyfr/ai config:validate
|
|
|
122
155
|
npx @dcyfr/ai config:validate --verbose
|
|
123
156
|
```
|
|
124
157
|
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 🔄 Migration Guides
|
|
161
|
+
|
|
162
|
+
### Migrating from LangChain
|
|
163
|
+
|
|
164
|
+
**Why migrate:** 10x smaller bundle (~200KB vs 2.3MB), built-in telemetry, simpler API
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
// LangChain (before)
|
|
168
|
+
import { ChatOpenAI } from "langchain/chat_models/openai";
|
|
169
|
+
import { HumanMessage } from "langchain/schema";
|
|
170
|
+
|
|
171
|
+
const model = new ChatOpenAI({ temperature: 0.9 });
|
|
172
|
+
const response = await model.call([new HumanMessage("Hello")]);
|
|
173
|
+
|
|
174
|
+
// @dcyfr/ai (after)
|
|
175
|
+
import { AgentRuntime } from '@dcyfr/ai';
|
|
176
|
+
|
|
177
|
+
const runtime = new AgentRuntime({
|
|
178
|
+
provider: 'openai',
|
|
179
|
+
model: 'gpt-4',
|
|
180
|
+
temperature: 0.9
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
const response = await runtime.chat({ messages: [{ role: 'user', content: 'Hello' }] });
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Key Differences:**
|
|
187
|
+
- Simpler configuration (YAML/JSON vs code-only)
|
|
188
|
+
- Built-in telemetry tracking (no additional setup)
|
|
189
|
+
- Smaller bundle size (200KB vs 2.3MB)
|
|
190
|
+
- Type-safe validation with Zod
|
|
191
|
+
- Quality gates included out of the box
|
|
192
|
+
|
|
193
|
+
### Migrating from Vercel AI SDK
|
|
194
|
+
|
|
195
|
+
**Why migrate:** Quality gates, telemetry, multi-provider validation framework
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
// Vercel AI SDK (before)
|
|
199
|
+
import { openai } from '@ai-sdk/openai';
|
|
200
|
+
import { generateText } from 'ai';
|
|
201
|
+
|
|
202
|
+
const { text } = await generateText({
|
|
203
|
+
model: openai('gpt-4-turbo'),
|
|
204
|
+
prompt: 'Hello'
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// @dcyfr/ai (after)
|
|
208
|
+
import { AgentRuntime, ValidationFramework } from '@dcyfr/ai';
|
|
209
|
+
|
|
210
|
+
const runtime = new AgentRuntime({
|
|
211
|
+
provider: 'openai',
|
|
212
|
+
model: 'gpt-4-turbo'
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
const response = await runtime.chat({
|
|
216
|
+
messages: [{ role: 'user', content: 'Hello' }]
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// Bonus: Built-in validation
|
|
220
|
+
const validator = new ValidationFramework();
|
|
221
|
+
const report = await validator.validate({ /* config */ });
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Key Differences:**
|
|
225
|
+
- Configuration system (YAML/JSON files)
|
|
226
|
+
- Validation framework with quality gates
|
|
227
|
+
- Comprehensive telemetry tracking
|
|
228
|
+
- Plugin system for custom validators
|
|
229
|
+
- Zero-config startup option
|
|
230
|
+
|
|
231
|
+
**Full Migration Docs:** See [docs/migrations/](./docs/migrations/) for detailed guides
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Getting Started with AgentRuntime (Phase 0 Autonomous Operations)
|
|
236
|
+
|
|
237
|
+
### Prerequisites
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# Node.js 18+ required
|
|
241
|
+
node --version
|
|
242
|
+
|
|
243
|
+
# Install @dcyfr/ai
|
|
244
|
+
npm install @dcyfr/ai
|
|
245
|
+
|
|
246
|
+
# Optional: Configure LLM providers
|
|
247
|
+
export OPENAI_API_KEY=your_openai_key
|
|
248
|
+
export ANTHROPIC_API_KEY=your_anthropic_key
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### 1. Basic AgentRuntime Setup
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
import {
|
|
255
|
+
AgentRuntime,
|
|
256
|
+
ProviderRegistry,
|
|
257
|
+
TelemetryEngine,
|
|
258
|
+
DCYFRMemory
|
|
259
|
+
} from '@dcyfr/ai';
|
|
260
|
+
|
|
261
|
+
// Initialize components
|
|
262
|
+
const providerRegistry = new ProviderRegistry();
|
|
263
|
+
const telemetryEngine = new TelemetryEngine({ storage: 'sqlite' });
|
|
264
|
+
const memory = new DCYFRMemory({ storage: 'memory' });
|
|
265
|
+
|
|
266
|
+
// Create runtime
|
|
267
|
+
const runtime = new AgentRuntime({
|
|
268
|
+
providerRegistry,
|
|
269
|
+
memory,
|
|
270
|
+
telemetry: telemetryEngine
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
// Verify setup
|
|
274
|
+
console.log(`Runtime ready: ${runtime.isReady()}`);
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### 2. Execute Autonomous Tasks
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
// Simple task execution
|
|
281
|
+
const result = await runtime.executeTask('Explain quantum computing briefly');
|
|
282
|
+
|
|
283
|
+
if (result.success) {
|
|
284
|
+
console.log('Output:', result.output);
|
|
285
|
+
console.log('Memory used:', result.memoryRetrievalUsed);
|
|
286
|
+
} else {
|
|
287
|
+
console.error('Error:', result.error);
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### 3. Memory-Enhanced Execution
|
|
292
|
+
|
|
293
|
+
```typescript
|
|
294
|
+
// Task with memory context
|
|
295
|
+
const result = await runtime.executeTask('Continue the quantum computing explanation', {
|
|
296
|
+
timeout: 30000,
|
|
297
|
+
memoryConfig: {
|
|
298
|
+
maxResults: 10, // Maximum context entries
|
|
299
|
+
minScore: 0.7 // Relevance threshold (0.0-1.0)
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
// Memory is automatically retrieved, injected, and persisted
|
|
304
|
+
console.log('Previous context used:', result.memoryRetrievalUsed);
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### 4. Working Memory for Multi-Step Tasks
|
|
308
|
+
|
|
309
|
+
```typescript
|
|
310
|
+
// Access working memory for ephemeral state
|
|
311
|
+
const workingMemory = runtime.getWorkingMemory();
|
|
312
|
+
|
|
313
|
+
// Step 1: Research overview
|
|
314
|
+
workingMemory.set('research-topic', 'AI ethics');
|
|
315
|
+
const overviewResult = await runtime.executeTask(
|
|
316
|
+
'Provide overview of AI ethics and key considerations'
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
// Step 2: Deep dive (with context from step 1)
|
|
320
|
+
workingMemory.set('overview-complete', overviewResult.output);
|
|
321
|
+
const deepDiveResult = await runtime.executeTask(
|
|
322
|
+
'Analyze specific ethical challenges in AI deployment'
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
console.log('Working memory keys:', Array.from(workingMemory.keys()));
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### 5. Hook System for Extensions
|
|
329
|
+
|
|
330
|
+
```typescript
|
|
331
|
+
// Add before-execution hook
|
|
332
|
+
runtime.addHook('beforeExecute', async (task: string) => {
|
|
333
|
+
console.log(`🚀 Starting task: ${task}`);
|
|
334
|
+
|
|
335
|
+
// Custom validation
|
|
336
|
+
if (task.includes('sensitive')) {
|
|
337
|
+
return { approved: false, reason: 'Sensitive content detected' };
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return { approved: true };
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
// Add after-execution hook
|
|
344
|
+
runtime.addHook('afterExecute', async (task, result, success) => {
|
|
345
|
+
console.log(`✅ Task completed: ${success ? 'SUCCESS' : 'FAILED'}`);
|
|
346
|
+
|
|
347
|
+
// Custom telemetry
|
|
348
|
+
if (success) {
|
|
349
|
+
await customAnalytics.track({
|
|
350
|
+
task: task.substring(0, 50),
|
|
351
|
+
duration: result.duration,
|
|
352
|
+
memoryUsed: result.memoryRetrievalUsed
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### 6. Provider Configuration & Fallback
|
|
359
|
+
|
|
360
|
+
```typescript
|
|
361
|
+
// Multi-provider setup with fallback
|
|
362
|
+
const runtime = new AgentRuntime({
|
|
363
|
+
providerRegistry: new ProviderRegistry(),
|
|
364
|
+
memory,
|
|
365
|
+
telemetry
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
// Providers automatically fallback: OpenAI → Anthropic → Ollama
|
|
369
|
+
const result = await runtime.executeTask('Analyze market trends');
|
|
370
|
+
|
|
371
|
+
// Check which provider was used
|
|
372
|
+
const events = await telemetryEngine.getEvents();
|
|
373
|
+
const lastExecution = events.filter(e => e.type === 'start').pop();
|
|
374
|
+
console.log('Provider used:', lastExecution?.provider);
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### 7. Telemetry Monitoring & Analysis
|
|
378
|
+
|
|
379
|
+
```typescript
|
|
380
|
+
// Get telemetry engine for analytics
|
|
381
|
+
const telemetry = runtime.getTelemetryEngine();
|
|
382
|
+
|
|
383
|
+
// Get recent events
|
|
384
|
+
const events = await telemetry.getEvents();
|
|
385
|
+
console.log(`Total events: ${events.length}`);
|
|
386
|
+
|
|
387
|
+
// Filter memory events
|
|
388
|
+
const memoryEvents = events.filter(e => e.type === 'memory_retrieval');
|
|
389
|
+
const hitRate = memoryEvents.length > 0
|
|
390
|
+
? memoryEvents.filter(e => e.memoriesRelevant > 0).length / memoryEvents.length
|
|
391
|
+
: 0;
|
|
392
|
+
console.log(`Memory hit rate: ${(hitRate * 100).toFixed(1)}%`);
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### 8. CLI Dashboard Commands
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
# View telemetry dashboard
|
|
399
|
+
npx @dcyfr/ai telemetry
|
|
400
|
+
|
|
401
|
+
# Show recent activity
|
|
402
|
+
npx @dcyfr/ai telemetry --recent 20
|
|
403
|
+
|
|
404
|
+
# Cost analysis
|
|
405
|
+
npx @dcyfr/ai telemetry --costs
|
|
406
|
+
|
|
407
|
+
# Provider summary
|
|
408
|
+
npx @dcyfr/ai telemetry --providers
|
|
409
|
+
|
|
410
|
+
# Runtime validation
|
|
411
|
+
npx @dcyfr/ai validate-runtime
|
|
412
|
+
|
|
413
|
+
# Export data
|
|
414
|
+
npx @dcyfr/ai telemetry --export usage_data.csv
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### 9. Provider Setup
|
|
418
|
+
|
|
419
|
+
**OpenAI:**
|
|
420
|
+
```bash
|
|
421
|
+
export OPENAI_API_KEY=sk-your-key-here
|
|
422
|
+
# Supports: gpt-4, gpt-4o, gpt-3.5-turbo
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**Anthropic:**
|
|
426
|
+
```bash
|
|
427
|
+
export ANTHROPIC_API_KEY=sk-ant-your-key-here
|
|
428
|
+
# Supports: claude-3-5-sonnet, claude-3-haiku, claude-3-opus
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
**Ollama (Local):**
|
|
432
|
+
```bash
|
|
433
|
+
# Install Ollama
|
|
434
|
+
curl -fsSL https://ollama.ai/install.sh | sh
|
|
435
|
+
|
|
436
|
+
# Install a model
|
|
437
|
+
ollama pull llama2
|
|
438
|
+
# OR: ollama pull codellama, qwen2.5, etc.
|
|
439
|
+
|
|
440
|
+
# Optional: Custom host
|
|
441
|
+
export OLLAMA_HOST=localhost:11434
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### 10. Configuration Examples
|
|
445
|
+
|
|
446
|
+
**Development:**
|
|
447
|
+
```typescript
|
|
448
|
+
const devConfig = {
|
|
449
|
+
providerRegistry: new ProviderRegistry(),
|
|
450
|
+
memory: new DCYFRMemory({
|
|
451
|
+
storage: 'memory',
|
|
452
|
+
maxEntries: 100
|
|
453
|
+
}),
|
|
454
|
+
telemetry: new TelemetryEngine({
|
|
455
|
+
storage: 'memory' // No persistence for dev
|
|
456
|
+
})
|
|
457
|
+
};
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
**Production:**
|
|
461
|
+
```typescript
|
|
462
|
+
const prodConfig = {
|
|
463
|
+
providerRegistry: new ProviderRegistry(),
|
|
464
|
+
memory: new DCYFRMemory({
|
|
465
|
+
storage: 'file',
|
|
466
|
+
filePath: './data/memory.json'
|
|
467
|
+
}),
|
|
468
|
+
telemetry: new TelemetryEngine({
|
|
469
|
+
storage: 'sqlite',
|
|
470
|
+
dbPath: './data/telemetry.db'
|
|
471
|
+
})
|
|
472
|
+
};
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
### 11. Real-World Example
|
|
476
|
+
|
|
477
|
+
See our comprehensive example: **[Autonomous Research Agent](../dcyfr-ai-agents/examples/autonomous-research-agent/)**
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
cd dcyfr-ai-agents/examples/autonomous-research-agent
|
|
481
|
+
npm run demo -- --topic "quantum computing applications"
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
This example demonstrates:
|
|
485
|
+
- 5-step autonomous research pipeline
|
|
486
|
+
- Memory context integration
|
|
487
|
+
- Working memory coordination
|
|
488
|
+
- Hook system extensions
|
|
489
|
+
- Telemetry monitoring
|
|
490
|
+
- Provider fallback handling
|
|
491
|
+
- Configuration management
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
125
495
|
## Architecture
|
|
126
496
|
|
|
127
497
|
The DCYFR AI framework follows a layered architecture with clear separation of concerns:
|
|
@@ -261,10 +631,12 @@ See [examples/](./examples/) directory:
|
|
|
261
631
|
|
|
262
632
|
## Documentation
|
|
263
633
|
|
|
264
|
-
- [Getting Started](./docs/
|
|
265
|
-
- [
|
|
266
|
-
- [
|
|
267
|
-
- [
|
|
634
|
+
- [Getting Started](./docs/GETTING-STARTED.md)
|
|
635
|
+
- [Provider Integrations](./docs/PROVIDER_INTEGRATIONS.md) - **OpenAI, Anthropic, Ollama, Msty Vibe CLI Proxy**
|
|
636
|
+
- [Memory Setup](./docs/MEMORY_SETUP.md) - Vector database and memory configuration
|
|
637
|
+
- [Plugin Development](./docs/PLUGINS.md)
|
|
638
|
+
- [API Reference](./docs/API.md)
|
|
639
|
+
- [TUI Dashboard](./docs/TUI.md)
|
|
268
640
|
- [Release Management](./docs/RELEASE_MANAGEMENT.md) - Publishing and versioning
|
|
269
641
|
- [Quick Release Guide](./docs/RELEASE_QUICK_START.md) - TL;DR for releases
|
|
270
642
|
|
|
@@ -429,7 +801,7 @@ const telemetry = new TelemetryEngine({
|
|
|
429
801
|
storage: new FileStorageAdapter('./telemetry')
|
|
430
802
|
});
|
|
431
803
|
```
|
|
432
|
-
Telemetry tracks: API calls, token usage, costs, latency, quality scores.
|
|
804
|
+
Telemetry tracks: API calls, token usage, costs, latency, quality scores.
|
|
433
805
|
|
|
434
806
|
**Q: Is this framework production-ready?**
|
|
435
807
|
|
|
@@ -498,7 +870,7 @@ Found a security issue? Report it privately:
|
|
|
498
870
|
|
|
499
871
|
### Platform-Specific Issues
|
|
500
872
|
- **Windows:** Path separators handled automatically but some plugins may have issues
|
|
501
|
-
- **Node.js version:** Requires ≥
|
|
873
|
+
- **Node.js version:** Requires ≥24.13.0 (uses native fetch, modern APIs)
|
|
502
874
|
- **ESM-only:** Package is ESM (ECMAScript Modules) - CommonJS require() not supported
|
|
503
875
|
|
|
504
876
|
### Planned Improvements
|
|
@@ -540,13 +912,13 @@ This package is dual-licensed:
|
|
|
540
912
|
- 💼 **Executive** ($4,800/yr) - Business license + 2hr consultation/mo + 50 employees
|
|
541
913
|
- 🏢 **Enterprise** ($9,600/yr) - Enterprise license + 4hr consultation/mo + unlimited scale
|
|
542
914
|
|
|
543
|
-
**Learn more:** [
|
|
915
|
+
**Learn more:** [SPONSORS.md](../SPONSORS.md)
|
|
544
916
|
**Join:** [GitHub Sponsors](https://github.com/sponsors/dcyfr)
|
|
545
917
|
**Contact:** licensing@dcyfr.ai
|
|
546
918
|
|
|
547
919
|
### Trademark
|
|
548
920
|
|
|
549
|
-
"DCYFR" is a trademark of DCYFR Labs. See [TRADEMARK.md](
|
|
921
|
+
"DCYFR" is a trademark of DCYFR Labs. See [TRADEMARK.md](../TRADEMARK.md) for usage guidelines.
|
|
550
922
|
|
|
551
923
|
---
|
|
552
924
|
|
|
@@ -51,10 +51,22 @@ export declare class AgentLoader {
|
|
|
51
51
|
* Load an agent by module path, file path, or object
|
|
52
52
|
*/
|
|
53
53
|
loadAgent(agentSource: string | Agent, tier?: AgentTier): Promise<LoadedAgent>;
|
|
54
|
+
/** @private Resolve an Agent from a string path or module specifier */
|
|
55
|
+
private resolveAgentFromSource;
|
|
56
|
+
/** @private Handle duplicate agent detection and tier-based override logic */
|
|
57
|
+
private handleAgentDuplicate;
|
|
54
58
|
/**
|
|
55
59
|
* Load multiple agents
|
|
56
60
|
*/
|
|
57
61
|
loadAgents(agents: (string | Agent)[], tier?: AgentTier): Promise<LoadedAgent[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Discover agents from a single pattern
|
|
64
|
+
*/
|
|
65
|
+
private discoverFromPattern;
|
|
66
|
+
/**
|
|
67
|
+
* Discover agents from a single search path
|
|
68
|
+
*/
|
|
69
|
+
private discoverFromSearchPath;
|
|
58
70
|
/**
|
|
59
71
|
* Discover agents in search paths
|
|
60
72
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-loader.d.ts","sourceRoot":"","sources":["../../../packages/ai/agents/agent-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;IAG9B,SAAS,EAAE,MAAM;IACjB,KAAK,CAAC,EAAE,KAAK;gBAFpB,OAAO,EAAE,MAAM,EACR,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKvB;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAGpC,SAAS,EAAE,MAAM;gBADxB,OAAO,EAAE,MAAM,EACR,SAAS,EAAE,MAAM;CAK3B;AAYD;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,MAAM,CAAoB;gBAEtB,MAAM,GAAE,OAAO,CAAC,iBAAiB,CAAM;IAInD;;OAEG;IACG,SAAS,CACb,WAAW,EAAE,MAAM,GAAG,KAAK,EAC3B,IAAI,GAAE,SAAqB,GAC1B,OAAO,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-loader.d.ts","sourceRoot":"","sources":["../../../packages/ai/agents/agent-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;IAG9B,SAAS,EAAE,MAAM;IACjB,KAAK,CAAC,EAAE,KAAK;gBAFpB,OAAO,EAAE,MAAM,EACR,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKvB;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAGpC,SAAS,EAAE,MAAM;gBADxB,OAAO,EAAE,MAAM,EACR,SAAS,EAAE,MAAM;CAK3B;AAYD;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,MAAM,CAAoB;gBAEtB,MAAM,GAAE,OAAO,CAAC,iBAAiB,CAAM;IAInD;;OAEG;IACG,SAAS,CACb,WAAW,EAAE,MAAM,GAAG,KAAK,EAC3B,IAAI,GAAE,SAAqB,GAC1B,OAAO,CAAC,WAAW,CAAC;IA8DvB,uEAAuE;YACzD,sBAAsB;IAkBpC,8EAA8E;YAChE,oBAAoB;IAclC;;OAEG;IACG,UAAU,CACd,MAAM,EAAE,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE,EAC1B,IAAI,GAAE,SAAqB,GAC1B,OAAO,CAAC,WAAW,EAAE,CAAC;IAezB;;OAEG;YACW,mBAAmB;IAmBjC;;OAEG;YACW,sBAAsB;IAmBpC;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAUhD;;OAEG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBnD;;OAEG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAQpC;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAQrC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAI/C;;OAEG;IACH,SAAS,IAAI,WAAW,EAAE;IAI1B;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,EAAE;IAI/C;;OAEG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE;IAIpD;;OAEG;IACH,gBAAgB,IAAI,WAAW,EAAE;IAIjC;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI/B;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAK/B;;OAEG;YACW,sBAAsB;IA4CpC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAe1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA0CxB;;OAEG;YACW,kBAAkB;CAejC;AAOD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAClC,WAAW,CAKb;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
|