@su-record/vibe 2.6.34 → 2.6.41
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 +14 -18
- 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 +154 -13
- package/commands/vibe.spec.review.md +155 -10
- package/commands/vibe.trace.md +49 -1
- package/commands/vibe.utils.md +26 -11
- 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 +29 -7
- 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 +304 -38
- 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 -117
- package/dist/lib/gemini-api.d.ts.map +0 -1
- package/dist/lib/gemini-api.js +0 -525
- 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/hooks/scripts/gemini-ui-gen.js +0 -281
- 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,219 @@
|
|
|
1
|
+
// Insight storage for self-evolution Phase 2
|
|
2
|
+
// Stores extracted patterns, anti-patterns, skill gaps, and optimizations
|
|
3
|
+
import { randomUUID } from 'crypto';
|
|
4
|
+
function generateId() {
|
|
5
|
+
const timestamp = Date.now().toString(36);
|
|
6
|
+
const uuid = randomUUID().replace(/-/g, '').slice(0, 12);
|
|
7
|
+
return `ins-${timestamp}-${uuid}`;
|
|
8
|
+
}
|
|
9
|
+
export class InsightStore {
|
|
10
|
+
db;
|
|
11
|
+
fts5Available;
|
|
12
|
+
constructor(storage) {
|
|
13
|
+
this.db = storage.getDatabase();
|
|
14
|
+
this.fts5Available = storage.isFTS5Available();
|
|
15
|
+
this.initializeTables();
|
|
16
|
+
}
|
|
17
|
+
initializeTables() {
|
|
18
|
+
this.db.exec(`
|
|
19
|
+
CREATE TABLE IF NOT EXISTS insights (
|
|
20
|
+
id TEXT PRIMARY KEY,
|
|
21
|
+
type TEXT NOT NULL CHECK(type IN ('pattern','anti_pattern','preference','skill_gap','optimization')),
|
|
22
|
+
title TEXT NOT NULL,
|
|
23
|
+
description TEXT NOT NULL,
|
|
24
|
+
evidence TEXT,
|
|
25
|
+
confidence REAL DEFAULT 0.5 CHECK(confidence >= 0 AND confidence <= 1),
|
|
26
|
+
occurrences INTEGER DEFAULT 1,
|
|
27
|
+
tags TEXT,
|
|
28
|
+
status TEXT NOT NULL DEFAULT 'draft' CHECK(status IN ('draft','confirmed','applied','deprecated')),
|
|
29
|
+
generatedFrom TEXT NOT NULL CHECK(generatedFrom IN ('reflection','observation','agent_stats','manual')),
|
|
30
|
+
appliedAs TEXT,
|
|
31
|
+
createdAt TEXT NOT NULL,
|
|
32
|
+
updatedAt TEXT NOT NULL
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
CREATE INDEX IF NOT EXISTS idx_ins_type ON insights(type);
|
|
36
|
+
CREATE INDEX IF NOT EXISTS idx_ins_status ON insights(status);
|
|
37
|
+
CREATE INDEX IF NOT EXISTS idx_ins_confidence ON insights(confidence);
|
|
38
|
+
CREATE INDEX IF NOT EXISTS idx_ins_created ON insights(createdAt);
|
|
39
|
+
CREATE INDEX IF NOT EXISTS idx_ins_source ON insights(generatedFrom);
|
|
40
|
+
`);
|
|
41
|
+
// Skill gaps table for prompt-dispatcher miss logging
|
|
42
|
+
this.db.exec(`
|
|
43
|
+
CREATE TABLE IF NOT EXISTS skill_gaps (
|
|
44
|
+
id TEXT PRIMARY KEY,
|
|
45
|
+
prompt TEXT NOT NULL,
|
|
46
|
+
normalizedPrompt TEXT,
|
|
47
|
+
sessionId TEXT,
|
|
48
|
+
createdAt TEXT NOT NULL
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
CREATE INDEX IF NOT EXISTS idx_sg_normalized ON skill_gaps(normalizedPrompt);
|
|
52
|
+
CREATE INDEX IF NOT EXISTS idx_sg_created ON skill_gaps(createdAt);
|
|
53
|
+
`);
|
|
54
|
+
if (this.fts5Available) {
|
|
55
|
+
try {
|
|
56
|
+
this.db.exec(`
|
|
57
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS insights_fts
|
|
58
|
+
USING fts5(title, description, tags, content=insights, content_rowid=rowid);
|
|
59
|
+
|
|
60
|
+
CREATE TRIGGER IF NOT EXISTS insights_ai AFTER INSERT ON insights BEGIN
|
|
61
|
+
INSERT INTO insights_fts(rowid, title, description, tags)
|
|
62
|
+
VALUES (new.rowid, new.title, new.description, new.tags);
|
|
63
|
+
END;
|
|
64
|
+
CREATE TRIGGER IF NOT EXISTS insights_ad AFTER DELETE ON insights BEGIN
|
|
65
|
+
INSERT INTO insights_fts(insights_fts, rowid, title, description, tags)
|
|
66
|
+
VALUES('delete', old.rowid, old.title, old.description, old.tags);
|
|
67
|
+
END;
|
|
68
|
+
CREATE TRIGGER IF NOT EXISTS insights_au AFTER UPDATE ON insights BEGIN
|
|
69
|
+
INSERT INTO insights_fts(insights_fts, rowid, title, description, tags)
|
|
70
|
+
VALUES('delete', old.rowid, old.title, old.description, old.tags);
|
|
71
|
+
INSERT INTO insights_fts(rowid, title, description, tags)
|
|
72
|
+
VALUES (new.rowid, new.title, new.description, new.tags);
|
|
73
|
+
END;
|
|
74
|
+
`);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
// FTS5 setup failed, continue without it
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
save(input) {
|
|
82
|
+
const id = generateId();
|
|
83
|
+
const now = new Date().toISOString();
|
|
84
|
+
const confidence = Math.max(0, Math.min(1, input.confidence ?? 0.5));
|
|
85
|
+
this.db.prepare(`
|
|
86
|
+
INSERT INTO insights (id, type, title, description, evidence, confidence, occurrences, tags, status, generatedFrom, createdAt, updatedAt)
|
|
87
|
+
VALUES (?, ?, ?, ?, ?, ?, 1, ?, 'draft', ?, ?, ?)
|
|
88
|
+
`).run(id, input.type, input.title, input.description, JSON.stringify(input.evidence ?? []), confidence, JSON.stringify(input.tags ?? []), input.generatedFrom, now, now);
|
|
89
|
+
return id;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Check for duplicate and merge (increment occurrences) if found
|
|
93
|
+
* Returns existing ID if merged, null if no duplicate
|
|
94
|
+
*/
|
|
95
|
+
findAndMergeDuplicate(title, description) {
|
|
96
|
+
if (this.fts5Available) {
|
|
97
|
+
try {
|
|
98
|
+
const row = this.db.prepare(`
|
|
99
|
+
SELECT i.id, i.occurrences, i.confidence
|
|
100
|
+
FROM insights_fts fts
|
|
101
|
+
JOIN insights i ON i.rowid = fts.rowid
|
|
102
|
+
WHERE insights_fts MATCH ?
|
|
103
|
+
ORDER BY bm25(insights_fts)
|
|
104
|
+
LIMIT 1
|
|
105
|
+
`).get(title);
|
|
106
|
+
if (row) {
|
|
107
|
+
const newOccurrences = row.occurrences + 1;
|
|
108
|
+
const newConfidence = Math.min(1.0, newOccurrences * 0.2 + 0.1);
|
|
109
|
+
this.db.prepare(`
|
|
110
|
+
UPDATE insights SET occurrences = ?, confidence = ?, updatedAt = ? WHERE id = ?
|
|
111
|
+
`).run(newOccurrences, newConfidence, new Date().toISOString(), row.id);
|
|
112
|
+
return row.id;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
// FTS5 failed, treat as no duplicate
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
search(query, limit = 20) {
|
|
122
|
+
if (this.fts5Available) {
|
|
123
|
+
try {
|
|
124
|
+
const rows = this.db.prepare(`
|
|
125
|
+
SELECT i.*, bm25(insights_fts) as rank
|
|
126
|
+
FROM insights_fts fts
|
|
127
|
+
JOIN insights i ON i.rowid = fts.rowid
|
|
128
|
+
WHERE insights_fts MATCH ?
|
|
129
|
+
ORDER BY i.confidence DESC, rank
|
|
130
|
+
LIMIT ?
|
|
131
|
+
`).all(query, limit);
|
|
132
|
+
return rows.map(this.rowToInsight);
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
// Fallback to LIKE
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const pattern = `%${query}%`;
|
|
139
|
+
const rows = this.db.prepare(`
|
|
140
|
+
SELECT * FROM insights
|
|
141
|
+
WHERE title LIKE ? OR description LIKE ? OR tags LIKE ?
|
|
142
|
+
ORDER BY confidence DESC, createdAt DESC
|
|
143
|
+
LIMIT ?
|
|
144
|
+
`).all(pattern, pattern, pattern, limit);
|
|
145
|
+
return rows.map(this.rowToInsight);
|
|
146
|
+
}
|
|
147
|
+
getById(id) {
|
|
148
|
+
const row = this.db.prepare(`SELECT * FROM insights WHERE id = ?`).get(id);
|
|
149
|
+
return row ? this.rowToInsight(row) : null;
|
|
150
|
+
}
|
|
151
|
+
getActionable() {
|
|
152
|
+
const rows = this.db.prepare(`
|
|
153
|
+
SELECT * FROM insights
|
|
154
|
+
WHERE status = 'confirmed' AND type IN ('skill_gap', 'pattern', 'anti_pattern')
|
|
155
|
+
ORDER BY confidence DESC, occurrences DESC
|
|
156
|
+
LIMIT 20
|
|
157
|
+
`).all();
|
|
158
|
+
return rows.map(this.rowToInsight);
|
|
159
|
+
}
|
|
160
|
+
getByStatus(status, limit = 50) {
|
|
161
|
+
const rows = this.db.prepare(`
|
|
162
|
+
SELECT * FROM insights WHERE status = ? ORDER BY updatedAt DESC LIMIT ?
|
|
163
|
+
`).all(status, limit);
|
|
164
|
+
return rows.map(this.rowToInsight);
|
|
165
|
+
}
|
|
166
|
+
getByType(type, limit = 50) {
|
|
167
|
+
const rows = this.db.prepare(`
|
|
168
|
+
SELECT * FROM insights WHERE type = ? ORDER BY confidence DESC LIMIT ?
|
|
169
|
+
`).all(type, limit);
|
|
170
|
+
return rows.map(this.rowToInsight);
|
|
171
|
+
}
|
|
172
|
+
updateStatus(id, status) {
|
|
173
|
+
const result = this.db.prepare(`
|
|
174
|
+
UPDATE insights SET status = ?, updatedAt = ? WHERE id = ?
|
|
175
|
+
`).run(status, new Date().toISOString(), id);
|
|
176
|
+
return result.changes > 0;
|
|
177
|
+
}
|
|
178
|
+
setAppliedAs(id, generationId) {
|
|
179
|
+
const result = this.db.prepare(`
|
|
180
|
+
UPDATE insights SET appliedAs = ?, status = 'applied', updatedAt = ? WHERE id = ?
|
|
181
|
+
`).run(generationId, new Date().toISOString(), id);
|
|
182
|
+
return result.changes > 0;
|
|
183
|
+
}
|
|
184
|
+
cleanupLowConfidence(maxAge = 7 * 24 * 60 * 60 * 1000) {
|
|
185
|
+
const cutoff = new Date(Date.now() - maxAge).toISOString();
|
|
186
|
+
const result = this.db.prepare(`
|
|
187
|
+
DELETE FROM insights WHERE confidence < 0.3 AND createdAt < ?
|
|
188
|
+
`).run(cutoff);
|
|
189
|
+
return result.changes;
|
|
190
|
+
}
|
|
191
|
+
getStats() {
|
|
192
|
+
const types = this.db.prepare(`SELECT type, COUNT(*) as count FROM insights GROUP BY type`).all();
|
|
193
|
+
const statuses = this.db.prepare(`SELECT status, COUNT(*) as count FROM insights GROUP BY status`).all();
|
|
194
|
+
const byType = {};
|
|
195
|
+
const byStatus = {};
|
|
196
|
+
let total = 0;
|
|
197
|
+
types.forEach(t => { byType[t.type] = t.count; total += t.count; });
|
|
198
|
+
statuses.forEach(s => { byStatus[s.status] = s.count; });
|
|
199
|
+
return { total, byType, byStatus };
|
|
200
|
+
}
|
|
201
|
+
rowToInsight(row) {
|
|
202
|
+
return {
|
|
203
|
+
id: row.id,
|
|
204
|
+
type: row.type,
|
|
205
|
+
title: row.title,
|
|
206
|
+
description: row.description,
|
|
207
|
+
evidence: row.evidence ? JSON.parse(row.evidence) : [],
|
|
208
|
+
confidence: row.confidence,
|
|
209
|
+
occurrences: row.occurrences,
|
|
210
|
+
tags: row.tags ? JSON.parse(row.tags) : [],
|
|
211
|
+
status: row.status,
|
|
212
|
+
generatedFrom: row.generatedFrom,
|
|
213
|
+
appliedAs: row.appliedAs,
|
|
214
|
+
createdAt: row.createdAt,
|
|
215
|
+
updatedAt: row.updatedAt,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=InsightStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightStore.js","sourceRoot":"","sources":["../../../../src/infra/lib/evolution/InsightStore.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,0EAA0E;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAiDpC,SAAS,UAAU;IACjB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACzD,OAAO,OAAO,SAAS,IAAI,IAAI,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,OAAO,YAAY;IACf,EAAE,CAAoB;IACtB,aAAa,CAAU;IAE/B,YAAY,OAAsB;QAChC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QAC/C,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAEO,gBAAgB;QACtB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;KAsBZ,CAAC,CAAC;QAEH,sDAAsD;QACtD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;;;;;;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EAAE;YACV,IAAI,EAAE,GAAG,CAAC,IAAmB;YAC7B,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;YACtD,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;YAC1C,MAAM,EAAE,GAAG,CAAC,MAAuB;YACnC,aAAa,EAAE,GAAG,CAAC,aAA8B;YACjD,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,SAAS,EAAE,GAAG,CAAC,SAAS;SACzB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { MemoryStorage } from '../memory/MemoryStorage.js';
|
|
2
|
+
interface TransitionResult {
|
|
3
|
+
promoted: string[];
|
|
4
|
+
demoted: string[];
|
|
5
|
+
deleted: string[];
|
|
6
|
+
errors: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare class LifecycleManager {
|
|
9
|
+
private registry;
|
|
10
|
+
private tracker;
|
|
11
|
+
private rollback;
|
|
12
|
+
constructor(storage: MemoryStorage);
|
|
13
|
+
/**
|
|
14
|
+
* Run full lifecycle check: promotions + demotions + TTL cleanup + deletion
|
|
15
|
+
*/
|
|
16
|
+
cleanup(): TransitionResult;
|
|
17
|
+
/**
|
|
18
|
+
* testing → active: 3+ usage + weighted negative ratio < 30%
|
|
19
|
+
*/
|
|
20
|
+
checkPromotions(): string[];
|
|
21
|
+
/**
|
|
22
|
+
* active → disabled: weighted negative ratio > 50%
|
|
23
|
+
*/
|
|
24
|
+
checkDemotions(): string[];
|
|
25
|
+
/**
|
|
26
|
+
* active → disabled: no usage for TTL_DAYS
|
|
27
|
+
*/
|
|
28
|
+
checkTTLExpiration(): string[];
|
|
29
|
+
/**
|
|
30
|
+
* disabled → deleted: disabled for additional TTL_DAYS with no recovery
|
|
31
|
+
*/
|
|
32
|
+
checkDeletions(): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Approve a draft generation (draft → testing)
|
|
35
|
+
*/
|
|
36
|
+
approve(generationId: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Reject a draft generation (draft → deleted)
|
|
39
|
+
*/
|
|
40
|
+
reject(generationId: string): boolean;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=LifecycleManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LifecycleManager.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/evolution/LifecycleManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAK3D,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAOD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,QAAQ,CAAkB;gBAEtB,OAAO,EAAE,aAAa;IAMlC;;OAEG;IACI,OAAO,IAAI,gBAAgB;IAsBlC;;OAEG;IACI,eAAe,IAAI,MAAM,EAAE;IAkBlC;;OAEG;IACI,cAAc,IAAI,MAAM,EAAE;IAmBjC;;OAEG;IACI,kBAAkB,IAAI,MAAM,EAAE;IAqBrC;;OAEG;IACI,cAAc,IAAI,MAAM,EAAE;IAiBjC;;OAEG;IACI,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAM7C;;OAEG;IACI,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;CAK7C"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// Lifecycle Manager for self-evolution Phase 4
|
|
2
|
+
// Manages state transitions: draft → testing → active → disabled → deleted
|
|
3
|
+
import { GenerationRegistry } from './GenerationRegistry.js';
|
|
4
|
+
import { UsageTracker } from './UsageTracker.js';
|
|
5
|
+
import { RollbackManager } from './RollbackManager.js';
|
|
6
|
+
const TTL_DAYS = 7;
|
|
7
|
+
const PROMOTION_MIN_USAGE = 3;
|
|
8
|
+
const PROMOTION_MAX_NEG_RATIO = 0.3;
|
|
9
|
+
const DEMOTION_NEG_RATIO = 0.5;
|
|
10
|
+
export class LifecycleManager {
|
|
11
|
+
registry;
|
|
12
|
+
tracker;
|
|
13
|
+
rollback;
|
|
14
|
+
constructor(storage) {
|
|
15
|
+
this.registry = new GenerationRegistry(storage);
|
|
16
|
+
this.tracker = new UsageTracker(storage);
|
|
17
|
+
this.rollback = new RollbackManager(storage);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Run full lifecycle check: promotions + demotions + TTL cleanup + deletion
|
|
21
|
+
*/
|
|
22
|
+
cleanup() {
|
|
23
|
+
const result = { promoted: [], demoted: [], deleted: [], errors: [] };
|
|
24
|
+
// 1. Check promotions (testing → active)
|
|
25
|
+
const promotions = this.checkPromotions();
|
|
26
|
+
result.promoted.push(...promotions);
|
|
27
|
+
// 2. Check demotions (active → disabled) based on negative feedback
|
|
28
|
+
const demotions = this.checkDemotions();
|
|
29
|
+
result.demoted.push(...demotions);
|
|
30
|
+
// 3. TTL expiration (active → disabled for unused)
|
|
31
|
+
const ttlExpired = this.checkTTLExpiration();
|
|
32
|
+
result.demoted.push(...ttlExpired);
|
|
33
|
+
// 4. Delete long-disabled (disabled → deleted after additional 7 days)
|
|
34
|
+
const deletions = this.checkDeletions();
|
|
35
|
+
result.deleted.push(...deletions);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* testing → active: 3+ usage + weighted negative ratio < 30%
|
|
40
|
+
*/
|
|
41
|
+
checkPromotions() {
|
|
42
|
+
const promoted = [];
|
|
43
|
+
const testing = this.registry.getByStatus('testing');
|
|
44
|
+
for (const gen of testing) {
|
|
45
|
+
const usageCount = this.tracker.getUsageCount(gen.id);
|
|
46
|
+
if (usageCount < PROMOTION_MIN_USAGE)
|
|
47
|
+
continue;
|
|
48
|
+
const stats = this.tracker.getFeedbackStats(gen.id);
|
|
49
|
+
if (stats.weightedNegativeRatio < PROMOTION_MAX_NEG_RATIO) {
|
|
50
|
+
this.registry.updateStatus(gen.id, 'active');
|
|
51
|
+
promoted.push(gen.id);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return promoted;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* active → disabled: weighted negative ratio > 50%
|
|
58
|
+
*/
|
|
59
|
+
checkDemotions() {
|
|
60
|
+
const demoted = [];
|
|
61
|
+
const active = this.registry.getByStatus('active');
|
|
62
|
+
for (const gen of active) {
|
|
63
|
+
const stats = this.tracker.getFeedbackStats(gen.id);
|
|
64
|
+
if (stats.totalEvents > 0 && stats.weightedNegativeRatio > DEMOTION_NEG_RATIO) {
|
|
65
|
+
try {
|
|
66
|
+
this.rollback.disable(gen.id);
|
|
67
|
+
demoted.push(gen.id);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
process.stderr.write(`[Lifecycle] Demotion failed for ${gen.id}: ${error instanceof Error ? error.message : 'Unknown'}\n`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return demoted;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* active → disabled: no usage for TTL_DAYS
|
|
78
|
+
*/
|
|
79
|
+
checkTTLExpiration() {
|
|
80
|
+
const expired = [];
|
|
81
|
+
const active = this.registry.getByStatus('active');
|
|
82
|
+
const ttlMs = TTL_DAYS * 24 * 60 * 60 * 1000;
|
|
83
|
+
const now = Date.now();
|
|
84
|
+
for (const gen of active) {
|
|
85
|
+
const lastUsed = gen.lastUsedAt ? new Date(gen.lastUsedAt).getTime() : new Date(gen.createdAt).getTime();
|
|
86
|
+
if (now - lastUsed > ttlMs) {
|
|
87
|
+
try {
|
|
88
|
+
this.rollback.disable(gen.id);
|
|
89
|
+
expired.push(gen.id);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
process.stderr.write(`[Lifecycle] TTL disable failed for ${gen.id}: ${error instanceof Error ? error.message : 'Unknown'}\n`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return expired;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* disabled → deleted: disabled for additional TTL_DAYS with no recovery
|
|
100
|
+
*/
|
|
101
|
+
checkDeletions() {
|
|
102
|
+
const deleted = [];
|
|
103
|
+
const disabled = this.registry.getByStatus('disabled');
|
|
104
|
+
const ttlMs = TTL_DAYS * 24 * 60 * 60 * 1000;
|
|
105
|
+
const now = Date.now();
|
|
106
|
+
for (const gen of disabled) {
|
|
107
|
+
const updatedAt = new Date(gen.updatedAt).getTime();
|
|
108
|
+
if (now - updatedAt > ttlMs) {
|
|
109
|
+
this.registry.updateStatus(gen.id, 'deleted');
|
|
110
|
+
deleted.push(gen.id);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return deleted;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Approve a draft generation (draft → testing)
|
|
117
|
+
*/
|
|
118
|
+
approve(generationId) {
|
|
119
|
+
const gen = this.registry.getById(generationId);
|
|
120
|
+
if (!gen || gen.status !== 'draft')
|
|
121
|
+
return false;
|
|
122
|
+
return this.registry.updateStatus(generationId, 'testing');
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Reject a draft generation (draft → deleted)
|
|
126
|
+
*/
|
|
127
|
+
reject(generationId) {
|
|
128
|
+
const gen = this.registry.getById(generationId);
|
|
129
|
+
if (!gen || gen.status !== 'draft')
|
|
130
|
+
return false;
|
|
131
|
+
return this.registry.updateStatus(generationId, 'deleted');
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=LifecycleManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LifecycleManager.js","sourceRoot":"","sources":["../../../../src/infra/lib/evolution/LifecycleManager.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,2EAA2E;AAG3E,OAAO,EAAE,kBAAkB,EAAoB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AASvD,MAAM,QAAQ,GAAG,CAAC,CAAC;AACnB,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,MAAM,OAAO,gBAAgB;IACnB,QAAQ,CAAqB;IAC7B,OAAO,CAAe;IACtB,QAAQ,CAAkB;IAElC,YAAY,OAAsB;QAChC,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACI,OAAO;QACZ,MAAM,MAAM,GAAqB,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QAExF,yCAAyC;QACzC,MAAM,UAAU,GAA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G,CAAC,EAAE,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,YAAoB;QACjC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,OAAO;YAAE,OAAO,KAAK,CAAC;QACjD,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,YAAoB;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,OAAO;YAAE,OAAO,KAAK,CAAC;QACjD,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MemoryStorage } from '../memory/MemoryStorage.js';
|
|
2
|
+
export declare class RollbackManager {
|
|
3
|
+
private db;
|
|
4
|
+
private registry;
|
|
5
|
+
constructor(storage: MemoryStorage);
|
|
6
|
+
/**
|
|
7
|
+
* Disable a single generation: DB status → 'disabled', file → .md.disabled
|
|
8
|
+
*/
|
|
9
|
+
disable(generationId: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Rollback to previous version: disable current, restore parent
|
|
12
|
+
*/
|
|
13
|
+
rollback(generationId: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Emergency: disable ALL auto-generated artifacts
|
|
16
|
+
*/
|
|
17
|
+
emergencyDisableAll(): {
|
|
18
|
+
disabled: number;
|
|
19
|
+
errors: string[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Re-enable a disabled generation
|
|
23
|
+
*/
|
|
24
|
+
enable(generationId: string): void;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=RollbackManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RollbackManager.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/evolution/RollbackManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,qBAAa,eAAe;IAC1B,OAAO,CAAC,EAAE,CAA2C;IACrD,OAAO,CAAC,QAAQ,CAAqB;gBAEzB,OAAO,EAAE,aAAa;IAKlC;;OAEG;IACI,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAsB1C;;OAEG;IACI,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAkC3C;;OAEG;IACI,mBAAmB,IAAI;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;IAqCpE;;OAEG;IACI,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CAsB1C"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// Rollback Manager for self-evolution Phase 4
|
|
2
|
+
// Handles disable, rollback, and emergency disable operations
|
|
3
|
+
import { existsSync, renameSync } from 'fs';
|
|
4
|
+
import { GenerationRegistry } from './GenerationRegistry.js';
|
|
5
|
+
export class RollbackManager {
|
|
6
|
+
db;
|
|
7
|
+
registry;
|
|
8
|
+
constructor(storage) {
|
|
9
|
+
this.db = storage.getDatabase();
|
|
10
|
+
this.registry = new GenerationRegistry(storage);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Disable a single generation: DB status → 'disabled', file → .md.disabled
|
|
14
|
+
*/
|
|
15
|
+
disable(generationId) {
|
|
16
|
+
const gen = this.registry.getById(generationId);
|
|
17
|
+
if (!gen)
|
|
18
|
+
throw new Error(`Generation not found: ${generationId}`);
|
|
19
|
+
if (gen.status === 'disabled' || gen.status === 'deleted')
|
|
20
|
+
return;
|
|
21
|
+
const transaction = this.db.transaction(() => {
|
|
22
|
+
this.registry.updateStatus(generationId, 'disabled');
|
|
23
|
+
if (gen.filePath && existsSync(gen.filePath)) {
|
|
24
|
+
const disabledPath = `${gen.filePath}.disabled`;
|
|
25
|
+
try {
|
|
26
|
+
renameSync(gen.filePath, disabledPath);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
// DB rollback happens via transaction abort
|
|
30
|
+
throw new Error(`File rename failed: ${error instanceof Error ? error.message : 'Unknown'}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
transaction();
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Rollback to previous version: disable current, restore parent
|
|
38
|
+
*/
|
|
39
|
+
rollback(generationId) {
|
|
40
|
+
const gen = this.registry.getById(generationId);
|
|
41
|
+
if (!gen)
|
|
42
|
+
throw new Error(`Generation not found: ${generationId}`);
|
|
43
|
+
if (!gen.parentId)
|
|
44
|
+
throw new Error(`No parent version for: ${generationId}`);
|
|
45
|
+
const parent = this.registry.getById(gen.parentId);
|
|
46
|
+
if (!parent)
|
|
47
|
+
throw new Error(`Parent generation not found: ${gen.parentId}`);
|
|
48
|
+
const transaction = this.db.transaction(() => {
|
|
49
|
+
// Disable current version
|
|
50
|
+
this.registry.updateStatus(generationId, 'disabled');
|
|
51
|
+
if (gen.filePath && existsSync(gen.filePath)) {
|
|
52
|
+
try {
|
|
53
|
+
renameSync(gen.filePath, `${gen.filePath}.disabled`);
|
|
54
|
+
}
|
|
55
|
+
catch { /* file may not exist */ }
|
|
56
|
+
}
|
|
57
|
+
// Restore parent version
|
|
58
|
+
this.registry.updateStatus(gen.parentId, 'active');
|
|
59
|
+
if (parent.filePath) {
|
|
60
|
+
const disabledParentPath = `${parent.filePath}.disabled`;
|
|
61
|
+
if (existsSync(disabledParentPath)) {
|
|
62
|
+
try {
|
|
63
|
+
renameSync(disabledParentPath, parent.filePath);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
throw new Error(`Parent restore failed: ${error instanceof Error ? error.message : 'Unknown'}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
transaction();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Emergency: disable ALL auto-generated artifacts
|
|
75
|
+
*/
|
|
76
|
+
emergencyDisableAll() {
|
|
77
|
+
const errors = [];
|
|
78
|
+
let disabled = 0;
|
|
79
|
+
const transaction = this.db.transaction(() => {
|
|
80
|
+
// Update all non-disabled/non-deleted in DB
|
|
81
|
+
const result = this.db.prepare(`
|
|
82
|
+
UPDATE generations SET status = 'disabled', updatedAt = ?
|
|
83
|
+
WHERE status IN ('draft', 'testing', 'active')
|
|
84
|
+
`).run(new Date().toISOString());
|
|
85
|
+
disabled = result.changes;
|
|
86
|
+
// Rename all active files
|
|
87
|
+
const activeGens = this.db.prepare(`
|
|
88
|
+
SELECT filePath FROM generations WHERE status = 'disabled' AND filePath IS NOT NULL
|
|
89
|
+
`).all();
|
|
90
|
+
for (const gen of activeGens) {
|
|
91
|
+
if (gen.filePath && existsSync(gen.filePath) && !gen.filePath.endsWith('.disabled')) {
|
|
92
|
+
try {
|
|
93
|
+
renameSync(gen.filePath, `${gen.filePath}.disabled`);
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
errors.push(`${gen.filePath}: ${error instanceof Error ? error.message : 'Unknown'}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
transaction();
|
|
102
|
+
if (disabled > 0) {
|
|
103
|
+
process.stderr.write(`[Evolution] EMERGENCY: Disabled ${disabled} auto-generated artifacts\n`);
|
|
104
|
+
}
|
|
105
|
+
return { disabled, errors };
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Re-enable a disabled generation
|
|
109
|
+
*/
|
|
110
|
+
enable(generationId) {
|
|
111
|
+
const gen = this.registry.getById(generationId);
|
|
112
|
+
if (!gen)
|
|
113
|
+
throw new Error(`Generation not found: ${generationId}`);
|
|
114
|
+
if (gen.status !== 'disabled')
|
|
115
|
+
return;
|
|
116
|
+
const transaction = this.db.transaction(() => {
|
|
117
|
+
this.registry.updateStatus(generationId, 'active');
|
|
118
|
+
if (gen.filePath) {
|
|
119
|
+
const disabledPath = `${gen.filePath}.disabled`;
|
|
120
|
+
if (existsSync(disabledPath)) {
|
|
121
|
+
try {
|
|
122
|
+
renameSync(disabledPath, gen.filePath);
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
throw new Error(`File restore failed: ${error instanceof Error ? error.message : 'Unknown'}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
transaction();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=RollbackManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RollbackManager.js","sourceRoot":"","sources":["../../../../src/infra/lib/evolution/RollbackManager.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,8DAA8D;AAE9D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAG5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,OAAO,eAAe;IAClB,EAAE,CAA2C;IAC7C,QAAQ,CAAqB;IAErC,YAAY,OAAsB;QAChC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,YAAoB;QACjC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QA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AM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,YAAY,EAAE,CAAC,CAAC;QACnE,IAAI,GAAG,CAAC,MAAM,KAAK,UAAU;YAAE,OAAO;QAEtC,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE;YAC3C,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;YAEnD,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;gBACjB,MAAM,YAAY,GAAG,GAAG,GAAG,CAAC,QAAQ,WAAW,CAAC;gBAChD,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;oBAC7B,IAAI,CAAC;wBACH,UAAU,CAAC,YAAY,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;oBACzC,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,wBAAwB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;oBAChG,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,WAAW,EAAE,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MemoryStorage } from '../memory/MemoryStorage.js';
|
|
2
|
+
export declare class SkillGapDetector {
|
|
3
|
+
private db;
|
|
4
|
+
private insightStore;
|
|
5
|
+
constructor(storage: MemoryStorage);
|
|
6
|
+
/**
|
|
7
|
+
* Log a prompt-dispatcher miss
|
|
8
|
+
*/
|
|
9
|
+
logMiss(prompt: string, sessionId?: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Analyze accumulated gaps and generate skill_gap insights
|
|
12
|
+
*/
|
|
13
|
+
analyze(limit?: number): {
|
|
14
|
+
newGaps: string[];
|
|
15
|
+
totalClusters: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Get gap log count
|
|
19
|
+
*/
|
|
20
|
+
getGapCount(): number;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=SkillGapDetector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkillGapDetector.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/evolution/SkillGapDetector.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAS3D,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,EAAE,CAAoB;IAC9B,OAAO,CAAC,YAAY,CAAe;gBAEvB,OAAO,EAAE,aAAa;IAKlC;;OAEG;IACI,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAexD;;OAEG;IACI,OAAO,CAAC,KAAK,GAAE,MAAY,GAAG;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE;IA6CjF;;OAEG;IACI,WAAW,IAAI,MAAM;CAQ7B"}
|