@yyc3/ai-family-kernel 0.0.0-stage → 2.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/index.d.ts +24 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/index.js +24 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-1-foundation/foundation-capability.d.ts +16 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-1-foundation/foundation-capability.js +29 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-1-foundation/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-1-foundation/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-2-bole/bole-capability.d.ts +16 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-2-bole/bole-capability.js +29 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-2-bole/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-2-bole/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-3-prophet/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-3-prophet/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-3-prophet/prophet-capability.d.ts +16 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-3-prophet/prophet-capability.js +29 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-4-thinker/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-4-thinker/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-4-thinker/thinker-capability.d.ts +16 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-4-thinker/thinker-capability.js +29 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-5-navigator/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-5-navigator/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-5-navigator/navigator-capability.d.ts +16 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-5-navigator/navigator-capability.js +29 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-6-creative/creative-capability.d.ts +16 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-6-creative/creative-capability.js +29 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-6-creative/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-6-creative/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-7-master/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-7-master/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-7-master/master-capability.d.ts +16 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-7-master/master-capability.js +29 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-8-guardian/guardian-capability.d.ts +16 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-8-guardian/guardian-capability.js +29 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-8-guardian/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-8-guardian/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-9-meta-oracle/index.d.ts +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-9-meta-oracle/index.js +4 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-9-meta-oracle/meta-oracle-capability.d.ts +17 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-9-meta-oracle/meta-oracle-capability.js +30 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-registry.d.ts +34 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/layer-registry.js +76 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/types.d.ts +49 -0
- package/dist/src/01-/344/271/235/345/261/202/346/236/266/346/236/204/345/210/206/345/261/202/345/272/225/345/272/247/types.js +33 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/index.d.ts +7 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/index.js +7 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/orchestrator.d.ts +47 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/orchestrator.js +59 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/task-decomposer.d.ts +21 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/task-decomposer.js +72 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/confidence-calibrator.d.ts +31 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/confidence-calibrator.js +39 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/consistency-metrics.d.ts +45 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/consistency-metrics.js +44 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/cross-validator.d.ts +44 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/cross-validator.js +69 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/gateway.d.ts +64 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/gateway.js +96 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/ground-truth-checker.d.ts +33 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/ground-truth-checker.js +74 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/index.d.ts +12 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/index.js +12 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/oracle-registry.d.ts +18 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/cloud-pivot-orchestrator/verification-gateway/oracle-registry.js +26 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/dashu-self-healing/index.d.ts +5 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/dashu-self-healing/index.js +5 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/dashu-self-healing/self-healing-controller.d.ts +33 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/dashu-self-healing/self-healing-controller.js +68 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-communication-bus/event-bus.d.ts +99 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-communication-bus/event-bus.js +178 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-communication-bus/index.d.ts +7 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-communication-bus/index.js +7 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-communication-bus/trajectory-bridge.d.ts +57 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-communication-bus/trajectory-bridge.js +72 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-phone-system/index.d.ts +4 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-phone-system/index.js +4 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-phone-system/phone-system.d.ts +46 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/family-phone-system/phone-system.js +85 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/global-status-center/index.d.ts +4 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/global-status-center/index.js +4 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/global-status-center/status-center.d.ts +27 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/global-status-center/status-center.js +57 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/index.d.ts +21 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/index.js +21 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/bus-mcp-codec.d.ts +29 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/bus-mcp-codec.js +84 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/index.d.ts +31 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/index.js +28 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/server/index.d.ts +5 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/server/index.js +5 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/server/protocol.d.ts +80 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/server/protocol.js +148 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/stdio-transport.d.ts +47 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/stdio-transport.js +178 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/types.d.ts +63 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/mcp-adapter/types.js +7 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/types.d.ts +167 -0
- package/dist/src/02-/344/272/221/346/236/242/346/240/270/345/277/203/345/274/225/346/223/216/types.js +23 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/experience-reflow/index.d.ts +7 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/experience-reflow/index.js +7 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/experience-reflow/outcome-labeler.d.ts +34 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/experience-reflow/outcome-labeler.js +38 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/experience-reflow/pattern-extractor.d.ts +64 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/experience-reflow/pattern-extractor.js +94 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/experience-reflow/trajectory-collector.d.ts +39 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/experience-reflow/trajectory-collector.js +36 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/index.d.ts +23 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/index.js +23 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/knowledge-update/index.d.ts +7 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/knowledge-update/index.js +7 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/knowledge-update/preference-tracker.d.ts +32 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/knowledge-update/preference-tracker.js +49 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/knowledge-update/rule-evolution.d.ts +41 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/knowledge-update/rule-evolution.js +60 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/knowledge-update/semantic-diff.d.ts +32 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/knowledge-update/semantic-diff.js +69 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/learning-loop.d.ts +146 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/learning-loop.js +171 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/learning-scheduler/budget-allocator.d.ts +29 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/learning-scheduler/budget-allocator.js +58 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/learning-scheduler/index.d.ts +6 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/learning-scheduler/index.js +6 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/learning-scheduler/priority-queue.d.ts +22 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/learning-scheduler/priority-queue.js +34 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/param-adaptation.d.ts +59 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/param-adaptation.js +55 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/index.d.ts +12 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/index.js +12 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-eval.d.ts +77 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-eval.js +110 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-executor.d.ts +51 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-executor.js +63 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-id.d.ts +32 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-id.js +54 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-index.d.ts +29 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-index.js +32 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-merger.d.ts +26 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-merger.js +65 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-pruner.d.ts +31 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-pruner.js +35 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-store-file.d.ts +33 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-store-file.js +76 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-versioner.d.ts +33 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/skill-consolidation/skill-versioner.js +63 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/stability-guard/forgetting-detector.d.ts +31 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/stability-guard/forgetting-detector.js +26 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/stability-guard/index.d.ts +7 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/stability-guard/index.js +7 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/stability-guard/regression-tester.d.ts +30 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/stability-guard/regression-tester.js +48 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/stability-guard/rollback-controller.d.ts +19 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/stability-guard/rollback-controller.js +19 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/types.d.ts +137 -0
- package/dist/src/05-/346/214/201/347/273/255/345/255/246/344/271/240/345/274/225/346/223/216/types.js +22 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/compliance-audit/compliance-audit.d.ts +20 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/compliance-audit/compliance-audit.js +83 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/compliance-audit/index.d.ts +4 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/compliance-audit/index.js +4 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/index.d.ts +18 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/index.js +18 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/policy-registry/index.d.ts +6 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/policy-registry/index.js +6 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/policy-registry/policy-bus.d.ts +39 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/policy-registry/policy-bus.js +73 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/policy-registry/policy-registry.d.ts +19 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/policy-registry/policy-registry.js +44 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/policy-registry/security-policies.d.ts +54 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/policy-registry/security-policies.js +80 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/quality-governance/index.d.ts +4 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/quality-governance/index.js +4 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/quality-governance/quality-governance.d.ts +23 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/quality-governance/quality-governance.js +38 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/security-governance/index.d.ts +4 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/security-governance/index.js +4 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/security-governance/security-governance.d.ts +24 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/security-governance/security-governance.js +29 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/types.d.ts +77 -0
- package/dist/src/06-/346/262/273/347/220/206/344/270/255/345/277/203/types.js +17 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/consistency-repair/consistency-repair.d.ts +25 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/consistency-repair/consistency-repair.js +66 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/consistency-repair/index.d.ts +4 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/consistency-repair/index.js +4 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/degradation-controller/degradation-controller.d.ts +50 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/degradation-controller/degradation-controller.js +90 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/degradation-controller/index.d.ts +4 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/degradation-controller/index.js +4 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/fault-detector/fault-detector.d.ts +42 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/fault-detector/fault-detector.js +55 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/fault-detector/index.d.ts +4 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/fault-detector/index.js +4 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/index.d.ts +19 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/index.js +19 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/rollback-controller/index.d.ts +4 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/rollback-controller/index.js +4 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/rollback-controller/rollback-controller.d.ts +36 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/rollback-controller/rollback-controller.js +71 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/types.d.ts +73 -0
- package/dist/src/07-/350/207/252/346/204/210/344/270/255/345/277/203/types.js +63 -0
- package/dist/src/08-/347/263/273/347/273/237/350/243/205/351/205/215/index.d.ts +5 -0
- package/dist/src/08-/347/263/273/347/273/237/350/243/205/351/205/215/index.js +5 -0
- package/dist/src/08-/347/263/273/347/273/237/350/243/205/351/205/215/mcp-server-assembly.d.ts +48 -0
- package/dist/src/08-/347/263/273/347/273/237/350/243/205/351/205/215/mcp-server-assembly.js +53 -0
- package/dist/src/08-/347/263/273/347/273/237/350/243/205/351/205/215/runtime-assembly.d.ts +175 -0
- package/dist/src/08-/347/263/273/347/273/237/350/243/205/351/205/215/runtime-assembly.js +249 -0
- package/dist/src/08-/347/263/273/347/273/237/350/243/205/351/205/215/runtime-entry.d.ts +68 -0
- package/dist/src/08-/347/263/273/347/273/237/350/243/205/351/205/215/runtime-entry.js +86 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/capability-instrumentation.d.ts +53 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/capability-instrumentation.js +85 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/collaboration-instrumentation.d.ts +56 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/collaboration-instrumentation.js +100 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/family-metrics.d.ts +172 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/family-metrics.js +313 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/index.d.ts +8 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/index.js +8 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/metrics-registry.d.ts +123 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/metrics-registry.js +270 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/metrics-server.d.ts +45 -0
- package/dist/src/09-/345/217/257/350/247/202/346/265/213/346/200/247/metrics-server.js +86 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/allowlist.d.ts +79 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/allowlist.js +122 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/catalog.d.ts +67 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/catalog.js +71 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/index.d.ts +14 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/index.js +10 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/integrity.d.ts +44 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/integrity.js +99 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/plugin-loader.d.ts +39 -0
- package/dist/src/10-/350/203/275/345/212/233/346/263/250/345/206/214/344/270/255/345/277/203/plugin-loader.js +89 -0
- package/dist/src/a2a-adapter/card-discovery.d.ts +40 -0
- package/dist/src/a2a-adapter/card-discovery.js +47 -0
- package/dist/src/a2a-adapter/index.d.ts +7 -0
- package/dist/src/a2a-adapter/index.js +7 -0
- package/dist/src/a2a-adapter/task-delegate.d.ts +85 -0
- package/dist/src/a2a-adapter/task-delegate.js +94 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.js +10 -0
- package/dist/vendor/memory-framework/episodic-store/episode-indexer.d.ts +30 -0
- package/dist/vendor/memory-framework/episodic-store/episode-indexer.js +45 -0
- package/dist/vendor/memory-framework/episodic-store/index.d.ts +30 -0
- package/dist/vendor/memory-framework/episodic-store/index.js +45 -0
- package/dist/vendor/memory-framework/episodic-store/retrieval-adapter.d.ts +20 -0
- package/dist/vendor/memory-framework/episodic-store/retrieval-adapter.js +29 -0
- package/dist/vendor/memory-framework/episodic-store/trajectory-logger.d.ts +36 -0
- package/dist/vendor/memory-framework/episodic-store/trajectory-logger.js +32 -0
- package/dist/vendor/memory-framework/index.d.ts +19 -0
- package/dist/vendor/memory-framework/index.js +19 -0
- package/dist/vendor/memory-framework/memory-orchestrator/consistency-checker.d.ts +20 -0
- package/dist/vendor/memory-framework/memory-orchestrator/consistency-checker.js +41 -0
- package/dist/vendor/memory-framework/memory-orchestrator/index.d.ts +55 -0
- package/dist/vendor/memory-framework/memory-orchestrator/index.js +185 -0
- package/dist/vendor/memory-framework/memory-orchestrator/retrieval-router.d.ts +21 -0
- package/dist/vendor/memory-framework/memory-orchestrator/retrieval-router.js +37 -0
- package/dist/vendor/memory-framework/procedural-memory/guardrail-registry.d.ts +34 -0
- package/dist/vendor/memory-framework/procedural-memory/guardrail-registry.js +22 -0
- package/dist/vendor/memory-framework/procedural-memory/index.d.ts +31 -0
- package/dist/vendor/memory-framework/procedural-memory/index.js +34 -0
- package/dist/vendor/memory-framework/procedural-memory/prompt-rule-extractor.d.ts +95 -0
- package/dist/vendor/memory-framework/procedural-memory/prompt-rule-extractor.js +160 -0
- package/dist/vendor/memory-framework/procedural-memory/skill-registry.d.ts +115 -0
- package/dist/vendor/memory-framework/procedural-memory/skill-registry.js +165 -0
- package/dist/vendor/memory-framework/procedural-memory/workflow-patterns.d.ts +36 -0
- package/dist/vendor/memory-framework/procedural-memory/workflow-patterns.js +22 -0
- package/dist/vendor/memory-framework/semantic-graph/entity-resolver.d.ts +26 -0
- package/dist/vendor/memory-framework/semantic-graph/entity-resolver.js +61 -0
- package/dist/vendor/memory-framework/semantic-graph/index.d.ts +23 -0
- package/dist/vendor/memory-framework/semantic-graph/index.js +25 -0
- package/dist/vendor/memory-framework/semantic-graph/knowledge-graph.d.ts +50 -0
- package/dist/vendor/memory-framework/semantic-graph/knowledge-graph.js +44 -0
- package/dist/vendor/memory-framework/sensory-buffer/index.d.ts +41 -0
- package/dist/vendor/memory-framework/sensory-buffer/index.js +70 -0
- package/dist/vendor/memory-framework/types.d.ts +192 -0
- package/dist/vendor/memory-framework/types.js +42 -0
- package/dist/vendor/memory-framework/working-context/attention-scorer.d.ts +39 -0
- package/dist/vendor/memory-framework/working-context/attention-scorer.js +45 -0
- package/dist/vendor/memory-framework/working-context/context-window.d.ts +33 -0
- package/dist/vendor/memory-framework/working-context/context-window.js +35 -0
- package/dist/vendor/memory-framework/working-context/index.d.ts +30 -0
- package/dist/vendor/memory-framework/working-context/index.js +44 -0
- package/dist/vendor/memory-framework/write-policy/consolidation.d.ts +37 -0
- package/dist/vendor/memory-framework/write-policy/consolidation.js +50 -0
- package/dist/vendor/memory-framework/write-policy/forgetting-policy.d.ts +28 -0
- package/dist/vendor/memory-framework/write-policy/forgetting-policy.js +31 -0
- package/dist/vendor/memory-framework/write-policy/index.d.ts +40 -0
- package/dist/vendor/memory-framework/write-policy/index.js +50 -0
- package/dist/vendor/memory-framework/write-policy/salience-scorer.d.ts +41 -0
- package/dist/vendor/memory-framework/write-policy/salience-scorer.js +70 -0
- package/dist/vendor/self-judge-kit/assumption-tracker.d.ts +31 -0
- package/dist/vendor/self-judge-kit/assumption-tracker.js +45 -0
- package/dist/vendor/self-judge-kit/confidence-scorer.d.ts +46 -0
- package/dist/vendor/self-judge-kit/confidence-scorer.js +60 -0
- package/dist/vendor/self-judge-kit/deviation-detector.d.ts +23 -0
- package/dist/vendor/self-judge-kit/deviation-detector.js +55 -0
- package/dist/vendor/self-judge-kit/escalation-policy.d.ts +17 -0
- package/dist/vendor/self-judge-kit/escalation-policy.js +45 -0
- package/dist/vendor/self-judge-kit/index.d.ts +46 -0
- package/dist/vendor/self-judge-kit/index.js +79 -0
- package/dist/vendor/self-judge-kit/types.d.ts +87 -0
- package/dist/vendor/self-judge-kit/types.js +18 -0
- package/package.json +41 -4
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 故障侦测(fault-detector)——「愈」支柱子模块。
|
|
3
|
+
* 职责:侦测**基础设施 / 模型服务 / 总线 / 记忆 / 学习 / 判断**各层故障。
|
|
4
|
+
* 边界:只侦测与分类;降级归 degradation-controller,回滚归 rollback-controller,
|
|
5
|
+
* 一致性修复归 consistency-repair。
|
|
6
|
+
*
|
|
7
|
+
* v2.5.0(Phase D)转实:
|
|
8
|
+
* - 去抖窗口:同 (layer, type) 信号在 windowMs 内累计 ≥ debounceCount 次才升级为 FaultEvent
|
|
9
|
+
* (单次毛刺不触发自愈动作,防抖动);触发后窗口重开;
|
|
10
|
+
* - 严重度按超出比率映射:ratio = observed/threshold
|
|
11
|
+
* (≥2 critical / ≥1.5 high / ≥1.2 med / 其余 low);
|
|
12
|
+
* - 信号回落(observed ≤ threshold)即清零窗口。
|
|
13
|
+
* TODO(infra): 接入 Prometheus/日志/链路追踪多源信号(§6.3)做跨信号聚合关联。
|
|
14
|
+
*/
|
|
15
|
+
import { HEALING_LAYER_MATRIX } from '../types.js';
|
|
16
|
+
/** 故障侦测器。 */
|
|
17
|
+
export class FaultDetector {
|
|
18
|
+
windows = new Map();
|
|
19
|
+
seq = 0;
|
|
20
|
+
debounceCount;
|
|
21
|
+
windowMs;
|
|
22
|
+
constructor(options = {}) {
|
|
23
|
+
this.debounceCount = Math.max(1, options.debounceCount ?? 2);
|
|
24
|
+
this.windowMs = options.windowMs ?? 30_000;
|
|
25
|
+
}
|
|
26
|
+
/** 将超阈信号做去抖后转为故障事件(未超阈 / 未达去抖阈值返回 undefined)。 */
|
|
27
|
+
detect(signal) {
|
|
28
|
+
const key = `${signal.layer}:${signal.type}`;
|
|
29
|
+
const now = Date.now();
|
|
30
|
+
if (signal.observed <= signal.threshold) {
|
|
31
|
+
this.windows.delete(key); // 信号回落即清零
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const prev = this.windows.get(key);
|
|
35
|
+
const inWindow = prev !== undefined && now - prev.firstAt <= this.windowMs;
|
|
36
|
+
const count = inWindow ? prev.count + 1 : 1;
|
|
37
|
+
this.windows.set(key, count === 1 ? { count: 1, firstAt: now } : { count, firstAt: prev.firstAt });
|
|
38
|
+
if (count < this.debounceCount)
|
|
39
|
+
return undefined;
|
|
40
|
+
this.windows.delete(key); // 触发后重开窗口
|
|
41
|
+
this.seq += 1;
|
|
42
|
+
const ratio = signal.observed / signal.threshold;
|
|
43
|
+
const severity = ratio >= 2 ? 'critical' : ratio >= 1.5 ? 'high' : ratio >= 1.2 ? 'med' : 'low';
|
|
44
|
+
return {
|
|
45
|
+
id: `fault-${signal.layer}-${signal.type}-${this.seq}`,
|
|
46
|
+
layer: signal.layer,
|
|
47
|
+
type: signal.type,
|
|
48
|
+
severity,
|
|
49
|
+
detail: `${HEALING_LAYER_MATRIX[signal.layer].faultType}:观测值 ${signal.observed} 超阈值 ${signal.threshold}` +
|
|
50
|
+
`(${(ratio * 100).toFixed(0)}%),窗口内第 ${count} 次超阈(去抖 ${this.debounceCount})`,
|
|
51
|
+
detectedAt: now,
|
|
52
|
+
traceId: signal.traceId,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ============================================================
|
|
3
|
+
* YYC³ AI Family — 自愈中心(「愈」支柱)统一入口(barrel)。
|
|
4
|
+
* ------------------------------------------------------------
|
|
5
|
+
* 四大子模块:
|
|
6
|
+
* fault-detector 故障侦测(基础设施/模型/总线/记忆/学习/判断)
|
|
7
|
+
* degradation-controller 降级 / 熔断
|
|
8
|
+
* rollback-controller 技能版本回滚 / 灰度回滚
|
|
9
|
+
* consistency-repair 记忆跨层不一致快照修复
|
|
10
|
+
*
|
|
11
|
+
* 自愈层级矩阵与 RTO/RPO 目标见 types.ts 的
|
|
12
|
+
* HEALING_LAYER_MATRIX 与 RTO_RPO_TARGETS(§5.5)。
|
|
13
|
+
* ============================================================
|
|
14
|
+
*/
|
|
15
|
+
export * from './types.js';
|
|
16
|
+
export * from './fault-detector/index.js';
|
|
17
|
+
export * from './degradation-controller/index.js';
|
|
18
|
+
export * from './rollback-controller/index.js';
|
|
19
|
+
export * from './consistency-repair/index.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ============================================================
|
|
3
|
+
* YYC³ AI Family — 自愈中心(「愈」支柱)统一入口(barrel)。
|
|
4
|
+
* ------------------------------------------------------------
|
|
5
|
+
* 四大子模块:
|
|
6
|
+
* fault-detector 故障侦测(基础设施/模型/总线/记忆/学习/判断)
|
|
7
|
+
* degradation-controller 降级 / 熔断
|
|
8
|
+
* rollback-controller 技能版本回滚 / 灰度回滚
|
|
9
|
+
* consistency-repair 记忆跨层不一致快照修复
|
|
10
|
+
*
|
|
11
|
+
* 自愈层级矩阵与 RTO/RPO 目标见 types.ts 的
|
|
12
|
+
* HEALING_LAYER_MATRIX 与 RTO_RPO_TARGETS(§5.5)。
|
|
13
|
+
* ============================================================
|
|
14
|
+
*/
|
|
15
|
+
export * from './types.js';
|
|
16
|
+
export * from './fault-detector/index.js';
|
|
17
|
+
export * from './degradation-controller/index.js';
|
|
18
|
+
export * from './rollback-controller/index.js';
|
|
19
|
+
export * from './consistency-repair/index.js';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 回滚控制(rollback-controller)——「愈」支柱子模块。
|
|
3
|
+
* 职责:**技能版本回滚 / 灰度回滚**(对接 §5.5 学习层与 §5.3 stability-guard)。
|
|
4
|
+
* 边界:只执行回滚;学习退化检测归 05-持续学习引擎 stability-guard。
|
|
5
|
+
*
|
|
6
|
+
* v2.5.0(infra-4)转实——注入式执行器 + RTO 记账:
|
|
7
|
+
* - learning 层:委托注入的 SkillRollbackPort(部署侧桥接 05 SkillVersioner 状态翻转 /
|
|
8
|
+
* procedural-memory Git revert);返回恢复到的版本号;
|
|
9
|
+
* - 其余层:委托注入的 InfraRollbackPort(部署侧桥接 K8s rollout undo 等灰度回滚);
|
|
10
|
+
* - 计时记账:rtoSeconds 对照 RTO_RPO_TARGETS(learning 600s / infrastructure 60s)
|
|
11
|
+
* 判 contractMet;RPO = 0(版本化永久,无数据丢失);
|
|
12
|
+
* - 执行器抛错 → status='failed' 且 contractMet=false(绝不谎报愈合)。
|
|
13
|
+
*/
|
|
14
|
+
import type { FaultEvent, HealingOutcome } from '../types.js';
|
|
15
|
+
/** 技能版本回滚端口(部署侧桥接 05 skill-versioner / procedural-memory)。 */
|
|
16
|
+
export interface SkillRollbackPort {
|
|
17
|
+
/** 回滚指定技能;返回恢复到的版本号(无可恢复为 undefined)。 */
|
|
18
|
+
rollbackSkill(skillId: string, version?: string): string | undefined;
|
|
19
|
+
}
|
|
20
|
+
/** 基础设施灰度回滚端口(部署侧桥接 K8s rollout undo 等)。 */
|
|
21
|
+
export interface InfraRollbackPort {
|
|
22
|
+
/** 对目标(服务/发布)执行灰度回滚。 */
|
|
23
|
+
rollbackInfra(target: string): void;
|
|
24
|
+
}
|
|
25
|
+
/** 回滚执行器依赖(按层注入;缺省视为未装配)。 */
|
|
26
|
+
export interface RollbackDeps {
|
|
27
|
+
readonly skill?: SkillRollbackPort;
|
|
28
|
+
readonly infra?: InfraRollbackPort;
|
|
29
|
+
}
|
|
30
|
+
/** 回滚控制器。 */
|
|
31
|
+
export declare class RollbackController {
|
|
32
|
+
private readonly deps;
|
|
33
|
+
constructor(deps?: RollbackDeps);
|
|
34
|
+
/** 执行技能版本回滚(learning 层)或灰度回滚(其余层),并记账 RTO/RPO。 */
|
|
35
|
+
rollback(fault: FaultEvent, target: string): HealingOutcome;
|
|
36
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 回滚控制(rollback-controller)——「愈」支柱子模块。
|
|
3
|
+
* 职责:**技能版本回滚 / 灰度回滚**(对接 §5.5 学习层与 §5.3 stability-guard)。
|
|
4
|
+
* 边界:只执行回滚;学习退化检测归 05-持续学习引擎 stability-guard。
|
|
5
|
+
*
|
|
6
|
+
* v2.5.0(infra-4)转实——注入式执行器 + RTO 记账:
|
|
7
|
+
* - learning 层:委托注入的 SkillRollbackPort(部署侧桥接 05 SkillVersioner 状态翻转 /
|
|
8
|
+
* procedural-memory Git revert);返回恢复到的版本号;
|
|
9
|
+
* - 其余层:委托注入的 InfraRollbackPort(部署侧桥接 K8s rollout undo 等灰度回滚);
|
|
10
|
+
* - 计时记账:rtoSeconds 对照 RTO_RPO_TARGETS(learning 600s / infrastructure 60s)
|
|
11
|
+
* 判 contractMet;RPO = 0(版本化永久,无数据丢失);
|
|
12
|
+
* - 执行器抛错 → status='failed' 且 contractMet=false(绝不谎报愈合)。
|
|
13
|
+
*/
|
|
14
|
+
import { RTO_RPO_TARGETS } from '../types.js';
|
|
15
|
+
/** 回滚控制器。 */
|
|
16
|
+
export class RollbackController {
|
|
17
|
+
deps;
|
|
18
|
+
constructor(deps = {}) {
|
|
19
|
+
this.deps = deps;
|
|
20
|
+
}
|
|
21
|
+
/** 执行技能版本回滚(learning 层)或灰度回滚(其余层),并记账 RTO/RPO。 */
|
|
22
|
+
rollback(fault, target) {
|
|
23
|
+
const start = Date.now();
|
|
24
|
+
const isLearning = fault.layer === 'learning';
|
|
25
|
+
try {
|
|
26
|
+
let detail;
|
|
27
|
+
let restored;
|
|
28
|
+
if (isLearning) {
|
|
29
|
+
if (!this.deps.skill)
|
|
30
|
+
throw new Error('未装配 SkillRollbackPort,无法执行技能回滚');
|
|
31
|
+
restored = this.deps.skill.rollbackSkill(target);
|
|
32
|
+
detail = restored
|
|
33
|
+
? `技能 ${target} 已回滚,恢复版本 ${restored}`
|
|
34
|
+
: `技能 ${target} 已回滚(无可恢复的前置版本)`;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
if (!this.deps.infra)
|
|
38
|
+
throw new Error('未装配 InfraRollbackPort,无法执行灰度回滚');
|
|
39
|
+
this.deps.infra.rollbackInfra(target);
|
|
40
|
+
detail = `灰度回滚已执行:${target}`;
|
|
41
|
+
}
|
|
42
|
+
const rtoSeconds = (Date.now() - start) / 1000;
|
|
43
|
+
const contract = RTO_RPO_TARGETS[fault.layer];
|
|
44
|
+
return {
|
|
45
|
+
faultId: fault.id,
|
|
46
|
+
actionId: `rollback-${fault.id}`,
|
|
47
|
+
layer: fault.layer,
|
|
48
|
+
status: 'healed',
|
|
49
|
+
contractMet: contract ? rtoSeconds <= contract.rtoSeconds : true,
|
|
50
|
+
rtoSeconds,
|
|
51
|
+
rpoSeconds: 0,
|
|
52
|
+
at: Date.now(),
|
|
53
|
+
detail,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
const rtoSeconds = (Date.now() - start) / 1000;
|
|
58
|
+
return {
|
|
59
|
+
faultId: fault.id,
|
|
60
|
+
actionId: `rollback-${fault.id}`,
|
|
61
|
+
layer: fault.layer,
|
|
62
|
+
status: 'failed',
|
|
63
|
+
contractMet: false,
|
|
64
|
+
rtoSeconds,
|
|
65
|
+
rpoSeconds: 0,
|
|
66
|
+
at: Date.now(),
|
|
67
|
+
detail: `回滚失败:${e instanceof Error ? e.message : String(e)}`,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ============================================================
|
|
3
|
+
* YYC³ AI Family — 自愈中心(「愈」支柱)核心类型定义
|
|
4
|
+
* ------------------------------------------------------------
|
|
5
|
+
* 文档依据:YYC3-AI-Family-Agent-架构设计.md §5.5
|
|
6
|
+
* 边界:负责故障侦测 / 降级 / 熔断 / 回滚 / 一致性修复 /
|
|
7
|
+
* 记忆遗忘 / 学习回滚;
|
|
8
|
+
* 不负责策略判定(归治理中心)、业务补偿逻辑(归各家人)。
|
|
9
|
+
* ============================================================
|
|
10
|
+
*/
|
|
11
|
+
/** 自愈层级(§5.5 矩阵的六个层级)。 */
|
|
12
|
+
export type HealingLayer = 'infrastructure' | 'model-service' | 'bus' | 'memory' | 'learning' | 'judgment';
|
|
13
|
+
/** 故障事件(fault-detector 产出)。 */
|
|
14
|
+
export interface FaultEvent {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly layer: HealingLayer;
|
|
17
|
+
/** 故障类型,如 "node-unhealthy" / "llm-timeout" / "message-backlog"。 */
|
|
18
|
+
readonly type: string;
|
|
19
|
+
readonly severity: 'low' | 'med' | 'high' | 'critical';
|
|
20
|
+
readonly detail: string;
|
|
21
|
+
readonly detectedAt: number;
|
|
22
|
+
readonly traceId?: string;
|
|
23
|
+
}
|
|
24
|
+
/** 自愈动作种类。 */
|
|
25
|
+
export type HealingActionKind = 'scale' | 'restart' | 'degrade' | 'circuit-break' | 'retry' | 'dead-letter' | 'throttle' | 'rollback' | 'snapshot-repair' | 'force-escalation';
|
|
26
|
+
/** 自愈动作(由降级/回滚/一致性修复控制器产出并执行)。 */
|
|
27
|
+
export interface HealingAction {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly faultId: string;
|
|
30
|
+
readonly layer: HealingLayer;
|
|
31
|
+
readonly kind: HealingActionKind;
|
|
32
|
+
/** 动作目标(Pod / 服务 / 技能 / 记忆层)。 */
|
|
33
|
+
readonly target: string;
|
|
34
|
+
readonly params?: Readonly<Record<string, unknown>>;
|
|
35
|
+
}
|
|
36
|
+
/** RTO/RPO 契约(§5.5 / §6.2)。 */
|
|
37
|
+
export interface RtoRpoContract {
|
|
38
|
+
/** 恢复时间目标(秒)。 */
|
|
39
|
+
readonly rtoSeconds: number;
|
|
40
|
+
/** 恢复点目标(秒),0 表示不允许数据丢失。 */
|
|
41
|
+
readonly rpoSeconds: number;
|
|
42
|
+
}
|
|
43
|
+
/** 自愈结果。 */
|
|
44
|
+
export interface HealingOutcome {
|
|
45
|
+
readonly faultId: string;
|
|
46
|
+
readonly actionId: string;
|
|
47
|
+
readonly layer: HealingLayer;
|
|
48
|
+
readonly status: 'healed' | 'degraded' | 'failed' | 'escalated';
|
|
49
|
+
/** 是否满足 RTO/RPO 契约。 */
|
|
50
|
+
readonly contractMet: boolean;
|
|
51
|
+
/** 实际恢复耗时(秒)。 */
|
|
52
|
+
readonly rtoSeconds?: number;
|
|
53
|
+
/** 实际数据丢失(秒)。 */
|
|
54
|
+
readonly rpoSeconds?: number;
|
|
55
|
+
readonly at: number;
|
|
56
|
+
readonly detail?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* §5.5 自愈层级矩阵(layer → 故障类型 / 自愈动作 / 触发源)。
|
|
60
|
+
*/
|
|
61
|
+
export declare const HEALING_LAYER_MATRIX: Readonly<Record<HealingLayer, {
|
|
62
|
+
faultType: string;
|
|
63
|
+
healingAction: string;
|
|
64
|
+
triggerSource: string;
|
|
65
|
+
}>>;
|
|
66
|
+
/**
|
|
67
|
+
* RTO/RPO 目标(§5.5):
|
|
68
|
+
* · 基础设施 RTO ≤ 60s / RPO = 0;
|
|
69
|
+
* · 记忆层 RTO ≤ 5min(300s)/ RPO = 0(快照增量);
|
|
70
|
+
* · 学习回滚 RTO ≤ 10min(600s);学习层未显式给定 RPO,
|
|
71
|
+
* 因技能版本化永久(Git YAML),取 0。
|
|
72
|
+
*/
|
|
73
|
+
export declare const RTO_RPO_TARGETS: Readonly<Record<'infrastructure' | 'memory' | 'learning', RtoRpoContract>>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ============================================================
|
|
3
|
+
* YYC³ AI Family — 自愈中心(「愈」支柱)核心类型定义
|
|
4
|
+
* ------------------------------------------------------------
|
|
5
|
+
* 文档依据:YYC3-AI-Family-Agent-架构设计.md §5.5
|
|
6
|
+
* 边界:负责故障侦测 / 降级 / 熔断 / 回滚 / 一致性修复 /
|
|
7
|
+
* 记忆遗忘 / 学习回滚;
|
|
8
|
+
* 不负责策略判定(归治理中心)、业务补偿逻辑(归各家人)。
|
|
9
|
+
* ============================================================
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* §5.5 自愈层级矩阵(layer → 故障类型 / 自愈动作 / 触发源)。
|
|
13
|
+
*/
|
|
14
|
+
export const HEALING_LAYER_MATRIX = {
|
|
15
|
+
// 第 1 层:基础设施——节点/副本异常,K8s 扩缩容,触发源为天枢 dashu-self-healing
|
|
16
|
+
infrastructure: {
|
|
17
|
+
faultType: '节点/副本异常',
|
|
18
|
+
healingAction: 'K8s 扩缩容、Pod 重建',
|
|
19
|
+
triggerSource: '天枢 dashu-self-healing',
|
|
20
|
+
},
|
|
21
|
+
// 第 2 层:模型服务——LLM 不可用/超时,Ollama 本地兜底 + 模型降级
|
|
22
|
+
'model-service': {
|
|
23
|
+
faultType: 'LLM 不可用/超时',
|
|
24
|
+
healingAction: 'Ollama 本地兜底、模型降级',
|
|
25
|
+
triggerSource: '千行/万物 provider',
|
|
26
|
+
},
|
|
27
|
+
// 第 3 层:总线——消息积压/丢失,重试、死信、限流
|
|
28
|
+
bus: {
|
|
29
|
+
faultType: '消息积压/丢失',
|
|
30
|
+
healingAction: '重试、死信、限流',
|
|
31
|
+
triggerSource: '通信总线',
|
|
32
|
+
},
|
|
33
|
+
// 第 4 层:记忆——跨层不一致/污染,consistency-repair 回滚至快照
|
|
34
|
+
memory: {
|
|
35
|
+
faultType: '跨层不一致/污染',
|
|
36
|
+
healingAction: 'consistency-repair 回滚至快照',
|
|
37
|
+
triggerSource: 'memory-orchestrator',
|
|
38
|
+
},
|
|
39
|
+
// 第 5 层:学习——新学习致能力退化,技能版本回滚 + 学习冻结
|
|
40
|
+
learning: {
|
|
41
|
+
faultType: '新学习致能力退化',
|
|
42
|
+
healingAction: '技能版本回滚、学习冻结',
|
|
43
|
+
triggerSource: 'stability-guard',
|
|
44
|
+
},
|
|
45
|
+
// 第 6 层:判断——置信度异常/自评失真,强制 escalation + 外部复验
|
|
46
|
+
judgment: {
|
|
47
|
+
faultType: '置信度异常/自评失真',
|
|
48
|
+
healingAction: '强制 escalation、外部复验',
|
|
49
|
+
triggerSource: 'verification-gateway',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* RTO/RPO 目标(§5.5):
|
|
54
|
+
* · 基础设施 RTO ≤ 60s / RPO = 0;
|
|
55
|
+
* · 记忆层 RTO ≤ 5min(300s)/ RPO = 0(快照增量);
|
|
56
|
+
* · 学习回滚 RTO ≤ 10min(600s);学习层未显式给定 RPO,
|
|
57
|
+
* 因技能版本化永久(Git YAML),取 0。
|
|
58
|
+
*/
|
|
59
|
+
export const RTO_RPO_TARGETS = {
|
|
60
|
+
infrastructure: { rtoSeconds: 60, rpoSeconds: 0 },
|
|
61
|
+
memory: { rtoSeconds: 5 * 60, rpoSeconds: 0 },
|
|
62
|
+
learning: { rtoSeconds: 10 * 60, rpoSeconds: 0 },
|
|
63
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP 服务端装配(mcp-server-assembly)—— P6-A(M14)· 能力供给接线闭环。
|
|
3
|
+
* 职责:把「工具目录 + 准入治理 + 指标仪表」组装为一个可启动的 MCP 请求处理器——
|
|
4
|
+
* tools/call 治理链:可见性 → CapabilityAllowlist 裁决(observe 留痕 / enforce 拒绝)
|
|
5
|
+
* → Policy 放行后进入 dispatch(instrumentMcpDispatcher 记 ok|error);
|
|
6
|
+
* metrics 注入即接线:plugin_denied(enforce 拒绝)与 mcp_tool_calls 自动记账
|
|
7
|
+
* (技能装载侧 skills_loaded 由部署侧以 instrumentSkillRegistry 包装,见 family-server.entry)。
|
|
8
|
+
* 边界:只做装配与策略适配;协议语义归 02 protocol、准入判定归 10 allowlist、
|
|
9
|
+
* 指标语义归 09;工具目录与清单由部署侧注入(内核不读 assets/presets)。
|
|
10
|
+
*/
|
|
11
|
+
import { type McpRequestHandler, type McpServerInfo, type McpToolDescriptor, type McpToolDispatcher } from '../02-云枢核心引擎/mcp-adapter/server/protocol.js';
|
|
12
|
+
import { CapabilityAllowlist, type AdmissionMode } from '../10-能力注册中心/allowlist.js';
|
|
13
|
+
import type { ComplianceAudit } from '../06-治理中心/compliance-audit/compliance-audit.js';
|
|
14
|
+
import type { FamilyMetrics } from '../09-可观测性/family-metrics.js';
|
|
15
|
+
/** 缺省提供工具目录的能力包(当前 45 工具全部由金包 family-core 提供)。 */
|
|
16
|
+
export declare const DEFAULT_MCP_PLUGIN_ID = "family-core";
|
|
17
|
+
/** 准入配置(直通 CapabilityAllowlist;缺省 observe + 仅 family-core)。 */
|
|
18
|
+
export interface McpAdmissionOptions {
|
|
19
|
+
readonly allowed: readonly string[];
|
|
20
|
+
readonly mode?: AdmissionMode;
|
|
21
|
+
readonly audit?: ComplianceAudit;
|
|
22
|
+
}
|
|
23
|
+
/** 装配选项(全部注入式;本模块零 IO)。 */
|
|
24
|
+
export interface McpServerAssemblyOptions {
|
|
25
|
+
readonly serverInfo: McpServerInfo;
|
|
26
|
+
readonly tools: readonly McpToolDescriptor[];
|
|
27
|
+
readonly visible?: (tool: McpToolDescriptor) => boolean;
|
|
28
|
+
readonly admission?: McpAdmissionOptions;
|
|
29
|
+
/** 工具 → 能力包归属(缺省全部归 family-core)。 */
|
|
30
|
+
readonly pluginOfTool?: (toolName: string) => string;
|
|
31
|
+
/** 真实分派(未配置时 tools/call 回 -32603)。 */
|
|
32
|
+
readonly dispatch?: McpToolDispatcher;
|
|
33
|
+
/** 共享指标集:传入即自动接线(准入拒绝 + 分派 ok|error)。 */
|
|
34
|
+
readonly metrics?: FamilyMetrics;
|
|
35
|
+
/** 无 _meta.traceId 时的合成前缀(保证未携带链路的准入审计仍可追溯)。 */
|
|
36
|
+
readonly tracePrefix?: string;
|
|
37
|
+
}
|
|
38
|
+
/** 装配结果:无状态 MCP 处理器 + 准入清单(供部署侧查询 rejectedCount / 审计链)。 */
|
|
39
|
+
export interface McpServerAssembly {
|
|
40
|
+
readonly handler: McpRequestHandler;
|
|
41
|
+
readonly allowlist: CapabilityAllowlist;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 组装 MCP 服务端(准入裁决 → 仪表化分派 → 无状态 JSON-RPC 处理器)。
|
|
45
|
+
* 未携带 traceId 的调用按 `tracePrefix-序号` 合成,确保 observe 留痕与
|
|
46
|
+
* enforce 拒绝都落入不可篡改审计链。
|
|
47
|
+
*/
|
|
48
|
+
export declare function assembleMcpServer(options: McpServerAssemblyOptions): McpServerAssembly;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP 服务端装配(mcp-server-assembly)—— P6-A(M14)· 能力供给接线闭环。
|
|
3
|
+
* 职责:把「工具目录 + 准入治理 + 指标仪表」组装为一个可启动的 MCP 请求处理器——
|
|
4
|
+
* tools/call 治理链:可见性 → CapabilityAllowlist 裁决(observe 留痕 / enforce 拒绝)
|
|
5
|
+
* → Policy 放行后进入 dispatch(instrumentMcpDispatcher 记 ok|error);
|
|
6
|
+
* metrics 注入即接线:plugin_denied(enforce 拒绝)与 mcp_tool_calls 自动记账
|
|
7
|
+
* (技能装载侧 skills_loaded 由部署侧以 instrumentSkillRegistry 包装,见 family-server.entry)。
|
|
8
|
+
* 边界:只做装配与策略适配;协议语义归 02 protocol、准入判定归 10 allowlist、
|
|
9
|
+
* 指标语义归 09;工具目录与清单由部署侧注入(内核不读 assets/presets)。
|
|
10
|
+
*/
|
|
11
|
+
import { createMcpRequestHandler, } from '../02-云枢核心引擎/mcp-adapter/server/protocol.js';
|
|
12
|
+
import { CapabilityAllowlist } from '../10-能力注册中心/allowlist.js';
|
|
13
|
+
import { instrumentCapabilityAllowlist, instrumentMcpDispatcher, } from '../09-可观测性/capability-instrumentation.js';
|
|
14
|
+
/** 缺省提供工具目录的能力包(当前 45 工具全部由金包 family-core 提供)。 */
|
|
15
|
+
export const DEFAULT_MCP_PLUGIN_ID = 'family-core';
|
|
16
|
+
/**
|
|
17
|
+
* 组装 MCP 服务端(准入裁决 → 仪表化分派 → 无状态 JSON-RPC 处理器)。
|
|
18
|
+
* 未携带 traceId 的调用按 `tracePrefix-序号` 合成,确保 observe 留痕与
|
|
19
|
+
* enforce 拒绝都落入不可篡改审计链。
|
|
20
|
+
*/
|
|
21
|
+
export function assembleMcpServer(options) {
|
|
22
|
+
const tracePrefix = options.tracePrefix ?? 'mcp-no-trace';
|
|
23
|
+
let untraced = 0;
|
|
24
|
+
const allowlist = new CapabilityAllowlist({
|
|
25
|
+
allowed: options.admission?.allowed ?? [DEFAULT_MCP_PLUGIN_ID],
|
|
26
|
+
mode: options.admission?.mode,
|
|
27
|
+
audit: options.admission?.audit,
|
|
28
|
+
});
|
|
29
|
+
const governed = options.metrics ? instrumentCapabilityAllowlist(allowlist, options.metrics) : allowlist;
|
|
30
|
+
const policy = (ctx) => {
|
|
31
|
+
const decision = governed.admit({
|
|
32
|
+
pluginId: options.pluginOfTool ? options.pluginOfTool(ctx.toolName) : DEFAULT_MCP_PLUGIN_ID,
|
|
33
|
+
traceId: ctx.traceId ?? `${tracePrefix}-${(untraced += 1)}`,
|
|
34
|
+
actor: ctx.actor ?? 'mcp:anonymous',
|
|
35
|
+
action: 'tool.call',
|
|
36
|
+
resource: ctx.toolName,
|
|
37
|
+
});
|
|
38
|
+
return { admitted: decision.admitted, reason: decision.reason };
|
|
39
|
+
};
|
|
40
|
+
const dispatch = options.dispatch && options.metrics
|
|
41
|
+
? instrumentMcpDispatcher(options.dispatch, options.metrics)
|
|
42
|
+
: options.dispatch;
|
|
43
|
+
return {
|
|
44
|
+
handler: createMcpRequestHandler({
|
|
45
|
+
serverInfo: options.serverInfo,
|
|
46
|
+
tools: options.tools,
|
|
47
|
+
visible: options.visible,
|
|
48
|
+
policy,
|
|
49
|
+
dispatch,
|
|
50
|
+
}),
|
|
51
|
+
allowlist,
|
|
52
|
+
};
|
|
53
|
+
}
|