@su-record/vibe 2.6.35 → 2.6.42
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/.env +62 -0
- package/.env.example +54 -0
- package/CLAUDE.md +323 -107
- package/README.md +612 -203
- package/agents/compounder.md +1 -1
- package/agents/junior-mentor.md +141 -0
- package/agents/research/best-practices-agent.md +4 -4
- package/agents/research/codebase-patterns-agent.md +1 -1
- package/agents/research/framework-docs-agent.md +1 -1
- package/agents/research/security-advisory-agent.md +4 -4
- package/agents/review/complexity-reviewer.md +2 -2
- package/agents/ui/ui-a11y-auditor.md +93 -0
- package/agents/ui/ui-antipattern-detector.md +94 -0
- package/agents/ui/ui-dataviz-advisor.md +69 -0
- package/agents/ui/ui-design-system-gen.md +57 -0
- package/agents/ui/ui-industry-analyzer.md +49 -0
- package/agents/ui/ui-layout-architect.md +65 -0
- package/agents/ui/ui-stack-implementer.md +68 -0
- package/agents/ui/ux-compliance-reviewer.md +81 -0
- package/agents/ui-previewer.md +2 -2
- package/commands/vibe.analyze.md +35 -18
- package/commands/vibe.reason.md +5 -1
- package/commands/vibe.review.md +140 -8
- package/commands/vibe.run.md +535 -25
- package/commands/vibe.spec.md +133 -14
- package/commands/vibe.spec.review.md +155 -10
- package/commands/vibe.trace.md +49 -1
- package/commands/vibe.utils.md +25 -10
- package/commands/vibe.verify.md +44 -5
- package/commands/vibe.voice.md +82 -0
- package/dist/cli/auth.d.ts +16 -4
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +100 -91
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/collaborator.js +17 -17
- package/dist/cli/commands/evolution.d.ts +16 -0
- package/dist/cli/commands/evolution.d.ts.map +1 -0
- package/dist/cli/commands/evolution.js +210 -0
- package/dist/cli/commands/evolution.js.map +1 -0
- package/dist/cli/commands/index.d.ts +13 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +13 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/info.d.ts +16 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js +150 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/init.d.ts +20 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +142 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/remove.d.ts +8 -0
- package/dist/cli/commands/remove.d.ts.map +1 -0
- package/dist/cli/commands/remove.js +142 -0
- package/dist/cli/commands/remove.js.map +1 -0
- package/dist/cli/commands/sentinel.d.ts +13 -0
- package/dist/cli/commands/sentinel.d.ts.map +1 -0
- package/dist/cli/commands/sentinel.js +322 -0
- package/dist/cli/commands/sentinel.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +9 -0
- package/dist/cli/commands/setup.d.ts.map +1 -0
- package/dist/cli/commands/setup.js +216 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/slack.d.ts +12 -0
- package/dist/cli/commands/slack.d.ts.map +1 -0
- package/dist/cli/commands/slack.js +92 -0
- package/dist/cli/commands/slack.js.map +1 -0
- package/dist/cli/commands/sync.d.ts +9 -0
- package/dist/cli/commands/sync.d.ts.map +1 -0
- package/dist/cli/commands/sync.js +166 -0
- package/dist/cli/commands/sync.js.map +1 -0
- package/dist/cli/commands/telegram.d.ts +11 -0
- package/dist/cli/commands/telegram.d.ts.map +1 -0
- package/dist/cli/commands/telegram.js +259 -0
- package/dist/cli/commands/telegram.js.map +1 -0
- package/dist/cli/commands/update.d.ts +10 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +90 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/commands/upgrade.d.ts +10 -0
- package/dist/cli/commands/upgrade.d.ts.map +1 -0
- package/dist/cli/commands/upgrade.js +26 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/index.d.ts +5 -6
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +157 -534
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/llm/claude-commands.d.ts +12 -0
- package/dist/cli/llm/claude-commands.d.ts.map +1 -0
- package/dist/cli/llm/claude-commands.js +73 -0
- package/dist/cli/llm/claude-commands.js.map +1 -0
- package/dist/cli/llm/config.d.ts +21 -0
- package/dist/cli/llm/config.d.ts.map +1 -0
- package/dist/cli/llm/config.js +140 -0
- package/dist/cli/llm/config.js.map +1 -0
- package/dist/cli/llm/gemini-commands.d.ts +27 -0
- package/dist/cli/llm/gemini-commands.d.ts.map +1 -0
- package/dist/cli/llm/gemini-commands.js +361 -0
- package/dist/cli/llm/gemini-commands.js.map +1 -0
- package/dist/cli/llm/gpt-commands.d.ts +23 -0
- package/dist/cli/llm/gpt-commands.d.ts.map +1 -0
- package/dist/cli/llm/gpt-commands.js +139 -0
- package/dist/cli/llm/gpt-commands.js.map +1 -0
- package/dist/cli/llm/help.d.ts +12 -0
- package/dist/cli/llm/help.d.ts.map +1 -0
- package/dist/cli/llm/help.js +37 -0
- package/dist/cli/llm/help.js.map +1 -0
- package/dist/cli/llm/index.d.ts +9 -0
- package/dist/cli/llm/index.d.ts.map +1 -0
- package/dist/cli/llm/index.js +9 -0
- package/dist/cli/llm/index.js.map +1 -0
- package/dist/cli/llm.d.ts +10 -46
- package/dist/cli/llm.d.ts.map +1 -1
- package/dist/cli/llm.js +10 -499
- package/dist/cli/llm.js.map +1 -1
- package/dist/cli/postinstall/claude-agents.d.ts +13 -0
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -0
- package/dist/cli/postinstall/claude-agents.js +161 -0
- package/dist/cli/postinstall/claude-agents.js.map +1 -0
- package/dist/cli/postinstall/constants.d.ts +25 -0
- package/dist/cli/postinstall/constants.d.ts.map +1 -0
- package/dist/cli/postinstall/constants.js +313 -0
- package/dist/cli/postinstall/constants.js.map +1 -0
- package/dist/cli/postinstall/cursor-agents.d.ts +8 -0
- package/dist/cli/postinstall/cursor-agents.d.ts.map +1 -0
- package/dist/cli/postinstall/cursor-agents.js +131 -0
- package/dist/cli/postinstall/cursor-agents.js.map +1 -0
- package/dist/cli/postinstall/cursor-rules.d.ts +11 -0
- package/dist/cli/postinstall/cursor-rules.d.ts.map +1 -0
- package/dist/cli/postinstall/cursor-rules.js +205 -0
- package/dist/cli/postinstall/cursor-rules.js.map +1 -0
- package/dist/cli/postinstall/cursor-skills.d.ts +9 -0
- package/dist/cli/postinstall/cursor-skills.d.ts.map +1 -0
- package/dist/cli/postinstall/cursor-skills.js +800 -0
- package/dist/cli/postinstall/cursor-skills.js.map +1 -0
- package/dist/cli/postinstall/fs-utils.d.ts +31 -0
- package/dist/cli/postinstall/fs-utils.d.ts.map +1 -0
- package/dist/cli/postinstall/fs-utils.js +90 -0
- package/dist/cli/postinstall/fs-utils.js.map +1 -0
- package/dist/cli/postinstall/global-config.d.ts +22 -0
- package/dist/cli/postinstall/global-config.d.ts.map +1 -0
- package/dist/cli/postinstall/global-config.js +155 -0
- package/dist/cli/postinstall/global-config.js.map +1 -0
- package/dist/cli/postinstall/index.d.ts +23 -0
- package/dist/cli/postinstall/index.d.ts.map +1 -0
- package/dist/cli/postinstall/index.js +23 -0
- package/dist/cli/postinstall/index.js.map +1 -0
- package/dist/cli/postinstall/inline-skills.d.ts +8 -0
- package/dist/cli/postinstall/inline-skills.d.ts.map +1 -0
- package/dist/cli/postinstall/inline-skills.js +158 -0
- package/dist/cli/postinstall/inline-skills.js.map +1 -0
- package/dist/cli/postinstall/main.d.ts +9 -0
- package/dist/cli/postinstall/main.d.ts.map +1 -0
- package/dist/cli/postinstall/main.js +169 -0
- package/dist/cli/postinstall/main.js.map +1 -0
- package/dist/cli/postinstall.d.ts +3 -18
- package/dist/cli/postinstall.d.ts.map +1 -1
- package/dist/cli/postinstall.js +4 -1572
- package/dist/cli/postinstall.js.map +1 -1
- package/dist/cli/prompt.d.ts +28 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +64 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/setup/GlobalInstaller.d.ts +5 -6
- package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
- package/dist/cli/setup/GlobalInstaller.js +22 -23
- package/dist/cli/setup/GlobalInstaller.js.map +1 -1
- package/dist/cli/setup/LanguageDetector.d.ts +1 -2
- package/dist/cli/setup/LanguageDetector.d.ts.map +1 -1
- package/dist/cli/setup/LanguageDetector.js +1 -2
- package/dist/cli/setup/LanguageDetector.js.map +1 -1
- package/dist/cli/setup/LegacyMigration.d.ts +5 -6
- package/dist/cli/setup/LegacyMigration.d.ts.map +1 -1
- package/dist/cli/setup/LegacyMigration.js +97 -39
- package/dist/cli/setup/LegacyMigration.js.map +1 -1
- package/dist/cli/setup/ProjectSetup.d.ts +4 -5
- package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +73 -73
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/cli/setup/index.d.ts +2 -8
- package/dist/cli/setup/index.d.ts.map +1 -1
- package/dist/cli/setup/index.js +2 -8
- package/dist/cli/setup/index.js.map +1 -1
- package/dist/cli/setup.d.ts +3 -11
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +3 -11
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/types.d.ts +17 -2
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/utils.d.ts +9 -0
- package/dist/cli/utils.d.ts.map +1 -1
- package/dist/cli/utils.js +28 -0
- package/dist/cli/utils.js.map +1 -1
- package/dist/infra/lib/ContextCompressor.d.ts.map +1 -0
- package/dist/infra/lib/ContextCompressor.js +306 -0
- package/dist/infra/lib/ContextCompressor.js.map +1 -0
- package/dist/infra/lib/DeepInit.d.ts.map +1 -0
- package/dist/infra/lib/DeepInit.js.map +1 -0
- package/dist/infra/lib/FrameworkDetector.d.ts.map +1 -0
- package/dist/infra/lib/FrameworkDetector.js.map +1 -0
- package/dist/infra/lib/IterationTracker.d.ts +81 -0
- package/dist/infra/lib/IterationTracker.d.ts.map +1 -0
- package/dist/infra/lib/IterationTracker.js.map +1 -0
- package/dist/infra/lib/MemoryManager.d.ts +96 -0
- package/dist/infra/lib/MemoryManager.d.ts.map +1 -0
- package/dist/infra/lib/MemoryManager.js +314 -0
- package/dist/infra/lib/MemoryManager.js.map +1 -0
- package/dist/infra/lib/ModelRouter.d.ts.map +1 -0
- package/dist/infra/lib/ModelRouter.js.map +1 -0
- package/dist/infra/lib/OrchestrateWorkflow.d.ts.map +1 -0
- package/dist/infra/lib/OrchestrateWorkflow.js.map +1 -0
- package/dist/infra/lib/ProgressTracker.d.ts.map +1 -0
- package/dist/infra/lib/ProgressTracker.js +267 -0
- package/dist/infra/lib/ProgressTracker.js.map +1 -0
- package/dist/infra/lib/ProjectCache.d.ts.map +1 -0
- package/dist/infra/lib/ProjectCache.js.map +1 -0
- package/dist/infra/lib/PythonParser.d.ts.map +1 -0
- package/dist/infra/lib/PythonParser.js +269 -0
- package/dist/infra/lib/PythonParser.js.map +1 -0
- package/dist/infra/lib/ReviewRace.d.ts.map +1 -0
- package/dist/infra/lib/ReviewRace.js +446 -0
- package/dist/infra/lib/ReviewRace.js.map +1 -0
- package/dist/infra/lib/RuleBuildSystem.d.ts +157 -0
- package/dist/infra/lib/RuleBuildSystem.d.ts.map +1 -0
- package/dist/infra/lib/RuleBuildSystem.js +550 -0
- package/dist/infra/lib/RuleBuildSystem.js.map +1 -0
- package/dist/infra/lib/SkillFrontmatter.d.ts +67 -0
- package/dist/infra/lib/SkillFrontmatter.d.ts.map +1 -0
- package/dist/infra/lib/SkillFrontmatter.js.map +1 -0
- package/dist/infra/lib/SkillQualityGate.d.ts.map +1 -0
- package/dist/infra/lib/SkillQualityGate.js.map +1 -0
- package/dist/infra/lib/SkillRepository.d.ts.map +1 -0
- package/dist/infra/lib/SkillRepository.js +477 -0
- package/dist/infra/lib/SkillRepository.js.map +1 -0
- package/dist/infra/lib/UltraQA.d.ts +85 -0
- package/dist/infra/lib/UltraQA.d.ts.map +1 -0
- package/dist/infra/lib/UltraQA.js +297 -0
- package/dist/infra/lib/UltraQA.js.map +1 -0
- package/dist/infra/lib/autonomy/AuditStore.d.ts +63 -0
- package/dist/infra/lib/autonomy/AuditStore.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/AuditStore.js +185 -0
- package/dist/infra/lib/autonomy/AuditStore.js.map +1 -0
- package/dist/infra/lib/autonomy/AutonomyConfig.d.ts +84 -0
- package/dist/infra/lib/autonomy/AutonomyConfig.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/AutonomyConfig.js +49 -0
- package/dist/infra/lib/autonomy/AutonomyConfig.js.map +1 -0
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts +78 -0
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.js +246 -0
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.js.map +1 -0
- package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts +36 -0
- package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/BackgroundMonitor.js +138 -0
- package/dist/infra/lib/autonomy/BackgroundMonitor.js.map +1 -0
- package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts +56 -0
- package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/CollaborationProtocol.js +122 -0
- package/dist/infra/lib/autonomy/CollaborationProtocol.js.map +1 -0
- package/dist/infra/lib/autonomy/ConfirmationManager.d.ts +42 -0
- package/dist/infra/lib/autonomy/ConfirmationManager.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/ConfirmationManager.js +200 -0
- package/dist/infra/lib/autonomy/ConfirmationManager.js.map +1 -0
- package/dist/infra/lib/autonomy/ConfirmationStore.d.ts +55 -0
- package/dist/infra/lib/autonomy/ConfirmationStore.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/ConfirmationStore.js +130 -0
- package/dist/infra/lib/autonomy/ConfirmationStore.js.map +1 -0
- package/dist/infra/lib/autonomy/EventBus.d.ts +20 -0
- package/dist/infra/lib/autonomy/EventBus.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/EventBus.js +119 -0
- package/dist/infra/lib/autonomy/EventBus.js.map +1 -0
- package/dist/infra/lib/autonomy/EventOutbox.d.ts +32 -0
- package/dist/infra/lib/autonomy/EventOutbox.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/EventOutbox.js +152 -0
- package/dist/infra/lib/autonomy/EventOutbox.js.map +1 -0
- package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts +24 -0
- package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/NotificationDispatcher.js +112 -0
- package/dist/infra/lib/autonomy/NotificationDispatcher.js.map +1 -0
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts +76 -0
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/PolicyEngine.js +208 -0
- package/dist/infra/lib/autonomy/PolicyEngine.js.map +1 -0
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts +61 -0
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.js +236 -0
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.js.map +1 -0
- package/dist/infra/lib/autonomy/RiskClassifier.d.ts +35 -0
- package/dist/infra/lib/autonomy/RiskClassifier.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/RiskClassifier.js +147 -0
- package/dist/infra/lib/autonomy/RiskClassifier.js.map +1 -0
- package/dist/infra/lib/autonomy/SecuritySentinel.d.ts +51 -0
- package/dist/infra/lib/autonomy/SecuritySentinel.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/SecuritySentinel.js +162 -0
- package/dist/infra/lib/autonomy/SecuritySentinel.js.map +1 -0
- package/dist/infra/lib/autonomy/SuggestionStore.d.ts +54 -0
- package/dist/infra/lib/autonomy/SuggestionStore.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/SuggestionStore.js +144 -0
- package/dist/infra/lib/autonomy/SuggestionStore.js.map +1 -0
- package/dist/infra/lib/autonomy/TaskDecomposer.d.ts +38 -0
- package/dist/infra/lib/autonomy/TaskDecomposer.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/TaskDecomposer.js +175 -0
- package/dist/infra/lib/autonomy/TaskDecomposer.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.js +198 -0
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.js +225 -0
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/event-core.test.js +194 -0
- package/dist/infra/lib/autonomy/__tests__/event-core.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/governance.test.js +540 -0
- package/dist/infra/lib/autonomy/__tests__/governance.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/integration.test.js +480 -0
- package/dist/infra/lib/autonomy/__tests__/integration.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/proactive.test.js +410 -0
- package/dist/infra/lib/autonomy/__tests__/proactive.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.js +486 -0
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.js.map +1 -0
- package/dist/infra/lib/autonomy/index.d.ts +18 -0
- package/dist/infra/lib/autonomy/index.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/index.js +22 -0
- package/dist/infra/lib/autonomy/index.js.map +1 -0
- package/dist/infra/lib/autonomy/schemas.d.ts +317 -0
- package/dist/infra/lib/autonomy/schemas.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/schemas.js +90 -0
- package/dist/infra/lib/autonomy/schemas.js.map +1 -0
- package/dist/infra/lib/claude/index.d.ts +5 -0
- package/dist/infra/lib/claude/index.d.ts.map +1 -0
- package/dist/infra/lib/claude/index.js +5 -0
- package/dist/infra/lib/claude/index.js.map +1 -0
- package/dist/infra/lib/claude/storage.d.ts +12 -0
- package/dist/infra/lib/claude/storage.d.ts.map +1 -0
- package/dist/infra/lib/claude/storage.js +59 -0
- package/dist/infra/lib/claude/storage.js.map +1 -0
- package/dist/infra/lib/claude-storage.d.ts +12 -0
- package/dist/infra/lib/claude-storage.d.ts.map +1 -0
- package/dist/infra/lib/claude-storage.js +59 -0
- package/dist/infra/lib/claude-storage.js.map +1 -0
- package/dist/infra/lib/constants.d.ts +76 -0
- package/dist/infra/lib/constants.d.ts.map +1 -0
- package/dist/infra/lib/constants.js +92 -0
- package/dist/infra/lib/constants.js.map +1 -0
- package/dist/infra/lib/embedding/EmbeddingProvider.d.ts +20 -0
- package/dist/infra/lib/embedding/EmbeddingProvider.d.ts.map +1 -0
- package/dist/infra/lib/embedding/EmbeddingProvider.js +82 -0
- package/dist/infra/lib/embedding/EmbeddingProvider.js.map +1 -0
- package/dist/infra/lib/embedding/VectorStore.d.ts +47 -0
- package/dist/infra/lib/embedding/VectorStore.d.ts.map +1 -0
- package/dist/infra/lib/embedding/VectorStore.js +116 -0
- package/dist/infra/lib/embedding/VectorStore.js.map +1 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.d.ts +2 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.d.ts.map +1 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js +39 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js.map +1 -0
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.d.ts +2 -0
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.d.ts.map +1 -0
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.js +94 -0
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.js.map +1 -0
- package/dist/infra/lib/embedding/__tests__/cosine.test.d.ts +2 -0
- package/dist/infra/lib/embedding/__tests__/cosine.test.d.ts.map +1 -0
- package/dist/infra/lib/embedding/__tests__/cosine.test.js +73 -0
- package/dist/infra/lib/embedding/__tests__/cosine.test.js.map +1 -0
- package/dist/infra/lib/embedding/cosine.d.ts +19 -0
- package/dist/infra/lib/embedding/cosine.d.ts.map +1 -0
- package/dist/infra/lib/embedding/cosine.js +40 -0
- package/dist/infra/lib/embedding/cosine.js.map +1 -0
- package/dist/infra/lib/embedding/index.d.ts +9 -0
- package/dist/infra/lib/embedding/index.d.ts.map +1 -0
- package/dist/infra/lib/embedding/index.js +8 -0
- package/dist/infra/lib/embedding/index.js.map +1 -0
- package/dist/infra/lib/embedding/types.d.ts +30 -0
- package/dist/infra/lib/embedding/types.d.ts.map +1 -0
- package/dist/infra/lib/embedding/types.js +12 -0
- package/dist/infra/lib/embedding/types.js.map +1 -0
- package/dist/infra/lib/evolution/AgentAnalyzer.d.ts +15 -0
- package/dist/infra/lib/evolution/AgentAnalyzer.d.ts.map +1 -0
- package/dist/infra/lib/evolution/AgentAnalyzer.js +84 -0
- package/dist/infra/lib/evolution/AgentAnalyzer.js.map +1 -0
- package/dist/infra/lib/evolution/CircuitBreaker.d.ts +31 -0
- package/dist/infra/lib/evolution/CircuitBreaker.d.ts.map +1 -0
- package/dist/infra/lib/evolution/CircuitBreaker.js +86 -0
- package/dist/infra/lib/evolution/CircuitBreaker.js.map +1 -0
- package/dist/infra/lib/evolution/EvolutionOrchestrator.d.ts +35 -0
- package/dist/infra/lib/evolution/EvolutionOrchestrator.d.ts.map +1 -0
- package/dist/infra/lib/evolution/EvolutionOrchestrator.js +212 -0
- package/dist/infra/lib/evolution/EvolutionOrchestrator.js.map +1 -0
- package/dist/infra/lib/evolution/GenerationRegistry.d.ts +53 -0
- package/dist/infra/lib/evolution/GenerationRegistry.d.ts.map +1 -0
- package/dist/infra/lib/evolution/GenerationRegistry.js +121 -0
- package/dist/infra/lib/evolution/GenerationRegistry.js.map +1 -0
- package/dist/infra/lib/evolution/InsightExtractor.d.ts +24 -0
- package/dist/infra/lib/evolution/InsightExtractor.d.ts.map +1 -0
- package/dist/infra/lib/evolution/InsightExtractor.js +131 -0
- package/dist/infra/lib/evolution/InsightExtractor.js.map +1 -0
- package/dist/infra/lib/evolution/InsightStore.d.ts +55 -0
- package/dist/infra/lib/evolution/InsightStore.d.ts.map +1 -0
- package/dist/infra/lib/evolution/InsightStore.js +219 -0
- package/dist/infra/lib/evolution/InsightStore.js.map +1 -0
- package/dist/infra/lib/evolution/LifecycleManager.d.ts +43 -0
- package/dist/infra/lib/evolution/LifecycleManager.d.ts.map +1 -0
- package/dist/infra/lib/evolution/LifecycleManager.js +134 -0
- package/dist/infra/lib/evolution/LifecycleManager.js.map +1 -0
- package/dist/infra/lib/evolution/RollbackManager.d.ts +26 -0
- package/dist/infra/lib/evolution/RollbackManager.d.ts.map +1 -0
- package/dist/infra/lib/evolution/RollbackManager.js +133 -0
- package/dist/infra/lib/evolution/RollbackManager.js.map +1 -0
- package/dist/infra/lib/evolution/SkillGapDetector.d.ts +22 -0
- package/dist/infra/lib/evolution/SkillGapDetector.d.ts.map +1 -0
- package/dist/infra/lib/evolution/SkillGapDetector.js +81 -0
- package/dist/infra/lib/evolution/SkillGapDetector.js.map +1 -0
- package/dist/infra/lib/evolution/TriggerCollisionDetector.d.ts +27 -0
- package/dist/infra/lib/evolution/TriggerCollisionDetector.d.ts.map +1 -0
- package/dist/infra/lib/evolution/TriggerCollisionDetector.js +100 -0
- package/dist/infra/lib/evolution/TriggerCollisionDetector.js.map +1 -0
- package/dist/infra/lib/evolution/UsageTracker.d.ts +53 -0
- package/dist/infra/lib/evolution/UsageTracker.d.ts.map +1 -0
- package/dist/infra/lib/evolution/UsageTracker.js +157 -0
- package/dist/infra/lib/evolution/UsageTracker.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/generation.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/generation.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/generation.test.js +396 -0
- package/dist/infra/lib/evolution/__tests__/generation.test.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/insight.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/insight.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/insight.test.js +204 -0
- package/dist/infra/lib/evolution/__tests__/insight.test.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/integration.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/integration.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/integration.test.js +248 -0
- package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.js +350 -0
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.js.map +1 -0
- package/dist/infra/lib/evolution/generators/AgentGenerator.d.ts +14 -0
- package/dist/infra/lib/evolution/generators/AgentGenerator.d.ts.map +1 -0
- package/dist/infra/lib/evolution/generators/AgentGenerator.js +55 -0
- package/dist/infra/lib/evolution/generators/AgentGenerator.js.map +1 -0
- package/dist/infra/lib/evolution/generators/RuleGenerator.d.ts +13 -0
- package/dist/infra/lib/evolution/generators/RuleGenerator.d.ts.map +1 -0
- package/dist/infra/lib/evolution/generators/RuleGenerator.js +52 -0
- package/dist/infra/lib/evolution/generators/RuleGenerator.js.map +1 -0
- package/dist/infra/lib/evolution/generators/SkillGenerator.d.ts +15 -0
- package/dist/infra/lib/evolution/generators/SkillGenerator.d.ts.map +1 -0
- package/dist/infra/lib/evolution/generators/SkillGenerator.js +73 -0
- package/dist/infra/lib/evolution/generators/SkillGenerator.js.map +1 -0
- package/dist/infra/lib/evolution/index.d.ts +23 -0
- package/dist/infra/lib/evolution/index.d.ts.map +1 -0
- package/dist/infra/lib/evolution/index.js +21 -0
- package/dist/infra/lib/evolution/index.js.map +1 -0
- package/dist/infra/lib/gemini/auth.d.ts +30 -0
- package/dist/infra/lib/gemini/auth.d.ts.map +1 -0
- package/dist/infra/lib/gemini/auth.js +351 -0
- package/dist/infra/lib/gemini/auth.js.map +1 -0
- package/dist/infra/lib/gemini/capabilities.d.ts +32 -0
- package/dist/infra/lib/gemini/capabilities.d.ts.map +1 -0
- package/dist/infra/lib/gemini/capabilities.js +336 -0
- package/dist/infra/lib/gemini/capabilities.js.map +1 -0
- package/dist/infra/lib/gemini/chat.d.ts +44 -0
- package/dist/infra/lib/gemini/chat.d.ts.map +1 -0
- package/dist/infra/lib/gemini/chat.js +473 -0
- package/dist/infra/lib/gemini/chat.js.map +1 -0
- package/dist/infra/lib/gemini/completion.d.ts +22 -0
- package/dist/infra/lib/gemini/completion.d.ts.map +1 -0
- package/dist/infra/lib/gemini/completion.js +104 -0
- package/dist/infra/lib/gemini/completion.js.map +1 -0
- package/dist/infra/lib/gemini/constants.d.ts +37 -0
- package/dist/infra/lib/gemini/constants.d.ts.map +1 -0
- package/dist/infra/lib/gemini/constants.js +86 -0
- package/dist/infra/lib/gemini/constants.js.map +1 -0
- package/dist/infra/lib/gemini/index.d.ts +15 -0
- package/dist/infra/lib/gemini/index.d.ts.map +1 -0
- package/dist/infra/lib/gemini/index.js +14 -0
- package/dist/infra/lib/gemini/index.js.map +1 -0
- package/dist/infra/lib/gemini/models.d.ts +12 -0
- package/dist/infra/lib/gemini/models.d.ts.map +1 -0
- package/dist/infra/lib/gemini/models.js +114 -0
- package/dist/infra/lib/gemini/models.js.map +1 -0
- package/dist/infra/lib/gemini/orchestration.d.ts +33 -0
- package/dist/infra/lib/gemini/orchestration.d.ts.map +1 -0
- package/dist/infra/lib/gemini/orchestration.js +62 -0
- package/dist/infra/lib/gemini/orchestration.js.map +1 -0
- package/dist/infra/lib/gemini/types.d.ts +143 -0
- package/dist/infra/lib/gemini/types.d.ts.map +1 -0
- package/dist/infra/lib/gemini/types.js +5 -0
- package/dist/infra/lib/gemini/types.js.map +1 -0
- package/dist/infra/lib/gemini-api.d.ts +13 -0
- package/dist/infra/lib/gemini-api.d.ts.map +1 -0
- package/dist/infra/lib/gemini-api.js +13 -0
- package/dist/infra/lib/gemini-api.js.map +1 -0
- package/dist/infra/lib/gemini-constants.d.ts +8 -0
- package/dist/infra/lib/gemini-constants.d.ts.map +1 -0
- package/dist/infra/lib/gemini-constants.js +18 -0
- package/dist/infra/lib/gemini-constants.js.map +1 -0
- package/dist/infra/lib/gemini-oauth.d.ts.map +1 -0
- package/dist/infra/lib/gemini-oauth.js.map +1 -0
- package/dist/infra/lib/gemini-storage.d.ts.map +1 -0
- package/dist/infra/lib/gemini-storage.js.map +1 -0
- package/dist/infra/lib/gpt/auth.d.ts +19 -0
- package/dist/infra/lib/gpt/auth.d.ts.map +1 -0
- package/dist/infra/lib/gpt/auth.js +116 -0
- package/dist/infra/lib/gpt/auth.js.map +1 -0
- package/dist/infra/lib/gpt/chat.d.ts +36 -0
- package/dist/infra/lib/gpt/chat.d.ts.map +1 -0
- package/dist/infra/lib/gpt/chat.js +460 -0
- package/dist/infra/lib/gpt/chat.js.map +1 -0
- package/dist/infra/lib/gpt/constants.d.ts +12 -0
- package/dist/infra/lib/gpt/constants.d.ts.map +1 -0
- package/dist/infra/lib/gpt/constants.js +18 -0
- package/dist/infra/lib/gpt/constants.js.map +1 -0
- package/dist/infra/lib/gpt/embedding.d.ts +15 -0
- package/dist/infra/lib/gpt/embedding.d.ts.map +1 -0
- package/dist/infra/lib/gpt/embedding.js +79 -0
- package/dist/infra/lib/gpt/embedding.js.map +1 -0
- package/dist/infra/lib/gpt/index.d.ts +17 -0
- package/dist/infra/lib/gpt/index.d.ts.map +1 -0
- package/dist/infra/lib/gpt/index.js +17 -0
- package/dist/infra/lib/gpt/index.js.map +1 -0
- package/dist/infra/lib/gpt/oauth.d.ts +66 -0
- package/dist/infra/lib/gpt/oauth.d.ts.map +1 -0
- package/dist/infra/lib/gpt/oauth.js +403 -0
- package/dist/infra/lib/gpt/oauth.js.map +1 -0
- package/dist/infra/lib/gpt/orchestration.d.ts +28 -0
- package/dist/infra/lib/gpt/orchestration.d.ts.map +1 -0
- package/dist/infra/lib/gpt/orchestration.js +52 -0
- package/dist/infra/lib/gpt/orchestration.js.map +1 -0
- package/dist/infra/lib/gpt/specializations.d.ts +12 -0
- package/dist/infra/lib/gpt/specializations.d.ts.map +1 -0
- package/dist/infra/lib/gpt/specializations.js +27 -0
- package/dist/infra/lib/gpt/specializations.js.map +1 -0
- package/dist/infra/lib/gpt/types.d.ts +70 -0
- package/dist/infra/lib/gpt/types.d.ts.map +1 -0
- package/dist/infra/lib/gpt/types.js +5 -0
- package/dist/infra/lib/gpt/types.js.map +1 -0
- package/dist/infra/lib/gpt-api.d.ts +13 -0
- package/dist/infra/lib/gpt-api.d.ts.map +1 -0
- package/dist/infra/lib/gpt-api.js +13 -0
- package/dist/infra/lib/gpt-api.js.map +1 -0
- package/dist/infra/lib/gpt-constants.d.ts +12 -0
- package/dist/infra/lib/gpt-constants.d.ts.map +1 -0
- package/dist/infra/lib/gpt-constants.js +18 -0
- package/dist/infra/lib/gpt-constants.js.map +1 -0
- package/dist/infra/lib/gpt-oauth.d.ts.map +1 -0
- package/dist/infra/lib/gpt-oauth.js +389 -0
- package/dist/infra/lib/gpt-oauth.js.map +1 -0
- package/dist/infra/lib/gpt-storage.d.ts +40 -0
- package/dist/infra/lib/gpt-storage.d.ts.map +1 -0
- package/dist/infra/lib/gpt-storage.js +106 -0
- package/dist/infra/lib/gpt-storage.js.map +1 -0
- package/dist/infra/lib/llm/auth/ApiKeyManager.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/ApiKeyManager.js.map +1 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.d.ts +59 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.js +248 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.js.map +1 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.d.ts +5 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.js +168 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.js.map +1 -0
- package/dist/infra/lib/llm/auth/ConfigManager.d.ts +29 -0
- package/dist/infra/lib/llm/auth/ConfigManager.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/ConfigManager.js +67 -0
- package/dist/infra/lib/llm/auth/ConfigManager.js.map +1 -0
- package/dist/infra/lib/llm/auth/ProfileFileLock.d.ts +16 -0
- package/dist/infra/lib/llm/auth/ProfileFileLock.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/ProfileFileLock.js +99 -0
- package/dist/infra/lib/llm/auth/ProfileFileLock.js.map +1 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.d.ts +35 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.js +217 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.js.map +1 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.test.d.ts +2 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.test.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.test.js +120 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.test.js.map +1 -0
- package/dist/infra/lib/llm/auth/index.d.ts +30 -0
- package/dist/infra/lib/llm/auth/index.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/index.js +86 -0
- package/dist/infra/lib/llm/auth/index.js.map +1 -0
- package/dist/infra/lib/llm/index.d.ts.map +1 -0
- package/dist/infra/lib/llm/index.js.map +1 -0
- package/dist/infra/lib/llm/types.d.ts.map +1 -0
- package/dist/infra/lib/llm/types.js.map +1 -0
- package/dist/infra/lib/llm/utils/index.d.ts.map +1 -0
- package/dist/infra/lib/llm/utils/index.js.map +1 -0
- package/dist/infra/lib/llm/utils/retry.d.ts.map +1 -0
- package/dist/infra/lib/llm/utils/retry.js.map +1 -0
- package/dist/infra/lib/llm/utils/stream.d.ts.map +1 -0
- package/dist/infra/lib/llm/utils/stream.js.map +1 -0
- package/dist/infra/lib/memory/KnowledgeGraph.d.ts.map +1 -0
- package/dist/infra/lib/memory/KnowledgeGraph.js.map +1 -0
- package/dist/infra/lib/memory/KnowledgeGraph.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/KnowledgeGraph.test.js +189 -0
- package/dist/infra/lib/memory/KnowledgeGraph.test.js.map +1 -0
- package/dist/infra/lib/memory/MemorySearch.d.ts +55 -0
- package/dist/infra/lib/memory/MemorySearch.d.ts.map +1 -0
- package/dist/infra/lib/memory/MemorySearch.js +309 -0
- package/dist/infra/lib/memory/MemorySearch.js.map +1 -0
- package/dist/infra/lib/memory/MemorySearch.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/MemorySearch.test.js +149 -0
- package/dist/infra/lib/memory/MemorySearch.test.js.map +1 -0
- package/dist/infra/lib/memory/MemoryStorage.d.ts +110 -0
- package/dist/infra/lib/memory/MemoryStorage.d.ts.map +1 -0
- package/dist/infra/lib/memory/MemoryStorage.js +527 -0
- package/dist/infra/lib/memory/MemoryStorage.js.map +1 -0
- package/dist/infra/lib/memory/MemoryStorage.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/MemoryStorage.test.js +198 -0
- package/dist/infra/lib/memory/MemoryStorage.test.js.map +1 -0
- package/dist/infra/lib/memory/ObservationStore.d.ts.map +1 -0
- package/dist/infra/lib/memory/ObservationStore.js.map +1 -0
- package/dist/infra/lib/memory/ReflectionStore.d.ts +60 -0
- package/dist/infra/lib/memory/ReflectionStore.d.ts.map +1 -0
- package/dist/infra/lib/memory/ReflectionStore.js +177 -0
- package/dist/infra/lib/memory/ReflectionStore.js.map +1 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.d.ts +88 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.js +306 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.js.map +1 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.test.js +180 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.test.js.map +1 -0
- package/dist/infra/lib/memory/SessionRAGStore.d.ts +163 -0
- package/dist/infra/lib/memory/SessionRAGStore.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionRAGStore.js +728 -0
- package/dist/infra/lib/memory/SessionRAGStore.js.map +1 -0
- package/dist/infra/lib/memory/SessionRAGStore.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionRAGStore.test.js +326 -0
- package/dist/infra/lib/memory/SessionRAGStore.test.js.map +1 -0
- package/dist/infra/lib/memory/SessionSummarizer.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionSummarizer.js.map +1 -0
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.d.ts +2 -0
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.js +196 -0
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.js.map +1 -0
- package/dist/infra/lib/memory/index.d.ts +11 -0
- package/dist/infra/lib/memory/index.d.ts.map +1 -0
- package/dist/infra/lib/memory/index.js +13 -0
- package/dist/infra/lib/memory/index.js.map +1 -0
- package/dist/infra/lib/memory/index.test.d.ts +2 -0
- package/dist/infra/lib/memory/index.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/index.test.js +23 -0
- package/dist/infra/lib/memory/index.test.js.map +1 -0
- package/dist/infra/lib/sync/constants.d.ts +21 -0
- package/dist/infra/lib/sync/constants.d.ts.map +1 -0
- package/dist/infra/lib/sync/constants.js +78 -0
- package/dist/infra/lib/sync/constants.js.map +1 -0
- package/dist/infra/lib/sync/crypto.d.ts +23 -0
- package/dist/infra/lib/sync/crypto.d.ts.map +1 -0
- package/dist/infra/lib/sync/crypto.js +55 -0
- package/dist/infra/lib/sync/crypto.js.map +1 -0
- package/dist/infra/lib/sync/drive.d.ts +22 -0
- package/dist/infra/lib/sync/drive.d.ts.map +1 -0
- package/dist/infra/lib/sync/drive.js +99 -0
- package/dist/infra/lib/sync/drive.js.map +1 -0
- package/dist/infra/lib/sync/index.d.ts +9 -0
- package/dist/infra/lib/sync/index.d.ts.map +1 -0
- package/dist/infra/lib/sync/index.js +9 -0
- package/dist/infra/lib/sync/index.js.map +1 -0
- package/dist/infra/lib/sync/oauth.d.ts +12 -0
- package/dist/infra/lib/sync/oauth.d.ts.map +1 -0
- package/dist/infra/lib/sync/oauth.js +157 -0
- package/dist/infra/lib/sync/oauth.js.map +1 -0
- package/dist/infra/lib/sync/storage.d.ts +21 -0
- package/dist/infra/lib/sync/storage.d.ts.map +1 -0
- package/dist/infra/lib/sync/storage.js +32 -0
- package/dist/infra/lib/sync/storage.js.map +1 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.d.ts +67 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.js +153 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.js.map +1 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.test.d.ts +2 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.test.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.test.js +159 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.test.js.map +1 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.d.ts +48 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.js +125 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.js.map +1 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.d.ts +2 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.js +141 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.js.map +1 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.d.ts +119 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.js +519 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.js.map +1 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.d.ts +2 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.js +370 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.js.map +1 -0
- package/dist/infra/lib/ui-ux/SearchService.d.ts +64 -0
- package/dist/infra/lib/ui-ux/SearchService.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/SearchService.js +240 -0
- package/dist/infra/lib/ui-ux/SearchService.js.map +1 -0
- package/dist/infra/lib/ui-ux/SearchService.test.d.ts +2 -0
- package/dist/infra/lib/ui-ux/SearchService.test.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/SearchService.test.js +215 -0
- package/dist/infra/lib/ui-ux/SearchService.test.js.map +1 -0
- package/dist/infra/lib/ui-ux/UiUxWorkflow.d.ts +58 -0
- package/dist/infra/lib/ui-ux/UiUxWorkflow.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/UiUxWorkflow.js +163 -0
- package/dist/infra/lib/ui-ux/UiUxWorkflow.js.map +1 -0
- package/dist/infra/lib/ui-ux/constants.d.ts +39 -0
- package/dist/infra/lib/ui-ux/constants.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/constants.js +203 -0
- package/dist/infra/lib/ui-ux/constants.js.map +1 -0
- package/dist/infra/lib/ui-ux/index.d.ts +11 -0
- package/dist/infra/lib/ui-ux/index.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/index.js +11 -0
- package/dist/infra/lib/ui-ux/index.js.map +1 -0
- package/dist/infra/lib/ui-ux/types.d.ts +243 -0
- package/dist/infra/lib/ui-ux/types.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/types.js +7 -0
- package/dist/infra/lib/ui-ux/types.js.map +1 -0
- package/dist/infra/lib/utils.d.ts.map +1 -0
- package/dist/infra/lib/utils.js.map +1 -0
- package/dist/infra/orchestrator/AgentAnnouncer.d.ts +64 -0
- package/dist/infra/orchestrator/AgentAnnouncer.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentAnnouncer.js +127 -0
- package/dist/infra/orchestrator/AgentAnnouncer.js.map +1 -0
- package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts +5 -0
- package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentAnnouncer.test.js +119 -0
- package/dist/infra/orchestrator/AgentAnnouncer.test.js.map +1 -0
- package/dist/infra/orchestrator/AgentExecutor.d.ts +22 -0
- package/dist/infra/orchestrator/AgentExecutor.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentExecutor.js +240 -0
- package/dist/infra/orchestrator/AgentExecutor.js.map +1 -0
- package/dist/infra/orchestrator/AgentManager.d.ts +72 -0
- package/dist/infra/orchestrator/AgentManager.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentManager.js +182 -0
- package/dist/infra/orchestrator/AgentManager.js.map +1 -0
- package/dist/infra/orchestrator/AgentRegistry.d.ts +76 -0
- package/dist/infra/orchestrator/AgentRegistry.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentRegistry.js +217 -0
- package/dist/infra/orchestrator/AgentRegistry.js.map +1 -0
- package/dist/infra/orchestrator/AgentRegistry.test.d.ts +5 -0
- package/dist/infra/orchestrator/AgentRegistry.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentRegistry.test.js +122 -0
- package/dist/infra/orchestrator/AgentRegistry.test.js.map +1 -0
- package/dist/infra/orchestrator/BackgroundManager.d.ts +128 -0
- package/dist/infra/orchestrator/BackgroundManager.d.ts.map +1 -0
- package/dist/infra/orchestrator/BackgroundManager.js +617 -0
- package/dist/infra/orchestrator/BackgroundManager.js.map +1 -0
- package/dist/infra/orchestrator/BackgroundManager.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/BackgroundManager.test.js.map +1 -0
- package/dist/infra/orchestrator/CheckpointManager.d.ts +54 -0
- package/dist/infra/orchestrator/CheckpointManager.d.ts.map +1 -0
- package/dist/infra/orchestrator/CheckpointManager.js +121 -0
- package/dist/infra/orchestrator/CheckpointManager.js.map +1 -0
- package/dist/infra/orchestrator/LLMCluster.d.ts +69 -0
- package/dist/infra/orchestrator/LLMCluster.d.ts.map +1 -0
- package/dist/infra/orchestrator/LLMCluster.js +90 -0
- package/dist/infra/orchestrator/LLMCluster.js.map +1 -0
- package/dist/infra/orchestrator/MultiLlmResearch.d.ts +26 -0
- package/dist/infra/orchestrator/MultiLlmResearch.d.ts.map +1 -0
- package/dist/infra/orchestrator/MultiLlmResearch.js +144 -0
- package/dist/infra/orchestrator/MultiLlmResearch.js.map +1 -0
- package/dist/infra/orchestrator/PhasePipeline.d.ts +122 -0
- package/dist/infra/orchestrator/PhasePipeline.d.ts.map +1 -0
- package/dist/infra/orchestrator/PhasePipeline.js +381 -0
- package/dist/infra/orchestrator/PhasePipeline.js.map +1 -0
- package/dist/infra/orchestrator/PhaseResultStore.d.ts +39 -0
- package/dist/infra/orchestrator/PhaseResultStore.d.ts.map +1 -0
- package/dist/infra/orchestrator/PhaseResultStore.js +151 -0
- package/dist/infra/orchestrator/PhaseResultStore.js.map +1 -0
- package/dist/infra/orchestrator/SessionStore.d.ts +40 -0
- package/dist/infra/orchestrator/SessionStore.d.ts.map +1 -0
- package/dist/infra/orchestrator/SessionStore.js +116 -0
- package/dist/infra/orchestrator/SessionStore.js.map +1 -0
- package/dist/infra/orchestrator/SmartRouter.d.ts +77 -0
- package/dist/infra/orchestrator/SmartRouter.d.ts.map +1 -0
- package/dist/infra/orchestrator/SmartRouter.js +267 -0
- package/dist/infra/orchestrator/SmartRouter.js.map +1 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.d.ts +143 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.d.ts.map +1 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.js +377 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.js.map +1 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.test.js.map +1 -0
- package/dist/infra/orchestrator/agentDiscovery.d.ts.map +1 -0
- package/dist/infra/orchestrator/agentDiscovery.js.map +1 -0
- package/dist/infra/orchestrator/backgroundAgent.d.ts +9 -0
- package/dist/infra/orchestrator/backgroundAgent.d.ts.map +1 -0
- package/dist/infra/orchestrator/backgroundAgent.js +10 -0
- package/dist/infra/orchestrator/backgroundAgent.js.map +1 -0
- package/dist/infra/orchestrator/index.d.ts +204 -0
- package/dist/infra/orchestrator/index.d.ts.map +1 -0
- package/dist/infra/orchestrator/index.js +360 -0
- package/dist/infra/orchestrator/index.js.map +1 -0
- package/dist/infra/orchestrator/orchestrator.d.ts +60 -0
- package/dist/infra/orchestrator/orchestrator.d.ts.map +1 -0
- package/dist/infra/orchestrator/orchestrator.js +214 -0
- package/dist/infra/orchestrator/orchestrator.js.map +1 -0
- package/dist/infra/orchestrator/parallelResearch.d.ts +27 -0
- package/dist/infra/orchestrator/parallelResearch.d.ts.map +1 -0
- package/dist/infra/orchestrator/parallelResearch.js +244 -0
- package/dist/infra/orchestrator/parallelResearch.js.map +1 -0
- package/dist/infra/orchestrator/types.d.ts +175 -0
- package/dist/infra/orchestrator/types.d.ts.map +1 -0
- package/dist/infra/orchestrator/types.js +21 -0
- package/dist/infra/orchestrator/types.js.map +1 -0
- package/dist/infra/types/tool.d.ts.map +1 -0
- package/dist/infra/types/tool.js.map +1 -0
- package/dist/tools/convention/analyzeComplexity.d.ts +1 -1
- package/dist/tools/convention/analyzeComplexity.d.ts.map +1 -1
- package/dist/tools/convention/analyzeComplexity.js +1 -1
- package/dist/tools/convention/analyzeComplexity.js.map +1 -1
- package/dist/tools/convention/applyQualityRules.d.ts +1 -1
- package/dist/tools/convention/applyQualityRules.d.ts.map +1 -1
- package/dist/tools/convention/checkCouplingCohesion.d.ts +1 -1
- package/dist/tools/convention/checkCouplingCohesion.d.ts.map +1 -1
- package/dist/tools/convention/suggestImprovements.d.ts +1 -1
- package/dist/tools/convention/suggestImprovements.d.ts.map +1 -1
- package/dist/tools/convention/validateCodeQuality.d.ts +1 -1
- package/dist/tools/convention/validateCodeQuality.d.ts.map +1 -1
- package/dist/tools/evolution/dashboardTools.d.ts +26 -0
- package/dist/tools/evolution/dashboardTools.d.ts.map +1 -0
- package/dist/tools/evolution/dashboardTools.js +216 -0
- package/dist/tools/evolution/dashboardTools.js.map +1 -0
- package/dist/tools/evolution/index.d.ts +3 -0
- package/dist/tools/evolution/index.d.ts.map +1 -0
- package/dist/tools/evolution/index.js +6 -0
- package/dist/tools/evolution/index.js.map +1 -0
- package/dist/tools/evolution/insightTools.d.ts +21 -0
- package/dist/tools/evolution/insightTools.d.ts.map +1 -0
- package/dist/tools/evolution/insightTools.js +184 -0
- package/dist/tools/evolution/insightTools.js.map +1 -0
- package/dist/tools/index.d.ts +31 -21
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +38 -26
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/interaction/askUser.d.ts +2 -2
- package/dist/tools/interaction/askUser.d.ts.map +1 -1
- package/dist/tools/interaction/askUser.js +1 -1
- package/dist/tools/memory/addObservation.d.ts +2 -2
- package/dist/tools/memory/addObservation.d.ts.map +1 -1
- package/dist/tools/memory/addObservation.js +1 -1
- package/dist/tools/memory/addObservation.js.map +1 -1
- package/dist/tools/memory/autoSaveContext.d.ts +1 -1
- package/dist/tools/memory/autoSaveContext.d.ts.map +1 -1
- package/dist/tools/memory/autoSaveContext.js +2 -2
- package/dist/tools/memory/autoSaveContext.js.map +1 -1
- package/dist/tools/memory/createMemoryTimeline.d.ts +1 -1
- package/dist/tools/memory/createMemoryTimeline.d.ts.map +1 -1
- package/dist/tools/memory/createMemoryTimeline.js +11 -11
- package/dist/tools/memory/createMemoryTimeline.js.map +1 -1
- package/dist/tools/memory/deleteMemory.d.ts +1 -1
- package/dist/tools/memory/deleteMemory.d.ts.map +1 -1
- package/dist/tools/memory/deleteMemory.js +1 -1
- package/dist/tools/memory/deleteMemory.js.map +1 -1
- package/dist/tools/memory/getMemoryGraph.d.ts +1 -1
- package/dist/tools/memory/getMemoryGraph.d.ts.map +1 -1
- package/dist/tools/memory/getMemoryGraph.js +13 -13
- package/dist/tools/memory/getMemoryGraph.js.map +1 -1
- package/dist/tools/memory/getSessionContext.d.ts +1 -1
- package/dist/tools/memory/getSessionContext.d.ts.map +1 -1
- package/dist/tools/memory/getSessionContext.js +10 -10
- package/dist/tools/memory/getSessionContext.js.map +1 -1
- package/dist/tools/memory/index.d.ts +1 -0
- package/dist/tools/memory/index.d.ts.map +1 -1
- package/dist/tools/memory/index.js +2 -0
- package/dist/tools/memory/index.js.map +1 -1
- package/dist/tools/memory/linkMemories.d.ts +1 -1
- package/dist/tools/memory/linkMemories.d.ts.map +1 -1
- package/dist/tools/memory/linkMemories.js +15 -15
- package/dist/tools/memory/linkMemories.js.map +1 -1
- package/dist/tools/memory/listMemories.d.ts +1 -1
- package/dist/tools/memory/listMemories.d.ts.map +1 -1
- package/dist/tools/memory/listMemories.js +5 -5
- package/dist/tools/memory/listMemories.js.map +1 -1
- package/dist/tools/memory/manageGoals.d.ts +2 -2
- package/dist/tools/memory/manageGoals.d.ts.map +1 -1
- package/dist/tools/memory/manageGoals.js +1 -1
- package/dist/tools/memory/manageGoals.js.map +1 -1
- package/dist/tools/memory/prioritizeMemory.d.ts +1 -1
- package/dist/tools/memory/prioritizeMemory.d.ts.map +1 -1
- package/dist/tools/memory/prioritizeMemory.js +1 -1
- package/dist/tools/memory/prioritizeMemory.js.map +1 -1
- package/dist/tools/memory/recallMemory.d.ts +1 -1
- package/dist/tools/memory/recallMemory.d.ts.map +1 -1
- package/dist/tools/memory/recallMemory.js +5 -5
- package/dist/tools/memory/recallMemory.js.map +1 -1
- package/dist/tools/memory/reflectionTools.d.ts +27 -0
- package/dist/tools/memory/reflectionTools.d.ts.map +1 -0
- package/dist/tools/memory/reflectionTools.js +180 -0
- package/dist/tools/memory/reflectionTools.js.map +1 -0
- package/dist/tools/memory/restoreSessionContext.d.ts +1 -1
- package/dist/tools/memory/restoreSessionContext.d.ts.map +1 -1
- package/dist/tools/memory/restoreSessionContext.js +1 -1
- package/dist/tools/memory/restoreSessionContext.js.map +1 -1
- package/dist/tools/memory/retrieveSessionContext.d.ts +1 -1
- package/dist/tools/memory/retrieveSessionContext.d.ts.map +1 -1
- package/dist/tools/memory/retrieveSessionContext.js +1 -1
- package/dist/tools/memory/retrieveSessionContext.js.map +1 -1
- package/dist/tools/memory/saveMemory.d.ts +1 -1
- package/dist/tools/memory/saveMemory.d.ts.map +1 -1
- package/dist/tools/memory/saveMemory.js +5 -5
- package/dist/tools/memory/saveMemory.js.map +1 -1
- package/dist/tools/memory/saveSessionItem.d.ts +1 -1
- package/dist/tools/memory/saveSessionItem.d.ts.map +1 -1
- package/dist/tools/memory/saveSessionItem.js +1 -1
- package/dist/tools/memory/saveSessionItem.js.map +1 -1
- package/dist/tools/memory/searchMemories.d.ts +1 -1
- package/dist/tools/memory/searchMemories.d.ts.map +1 -1
- package/dist/tools/memory/searchMemories.js +1 -1
- package/dist/tools/memory/searchMemories.js.map +1 -1
- package/dist/tools/memory/searchMemoriesAdvanced.d.ts +1 -1
- package/dist/tools/memory/searchMemoriesAdvanced.d.ts.map +1 -1
- package/dist/tools/memory/searchMemoriesAdvanced.js +24 -24
- package/dist/tools/memory/searchMemoriesAdvanced.js.map +1 -1
- package/dist/tools/memory/searchObservations.d.ts +2 -2
- package/dist/tools/memory/searchObservations.d.ts.map +1 -1
- package/dist/tools/memory/searchObservations.js +1 -1
- package/dist/tools/memory/searchObservations.js.map +1 -1
- package/dist/tools/memory/startSession.d.ts +1 -1
- package/dist/tools/memory/startSession.d.ts.map +1 -1
- package/dist/tools/memory/startSession.js +28 -6
- package/dist/tools/memory/startSession.js.map +1 -1
- package/dist/tools/memory/updateMemory.d.ts +1 -1
- package/dist/tools/memory/updateMemory.d.ts.map +1 -1
- package/dist/tools/memory/updateMemory.js +1 -1
- package/dist/tools/memory/updateMemory.js.map +1 -1
- package/dist/tools/semantic/analyzeDependencyGraph.d.ts +1 -1
- package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +1 -1
- package/dist/tools/semantic/analyzeDependencyGraph.js +13 -13
- package/dist/tools/semantic/analyzeDependencyGraph.js.map +1 -1
- package/dist/tools/semantic/astGrep.d.ts +23 -0
- package/dist/tools/semantic/astGrep.d.ts.map +1 -0
- package/dist/tools/semantic/astGrep.js +298 -0
- package/dist/tools/semantic/astGrep.js.map +1 -0
- package/dist/tools/semantic/astGrep.test.d.ts +2 -0
- package/dist/tools/semantic/astGrep.test.d.ts.map +1 -0
- package/dist/tools/semantic/astGrep.test.js +66 -0
- package/dist/tools/semantic/astGrep.test.js.map +1 -0
- package/dist/tools/semantic/findReferences.d.ts +1 -1
- package/dist/tools/semantic/findReferences.d.ts.map +1 -1
- package/dist/tools/semantic/findReferences.js +2 -2
- package/dist/tools/semantic/findReferences.js.map +1 -1
- package/dist/tools/semantic/findSymbol.d.ts +1 -1
- package/dist/tools/semantic/findSymbol.d.ts.map +1 -1
- package/dist/tools/semantic/findSymbol.js +3 -3
- package/dist/tools/semantic/findSymbol.js.map +1 -1
- package/dist/tools/semantic/index.d.ts +2 -0
- package/dist/tools/semantic/index.d.ts.map +1 -1
- package/dist/tools/semantic/index.js +4 -0
- package/dist/tools/semantic/index.js.map +1 -1
- package/dist/tools/semantic/lsp.d.ts +68 -0
- package/dist/tools/semantic/lsp.d.ts.map +1 -0
- package/dist/tools/semantic/lsp.js +553 -0
- package/dist/tools/semantic/lsp.js.map +1 -0
- package/dist/tools/spec/e2eTestGenerator.d.ts +0 -1
- package/dist/tools/spec/e2eTestGenerator.d.ts.map +1 -1
- package/dist/tools/spec/e2eTestGenerator.js +0 -1
- package/dist/tools/spec/e2eTestGenerator.js.map +1 -1
- package/dist/tools/spec/prdParser.d.ts +0 -1
- package/dist/tools/spec/prdParser.d.ts.map +1 -1
- package/dist/tools/spec/prdParser.js +8 -6
- package/dist/tools/spec/prdParser.js.map +1 -1
- package/dist/tools/spec/requirementId.d.ts +0 -1
- package/dist/tools/spec/requirementId.d.ts.map +1 -1
- package/dist/tools/spec/requirementId.js +0 -1
- package/dist/tools/spec/requirementId.js.map +1 -1
- package/dist/tools/spec/specGenerator.d.ts +0 -1
- package/dist/tools/spec/specGenerator.d.ts.map +1 -1
- package/dist/tools/spec/specGenerator.js +0 -1
- package/dist/tools/spec/specGenerator.js.map +1 -1
- package/dist/tools/spec/specVersioning.d.ts +0 -1
- package/dist/tools/spec/specVersioning.d.ts.map +1 -1
- package/dist/tools/spec/specVersioning.js +0 -1
- package/dist/tools/spec/specVersioning.js.map +1 -1
- package/dist/tools/spec/traceabilityMatrix.d.ts +0 -1
- package/dist/tools/spec/traceabilityMatrix.d.ts.map +1 -1
- package/dist/tools/spec/traceabilityMatrix.js +12 -7
- package/dist/tools/spec/traceabilityMatrix.js.map +1 -1
- package/dist/tools/time/getCurrentTime.d.ts +2 -2
- package/dist/tools/time/getCurrentTime.d.ts.map +1 -1
- package/dist/tools/time/getCurrentTime.js +1 -9
- package/dist/tools/time/getCurrentTime.js.map +1 -1
- package/dist/tools/ui/generateDesignSystem.d.ts +7 -0
- package/dist/tools/ui/generateDesignSystem.d.ts.map +1 -0
- package/dist/tools/ui/generateDesignSystem.js +70 -0
- package/dist/tools/ui/generateDesignSystem.js.map +1 -0
- package/dist/tools/ui/index.d.ts +5 -1
- package/dist/tools/ui/index.d.ts.map +1 -1
- package/dist/tools/ui/index.js +5 -1
- package/dist/tools/ui/index.js.map +1 -1
- package/dist/tools/ui/persistDesignSystem.d.ts +8 -0
- package/dist/tools/ui/persistDesignSystem.d.ts.map +1 -0
- package/dist/tools/ui/persistDesignSystem.js +77 -0
- package/dist/tools/ui/persistDesignSystem.js.map +1 -0
- package/dist/tools/ui/previewUiAscii.d.ts +1 -1
- package/dist/tools/ui/previewUiAscii.d.ts.map +1 -1
- package/dist/tools/ui/searchUiUx.d.ts +8 -0
- package/dist/tools/ui/searchUiUx.d.ts.map +1 -0
- package/dist/tools/ui/searchUiUx.js +82 -0
- package/dist/tools/ui/searchUiUx.js.map +1 -0
- package/dist/tools/ui/searchUiUxStack.d.ts +8 -0
- package/dist/tools/ui/searchUiUxStack.d.ts.map +1 -0
- package/dist/tools/ui/searchUiUxStack.js +83 -0
- package/dist/tools/ui/searchUiUxStack.js.map +1 -0
- package/hooks/hooks.json +32 -10
- package/hooks/scripts/__tests__/skill-injector.test.js +234 -0
- package/hooks/scripts/autonomy-controller.js +101 -0
- package/hooks/scripts/context-save.js +152 -5
- package/hooks/scripts/evolution-engine.js +101 -0
- package/hooks/scripts/keyword-detector.js +1 -1
- package/hooks/scripts/llm-orchestrate.js +224 -37
- package/hooks/scripts/post-edit.js +2 -45
- package/hooks/scripts/post-tool-verify.js +1 -1
- package/hooks/scripts/pre-tool-guard.js +1 -1
- package/hooks/scripts/prompt-dispatcher.js +56 -1
- package/hooks/scripts/sentinel-guard.js +104 -0
- package/hooks/scripts/session-start.js +76 -0
- package/hooks/scripts/skill-injector.js +546 -83
- package/hooks/scripts/skill-requirements.js +83 -0
- package/hooks/scripts/stop-notify.js +207 -0
- package/hooks/scripts/utils.js +8 -8
- package/package.json +55 -18
- package/skills/brand-assets/SKILL.md +138 -0
- package/skills/commit-push-pr/SKILL.md +118 -0
- package/skills/context7-usage/SKILL.md +105 -0
- package/skills/core-capabilities/SKILL.md +164 -0
- package/skills/git-worktree/SKILL.md +184 -0
- package/skills/handoff/SKILL.md +101 -0
- package/skills/parallel-research/SKILL.md +80 -0
- package/skills/priority-todos/SKILL.md +242 -0
- package/skills/techdebt/SKILL.md +122 -0
- package/skills/tool-fallback/SKILL.md +193 -0
- package/skills/typescript-advanced-types/SKILL.md +720 -0
- package/skills/ui-ux-pro-max/SKILL.md +386 -0
- package/skills/vercel-react-best-practices/SKILL.md +304 -0
- package/vibe/config.json +29 -29
- package/vibe/constitution.md +3 -3
- package/vibe/rules/quality/bdd-contract-testing.md +6 -6
- package/vibe/rules/quality/performance.md +236 -0
- package/vibe/rules/standards/git-workflow.md +237 -0
- package/vibe/rules/standards/security.md +305 -0
- package/vibe/rules/writing/document-style.md +74 -0
- package/vibe/setup.sh +6 -6
- package/vibe/templates/constitution-template.md +3 -3
- package/vibe/ui-ux-data/charts.csv +26 -0
- package/vibe/ui-ux-data/colors.csv +97 -0
- package/vibe/ui-ux-data/icons.csv +101 -0
- package/vibe/ui-ux-data/landing.csv +31 -0
- package/vibe/ui-ux-data/products.csv +97 -0
- package/vibe/ui-ux-data/react-performance.csv +45 -0
- package/vibe/ui-ux-data/stacks/astro.csv +54 -0
- package/vibe/ui-ux-data/stacks/flutter.csv +53 -0
- package/vibe/ui-ux-data/stacks/html-tailwind.csv +56 -0
- package/vibe/ui-ux-data/stacks/jetpack-compose.csv +53 -0
- package/vibe/ui-ux-data/stacks/nextjs.csv +53 -0
- package/vibe/ui-ux-data/stacks/nuxt-ui.csv +51 -0
- package/vibe/ui-ux-data/stacks/nuxtjs.csv +59 -0
- package/vibe/ui-ux-data/stacks/react-native.csv +52 -0
- package/vibe/ui-ux-data/stacks/react.csv +54 -0
- package/vibe/ui-ux-data/stacks/shadcn.csv +61 -0
- package/vibe/ui-ux-data/stacks/svelte.csv +54 -0
- package/vibe/ui-ux-data/stacks/swiftui.csv +51 -0
- package/vibe/ui-ux-data/stacks/vue.csv +50 -0
- package/vibe/ui-ux-data/styles.csv +68 -0
- package/vibe/ui-ux-data/typography.csv +58 -0
- package/vibe/ui-ux-data/ui-reasoning.csv +101 -0
- package/vibe/ui-ux-data/ux-guidelines.csv +100 -0
- package/vibe/ui-ux-data/version.json +31 -0
- package/vibe/ui-ux-data/web-interface.csv +31 -0
- package/dist/cli/hud.d.ts +0 -33
- package/dist/cli/hud.d.ts.map +0 -1
- package/dist/cli/hud.js +0 -247
- package/dist/cli/hud.js.map +0 -1
- package/dist/lib/ContextCompressor.d.ts.map +0 -1
- package/dist/lib/ContextCompressor.js +0 -306
- package/dist/lib/ContextCompressor.js.map +0 -1
- package/dist/lib/DeepInit.d.ts.map +0 -1
- package/dist/lib/DeepInit.js.map +0 -1
- package/dist/lib/FrameworkDetector.d.ts.map +0 -1
- package/dist/lib/FrameworkDetector.js.map +0 -1
- package/dist/lib/IterationTracker.d.ts +0 -81
- package/dist/lib/IterationTracker.d.ts.map +0 -1
- package/dist/lib/IterationTracker.js.map +0 -1
- package/dist/lib/MemoryManager.d.ts +0 -86
- package/dist/lib/MemoryManager.d.ts.map +0 -1
- package/dist/lib/MemoryManager.js +0 -287
- package/dist/lib/MemoryManager.js.map +0 -1
- package/dist/lib/ModelRouter.d.ts.map +0 -1
- package/dist/lib/ModelRouter.js.map +0 -1
- package/dist/lib/OrchestrateWorkflow.d.ts.map +0 -1
- package/dist/lib/OrchestrateWorkflow.js.map +0 -1
- package/dist/lib/ProgressTracker.d.ts.map +0 -1
- package/dist/lib/ProgressTracker.js +0 -267
- package/dist/lib/ProgressTracker.js.map +0 -1
- package/dist/lib/ProjectCache.d.ts.map +0 -1
- package/dist/lib/ProjectCache.js.map +0 -1
- package/dist/lib/PythonParser.d.ts.map +0 -1
- package/dist/lib/PythonParser.js +0 -269
- package/dist/lib/PythonParser.js.map +0 -1
- package/dist/lib/ReviewRace.d.ts.map +0 -1
- package/dist/lib/ReviewRace.js +0 -446
- package/dist/lib/ReviewRace.js.map +0 -1
- package/dist/lib/RuleBuildSystem.d.ts +0 -117
- package/dist/lib/RuleBuildSystem.d.ts.map +0 -1
- package/dist/lib/RuleBuildSystem.js +0 -402
- package/dist/lib/RuleBuildSystem.js.map +0 -1
- package/dist/lib/SkillFrontmatter.d.ts +0 -62
- package/dist/lib/SkillFrontmatter.d.ts.map +0 -1
- package/dist/lib/SkillFrontmatter.js.map +0 -1
- package/dist/lib/SkillQualityGate.d.ts.map +0 -1
- package/dist/lib/SkillQualityGate.js.map +0 -1
- package/dist/lib/SkillRepository.d.ts.map +0 -1
- package/dist/lib/SkillRepository.js +0 -477
- package/dist/lib/SkillRepository.js.map +0 -1
- package/dist/lib/UltraQA.d.ts +0 -68
- package/dist/lib/UltraQA.d.ts.map +0 -1
- package/dist/lib/UltraQA.js +0 -232
- package/dist/lib/UltraQA.js.map +0 -1
- package/dist/lib/constants.d.ts +0 -45
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/constants.js +0 -62
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/gemini-api.d.ts +0 -128
- package/dist/lib/gemini-api.d.ts.map +0 -1
- package/dist/lib/gemini-api.js +0 -662
- package/dist/lib/gemini-api.js.map +0 -1
- package/dist/lib/gemini-constants.d.ts +0 -19
- package/dist/lib/gemini-constants.d.ts.map +0 -1
- package/dist/lib/gemini-constants.js +0 -34
- package/dist/lib/gemini-constants.js.map +0 -1
- package/dist/lib/gemini-oauth.d.ts +0 -52
- package/dist/lib/gemini-oauth.d.ts.map +0 -1
- package/dist/lib/gemini-oauth.js +0 -363
- package/dist/lib/gemini-oauth.js.map +0 -1
- package/dist/lib/gemini-storage.d.ts +0 -64
- package/dist/lib/gemini-storage.d.ts.map +0 -1
- package/dist/lib/gemini-storage.js +0 -177
- package/dist/lib/gemini-storage.js.map +0 -1
- package/dist/lib/gpt-api.d.ts +0 -106
- package/dist/lib/gpt-api.d.ts.map +0 -1
- package/dist/lib/gpt-api.js +0 -556
- package/dist/lib/gpt-api.js.map +0 -1
- package/dist/lib/gpt-constants.d.ts +0 -12
- package/dist/lib/gpt-constants.d.ts.map +0 -1
- package/dist/lib/gpt-constants.js +0 -18
- package/dist/lib/gpt-constants.js.map +0 -1
- package/dist/lib/gpt-oauth.d.ts.map +0 -1
- package/dist/lib/gpt-oauth.js +0 -373
- package/dist/lib/gpt-oauth.js.map +0 -1
- package/dist/lib/gpt-storage.d.ts +0 -64
- package/dist/lib/gpt-storage.d.ts.map +0 -1
- package/dist/lib/gpt-storage.js +0 -180
- package/dist/lib/gpt-storage.js.map +0 -1
- package/dist/lib/llm/auth/ApiKeyManager.d.ts.map +0 -1
- package/dist/lib/llm/auth/ApiKeyManager.js.map +0 -1
- package/dist/lib/llm/auth/ConfigManager.d.ts +0 -29
- package/dist/lib/llm/auth/ConfigManager.d.ts.map +0 -1
- package/dist/lib/llm/auth/ConfigManager.js +0 -67
- package/dist/lib/llm/auth/ConfigManager.js.map +0 -1
- package/dist/lib/llm/auth/index.d.ts +0 -25
- package/dist/lib/llm/auth/index.d.ts.map +0 -1
- package/dist/lib/llm/auth/index.js +0 -83
- package/dist/lib/llm/auth/index.js.map +0 -1
- package/dist/lib/llm/index.d.ts.map +0 -1
- package/dist/lib/llm/index.js.map +0 -1
- package/dist/lib/llm/types.d.ts.map +0 -1
- package/dist/lib/llm/types.js.map +0 -1
- package/dist/lib/llm/utils/index.d.ts.map +0 -1
- package/dist/lib/llm/utils/index.js.map +0 -1
- package/dist/lib/llm/utils/retry.d.ts.map +0 -1
- package/dist/lib/llm/utils/retry.js.map +0 -1
- package/dist/lib/llm/utils/stream.d.ts.map +0 -1
- package/dist/lib/llm/utils/stream.js.map +0 -1
- package/dist/lib/memory/KnowledgeGraph.d.ts.map +0 -1
- package/dist/lib/memory/KnowledgeGraph.js.map +0 -1
- package/dist/lib/memory/KnowledgeGraph.test.d.ts.map +0 -1
- package/dist/lib/memory/KnowledgeGraph.test.js +0 -189
- package/dist/lib/memory/KnowledgeGraph.test.js.map +0 -1
- package/dist/lib/memory/MemorySearch.d.ts +0 -27
- package/dist/lib/memory/MemorySearch.d.ts.map +0 -1
- package/dist/lib/memory/MemorySearch.js +0 -145
- package/dist/lib/memory/MemorySearch.js.map +0 -1
- package/dist/lib/memory/MemorySearch.test.d.ts.map +0 -1
- package/dist/lib/memory/MemorySearch.test.js +0 -149
- package/dist/lib/memory/MemorySearch.test.js.map +0 -1
- package/dist/lib/memory/MemoryStorage.d.ts +0 -88
- package/dist/lib/memory/MemoryStorage.d.ts.map +0 -1
- package/dist/lib/memory/MemoryStorage.js +0 -404
- package/dist/lib/memory/MemoryStorage.js.map +0 -1
- package/dist/lib/memory/MemoryStorage.test.d.ts.map +0 -1
- package/dist/lib/memory/MemoryStorage.test.js +0 -198
- package/dist/lib/memory/MemoryStorage.test.js.map +0 -1
- package/dist/lib/memory/ObservationStore.d.ts.map +0 -1
- package/dist/lib/memory/ObservationStore.js.map +0 -1
- package/dist/lib/memory/SessionRAGRetriever.d.ts +0 -66
- package/dist/lib/memory/SessionRAGRetriever.d.ts.map +0 -1
- package/dist/lib/memory/SessionRAGRetriever.js +0 -196
- package/dist/lib/memory/SessionRAGRetriever.js.map +0 -1
- package/dist/lib/memory/SessionRAGRetriever.test.d.ts.map +0 -1
- package/dist/lib/memory/SessionRAGRetriever.test.js +0 -180
- package/dist/lib/memory/SessionRAGRetriever.test.js.map +0 -1
- package/dist/lib/memory/SessionRAGStore.d.ts +0 -153
- package/dist/lib/memory/SessionRAGStore.d.ts.map +0 -1
- package/dist/lib/memory/SessionRAGStore.js +0 -673
- package/dist/lib/memory/SessionRAGStore.js.map +0 -1
- package/dist/lib/memory/SessionRAGStore.test.d.ts.map +0 -1
- package/dist/lib/memory/SessionRAGStore.test.js +0 -326
- package/dist/lib/memory/SessionRAGStore.test.js.map +0 -1
- package/dist/lib/memory/SessionSummarizer.d.ts.map +0 -1
- package/dist/lib/memory/SessionSummarizer.js.map +0 -1
- package/dist/lib/memory/index.d.ts +0 -5
- package/dist/lib/memory/index.d.ts.map +0 -1
- package/dist/lib/memory/index.js +0 -9
- package/dist/lib/memory/index.js.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/dist/orchestrator/AgentExecutor.d.ts +0 -23
- package/dist/orchestrator/AgentExecutor.d.ts.map +0 -1
- package/dist/orchestrator/AgentExecutor.js +0 -231
- package/dist/orchestrator/AgentExecutor.js.map +0 -1
- package/dist/orchestrator/AgentManager.d.ts +0 -73
- package/dist/orchestrator/AgentManager.d.ts.map +0 -1
- package/dist/orchestrator/AgentManager.js +0 -184
- package/dist/orchestrator/AgentManager.js.map +0 -1
- package/dist/orchestrator/BackgroundManager.d.ts +0 -109
- package/dist/orchestrator/BackgroundManager.d.ts.map +0 -1
- package/dist/orchestrator/BackgroundManager.js +0 -456
- package/dist/orchestrator/BackgroundManager.js.map +0 -1
- package/dist/orchestrator/BackgroundManager.test.d.ts.map +0 -1
- package/dist/orchestrator/BackgroundManager.test.js.map +0 -1
- package/dist/orchestrator/LLMCluster.d.ts +0 -70
- package/dist/orchestrator/LLMCluster.d.ts.map +0 -1
- package/dist/orchestrator/LLMCluster.js +0 -91
- package/dist/orchestrator/LLMCluster.js.map +0 -1
- package/dist/orchestrator/MultiLlmResearch.d.ts +0 -27
- package/dist/orchestrator/MultiLlmResearch.d.ts.map +0 -1
- package/dist/orchestrator/MultiLlmResearch.js +0 -145
- package/dist/orchestrator/MultiLlmResearch.js.map +0 -1
- package/dist/orchestrator/PhasePipeline.d.ts +0 -108
- package/dist/orchestrator/PhasePipeline.d.ts.map +0 -1
- package/dist/orchestrator/PhasePipeline.js +0 -313
- package/dist/orchestrator/PhasePipeline.js.map +0 -1
- package/dist/orchestrator/SessionStore.d.ts +0 -41
- package/dist/orchestrator/SessionStore.d.ts.map +0 -1
- package/dist/orchestrator/SessionStore.js +0 -117
- package/dist/orchestrator/SessionStore.js.map +0 -1
- package/dist/orchestrator/SmartRouter.d.ts +0 -68
- package/dist/orchestrator/SmartRouter.d.ts.map +0 -1
- package/dist/orchestrator/SmartRouter.js +0 -256
- package/dist/orchestrator/SmartRouter.js.map +0 -1
- package/dist/orchestrator/SwarmOrchestrator.d.ts +0 -144
- package/dist/orchestrator/SwarmOrchestrator.d.ts.map +0 -1
- package/dist/orchestrator/SwarmOrchestrator.js +0 -361
- package/dist/orchestrator/SwarmOrchestrator.js.map +0 -1
- package/dist/orchestrator/SwarmOrchestrator.test.d.ts.map +0 -1
- package/dist/orchestrator/SwarmOrchestrator.test.js.map +0 -1
- package/dist/orchestrator/agentDiscovery.d.ts.map +0 -1
- package/dist/orchestrator/agentDiscovery.js.map +0 -1
- package/dist/orchestrator/backgroundAgent.d.ts +0 -15
- package/dist/orchestrator/backgroundAgent.d.ts.map +0 -1
- package/dist/orchestrator/backgroundAgent.js +0 -16
- package/dist/orchestrator/backgroundAgent.js.map +0 -1
- package/dist/orchestrator/index.d.ts +0 -179
- package/dist/orchestrator/index.d.ts.map +0 -1
- package/dist/orchestrator/index.js +0 -335
- package/dist/orchestrator/index.js.map +0 -1
- package/dist/orchestrator/orchestrator.d.ts +0 -63
- package/dist/orchestrator/orchestrator.d.ts.map +0 -1
- package/dist/orchestrator/orchestrator.js +0 -212
- package/dist/orchestrator/orchestrator.js.map +0 -1
- package/dist/orchestrator/parallelResearch.d.ts +0 -30
- package/dist/orchestrator/parallelResearch.d.ts.map +0 -1
- package/dist/orchestrator/parallelResearch.js +0 -247
- package/dist/orchestrator/parallelResearch.js.map +0 -1
- package/dist/orchestrator/types.d.ts +0 -170
- package/dist/orchestrator/types.d.ts.map +0 -1
- package/dist/orchestrator/types.js +0 -14
- package/dist/orchestrator/types.js.map +0 -1
- package/dist/types/tool.d.ts.map +0 -1
- package/dist/types/tool.js.map +0 -1
- package/skills/brand-assets.md +0 -137
- package/skills/context7-usage.md +0 -102
- package/skills/git-worktree.md +0 -181
- package/skills/parallel-research.md +0 -77
- package/skills/priority-todos.md +0 -239
- package/skills/tool-fallback.md +0 -190
- package/skills/vibe-capabilities.md +0 -161
- /package/dist/{lib → infra/lib}/ContextCompressor.d.ts +0 -0
- /package/dist/{lib → infra/lib}/DeepInit.d.ts +0 -0
- /package/dist/{lib → infra/lib}/DeepInit.js +0 -0
- /package/dist/{lib → infra/lib}/FrameworkDetector.d.ts +0 -0
- /package/dist/{lib → infra/lib}/FrameworkDetector.js +0 -0
- /package/dist/{lib → infra/lib}/IterationTracker.js +0 -0
- /package/dist/{lib → infra/lib}/ModelRouter.d.ts +0 -0
- /package/dist/{lib → infra/lib}/ModelRouter.js +0 -0
- /package/dist/{lib → infra/lib}/OrchestrateWorkflow.d.ts +0 -0
- /package/dist/{lib → infra/lib}/OrchestrateWorkflow.js +0 -0
- /package/dist/{lib → infra/lib}/ProgressTracker.d.ts +0 -0
- /package/dist/{lib → infra/lib}/ProjectCache.d.ts +0 -0
- /package/dist/{lib → infra/lib}/ProjectCache.js +0 -0
- /package/dist/{lib → infra/lib}/PythonParser.d.ts +0 -0
- /package/dist/{lib → infra/lib}/ReviewRace.d.ts +0 -0
- /package/dist/{lib → infra/lib}/SkillFrontmatter.js +0 -0
- /package/dist/{lib → infra/lib}/SkillQualityGate.d.ts +0 -0
- /package/dist/{lib → infra/lib}/SkillQualityGate.js +0 -0
- /package/dist/{lib → infra/lib}/SkillRepository.d.ts +0 -0
- /package/dist/{lib → infra/lib}/gpt-oauth.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/auth/ApiKeyManager.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/auth/ApiKeyManager.js +0 -0
- /package/dist/{lib → infra/lib}/llm/index.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/index.js +0 -0
- /package/dist/{lib → infra/lib}/llm/types.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/types.js +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/index.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/index.js +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/retry.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/retry.js +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/stream.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/stream.js +0 -0
- /package/dist/{lib → infra/lib}/memory/KnowledgeGraph.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/KnowledgeGraph.js +0 -0
- /package/dist/{lib → infra/lib}/memory/KnowledgeGraph.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/MemorySearch.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/MemoryStorage.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/ObservationStore.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/ObservationStore.js +0 -0
- /package/dist/{lib → infra/lib}/memory/SessionRAGRetriever.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/SessionRAGStore.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/SessionSummarizer.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/SessionSummarizer.js +0 -0
- /package/dist/{lib → infra/lib}/utils.d.ts +0 -0
- /package/dist/{lib → infra/lib}/utils.js +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/BackgroundManager.test.d.ts +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/BackgroundManager.test.js +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/SwarmOrchestrator.test.d.ts +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/SwarmOrchestrator.test.js +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/agentDiscovery.d.ts +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/agentDiscovery.js +0 -0
- /package/dist/{types → infra/types}/tool.d.ts +0 -0
- /package/dist/{types → infra/types}/tool.js +0 -0
- /package/skills/{commerce-patterns.md → commerce-patterns/SKILL.md} +0 -0
- /package/skills/{e2e-commerce.md → e2e-commerce/SKILL.md} +0 -0
- /package/skills/{frontend-design.md → frontend-design/SKILL.md} +0 -0
- /package/skills/{seo-checklist.md → seo-checklist/SKILL.md} +0 -0
- /package/vibe/rules/{core → principles}/communication-guide.md +0 -0
- /package/vibe/rules/{core → principles}/development-philosophy.md +0 -0
- /package/vibe/rules/{core → principles}/quick-start.md +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { uuidv7 } from 'uuidv7';
|
|
2
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
3
|
+
// Constants
|
|
4
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
5
|
+
const MAX_MESSAGE_BYTES = 10_240; // 10KB
|
|
6
|
+
const MAX_CONTEXT_ITEMS = 100;
|
|
7
|
+
const AGENT_TIMEOUT_MS = 600_000; // 10 minutes
|
|
8
|
+
const MAX_RETRIES = 1;
|
|
9
|
+
export class MessageSizeError extends Error {
|
|
10
|
+
constructor(size) {
|
|
11
|
+
super(`Message exceeds 10KB limit: ${size} bytes`);
|
|
12
|
+
this.name = 'MessageSizeError';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export class AgentTimeoutError extends Error {
|
|
16
|
+
constructor(agentName, stepId) {
|
|
17
|
+
super(`Agent '${agentName}' timed out on step '${stepId}' after ${AGENT_TIMEOUT_MS / 1000}s`);
|
|
18
|
+
this.name = 'AgentTimeoutError';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
22
|
+
// Role → Agent mapping
|
|
23
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
24
|
+
const STEP_TYPE_TO_ROLE = {
|
|
25
|
+
spec: 'planner',
|
|
26
|
+
review: 'reviewer',
|
|
27
|
+
implement: 'implementer',
|
|
28
|
+
test: 'tester',
|
|
29
|
+
deploy: 'implementer',
|
|
30
|
+
};
|
|
31
|
+
const ROLE_TO_AGENT = {
|
|
32
|
+
planner: 'architect',
|
|
33
|
+
implementer: 'implementer',
|
|
34
|
+
reviewer: 'security-reviewer',
|
|
35
|
+
tester: 'tester',
|
|
36
|
+
sentinel: 'SecuritySentinel',
|
|
37
|
+
};
|
|
38
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
39
|
+
// CollaborationProtocol
|
|
40
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
41
|
+
export class CollaborationProtocol {
|
|
42
|
+
messageLog = [];
|
|
43
|
+
handoffLog = [];
|
|
44
|
+
retryCount = new Map();
|
|
45
|
+
assignAgent(step) {
|
|
46
|
+
const role = STEP_TYPE_TO_ROLE[step.type];
|
|
47
|
+
const agentName = ROLE_TO_AGENT[role];
|
|
48
|
+
return {
|
|
49
|
+
stepId: step.id,
|
|
50
|
+
role,
|
|
51
|
+
agentName,
|
|
52
|
+
assignedAt: new Date().toISOString(),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
createMessage(from, to, type, payload, correlationId) {
|
|
56
|
+
const message = {
|
|
57
|
+
id: uuidv7(),
|
|
58
|
+
from,
|
|
59
|
+
to,
|
|
60
|
+
type,
|
|
61
|
+
payload,
|
|
62
|
+
correlationId: correlationId ?? uuidv7(),
|
|
63
|
+
timestamp: new Date().toISOString(),
|
|
64
|
+
};
|
|
65
|
+
this.validateMessageSize(message);
|
|
66
|
+
this.messageLog.push(message);
|
|
67
|
+
return message;
|
|
68
|
+
}
|
|
69
|
+
handoff(from, to, context) {
|
|
70
|
+
const trimmedContext = this.trimContext(context);
|
|
71
|
+
const handoffMessage = this.createMessage(from, to, 'handoff', trimmedContext);
|
|
72
|
+
const result = {
|
|
73
|
+
id: handoffMessage.id,
|
|
74
|
+
from,
|
|
75
|
+
to,
|
|
76
|
+
context: trimmedContext,
|
|
77
|
+
success: true,
|
|
78
|
+
timestamp: new Date().toISOString(),
|
|
79
|
+
};
|
|
80
|
+
this.handoffLog.push(result);
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
canRetry(stepId) {
|
|
84
|
+
const count = this.retryCount.get(stepId) ?? 0;
|
|
85
|
+
return count < MAX_RETRIES;
|
|
86
|
+
}
|
|
87
|
+
recordRetry(stepId) {
|
|
88
|
+
const count = this.retryCount.get(stepId) ?? 0;
|
|
89
|
+
this.retryCount.set(stepId, count + 1);
|
|
90
|
+
}
|
|
91
|
+
getRetryCount(stepId) {
|
|
92
|
+
return this.retryCount.get(stepId) ?? 0;
|
|
93
|
+
}
|
|
94
|
+
getMessageLog() {
|
|
95
|
+
return this.messageLog;
|
|
96
|
+
}
|
|
97
|
+
getHandoffLog() {
|
|
98
|
+
return this.handoffLog;
|
|
99
|
+
}
|
|
100
|
+
getTimeoutMs() {
|
|
101
|
+
return AGENT_TIMEOUT_MS;
|
|
102
|
+
}
|
|
103
|
+
getMaxMessageBytes() {
|
|
104
|
+
return MAX_MESSAGE_BYTES;
|
|
105
|
+
}
|
|
106
|
+
validateMessageSize(message) {
|
|
107
|
+
const serialized = JSON.stringify(message);
|
|
108
|
+
const byteLength = Buffer.byteLength(serialized, 'utf-8');
|
|
109
|
+
if (byteLength > MAX_MESSAGE_BYTES) {
|
|
110
|
+
throw new MessageSizeError(byteLength);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
trimContext(context) {
|
|
114
|
+
return {
|
|
115
|
+
files: context.files.slice(0, MAX_CONTEXT_ITEMS),
|
|
116
|
+
changes: context.changes.slice(0, MAX_CONTEXT_ITEMS),
|
|
117
|
+
decisions: context.decisions.slice(0, MAX_CONTEXT_ITEMS),
|
|
118
|
+
metadata: context.metadata,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=CollaborationProtocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollaborationProtocol.js","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/CollaborationProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,yDAAyD;AACzD,YAAY;AACZ,yDAAyD;AAEzD,MAAM,iBAAiB,GAAG,MAAM,CAAC,CAAC,OAAO;AACzC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,gBAAgB,GAAG,OAAO,CAAC,CAAC,aAAa;AAC/C,MAAM,WAAW,GAAG,CAAC,CAAC;AA2CtB,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,IAAY;QACtB,KAAK,CAAC,+BAA+B,IAAI,QAAQ,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CAC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,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,YAAY;QACV,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,kBAAkB;QAChB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAEO,mBAAmB,CAAC,OAAqB;QAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC1D,IAAI,UAAU,GAAG,iBAAiB,EAAE,CAAC;YACnC,MAAM,IAAI,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAEO,WAAW,CAAC,OAAuB;QACzC,OAAO;YACL,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC;YAChD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC;YACpD,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC;YACxD,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { AgentActionEvent } from './schemas.js';
|
|
2
|
+
import type { EventBus } from './EventBus.js';
|
|
3
|
+
import type { RiskAssessment } from './RiskClassifier.js';
|
|
4
|
+
import { ConfirmationStore } from './ConfirmationStore.js';
|
|
5
|
+
import type { NotificationChannel } from './NotificationDispatcher.js';
|
|
6
|
+
export interface ConfirmationResult {
|
|
7
|
+
id: string;
|
|
8
|
+
status: 'approved' | 'rejected' | 'expired' | 'cancelled';
|
|
9
|
+
response?: string;
|
|
10
|
+
}
|
|
11
|
+
interface StorageProvider {
|
|
12
|
+
getDatabase(): import('better-sqlite3').Database;
|
|
13
|
+
}
|
|
14
|
+
export declare class ConfirmationManager {
|
|
15
|
+
private readonly store;
|
|
16
|
+
private readonly dispatcher;
|
|
17
|
+
private readonly eventBus;
|
|
18
|
+
private readonly pending;
|
|
19
|
+
private expiryCheckId;
|
|
20
|
+
private readonly timeoutSeconds;
|
|
21
|
+
constructor(deps: {
|
|
22
|
+
storage: StorageProvider;
|
|
23
|
+
eventBus: EventBus;
|
|
24
|
+
channels: NotificationChannel[];
|
|
25
|
+
timeoutSeconds?: number;
|
|
26
|
+
});
|
|
27
|
+
requestConfirmation(action: AgentActionEvent, riskAssessment: RiskAssessment): Promise<ConfirmationResult>;
|
|
28
|
+
handleResponse(confirmationId: string, approved: boolean, response?: string): ConfirmationResult;
|
|
29
|
+
checkExpired(): number;
|
|
30
|
+
loadPendingOnStartup(): void;
|
|
31
|
+
startExpiryCheck(): void;
|
|
32
|
+
stopExpiryCheck(): void;
|
|
33
|
+
getStore(): ConfirmationStore;
|
|
34
|
+
getPendingCount(): number;
|
|
35
|
+
private waitForResponse;
|
|
36
|
+
private resolvePending;
|
|
37
|
+
private enforceMaxPending;
|
|
38
|
+
private emitRequested;
|
|
39
|
+
private emitResolved;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=ConfirmationManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationManager.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/ConfirmationManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAA0B,M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C,aAAa;IAarB,OAAO,CAAC,YAAY;CAmBrB"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { ConfirmationStore, InvalidTransitionError } from './ConfirmationStore.js';
|
|
2
|
+
import { NotificationDispatcher } from './NotificationDispatcher.js';
|
|
3
|
+
const CHECK_EXPIRED_INTERVAL_MS = 60_000;
|
|
4
|
+
const MAX_PENDING = 10;
|
|
5
|
+
const DEFAULT_TIMEOUT_S = 300;
|
|
6
|
+
export class ConfirmationManager {
|
|
7
|
+
store;
|
|
8
|
+
dispatcher;
|
|
9
|
+
eventBus;
|
|
10
|
+
pending = new Map();
|
|
11
|
+
expiryCheckId = null;
|
|
12
|
+
timeoutSeconds;
|
|
13
|
+
constructor(deps) {
|
|
14
|
+
this.store = new ConfirmationStore(deps.storage);
|
|
15
|
+
this.dispatcher = new NotificationDispatcher(deps.channels);
|
|
16
|
+
this.eventBus = deps.eventBus;
|
|
17
|
+
this.timeoutSeconds = deps.timeoutSeconds ?? DEFAULT_TIMEOUT_S;
|
|
18
|
+
}
|
|
19
|
+
async requestConfirmation(action, riskAssessment) {
|
|
20
|
+
this.enforceMaxPending();
|
|
21
|
+
const input = {
|
|
22
|
+
correlationId: action.correlationId ?? `confirm-${Date.now()}`,
|
|
23
|
+
actionType: action.actionType,
|
|
24
|
+
actionSummary: `${action.actionType} on ${action.target}`,
|
|
25
|
+
riskLevel: riskAssessment.riskLevel,
|
|
26
|
+
riskScore: riskAssessment.score,
|
|
27
|
+
riskFactors: riskAssessment.factors,
|
|
28
|
+
timeoutSeconds: this.timeoutSeconds,
|
|
29
|
+
idempotencyKey: `${action.actionType}:${action.target}:${riskAssessment.riskLevel}`,
|
|
30
|
+
};
|
|
31
|
+
const confirmation = this.store.create(input);
|
|
32
|
+
if (confirmation.status !== 'pending') {
|
|
33
|
+
return {
|
|
34
|
+
id: confirmation.id,
|
|
35
|
+
status: confirmation.status,
|
|
36
|
+
response: confirmation.ownerResponse ?? undefined,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const notifyResult = await this.dispatcher.notify(confirmation);
|
|
40
|
+
if (notifyResult.success && notifyResult.channel) {
|
|
41
|
+
this.store.updateChannel(confirmation.id, notifyResult.channel);
|
|
42
|
+
}
|
|
43
|
+
if (!notifyResult.success) {
|
|
44
|
+
const expired = this.store.resolve(confirmation.id, 'expired', 'All notification channels failed');
|
|
45
|
+
this.emitResolved(expired);
|
|
46
|
+
return { id: expired.id, status: 'expired', response: expired.ownerResponse ?? undefined };
|
|
47
|
+
}
|
|
48
|
+
this.emitRequested(confirmation);
|
|
49
|
+
return this.waitForResponse(confirmation);
|
|
50
|
+
}
|
|
51
|
+
handleResponse(confirmationId, approved, response) {
|
|
52
|
+
const status = approved ? 'approved' : 'rejected';
|
|
53
|
+
const resolved = this.store.resolve(confirmationId, status, response);
|
|
54
|
+
this.emitResolved(resolved);
|
|
55
|
+
this.resolvePending(confirmationId, {
|
|
56
|
+
id: resolved.id,
|
|
57
|
+
status: resolved.status,
|
|
58
|
+
response: resolved.ownerResponse ?? undefined,
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
id: resolved.id,
|
|
62
|
+
status: resolved.status,
|
|
63
|
+
response: resolved.ownerResponse ?? undefined,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
checkExpired() {
|
|
67
|
+
const expired = this.store.getExpired();
|
|
68
|
+
let count = 0;
|
|
69
|
+
for (const row of expired) {
|
|
70
|
+
try {
|
|
71
|
+
const resolved = this.store.resolve(row.id, 'expired', 'Confirmation timeout');
|
|
72
|
+
this.emitResolved(resolved);
|
|
73
|
+
this.resolvePending(row.id, { id: row.id, status: 'expired', response: 'Confirmation timeout' });
|
|
74
|
+
count++;
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
if (!(err instanceof InvalidTransitionError))
|
|
78
|
+
throw err;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return count;
|
|
82
|
+
}
|
|
83
|
+
loadPendingOnStartup() {
|
|
84
|
+
const pendingRows = this.store.getPending();
|
|
85
|
+
const now = Date.now();
|
|
86
|
+
for (const row of pendingRows) {
|
|
87
|
+
const expiresAt = new Date(row.expiresAt).getTime();
|
|
88
|
+
if (expiresAt <= now) {
|
|
89
|
+
try {
|
|
90
|
+
this.store.resolve(row.id, 'expired', 'Expired during restart');
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
// Already transitioned
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
startExpiryCheck() {
|
|
99
|
+
this.expiryCheckId = setInterval(() => {
|
|
100
|
+
this.checkExpired();
|
|
101
|
+
}, CHECK_EXPIRED_INTERVAL_MS);
|
|
102
|
+
}
|
|
103
|
+
stopExpiryCheck() {
|
|
104
|
+
if (this.expiryCheckId) {
|
|
105
|
+
clearInterval(this.expiryCheckId);
|
|
106
|
+
this.expiryCheckId = null;
|
|
107
|
+
}
|
|
108
|
+
for (const [id, entry] of this.pending) {
|
|
109
|
+
clearTimeout(entry.timerId);
|
|
110
|
+
entry.resolve({ id, status: 'cancelled' });
|
|
111
|
+
}
|
|
112
|
+
this.pending.clear();
|
|
113
|
+
}
|
|
114
|
+
getStore() {
|
|
115
|
+
return this.store;
|
|
116
|
+
}
|
|
117
|
+
getPendingCount() {
|
|
118
|
+
return this.store.getPendingCount();
|
|
119
|
+
}
|
|
120
|
+
waitForResponse(confirmation) {
|
|
121
|
+
return new Promise((resolve) => {
|
|
122
|
+
const remaining = new Date(confirmation.expiresAt).getTime() - Date.now();
|
|
123
|
+
const timerId = setTimeout(() => {
|
|
124
|
+
this.pending.delete(confirmation.id);
|
|
125
|
+
try {
|
|
126
|
+
const expired = this.store.resolve(confirmation.id, 'expired', 'Confirmation timeout');
|
|
127
|
+
this.emitResolved(expired);
|
|
128
|
+
resolve({ id: expired.id, status: 'expired', response: 'Confirmation timeout' });
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
const current = this.store.getById(confirmation.id);
|
|
132
|
+
resolve({
|
|
133
|
+
id: confirmation.id,
|
|
134
|
+
status: (current?.status ?? 'expired'),
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}, Math.max(remaining, 0));
|
|
138
|
+
this.pending.set(confirmation.id, { resolve, timerId });
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
resolvePending(id, result) {
|
|
142
|
+
const entry = this.pending.get(id);
|
|
143
|
+
if (entry) {
|
|
144
|
+
clearTimeout(entry.timerId);
|
|
145
|
+
this.pending.delete(id);
|
|
146
|
+
entry.resolve(result);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
enforceMaxPending() {
|
|
150
|
+
const pendingCount = this.store.getPendingCount();
|
|
151
|
+
if (pendingCount >= MAX_PENDING) {
|
|
152
|
+
const expired = this.store.getExpired();
|
|
153
|
+
if (expired.length === 0) {
|
|
154
|
+
const oldest = this.store.getPending();
|
|
155
|
+
if (oldest.length > 0) {
|
|
156
|
+
try {
|
|
157
|
+
this.store.resolve(oldest[0].id, 'expired', 'Max pending limit exceeded');
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
// Already transitioned
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
emitRequested(confirmation) {
|
|
167
|
+
try {
|
|
168
|
+
this.eventBus.emit('confirmation_requested', {
|
|
169
|
+
actionId: confirmation.id,
|
|
170
|
+
channel: confirmation.channel ?? 'unknown',
|
|
171
|
+
status: 'PENDING_APPROVAL',
|
|
172
|
+
expiresAt: confirmation.expiresAt,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
// Non-critical
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
emitResolved(confirmation) {
|
|
180
|
+
try {
|
|
181
|
+
const statusMap = {
|
|
182
|
+
approved: 'APPROVED',
|
|
183
|
+
rejected: 'REJECTED',
|
|
184
|
+
expired: 'EXPIRED',
|
|
185
|
+
cancelled: 'EXPIRED',
|
|
186
|
+
};
|
|
187
|
+
this.eventBus.emit('confirmation_resolved', {
|
|
188
|
+
actionId: confirmation.id,
|
|
189
|
+
channel: confirmation.channel ?? 'unknown',
|
|
190
|
+
status: (statusMap[confirmation.status] ?? 'EXPIRED'),
|
|
191
|
+
ownerResponse: confirmation.ownerResponse ?? undefined,
|
|
192
|
+
expiresAt: confirmation.expiresAt,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
catch {
|
|
196
|
+
// Non-critical
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=ConfirmationManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationManager.js","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/ConfirmationManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,MAAM,yBAAyB,GAAG,MAAM,CAAC;AACzC,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAiB9B,MAAM,OAAO,mBAAmB;IACb,KAAK,CAAoB;IACzB,UAAU,CAAyB;IACnC,QAAQ,CAAW;IACnB,OAAO,GAAG,IAAI,GAAG,EAAwB,CAAC;IACnD,aAAa,GAA0C,IAAI,CAAC;IACnD,cAAc,CAAS;IAExC,YAAY,IAKX;QACC,IAAI,CAAC,KAAK,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B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AAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,4BAA4B,CAAC,CAAC;oBAC5E,CAAC;oBAAC,MAAM,CAAC;wBACP,uBAAuB;oBACzB,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAEO,aAAa,CAAC,YAA6B;QACjD,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,wBAAwB,EAAE;gBAC3C,QAAQ,EAAE,YAAY,CAAC,EAAE;gBACzB,OAAO,EAAE,YAAY,CAAC,OAAO,IAAI,SAAS;gBAC1C,MAAM,EAAE,kBAAkB;gBAC1B,SAAS,EAAE,YAAY,CAAC,SAAS;aAClC,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,eAAe;QACjB,CAAC;IACH,CAAC;IAEO,YAAY,CAAC,YAA6B;QAChD,IAAI,CAAC;YACH,MAAM,SAAS,GAA2B;gBACxC,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,UAAU;gBACpB,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,SAAS;aACrB,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,uBAAuB,EAAE;gBAC1C,QAAQ,EAAE,YAAY,CAAC,EAAE;gBACzB,OAAO,EAAE,YAAY,CAAC,OAAO,IAAI,SAAS;gBAC1C,MAAM,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,SAAS,CAAwC;gBAC5F,aAAa,EAAE,YAAY,CAAC,aAAa,IAAI,SAAS;gBACtD,SAAS,EAAE,YAAY,CAAC,SAAS;aAClC,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,eAAe;QACjB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type Database from 'better-sqlite3';
|
|
2
|
+
declare const VALID_STATUSES: readonly ["pending", "approved", "rejected", "expired", "cancelled"];
|
|
3
|
+
type ConfirmationStatus = (typeof VALID_STATUSES)[number];
|
|
4
|
+
export declare class InvalidTransitionError extends Error {
|
|
5
|
+
constructor(from: string, to: string);
|
|
6
|
+
}
|
|
7
|
+
export interface ConfirmationRow {
|
|
8
|
+
id: string;
|
|
9
|
+
correlationId: string;
|
|
10
|
+
actionType: string;
|
|
11
|
+
actionSummary: string;
|
|
12
|
+
riskLevel: string;
|
|
13
|
+
riskScore: number;
|
|
14
|
+
riskFactors: string;
|
|
15
|
+
status: string;
|
|
16
|
+
channel: string | null;
|
|
17
|
+
notifiedAt: string | null;
|
|
18
|
+
respondedAt: string | null;
|
|
19
|
+
ownerResponse: string | null;
|
|
20
|
+
expiresAt: string;
|
|
21
|
+
idempotencyKey: string | null;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CreateConfirmationInput {
|
|
25
|
+
correlationId: string;
|
|
26
|
+
actionType: string;
|
|
27
|
+
actionSummary: string;
|
|
28
|
+
riskLevel: string;
|
|
29
|
+
riskScore: number;
|
|
30
|
+
riskFactors: string[];
|
|
31
|
+
timeoutSeconds?: number;
|
|
32
|
+
idempotencyKey?: string;
|
|
33
|
+
}
|
|
34
|
+
interface StorageProvider {
|
|
35
|
+
getDatabase(): Database.Database;
|
|
36
|
+
}
|
|
37
|
+
export declare class ConfirmationStore {
|
|
38
|
+
private readonly db;
|
|
39
|
+
private readonly insertStmt;
|
|
40
|
+
private readonly resolveStmt;
|
|
41
|
+
private readonly getByIdStmt;
|
|
42
|
+
constructor(storage: StorageProvider);
|
|
43
|
+
private initTables;
|
|
44
|
+
create(input: CreateConfirmationInput): ConfirmationRow;
|
|
45
|
+
resolve(id: string, status: ConfirmationStatus, response?: string): ConfirmationRow;
|
|
46
|
+
getById(id: string): ConfirmationRow | null;
|
|
47
|
+
getExpired(): ConfirmationRow[];
|
|
48
|
+
getPending(): ConfirmationRow[];
|
|
49
|
+
getByCorrelation(correlationId: string): ConfirmationRow[];
|
|
50
|
+
updateChannel(id: string, channel: string): void;
|
|
51
|
+
getPendingCount(): number;
|
|
52
|
+
private getByIdempotencyKey;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=ConfirmationStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationStore.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/ConfirmationStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAG3C,QAAA,MAAM,cAAc,sEAAuE,CAAC;AAC5F,KAAK,kBAAkB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAW1D,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;CAIrC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,eAAe;IACvB,WAAW,IAAI,QAAQ,CAAC,QAAQ,CAAC;CAClC;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAoB;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAChD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;gBAErC,OAAO,EAAE,eAAe;IAmBpC,OAAO,CAAC,UAAU;IA0BlB,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,eAAe;IA2BvD,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe;IAgCnF,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI;IAI3C,UAAU,IAAI,eAAe,EAAE;IAO/B,UAAU,IAAI,eAAe,EAAE;IAM/B,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,eAAe,EAAE;IAM1D,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAMhD,eAAe,IAAI,MAAM;IAQzB,OAAO,CAAC,mBAAmB;CAO5B"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { uuidv7 } from 'uuidv7';
|
|
2
|
+
const VALID_STATUSES = ['pending', 'approved', 'rejected', 'expired', 'cancelled'];
|
|
3
|
+
const TERMINAL_STATUSES = new Set(['approved', 'rejected', 'expired', 'cancelled']);
|
|
4
|
+
const VALID_TRANSITIONS = {
|
|
5
|
+
pending: new Set(['approved', 'rejected', 'expired', 'cancelled']),
|
|
6
|
+
};
|
|
7
|
+
const DEFAULT_TIMEOUT_S = 300;
|
|
8
|
+
const MAX_TIMEOUT_S = 3600;
|
|
9
|
+
export class InvalidTransitionError extends Error {
|
|
10
|
+
constructor(from, to) {
|
|
11
|
+
super(`Invalid state transition: ${from} → ${to}`);
|
|
12
|
+
this.name = 'InvalidTransitionError';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export class ConfirmationStore {
|
|
16
|
+
db;
|
|
17
|
+
insertStmt;
|
|
18
|
+
resolveStmt;
|
|
19
|
+
getByIdStmt;
|
|
20
|
+
constructor(storage) {
|
|
21
|
+
this.db = storage.getDatabase();
|
|
22
|
+
this.initTables();
|
|
23
|
+
this.insertStmt = this.db.prepare(`
|
|
24
|
+
INSERT INTO confirmations
|
|
25
|
+
(id, correlationId, actionType, actionSummary, riskLevel, riskScore, riskFactors,
|
|
26
|
+
status, expiresAt, idempotencyKey, createdAt)
|
|
27
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, 'pending', ?, ?, ?)
|
|
28
|
+
`);
|
|
29
|
+
this.resolveStmt = this.db.prepare(`
|
|
30
|
+
UPDATE confirmations SET status = ?, respondedAt = ?, ownerResponse = ?
|
|
31
|
+
WHERE id = ? AND status = 'pending'
|
|
32
|
+
`);
|
|
33
|
+
this.getByIdStmt = this.db.prepare('SELECT * FROM confirmations WHERE id = ?');
|
|
34
|
+
}
|
|
35
|
+
initTables() {
|
|
36
|
+
this.db.exec(`
|
|
37
|
+
CREATE TABLE IF NOT EXISTS confirmations (
|
|
38
|
+
id TEXT PRIMARY KEY,
|
|
39
|
+
correlationId TEXT NOT NULL,
|
|
40
|
+
actionType TEXT NOT NULL,
|
|
41
|
+
actionSummary TEXT NOT NULL,
|
|
42
|
+
riskLevel TEXT NOT NULL,
|
|
43
|
+
riskScore INTEGER NOT NULL,
|
|
44
|
+
riskFactors TEXT NOT NULL,
|
|
45
|
+
status TEXT NOT NULL DEFAULT 'pending'
|
|
46
|
+
CHECK(status IN ('pending', 'approved', 'rejected', 'expired', 'cancelled')),
|
|
47
|
+
channel TEXT,
|
|
48
|
+
notifiedAt TEXT,
|
|
49
|
+
respondedAt TEXT,
|
|
50
|
+
ownerResponse TEXT,
|
|
51
|
+
expiresAt TEXT NOT NULL,
|
|
52
|
+
idempotencyKey TEXT UNIQUE,
|
|
53
|
+
createdAt TEXT NOT NULL
|
|
54
|
+
);
|
|
55
|
+
CREATE INDEX IF NOT EXISTS idx_confirmation_status_expires ON confirmations(status, expiresAt);
|
|
56
|
+
CREATE INDEX IF NOT EXISTS idx_confirmation_correlation ON confirmations(correlationId);
|
|
57
|
+
CREATE INDEX IF NOT EXISTS idx_confirmation_idempotency ON confirmations(idempotencyKey);
|
|
58
|
+
`);
|
|
59
|
+
}
|
|
60
|
+
create(input) {
|
|
61
|
+
if (input.idempotencyKey) {
|
|
62
|
+
const existing = this.getByIdempotencyKey(input.idempotencyKey);
|
|
63
|
+
if (existing)
|
|
64
|
+
return existing;
|
|
65
|
+
}
|
|
66
|
+
const id = uuidv7();
|
|
67
|
+
const now = new Date().toISOString();
|
|
68
|
+
const timeout = Math.min(input.timeoutSeconds ?? DEFAULT_TIMEOUT_S, MAX_TIMEOUT_S);
|
|
69
|
+
const expiresAt = new Date(Date.now() + timeout * 1000).toISOString();
|
|
70
|
+
this.insertStmt.run(id, input.correlationId, input.actionType, input.actionSummary, input.riskLevel, input.riskScore, JSON.stringify(input.riskFactors), expiresAt, input.idempotencyKey ?? null, now);
|
|
71
|
+
return this.getById(id);
|
|
72
|
+
}
|
|
73
|
+
resolve(id, status, response) {
|
|
74
|
+
const current = this.getById(id);
|
|
75
|
+
if (!current) {
|
|
76
|
+
throw new Error(`Confirmation not found: ${id}`);
|
|
77
|
+
}
|
|
78
|
+
const currentStatus = current.status;
|
|
79
|
+
if (TERMINAL_STATUSES.has(currentStatus)) {
|
|
80
|
+
throw new InvalidTransitionError(currentStatus, status);
|
|
81
|
+
}
|
|
82
|
+
const allowed = VALID_TRANSITIONS[currentStatus];
|
|
83
|
+
if (!allowed || !allowed.has(status)) {
|
|
84
|
+
throw new InvalidTransitionError(currentStatus, status);
|
|
85
|
+
}
|
|
86
|
+
const result = this.db.transaction(() => {
|
|
87
|
+
const changes = this.resolveStmt.run(status, new Date().toISOString(), response ?? null, id);
|
|
88
|
+
if (changes.changes === 0) {
|
|
89
|
+
throw new InvalidTransitionError(currentStatus, status);
|
|
90
|
+
}
|
|
91
|
+
return this.getById(id);
|
|
92
|
+
})();
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
getById(id) {
|
|
96
|
+
return this.getByIdStmt.get(id) ?? null;
|
|
97
|
+
}
|
|
98
|
+
getExpired() {
|
|
99
|
+
const now = new Date().toISOString();
|
|
100
|
+
return this.db
|
|
101
|
+
.prepare("SELECT * FROM confirmations WHERE status = 'pending' AND expiresAt <= ?")
|
|
102
|
+
.all(now);
|
|
103
|
+
}
|
|
104
|
+
getPending() {
|
|
105
|
+
return this.db
|
|
106
|
+
.prepare("SELECT * FROM confirmations WHERE status = 'pending' ORDER BY createdAt ASC")
|
|
107
|
+
.all();
|
|
108
|
+
}
|
|
109
|
+
getByCorrelation(correlationId) {
|
|
110
|
+
return this.db
|
|
111
|
+
.prepare('SELECT * FROM confirmations WHERE correlationId = ? ORDER BY createdAt ASC')
|
|
112
|
+
.all(correlationId);
|
|
113
|
+
}
|
|
114
|
+
updateChannel(id, channel) {
|
|
115
|
+
this.db
|
|
116
|
+
.prepare('UPDATE confirmations SET channel = ?, notifiedAt = ? WHERE id = ?')
|
|
117
|
+
.run(channel, new Date().toISOString(), id);
|
|
118
|
+
}
|
|
119
|
+
getPendingCount() {
|
|
120
|
+
return this.db
|
|
121
|
+
.prepare("SELECT COUNT(*) as count FROM confirmations WHERE status = 'pending'")
|
|
122
|
+
.get().count;
|
|
123
|
+
}
|
|
124
|
+
getByIdempotencyKey(key) {
|
|
125
|
+
return this.db
|
|
126
|
+
.prepare('SELECT * FROM confirmations WHERE idempotencyKey = ?')
|
|
127
|
+
.get(key) ?? null;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=ConfirmationStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationStore.js","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/ConfirmationStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAU,CAAC;AAG5F,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAqB,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAExG,MAAM,iBAAiB,GAA4C;IACjE,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;CACnE,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,IAAY,EAAE,EAAU;QAClC,KAAK,CAAC,6BAA6B,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAmCD,MAAM,OAAO,iBAAiB;IACX,EAAE,CAAoB;IACtB,UAAU,CAAqB;IAC/B,WAAW,CAAqB;IAChC,WAAW,CAAqB;IAEjD,YAAY,OAAwB;QAClC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;;;;;KAKjC,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,C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ACX,OAAO,CAAC,yEAAyE,CAAC;aAClF,GAAG,CAAC,GAAG,CAAsB,CAAC;IACnC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,EAAE;aACX,OAAO,CAAC,6EAA6E,CAAC;aACtF,GAAG,EAAuB,CAAC;IAChC,CAAC;IAED,gBAAgB,CAAC,aAAqB;QACpC,OAAO,IAAI,CAAC,EAAE;aACX,OAAO,CAAC,4EAA4E,CAAC;aACrF,GAAG,CAAC,aAAa,CAAsB,CAAC;IAC7C,CAAC;IAED,aAAa,CAAC,EAAU,EAAE,OAAe;QACvC,IAAI,CAAC,EAAE;aACJ,OAAO,CAAC,mEAAmE,CAAC;aAC5E,GAAG,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,eAAe;QACb,OACE,IAAI,CAAC,EAAE;aACJ,OAAO,CAAC,sEAAsE,CAAC;aAC/E,GAAG,EACP,CAAC,KAAK,CAAC;IACV,CAAC;IAEO,mBAAmB,CAAC,GAAW;QACrC,OACE,IAAI,CAAC,EAAE;aACJ,OAAO,CAAC,sDAAsD,CAAC;aAC/D,GAAG,CAAC,GAAG,CACX,IAAI,IAAI,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AutonomyEventType, type EventPayload, type EventInput, type EnrichedEvent } from './schemas.js';
|
|
2
|
+
export type EventListener<T extends AutonomyEventType> = (event: EnrichedEvent<EventPayload<T>>) => void | Promise<void>;
|
|
3
|
+
export declare class EventBus {
|
|
4
|
+
private readonly listeners;
|
|
5
|
+
private totalListenerCount;
|
|
6
|
+
private readonly dedupCache;
|
|
7
|
+
private readonly dedupOrder;
|
|
8
|
+
private lastSyncErrors;
|
|
9
|
+
on<T extends AutonomyEventType>(eventType: T, listener: EventListener<T>): void;
|
|
10
|
+
off<T extends AutonomyEventType>(eventType: T, listener: EventListener<T>): void;
|
|
11
|
+
emit<T extends AutonomyEventType>(eventType: T, payload: EventInput<T>): EnrichedEvent<EventPayload<T>>;
|
|
12
|
+
emitIdempotent<T extends AutonomyEventType>(eventId: string, eventType: T, payload: EventInput<T>): EnrichedEvent<EventPayload<T>> | null;
|
|
13
|
+
getListenerCount(eventType?: AutonomyEventType): number;
|
|
14
|
+
getLastSyncErrors(): ReadonlyArray<Error>;
|
|
15
|
+
removeAllListeners(eventType?: AutonomyEventType): void;
|
|
16
|
+
private dispatch;
|
|
17
|
+
private handleListenerError;
|
|
18
|
+
private trackDedup;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=EventBus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventBus.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/EventBus.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAKtB,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,iBAAiB,IAAI,CACvD,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAClC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAM1B,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsC;IAChE,OAAO,CAAC,kBAAkB,CAAK;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAChD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgB;IAC3C,OAAO,CAAC,cAAc,CAAe;IAErC,EAAE,CAAC,CAAC,SAAS,iBAAiB,EAC5B,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GACzB,IAAI;IAUP,GAAG,CAAC,CAAC,SAAS,iBAAiB,EAC7B,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,aAAa,CAAC,CAAC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