@su-record/vibe 2.6.35 → 2.6.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +62 -0
- package/.env.example +54 -0
- package/CLAUDE.md +323 -107
- package/README.md +612 -203
- package/agents/compounder.md +1 -1
- package/agents/junior-mentor.md +141 -0
- package/agents/research/best-practices-agent.md +4 -4
- package/agents/research/codebase-patterns-agent.md +1 -1
- package/agents/research/framework-docs-agent.md +1 -1
- package/agents/research/security-advisory-agent.md +4 -4
- package/agents/review/complexity-reviewer.md +2 -2
- package/agents/ui/ui-a11y-auditor.md +93 -0
- package/agents/ui/ui-antipattern-detector.md +94 -0
- package/agents/ui/ui-dataviz-advisor.md +69 -0
- package/agents/ui/ui-design-system-gen.md +57 -0
- package/agents/ui/ui-industry-analyzer.md +49 -0
- package/agents/ui/ui-layout-architect.md +65 -0
- package/agents/ui/ui-stack-implementer.md +68 -0
- package/agents/ui/ux-compliance-reviewer.md +81 -0
- package/agents/ui-previewer.md +2 -2
- package/commands/vibe.analyze.md +35 -18
- package/commands/vibe.reason.md +5 -1
- package/commands/vibe.review.md +140 -8
- package/commands/vibe.run.md +535 -25
- package/commands/vibe.spec.md +133 -14
- package/commands/vibe.spec.review.md +155 -10
- package/commands/vibe.trace.md +49 -1
- package/commands/vibe.utils.md +25 -10
- package/commands/vibe.verify.md +44 -5
- package/commands/vibe.voice.md +82 -0
- package/dist/cli/auth.d.ts +16 -4
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +100 -91
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/collaborator.js +17 -17
- package/dist/cli/commands/evolution.d.ts +16 -0
- package/dist/cli/commands/evolution.d.ts.map +1 -0
- package/dist/cli/commands/evolution.js +210 -0
- package/dist/cli/commands/evolution.js.map +1 -0
- package/dist/cli/commands/index.d.ts +13 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +13 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/info.d.ts +16 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js +150 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/init.d.ts +20 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +142 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/remove.d.ts +8 -0
- package/dist/cli/commands/remove.d.ts.map +1 -0
- package/dist/cli/commands/remove.js +142 -0
- package/dist/cli/commands/remove.js.map +1 -0
- package/dist/cli/commands/sentinel.d.ts +13 -0
- package/dist/cli/commands/sentinel.d.ts.map +1 -0
- package/dist/cli/commands/sentinel.js +322 -0
- package/dist/cli/commands/sentinel.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +9 -0
- package/dist/cli/commands/setup.d.ts.map +1 -0
- package/dist/cli/commands/setup.js +216 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/slack.d.ts +12 -0
- package/dist/cli/commands/slack.d.ts.map +1 -0
- package/dist/cli/commands/slack.js +92 -0
- package/dist/cli/commands/slack.js.map +1 -0
- package/dist/cli/commands/sync.d.ts +9 -0
- package/dist/cli/commands/sync.d.ts.map +1 -0
- package/dist/cli/commands/sync.js +166 -0
- package/dist/cli/commands/sync.js.map +1 -0
- package/dist/cli/commands/telegram.d.ts +11 -0
- package/dist/cli/commands/telegram.d.ts.map +1 -0
- package/dist/cli/commands/telegram.js +259 -0
- package/dist/cli/commands/telegram.js.map +1 -0
- package/dist/cli/commands/update.d.ts +10 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +90 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/commands/upgrade.d.ts +10 -0
- package/dist/cli/commands/upgrade.d.ts.map +1 -0
- package/dist/cli/commands/upgrade.js +26 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/index.d.ts +5 -6
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +157 -534
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/llm/claude-commands.d.ts +12 -0
- package/dist/cli/llm/claude-commands.d.ts.map +1 -0
- package/dist/cli/llm/claude-commands.js +73 -0
- package/dist/cli/llm/claude-commands.js.map +1 -0
- package/dist/cli/llm/config.d.ts +21 -0
- package/dist/cli/llm/config.d.ts.map +1 -0
- package/dist/cli/llm/config.js +140 -0
- package/dist/cli/llm/config.js.map +1 -0
- package/dist/cli/llm/gemini-commands.d.ts +27 -0
- package/dist/cli/llm/gemini-commands.d.ts.map +1 -0
- package/dist/cli/llm/gemini-commands.js +361 -0
- package/dist/cli/llm/gemini-commands.js.map +1 -0
- package/dist/cli/llm/gpt-commands.d.ts +23 -0
- package/dist/cli/llm/gpt-commands.d.ts.map +1 -0
- package/dist/cli/llm/gpt-commands.js +139 -0
- package/dist/cli/llm/gpt-commands.js.map +1 -0
- package/dist/cli/llm/help.d.ts +12 -0
- package/dist/cli/llm/help.d.ts.map +1 -0
- package/dist/cli/llm/help.js +37 -0
- package/dist/cli/llm/help.js.map +1 -0
- package/dist/cli/llm/index.d.ts +9 -0
- package/dist/cli/llm/index.d.ts.map +1 -0
- package/dist/cli/llm/index.js +9 -0
- package/dist/cli/llm/index.js.map +1 -0
- package/dist/cli/llm.d.ts +10 -46
- package/dist/cli/llm.d.ts.map +1 -1
- package/dist/cli/llm.js +10 -499
- package/dist/cli/llm.js.map +1 -1
- package/dist/cli/postinstall/claude-agents.d.ts +13 -0
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -0
- package/dist/cli/postinstall/claude-agents.js +161 -0
- package/dist/cli/postinstall/claude-agents.js.map +1 -0
- package/dist/cli/postinstall/constants.d.ts +25 -0
- package/dist/cli/postinstall/constants.d.ts.map +1 -0
- package/dist/cli/postinstall/constants.js +313 -0
- package/dist/cli/postinstall/constants.js.map +1 -0
- package/dist/cli/postinstall/cursor-agents.d.ts +8 -0
- package/dist/cli/postinstall/cursor-agents.d.ts.map +1 -0
- package/dist/cli/postinstall/cursor-agents.js +131 -0
- package/dist/cli/postinstall/cursor-agents.js.map +1 -0
- package/dist/cli/postinstall/cursor-rules.d.ts +11 -0
- package/dist/cli/postinstall/cursor-rules.d.ts.map +1 -0
- package/dist/cli/postinstall/cursor-rules.js +205 -0
- package/dist/cli/postinstall/cursor-rules.js.map +1 -0
- package/dist/cli/postinstall/cursor-skills.d.ts +9 -0
- package/dist/cli/postinstall/cursor-skills.d.ts.map +1 -0
- package/dist/cli/postinstall/cursor-skills.js +800 -0
- package/dist/cli/postinstall/cursor-skills.js.map +1 -0
- package/dist/cli/postinstall/fs-utils.d.ts +31 -0
- package/dist/cli/postinstall/fs-utils.d.ts.map +1 -0
- package/dist/cli/postinstall/fs-utils.js +90 -0
- package/dist/cli/postinstall/fs-utils.js.map +1 -0
- package/dist/cli/postinstall/global-config.d.ts +22 -0
- package/dist/cli/postinstall/global-config.d.ts.map +1 -0
- package/dist/cli/postinstall/global-config.js +155 -0
- package/dist/cli/postinstall/global-config.js.map +1 -0
- package/dist/cli/postinstall/index.d.ts +23 -0
- package/dist/cli/postinstall/index.d.ts.map +1 -0
- package/dist/cli/postinstall/index.js +23 -0
- package/dist/cli/postinstall/index.js.map +1 -0
- package/dist/cli/postinstall/inline-skills.d.ts +8 -0
- package/dist/cli/postinstall/inline-skills.d.ts.map +1 -0
- package/dist/cli/postinstall/inline-skills.js +158 -0
- package/dist/cli/postinstall/inline-skills.js.map +1 -0
- package/dist/cli/postinstall/main.d.ts +9 -0
- package/dist/cli/postinstall/main.d.ts.map +1 -0
- package/dist/cli/postinstall/main.js +169 -0
- package/dist/cli/postinstall/main.js.map +1 -0
- package/dist/cli/postinstall.d.ts +3 -18
- package/dist/cli/postinstall.d.ts.map +1 -1
- package/dist/cli/postinstall.js +4 -1572
- package/dist/cli/postinstall.js.map +1 -1
- package/dist/cli/prompt.d.ts +28 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +64 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/setup/GlobalInstaller.d.ts +5 -6
- package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
- package/dist/cli/setup/GlobalInstaller.js +22 -23
- package/dist/cli/setup/GlobalInstaller.js.map +1 -1
- package/dist/cli/setup/LanguageDetector.d.ts +1 -2
- package/dist/cli/setup/LanguageDetector.d.ts.map +1 -1
- package/dist/cli/setup/LanguageDetector.js +1 -2
- package/dist/cli/setup/LanguageDetector.js.map +1 -1
- package/dist/cli/setup/LegacyMigration.d.ts +5 -6
- package/dist/cli/setup/LegacyMigration.d.ts.map +1 -1
- package/dist/cli/setup/LegacyMigration.js +97 -39
- package/dist/cli/setup/LegacyMigration.js.map +1 -1
- package/dist/cli/setup/ProjectSetup.d.ts +4 -5
- package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +73 -73
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/cli/setup/index.d.ts +2 -8
- package/dist/cli/setup/index.d.ts.map +1 -1
- package/dist/cli/setup/index.js +2 -8
- package/dist/cli/setup/index.js.map +1 -1
- package/dist/cli/setup.d.ts +3 -11
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +3 -11
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/types.d.ts +17 -2
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/utils.d.ts +9 -0
- package/dist/cli/utils.d.ts.map +1 -1
- package/dist/cli/utils.js +28 -0
- package/dist/cli/utils.js.map +1 -1
- package/dist/infra/lib/ContextCompressor.d.ts.map +1 -0
- package/dist/infra/lib/ContextCompressor.js +306 -0
- package/dist/infra/lib/ContextCompressor.js.map +1 -0
- package/dist/infra/lib/DeepInit.d.ts.map +1 -0
- package/dist/infra/lib/DeepInit.js.map +1 -0
- package/dist/infra/lib/FrameworkDetector.d.ts.map +1 -0
- package/dist/infra/lib/FrameworkDetector.js.map +1 -0
- package/dist/infra/lib/IterationTracker.d.ts +81 -0
- package/dist/infra/lib/IterationTracker.d.ts.map +1 -0
- package/dist/infra/lib/IterationTracker.js.map +1 -0
- package/dist/infra/lib/MemoryManager.d.ts +96 -0
- package/dist/infra/lib/MemoryManager.d.ts.map +1 -0
- package/dist/infra/lib/MemoryManager.js +314 -0
- package/dist/infra/lib/MemoryManager.js.map +1 -0
- package/dist/infra/lib/ModelRouter.d.ts.map +1 -0
- package/dist/infra/lib/ModelRouter.js.map +1 -0
- package/dist/infra/lib/OrchestrateWorkflow.d.ts.map +1 -0
- package/dist/infra/lib/OrchestrateWorkflow.js.map +1 -0
- package/dist/infra/lib/ProgressTracker.d.ts.map +1 -0
- package/dist/infra/lib/ProgressTracker.js +267 -0
- package/dist/infra/lib/ProgressTracker.js.map +1 -0
- package/dist/infra/lib/ProjectCache.d.ts.map +1 -0
- package/dist/infra/lib/ProjectCache.js.map +1 -0
- package/dist/infra/lib/PythonParser.d.ts.map +1 -0
- package/dist/infra/lib/PythonParser.js +269 -0
- package/dist/infra/lib/PythonParser.js.map +1 -0
- package/dist/infra/lib/ReviewRace.d.ts.map +1 -0
- package/dist/infra/lib/ReviewRace.js +446 -0
- package/dist/infra/lib/ReviewRace.js.map +1 -0
- package/dist/infra/lib/RuleBuildSystem.d.ts +157 -0
- package/dist/infra/lib/RuleBuildSystem.d.ts.map +1 -0
- package/dist/infra/lib/RuleBuildSystem.js +550 -0
- package/dist/infra/lib/RuleBuildSystem.js.map +1 -0
- package/dist/infra/lib/SkillFrontmatter.d.ts +67 -0
- package/dist/infra/lib/SkillFrontmatter.d.ts.map +1 -0
- package/dist/infra/lib/SkillFrontmatter.js.map +1 -0
- package/dist/infra/lib/SkillQualityGate.d.ts.map +1 -0
- package/dist/infra/lib/SkillQualityGate.js.map +1 -0
- package/dist/infra/lib/SkillRepository.d.ts.map +1 -0
- package/dist/infra/lib/SkillRepository.js +477 -0
- package/dist/infra/lib/SkillRepository.js.map +1 -0
- package/dist/infra/lib/UltraQA.d.ts +85 -0
- package/dist/infra/lib/UltraQA.d.ts.map +1 -0
- package/dist/infra/lib/UltraQA.js +297 -0
- package/dist/infra/lib/UltraQA.js.map +1 -0
- package/dist/infra/lib/autonomy/AuditStore.d.ts +63 -0
- package/dist/infra/lib/autonomy/AuditStore.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/AuditStore.js +185 -0
- package/dist/infra/lib/autonomy/AuditStore.js.map +1 -0
- package/dist/infra/lib/autonomy/AutonomyConfig.d.ts +84 -0
- package/dist/infra/lib/autonomy/AutonomyConfig.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/AutonomyConfig.js +49 -0
- package/dist/infra/lib/autonomy/AutonomyConfig.js.map +1 -0
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts +78 -0
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.js +246 -0
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.js.map +1 -0
- package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts +36 -0
- package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/BackgroundMonitor.js +138 -0
- package/dist/infra/lib/autonomy/BackgroundMonitor.js.map +1 -0
- package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts +56 -0
- package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/CollaborationProtocol.js +122 -0
- package/dist/infra/lib/autonomy/CollaborationProtocol.js.map +1 -0
- package/dist/infra/lib/autonomy/ConfirmationManager.d.ts +42 -0
- package/dist/infra/lib/autonomy/ConfirmationManager.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/ConfirmationManager.js +200 -0
- package/dist/infra/lib/autonomy/ConfirmationManager.js.map +1 -0
- package/dist/infra/lib/autonomy/ConfirmationStore.d.ts +55 -0
- package/dist/infra/lib/autonomy/ConfirmationStore.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/ConfirmationStore.js +130 -0
- package/dist/infra/lib/autonomy/ConfirmationStore.js.map +1 -0
- package/dist/infra/lib/autonomy/EventBus.d.ts +20 -0
- package/dist/infra/lib/autonomy/EventBus.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/EventBus.js +119 -0
- package/dist/infra/lib/autonomy/EventBus.js.map +1 -0
- package/dist/infra/lib/autonomy/EventOutbox.d.ts +32 -0
- package/dist/infra/lib/autonomy/EventOutbox.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/EventOutbox.js +152 -0
- package/dist/infra/lib/autonomy/EventOutbox.js.map +1 -0
- package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts +24 -0
- package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/NotificationDispatcher.js +112 -0
- package/dist/infra/lib/autonomy/NotificationDispatcher.js.map +1 -0
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts +76 -0
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/PolicyEngine.js +208 -0
- package/dist/infra/lib/autonomy/PolicyEngine.js.map +1 -0
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts +61 -0
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.js +236 -0
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.js.map +1 -0
- package/dist/infra/lib/autonomy/RiskClassifier.d.ts +35 -0
- package/dist/infra/lib/autonomy/RiskClassifier.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/RiskClassifier.js +147 -0
- package/dist/infra/lib/autonomy/RiskClassifier.js.map +1 -0
- package/dist/infra/lib/autonomy/SecuritySentinel.d.ts +51 -0
- package/dist/infra/lib/autonomy/SecuritySentinel.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/SecuritySentinel.js +162 -0
- package/dist/infra/lib/autonomy/SecuritySentinel.js.map +1 -0
- package/dist/infra/lib/autonomy/SuggestionStore.d.ts +54 -0
- package/dist/infra/lib/autonomy/SuggestionStore.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/SuggestionStore.js +144 -0
- package/dist/infra/lib/autonomy/SuggestionStore.js.map +1 -0
- package/dist/infra/lib/autonomy/TaskDecomposer.d.ts +38 -0
- package/dist/infra/lib/autonomy/TaskDecomposer.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/TaskDecomposer.js +175 -0
- package/dist/infra/lib/autonomy/TaskDecomposer.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.js +198 -0
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.js +225 -0
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/event-core.test.js +194 -0
- package/dist/infra/lib/autonomy/__tests__/event-core.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/governance.test.js +540 -0
- package/dist/infra/lib/autonomy/__tests__/governance.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/integration.test.js +480 -0
- package/dist/infra/lib/autonomy/__tests__/integration.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/proactive.test.js +410 -0
- package/dist/infra/lib/autonomy/__tests__/proactive.test.js.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts +2 -0
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.js +486 -0
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.js.map +1 -0
- package/dist/infra/lib/autonomy/index.d.ts +18 -0
- package/dist/infra/lib/autonomy/index.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/index.js +22 -0
- package/dist/infra/lib/autonomy/index.js.map +1 -0
- package/dist/infra/lib/autonomy/schemas.d.ts +317 -0
- package/dist/infra/lib/autonomy/schemas.d.ts.map +1 -0
- package/dist/infra/lib/autonomy/schemas.js +90 -0
- package/dist/infra/lib/autonomy/schemas.js.map +1 -0
- package/dist/infra/lib/claude/index.d.ts +5 -0
- package/dist/infra/lib/claude/index.d.ts.map +1 -0
- package/dist/infra/lib/claude/index.js +5 -0
- package/dist/infra/lib/claude/index.js.map +1 -0
- package/dist/infra/lib/claude/storage.d.ts +12 -0
- package/dist/infra/lib/claude/storage.d.ts.map +1 -0
- package/dist/infra/lib/claude/storage.js +59 -0
- package/dist/infra/lib/claude/storage.js.map +1 -0
- package/dist/infra/lib/claude-storage.d.ts +12 -0
- package/dist/infra/lib/claude-storage.d.ts.map +1 -0
- package/dist/infra/lib/claude-storage.js +59 -0
- package/dist/infra/lib/claude-storage.js.map +1 -0
- package/dist/infra/lib/constants.d.ts +76 -0
- package/dist/infra/lib/constants.d.ts.map +1 -0
- package/dist/infra/lib/constants.js +92 -0
- package/dist/infra/lib/constants.js.map +1 -0
- package/dist/infra/lib/embedding/EmbeddingProvider.d.ts +20 -0
- package/dist/infra/lib/embedding/EmbeddingProvider.d.ts.map +1 -0
- package/dist/infra/lib/embedding/EmbeddingProvider.js +82 -0
- package/dist/infra/lib/embedding/EmbeddingProvider.js.map +1 -0
- package/dist/infra/lib/embedding/VectorStore.d.ts +47 -0
- package/dist/infra/lib/embedding/VectorStore.d.ts.map +1 -0
- package/dist/infra/lib/embedding/VectorStore.js +116 -0
- package/dist/infra/lib/embedding/VectorStore.js.map +1 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.d.ts +2 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.d.ts.map +1 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js +39 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js.map +1 -0
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.d.ts +2 -0
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.d.ts.map +1 -0
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.js +94 -0
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.js.map +1 -0
- package/dist/infra/lib/embedding/__tests__/cosine.test.d.ts +2 -0
- package/dist/infra/lib/embedding/__tests__/cosine.test.d.ts.map +1 -0
- package/dist/infra/lib/embedding/__tests__/cosine.test.js +73 -0
- package/dist/infra/lib/embedding/__tests__/cosine.test.js.map +1 -0
- package/dist/infra/lib/embedding/cosine.d.ts +19 -0
- package/dist/infra/lib/embedding/cosine.d.ts.map +1 -0
- package/dist/infra/lib/embedding/cosine.js +40 -0
- package/dist/infra/lib/embedding/cosine.js.map +1 -0
- package/dist/infra/lib/embedding/index.d.ts +9 -0
- package/dist/infra/lib/embedding/index.d.ts.map +1 -0
- package/dist/infra/lib/embedding/index.js +8 -0
- package/dist/infra/lib/embedding/index.js.map +1 -0
- package/dist/infra/lib/embedding/types.d.ts +30 -0
- package/dist/infra/lib/embedding/types.d.ts.map +1 -0
- package/dist/infra/lib/embedding/types.js +12 -0
- package/dist/infra/lib/embedding/types.js.map +1 -0
- package/dist/infra/lib/evolution/AgentAnalyzer.d.ts +15 -0
- package/dist/infra/lib/evolution/AgentAnalyzer.d.ts.map +1 -0
- package/dist/infra/lib/evolution/AgentAnalyzer.js +84 -0
- package/dist/infra/lib/evolution/AgentAnalyzer.js.map +1 -0
- package/dist/infra/lib/evolution/CircuitBreaker.d.ts +31 -0
- package/dist/infra/lib/evolution/CircuitBreaker.d.ts.map +1 -0
- package/dist/infra/lib/evolution/CircuitBreaker.js +86 -0
- package/dist/infra/lib/evolution/CircuitBreaker.js.map +1 -0
- package/dist/infra/lib/evolution/EvolutionOrchestrator.d.ts +35 -0
- package/dist/infra/lib/evolution/EvolutionOrchestrator.d.ts.map +1 -0
- package/dist/infra/lib/evolution/EvolutionOrchestrator.js +212 -0
- package/dist/infra/lib/evolution/EvolutionOrchestrator.js.map +1 -0
- package/dist/infra/lib/evolution/GenerationRegistry.d.ts +53 -0
- package/dist/infra/lib/evolution/GenerationRegistry.d.ts.map +1 -0
- package/dist/infra/lib/evolution/GenerationRegistry.js +121 -0
- package/dist/infra/lib/evolution/GenerationRegistry.js.map +1 -0
- package/dist/infra/lib/evolution/InsightExtractor.d.ts +24 -0
- package/dist/infra/lib/evolution/InsightExtractor.d.ts.map +1 -0
- package/dist/infra/lib/evolution/InsightExtractor.js +131 -0
- package/dist/infra/lib/evolution/InsightExtractor.js.map +1 -0
- package/dist/infra/lib/evolution/InsightStore.d.ts +55 -0
- package/dist/infra/lib/evolution/InsightStore.d.ts.map +1 -0
- package/dist/infra/lib/evolution/InsightStore.js +219 -0
- package/dist/infra/lib/evolution/InsightStore.js.map +1 -0
- package/dist/infra/lib/evolution/LifecycleManager.d.ts +43 -0
- package/dist/infra/lib/evolution/LifecycleManager.d.ts.map +1 -0
- package/dist/infra/lib/evolution/LifecycleManager.js +134 -0
- package/dist/infra/lib/evolution/LifecycleManager.js.map +1 -0
- package/dist/infra/lib/evolution/RollbackManager.d.ts +26 -0
- package/dist/infra/lib/evolution/RollbackManager.d.ts.map +1 -0
- package/dist/infra/lib/evolution/RollbackManager.js +133 -0
- package/dist/infra/lib/evolution/RollbackManager.js.map +1 -0
- package/dist/infra/lib/evolution/SkillGapDetector.d.ts +22 -0
- package/dist/infra/lib/evolution/SkillGapDetector.d.ts.map +1 -0
- package/dist/infra/lib/evolution/SkillGapDetector.js +81 -0
- package/dist/infra/lib/evolution/SkillGapDetector.js.map +1 -0
- package/dist/infra/lib/evolution/TriggerCollisionDetector.d.ts +27 -0
- package/dist/infra/lib/evolution/TriggerCollisionDetector.d.ts.map +1 -0
- package/dist/infra/lib/evolution/TriggerCollisionDetector.js +100 -0
- package/dist/infra/lib/evolution/TriggerCollisionDetector.js.map +1 -0
- package/dist/infra/lib/evolution/UsageTracker.d.ts +53 -0
- package/dist/infra/lib/evolution/UsageTracker.d.ts.map +1 -0
- package/dist/infra/lib/evolution/UsageTracker.js +157 -0
- package/dist/infra/lib/evolution/UsageTracker.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/generation.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/generation.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/generation.test.js +396 -0
- package/dist/infra/lib/evolution/__tests__/generation.test.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/insight.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/insight.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/insight.test.js +204 -0
- package/dist/infra/lib/evolution/__tests__/insight.test.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/integration.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/integration.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/integration.test.js +248 -0
- package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.js +350 -0
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.js.map +1 -0
- package/dist/infra/lib/evolution/generators/AgentGenerator.d.ts +14 -0
- package/dist/infra/lib/evolution/generators/AgentGenerator.d.ts.map +1 -0
- package/dist/infra/lib/evolution/generators/AgentGenerator.js +55 -0
- package/dist/infra/lib/evolution/generators/AgentGenerator.js.map +1 -0
- package/dist/infra/lib/evolution/generators/RuleGenerator.d.ts +13 -0
- package/dist/infra/lib/evolution/generators/RuleGenerator.d.ts.map +1 -0
- package/dist/infra/lib/evolution/generators/RuleGenerator.js +52 -0
- package/dist/infra/lib/evolution/generators/RuleGenerator.js.map +1 -0
- package/dist/infra/lib/evolution/generators/SkillGenerator.d.ts +15 -0
- package/dist/infra/lib/evolution/generators/SkillGenerator.d.ts.map +1 -0
- package/dist/infra/lib/evolution/generators/SkillGenerator.js +73 -0
- package/dist/infra/lib/evolution/generators/SkillGenerator.js.map +1 -0
- package/dist/infra/lib/evolution/index.d.ts +23 -0
- package/dist/infra/lib/evolution/index.d.ts.map +1 -0
- package/dist/infra/lib/evolution/index.js +21 -0
- package/dist/infra/lib/evolution/index.js.map +1 -0
- package/dist/infra/lib/gemini/auth.d.ts +30 -0
- package/dist/infra/lib/gemini/auth.d.ts.map +1 -0
- package/dist/infra/lib/gemini/auth.js +351 -0
- package/dist/infra/lib/gemini/auth.js.map +1 -0
- package/dist/infra/lib/gemini/capabilities.d.ts +32 -0
- package/dist/infra/lib/gemini/capabilities.d.ts.map +1 -0
- package/dist/infra/lib/gemini/capabilities.js +336 -0
- package/dist/infra/lib/gemini/capabilities.js.map +1 -0
- package/dist/infra/lib/gemini/chat.d.ts +44 -0
- package/dist/infra/lib/gemini/chat.d.ts.map +1 -0
- package/dist/infra/lib/gemini/chat.js +473 -0
- package/dist/infra/lib/gemini/chat.js.map +1 -0
- package/dist/infra/lib/gemini/completion.d.ts +22 -0
- package/dist/infra/lib/gemini/completion.d.ts.map +1 -0
- package/dist/infra/lib/gemini/completion.js +104 -0
- package/dist/infra/lib/gemini/completion.js.map +1 -0
- package/dist/infra/lib/gemini/constants.d.ts +37 -0
- package/dist/infra/lib/gemini/constants.d.ts.map +1 -0
- package/dist/infra/lib/gemini/constants.js +86 -0
- package/dist/infra/lib/gemini/constants.js.map +1 -0
- package/dist/infra/lib/gemini/index.d.ts +15 -0
- package/dist/infra/lib/gemini/index.d.ts.map +1 -0
- package/dist/infra/lib/gemini/index.js +14 -0
- package/dist/infra/lib/gemini/index.js.map +1 -0
- package/dist/infra/lib/gemini/models.d.ts +12 -0
- package/dist/infra/lib/gemini/models.d.ts.map +1 -0
- package/dist/infra/lib/gemini/models.js +114 -0
- package/dist/infra/lib/gemini/models.js.map +1 -0
- package/dist/infra/lib/gemini/orchestration.d.ts +33 -0
- package/dist/infra/lib/gemini/orchestration.d.ts.map +1 -0
- package/dist/infra/lib/gemini/orchestration.js +62 -0
- package/dist/infra/lib/gemini/orchestration.js.map +1 -0
- package/dist/infra/lib/gemini/types.d.ts +143 -0
- package/dist/infra/lib/gemini/types.d.ts.map +1 -0
- package/dist/infra/lib/gemini/types.js +5 -0
- package/dist/infra/lib/gemini/types.js.map +1 -0
- package/dist/infra/lib/gemini-api.d.ts +13 -0
- package/dist/infra/lib/gemini-api.d.ts.map +1 -0
- package/dist/infra/lib/gemini-api.js +13 -0
- package/dist/infra/lib/gemini-api.js.map +1 -0
- package/dist/infra/lib/gemini-constants.d.ts +8 -0
- package/dist/infra/lib/gemini-constants.d.ts.map +1 -0
- package/dist/infra/lib/gemini-constants.js +18 -0
- package/dist/infra/lib/gemini-constants.js.map +1 -0
- package/dist/infra/lib/gemini-oauth.d.ts.map +1 -0
- package/dist/infra/lib/gemini-oauth.js.map +1 -0
- package/dist/infra/lib/gemini-storage.d.ts.map +1 -0
- package/dist/infra/lib/gemini-storage.js.map +1 -0
- package/dist/infra/lib/gpt/auth.d.ts +19 -0
- package/dist/infra/lib/gpt/auth.d.ts.map +1 -0
- package/dist/infra/lib/gpt/auth.js +116 -0
- package/dist/infra/lib/gpt/auth.js.map +1 -0
- package/dist/infra/lib/gpt/chat.d.ts +36 -0
- package/dist/infra/lib/gpt/chat.d.ts.map +1 -0
- package/dist/infra/lib/gpt/chat.js +460 -0
- package/dist/infra/lib/gpt/chat.js.map +1 -0
- package/dist/infra/lib/gpt/constants.d.ts +12 -0
- package/dist/infra/lib/gpt/constants.d.ts.map +1 -0
- package/dist/infra/lib/gpt/constants.js +18 -0
- package/dist/infra/lib/gpt/constants.js.map +1 -0
- package/dist/infra/lib/gpt/embedding.d.ts +15 -0
- package/dist/infra/lib/gpt/embedding.d.ts.map +1 -0
- package/dist/infra/lib/gpt/embedding.js +79 -0
- package/dist/infra/lib/gpt/embedding.js.map +1 -0
- package/dist/infra/lib/gpt/index.d.ts +17 -0
- package/dist/infra/lib/gpt/index.d.ts.map +1 -0
- package/dist/infra/lib/gpt/index.js +17 -0
- package/dist/infra/lib/gpt/index.js.map +1 -0
- package/dist/infra/lib/gpt/oauth.d.ts +66 -0
- package/dist/infra/lib/gpt/oauth.d.ts.map +1 -0
- package/dist/infra/lib/gpt/oauth.js +403 -0
- package/dist/infra/lib/gpt/oauth.js.map +1 -0
- package/dist/infra/lib/gpt/orchestration.d.ts +28 -0
- package/dist/infra/lib/gpt/orchestration.d.ts.map +1 -0
- package/dist/infra/lib/gpt/orchestration.js +52 -0
- package/dist/infra/lib/gpt/orchestration.js.map +1 -0
- package/dist/infra/lib/gpt/specializations.d.ts +12 -0
- package/dist/infra/lib/gpt/specializations.d.ts.map +1 -0
- package/dist/infra/lib/gpt/specializations.js +27 -0
- package/dist/infra/lib/gpt/specializations.js.map +1 -0
- package/dist/infra/lib/gpt/types.d.ts +70 -0
- package/dist/infra/lib/gpt/types.d.ts.map +1 -0
- package/dist/infra/lib/gpt/types.js +5 -0
- package/dist/infra/lib/gpt/types.js.map +1 -0
- package/dist/infra/lib/gpt-api.d.ts +13 -0
- package/dist/infra/lib/gpt-api.d.ts.map +1 -0
- package/dist/infra/lib/gpt-api.js +13 -0
- package/dist/infra/lib/gpt-api.js.map +1 -0
- package/dist/infra/lib/gpt-constants.d.ts +12 -0
- package/dist/infra/lib/gpt-constants.d.ts.map +1 -0
- package/dist/infra/lib/gpt-constants.js +18 -0
- package/dist/infra/lib/gpt-constants.js.map +1 -0
- package/dist/infra/lib/gpt-oauth.d.ts.map +1 -0
- package/dist/infra/lib/gpt-oauth.js +389 -0
- package/dist/infra/lib/gpt-oauth.js.map +1 -0
- package/dist/infra/lib/gpt-storage.d.ts +40 -0
- package/dist/infra/lib/gpt-storage.d.ts.map +1 -0
- package/dist/infra/lib/gpt-storage.js +106 -0
- package/dist/infra/lib/gpt-storage.js.map +1 -0
- package/dist/infra/lib/llm/auth/ApiKeyManager.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/ApiKeyManager.js.map +1 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.d.ts +59 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.js +248 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.js.map +1 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.d.ts +5 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.js +168 -0
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.js.map +1 -0
- package/dist/infra/lib/llm/auth/ConfigManager.d.ts +29 -0
- package/dist/infra/lib/llm/auth/ConfigManager.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/ConfigManager.js +67 -0
- package/dist/infra/lib/llm/auth/ConfigManager.js.map +1 -0
- package/dist/infra/lib/llm/auth/ProfileFileLock.d.ts +16 -0
- package/dist/infra/lib/llm/auth/ProfileFileLock.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/ProfileFileLock.js +99 -0
- package/dist/infra/lib/llm/auth/ProfileFileLock.js.map +1 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.d.ts +35 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.js +217 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.js.map +1 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.test.d.ts +2 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.test.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.test.js +120 -0
- package/dist/infra/lib/llm/auth/TokenRefresher.test.js.map +1 -0
- package/dist/infra/lib/llm/auth/index.d.ts +30 -0
- package/dist/infra/lib/llm/auth/index.d.ts.map +1 -0
- package/dist/infra/lib/llm/auth/index.js +86 -0
- package/dist/infra/lib/llm/auth/index.js.map +1 -0
- package/dist/infra/lib/llm/index.d.ts.map +1 -0
- package/dist/infra/lib/llm/index.js.map +1 -0
- package/dist/infra/lib/llm/types.d.ts.map +1 -0
- package/dist/infra/lib/llm/types.js.map +1 -0
- package/dist/infra/lib/llm/utils/index.d.ts.map +1 -0
- package/dist/infra/lib/llm/utils/index.js.map +1 -0
- package/dist/infra/lib/llm/utils/retry.d.ts.map +1 -0
- package/dist/infra/lib/llm/utils/retry.js.map +1 -0
- package/dist/infra/lib/llm/utils/stream.d.ts.map +1 -0
- package/dist/infra/lib/llm/utils/stream.js.map +1 -0
- package/dist/infra/lib/memory/KnowledgeGraph.d.ts.map +1 -0
- package/dist/infra/lib/memory/KnowledgeGraph.js.map +1 -0
- package/dist/infra/lib/memory/KnowledgeGraph.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/KnowledgeGraph.test.js +189 -0
- package/dist/infra/lib/memory/KnowledgeGraph.test.js.map +1 -0
- package/dist/infra/lib/memory/MemorySearch.d.ts +55 -0
- package/dist/infra/lib/memory/MemorySearch.d.ts.map +1 -0
- package/dist/infra/lib/memory/MemorySearch.js +309 -0
- package/dist/infra/lib/memory/MemorySearch.js.map +1 -0
- package/dist/infra/lib/memory/MemorySearch.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/MemorySearch.test.js +149 -0
- package/dist/infra/lib/memory/MemorySearch.test.js.map +1 -0
- package/dist/infra/lib/memory/MemoryStorage.d.ts +110 -0
- package/dist/infra/lib/memory/MemoryStorage.d.ts.map +1 -0
- package/dist/infra/lib/memory/MemoryStorage.js +527 -0
- package/dist/infra/lib/memory/MemoryStorage.js.map +1 -0
- package/dist/infra/lib/memory/MemoryStorage.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/MemoryStorage.test.js +198 -0
- package/dist/infra/lib/memory/MemoryStorage.test.js.map +1 -0
- package/dist/infra/lib/memory/ObservationStore.d.ts.map +1 -0
- package/dist/infra/lib/memory/ObservationStore.js.map +1 -0
- package/dist/infra/lib/memory/ReflectionStore.d.ts +60 -0
- package/dist/infra/lib/memory/ReflectionStore.d.ts.map +1 -0
- package/dist/infra/lib/memory/ReflectionStore.js +177 -0
- package/dist/infra/lib/memory/ReflectionStore.js.map +1 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.d.ts +88 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.js +306 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.js.map +1 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.test.js +180 -0
- package/dist/infra/lib/memory/SessionRAGRetriever.test.js.map +1 -0
- package/dist/infra/lib/memory/SessionRAGStore.d.ts +163 -0
- package/dist/infra/lib/memory/SessionRAGStore.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionRAGStore.js +728 -0
- package/dist/infra/lib/memory/SessionRAGStore.js.map +1 -0
- package/dist/infra/lib/memory/SessionRAGStore.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionRAGStore.test.js +326 -0
- package/dist/infra/lib/memory/SessionRAGStore.test.js.map +1 -0
- package/dist/infra/lib/memory/SessionSummarizer.d.ts.map +1 -0
- package/dist/infra/lib/memory/SessionSummarizer.js.map +1 -0
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.d.ts +2 -0
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.js +196 -0
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.js.map +1 -0
- package/dist/infra/lib/memory/index.d.ts +11 -0
- package/dist/infra/lib/memory/index.d.ts.map +1 -0
- package/dist/infra/lib/memory/index.js +13 -0
- package/dist/infra/lib/memory/index.js.map +1 -0
- package/dist/infra/lib/memory/index.test.d.ts +2 -0
- package/dist/infra/lib/memory/index.test.d.ts.map +1 -0
- package/dist/infra/lib/memory/index.test.js +23 -0
- package/dist/infra/lib/memory/index.test.js.map +1 -0
- package/dist/infra/lib/sync/constants.d.ts +21 -0
- package/dist/infra/lib/sync/constants.d.ts.map +1 -0
- package/dist/infra/lib/sync/constants.js +78 -0
- package/dist/infra/lib/sync/constants.js.map +1 -0
- package/dist/infra/lib/sync/crypto.d.ts +23 -0
- package/dist/infra/lib/sync/crypto.d.ts.map +1 -0
- package/dist/infra/lib/sync/crypto.js +55 -0
- package/dist/infra/lib/sync/crypto.js.map +1 -0
- package/dist/infra/lib/sync/drive.d.ts +22 -0
- package/dist/infra/lib/sync/drive.d.ts.map +1 -0
- package/dist/infra/lib/sync/drive.js +99 -0
- package/dist/infra/lib/sync/drive.js.map +1 -0
- package/dist/infra/lib/sync/index.d.ts +9 -0
- package/dist/infra/lib/sync/index.d.ts.map +1 -0
- package/dist/infra/lib/sync/index.js +9 -0
- package/dist/infra/lib/sync/index.js.map +1 -0
- package/dist/infra/lib/sync/oauth.d.ts +12 -0
- package/dist/infra/lib/sync/oauth.d.ts.map +1 -0
- package/dist/infra/lib/sync/oauth.js +157 -0
- package/dist/infra/lib/sync/oauth.js.map +1 -0
- package/dist/infra/lib/sync/storage.d.ts +21 -0
- package/dist/infra/lib/sync/storage.d.ts.map +1 -0
- package/dist/infra/lib/sync/storage.js +32 -0
- package/dist/infra/lib/sync/storage.js.map +1 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.d.ts +67 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.js +153 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.js.map +1 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.test.d.ts +2 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.test.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.test.js +159 -0
- package/dist/infra/lib/ui-ux/Bm25Engine.test.js.map +1 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.d.ts +48 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.js +125 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.js.map +1 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.d.ts +2 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.js +141 -0
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.js.map +1 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.d.ts +119 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.js +519 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.js.map +1 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.d.ts +2 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.js +370 -0
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.js.map +1 -0
- package/dist/infra/lib/ui-ux/SearchService.d.ts +64 -0
- package/dist/infra/lib/ui-ux/SearchService.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/SearchService.js +240 -0
- package/dist/infra/lib/ui-ux/SearchService.js.map +1 -0
- package/dist/infra/lib/ui-ux/SearchService.test.d.ts +2 -0
- package/dist/infra/lib/ui-ux/SearchService.test.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/SearchService.test.js +215 -0
- package/dist/infra/lib/ui-ux/SearchService.test.js.map +1 -0
- package/dist/infra/lib/ui-ux/UiUxWorkflow.d.ts +58 -0
- package/dist/infra/lib/ui-ux/UiUxWorkflow.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/UiUxWorkflow.js +163 -0
- package/dist/infra/lib/ui-ux/UiUxWorkflow.js.map +1 -0
- package/dist/infra/lib/ui-ux/constants.d.ts +39 -0
- package/dist/infra/lib/ui-ux/constants.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/constants.js +203 -0
- package/dist/infra/lib/ui-ux/constants.js.map +1 -0
- package/dist/infra/lib/ui-ux/index.d.ts +11 -0
- package/dist/infra/lib/ui-ux/index.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/index.js +11 -0
- package/dist/infra/lib/ui-ux/index.js.map +1 -0
- package/dist/infra/lib/ui-ux/types.d.ts +243 -0
- package/dist/infra/lib/ui-ux/types.d.ts.map +1 -0
- package/dist/infra/lib/ui-ux/types.js +7 -0
- package/dist/infra/lib/ui-ux/types.js.map +1 -0
- package/dist/infra/lib/utils.d.ts.map +1 -0
- package/dist/infra/lib/utils.js.map +1 -0
- package/dist/infra/orchestrator/AgentAnnouncer.d.ts +64 -0
- package/dist/infra/orchestrator/AgentAnnouncer.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentAnnouncer.js +127 -0
- package/dist/infra/orchestrator/AgentAnnouncer.js.map +1 -0
- package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts +5 -0
- package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentAnnouncer.test.js +119 -0
- package/dist/infra/orchestrator/AgentAnnouncer.test.js.map +1 -0
- package/dist/infra/orchestrator/AgentExecutor.d.ts +22 -0
- package/dist/infra/orchestrator/AgentExecutor.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentExecutor.js +240 -0
- package/dist/infra/orchestrator/AgentExecutor.js.map +1 -0
- package/dist/infra/orchestrator/AgentManager.d.ts +72 -0
- package/dist/infra/orchestrator/AgentManager.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentManager.js +182 -0
- package/dist/infra/orchestrator/AgentManager.js.map +1 -0
- package/dist/infra/orchestrator/AgentRegistry.d.ts +76 -0
- package/dist/infra/orchestrator/AgentRegistry.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentRegistry.js +217 -0
- package/dist/infra/orchestrator/AgentRegistry.js.map +1 -0
- package/dist/infra/orchestrator/AgentRegistry.test.d.ts +5 -0
- package/dist/infra/orchestrator/AgentRegistry.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/AgentRegistry.test.js +122 -0
- package/dist/infra/orchestrator/AgentRegistry.test.js.map +1 -0
- package/dist/infra/orchestrator/BackgroundManager.d.ts +128 -0
- package/dist/infra/orchestrator/BackgroundManager.d.ts.map +1 -0
- package/dist/infra/orchestrator/BackgroundManager.js +617 -0
- package/dist/infra/orchestrator/BackgroundManager.js.map +1 -0
- package/dist/infra/orchestrator/BackgroundManager.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/BackgroundManager.test.js.map +1 -0
- package/dist/infra/orchestrator/CheckpointManager.d.ts +54 -0
- package/dist/infra/orchestrator/CheckpointManager.d.ts.map +1 -0
- package/dist/infra/orchestrator/CheckpointManager.js +121 -0
- package/dist/infra/orchestrator/CheckpointManager.js.map +1 -0
- package/dist/infra/orchestrator/LLMCluster.d.ts +69 -0
- package/dist/infra/orchestrator/LLMCluster.d.ts.map +1 -0
- package/dist/infra/orchestrator/LLMCluster.js +90 -0
- package/dist/infra/orchestrator/LLMCluster.js.map +1 -0
- package/dist/infra/orchestrator/MultiLlmResearch.d.ts +26 -0
- package/dist/infra/orchestrator/MultiLlmResearch.d.ts.map +1 -0
- package/dist/infra/orchestrator/MultiLlmResearch.js +144 -0
- package/dist/infra/orchestrator/MultiLlmResearch.js.map +1 -0
- package/dist/infra/orchestrator/PhasePipeline.d.ts +122 -0
- package/dist/infra/orchestrator/PhasePipeline.d.ts.map +1 -0
- package/dist/infra/orchestrator/PhasePipeline.js +381 -0
- package/dist/infra/orchestrator/PhasePipeline.js.map +1 -0
- package/dist/infra/orchestrator/PhaseResultStore.d.ts +39 -0
- package/dist/infra/orchestrator/PhaseResultStore.d.ts.map +1 -0
- package/dist/infra/orchestrator/PhaseResultStore.js +151 -0
- package/dist/infra/orchestrator/PhaseResultStore.js.map +1 -0
- package/dist/infra/orchestrator/SessionStore.d.ts +40 -0
- package/dist/infra/orchestrator/SessionStore.d.ts.map +1 -0
- package/dist/infra/orchestrator/SessionStore.js +116 -0
- package/dist/infra/orchestrator/SessionStore.js.map +1 -0
- package/dist/infra/orchestrator/SmartRouter.d.ts +77 -0
- package/dist/infra/orchestrator/SmartRouter.d.ts.map +1 -0
- package/dist/infra/orchestrator/SmartRouter.js +267 -0
- package/dist/infra/orchestrator/SmartRouter.js.map +1 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.d.ts +143 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.d.ts.map +1 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.js +377 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.js.map +1 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/SwarmOrchestrator.test.js.map +1 -0
- package/dist/infra/orchestrator/agentDiscovery.d.ts.map +1 -0
- package/dist/infra/orchestrator/agentDiscovery.js.map +1 -0
- package/dist/infra/orchestrator/backgroundAgent.d.ts +9 -0
- package/dist/infra/orchestrator/backgroundAgent.d.ts.map +1 -0
- package/dist/infra/orchestrator/backgroundAgent.js +10 -0
- package/dist/infra/orchestrator/backgroundAgent.js.map +1 -0
- package/dist/infra/orchestrator/index.d.ts +204 -0
- package/dist/infra/orchestrator/index.d.ts.map +1 -0
- package/dist/infra/orchestrator/index.js +360 -0
- package/dist/infra/orchestrator/index.js.map +1 -0
- package/dist/infra/orchestrator/orchestrator.d.ts +60 -0
- package/dist/infra/orchestrator/orchestrator.d.ts.map +1 -0
- package/dist/infra/orchestrator/orchestrator.js +214 -0
- package/dist/infra/orchestrator/orchestrator.js.map +1 -0
- package/dist/infra/orchestrator/parallelResearch.d.ts +27 -0
- package/dist/infra/orchestrator/parallelResearch.d.ts.map +1 -0
- package/dist/infra/orchestrator/parallelResearch.js +244 -0
- package/dist/infra/orchestrator/parallelResearch.js.map +1 -0
- package/dist/infra/orchestrator/types.d.ts +175 -0
- package/dist/infra/orchestrator/types.d.ts.map +1 -0
- package/dist/infra/orchestrator/types.js +21 -0
- package/dist/infra/orchestrator/types.js.map +1 -0
- package/dist/infra/types/tool.d.ts.map +1 -0
- package/dist/infra/types/tool.js.map +1 -0
- package/dist/tools/convention/analyzeComplexity.d.ts +1 -1
- package/dist/tools/convention/analyzeComplexity.d.ts.map +1 -1
- package/dist/tools/convention/analyzeComplexity.js +1 -1
- package/dist/tools/convention/analyzeComplexity.js.map +1 -1
- package/dist/tools/convention/applyQualityRules.d.ts +1 -1
- package/dist/tools/convention/applyQualityRules.d.ts.map +1 -1
- package/dist/tools/convention/checkCouplingCohesion.d.ts +1 -1
- package/dist/tools/convention/checkCouplingCohesion.d.ts.map +1 -1
- package/dist/tools/convention/suggestImprovements.d.ts +1 -1
- package/dist/tools/convention/suggestImprovements.d.ts.map +1 -1
- package/dist/tools/convention/validateCodeQuality.d.ts +1 -1
- package/dist/tools/convention/validateCodeQuality.d.ts.map +1 -1
- package/dist/tools/evolution/dashboardTools.d.ts +26 -0
- package/dist/tools/evolution/dashboardTools.d.ts.map +1 -0
- package/dist/tools/evolution/dashboardTools.js +216 -0
- package/dist/tools/evolution/dashboardTools.js.map +1 -0
- package/dist/tools/evolution/index.d.ts +3 -0
- package/dist/tools/evolution/index.d.ts.map +1 -0
- package/dist/tools/evolution/index.js +6 -0
- package/dist/tools/evolution/index.js.map +1 -0
- package/dist/tools/evolution/insightTools.d.ts +21 -0
- package/dist/tools/evolution/insightTools.d.ts.map +1 -0
- package/dist/tools/evolution/insightTools.js +184 -0
- package/dist/tools/evolution/insightTools.js.map +1 -0
- package/dist/tools/index.d.ts +31 -21
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +38 -26
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/interaction/askUser.d.ts +2 -2
- package/dist/tools/interaction/askUser.d.ts.map +1 -1
- package/dist/tools/interaction/askUser.js +1 -1
- package/dist/tools/memory/addObservation.d.ts +2 -2
- package/dist/tools/memory/addObservation.d.ts.map +1 -1
- package/dist/tools/memory/addObservation.js +1 -1
- package/dist/tools/memory/addObservation.js.map +1 -1
- package/dist/tools/memory/autoSaveContext.d.ts +1 -1
- package/dist/tools/memory/autoSaveContext.d.ts.map +1 -1
- package/dist/tools/memory/autoSaveContext.js +2 -2
- package/dist/tools/memory/autoSaveContext.js.map +1 -1
- package/dist/tools/memory/createMemoryTimeline.d.ts +1 -1
- package/dist/tools/memory/createMemoryTimeline.d.ts.map +1 -1
- package/dist/tools/memory/createMemoryTimeline.js +11 -11
- package/dist/tools/memory/createMemoryTimeline.js.map +1 -1
- package/dist/tools/memory/deleteMemory.d.ts +1 -1
- package/dist/tools/memory/deleteMemory.d.ts.map +1 -1
- package/dist/tools/memory/deleteMemory.js +1 -1
- package/dist/tools/memory/deleteMemory.js.map +1 -1
- package/dist/tools/memory/getMemoryGraph.d.ts +1 -1
- package/dist/tools/memory/getMemoryGraph.d.ts.map +1 -1
- package/dist/tools/memory/getMemoryGraph.js +13 -13
- package/dist/tools/memory/getMemoryGraph.js.map +1 -1
- package/dist/tools/memory/getSessionContext.d.ts +1 -1
- package/dist/tools/memory/getSessionContext.d.ts.map +1 -1
- package/dist/tools/memory/getSessionContext.js +10 -10
- package/dist/tools/memory/getSessionContext.js.map +1 -1
- package/dist/tools/memory/index.d.ts +1 -0
- package/dist/tools/memory/index.d.ts.map +1 -1
- package/dist/tools/memory/index.js +2 -0
- package/dist/tools/memory/index.js.map +1 -1
- package/dist/tools/memory/linkMemories.d.ts +1 -1
- package/dist/tools/memory/linkMemories.d.ts.map +1 -1
- package/dist/tools/memory/linkMemories.js +15 -15
- package/dist/tools/memory/linkMemories.js.map +1 -1
- package/dist/tools/memory/listMemories.d.ts +1 -1
- package/dist/tools/memory/listMemories.d.ts.map +1 -1
- package/dist/tools/memory/listMemories.js +5 -5
- package/dist/tools/memory/listMemories.js.map +1 -1
- package/dist/tools/memory/manageGoals.d.ts +2 -2
- package/dist/tools/memory/manageGoals.d.ts.map +1 -1
- package/dist/tools/memory/manageGoals.js +1 -1
- package/dist/tools/memory/manageGoals.js.map +1 -1
- package/dist/tools/memory/prioritizeMemory.d.ts +1 -1
- package/dist/tools/memory/prioritizeMemory.d.ts.map +1 -1
- package/dist/tools/memory/prioritizeMemory.js +1 -1
- package/dist/tools/memory/prioritizeMemory.js.map +1 -1
- package/dist/tools/memory/recallMemory.d.ts +1 -1
- package/dist/tools/memory/recallMemory.d.ts.map +1 -1
- package/dist/tools/memory/recallMemory.js +5 -5
- package/dist/tools/memory/recallMemory.js.map +1 -1
- package/dist/tools/memory/reflectionTools.d.ts +27 -0
- package/dist/tools/memory/reflectionTools.d.ts.map +1 -0
- package/dist/tools/memory/reflectionTools.js +180 -0
- package/dist/tools/memory/reflectionTools.js.map +1 -0
- package/dist/tools/memory/restoreSessionContext.d.ts +1 -1
- package/dist/tools/memory/restoreSessionContext.d.ts.map +1 -1
- package/dist/tools/memory/restoreSessionContext.js +1 -1
- package/dist/tools/memory/restoreSessionContext.js.map +1 -1
- package/dist/tools/memory/retrieveSessionContext.d.ts +1 -1
- package/dist/tools/memory/retrieveSessionContext.d.ts.map +1 -1
- package/dist/tools/memory/retrieveSessionContext.js +1 -1
- package/dist/tools/memory/retrieveSessionContext.js.map +1 -1
- package/dist/tools/memory/saveMemory.d.ts +1 -1
- package/dist/tools/memory/saveMemory.d.ts.map +1 -1
- package/dist/tools/memory/saveMemory.js +5 -5
- package/dist/tools/memory/saveMemory.js.map +1 -1
- package/dist/tools/memory/saveSessionItem.d.ts +1 -1
- package/dist/tools/memory/saveSessionItem.d.ts.map +1 -1
- package/dist/tools/memory/saveSessionItem.js +1 -1
- package/dist/tools/memory/saveSessionItem.js.map +1 -1
- package/dist/tools/memory/searchMemories.d.ts +1 -1
- package/dist/tools/memory/searchMemories.d.ts.map +1 -1
- package/dist/tools/memory/searchMemories.js +1 -1
- package/dist/tools/memory/searchMemories.js.map +1 -1
- package/dist/tools/memory/searchMemoriesAdvanced.d.ts +1 -1
- package/dist/tools/memory/searchMemoriesAdvanced.d.ts.map +1 -1
- package/dist/tools/memory/searchMemoriesAdvanced.js +24 -24
- package/dist/tools/memory/searchMemoriesAdvanced.js.map +1 -1
- package/dist/tools/memory/searchObservations.d.ts +2 -2
- package/dist/tools/memory/searchObservations.d.ts.map +1 -1
- package/dist/tools/memory/searchObservations.js +1 -1
- package/dist/tools/memory/searchObservations.js.map +1 -1
- package/dist/tools/memory/startSession.d.ts +1 -1
- package/dist/tools/memory/startSession.d.ts.map +1 -1
- package/dist/tools/memory/startSession.js +28 -6
- package/dist/tools/memory/startSession.js.map +1 -1
- package/dist/tools/memory/updateMemory.d.ts +1 -1
- package/dist/tools/memory/updateMemory.d.ts.map +1 -1
- package/dist/tools/memory/updateMemory.js +1 -1
- package/dist/tools/memory/updateMemory.js.map +1 -1
- package/dist/tools/semantic/analyzeDependencyGraph.d.ts +1 -1
- package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +1 -1
- package/dist/tools/semantic/analyzeDependencyGraph.js +13 -13
- package/dist/tools/semantic/analyzeDependencyGraph.js.map +1 -1
- package/dist/tools/semantic/astGrep.d.ts +23 -0
- package/dist/tools/semantic/astGrep.d.ts.map +1 -0
- package/dist/tools/semantic/astGrep.js +298 -0
- package/dist/tools/semantic/astGrep.js.map +1 -0
- package/dist/tools/semantic/astGrep.test.d.ts +2 -0
- package/dist/tools/semantic/astGrep.test.d.ts.map +1 -0
- package/dist/tools/semantic/astGrep.test.js +66 -0
- package/dist/tools/semantic/astGrep.test.js.map +1 -0
- package/dist/tools/semantic/findReferences.d.ts +1 -1
- package/dist/tools/semantic/findReferences.d.ts.map +1 -1
- package/dist/tools/semantic/findReferences.js +2 -2
- package/dist/tools/semantic/findReferences.js.map +1 -1
- package/dist/tools/semantic/findSymbol.d.ts +1 -1
- package/dist/tools/semantic/findSymbol.d.ts.map +1 -1
- package/dist/tools/semantic/findSymbol.js +3 -3
- package/dist/tools/semantic/findSymbol.js.map +1 -1
- package/dist/tools/semantic/index.d.ts +2 -0
- package/dist/tools/semantic/index.d.ts.map +1 -1
- package/dist/tools/semantic/index.js +4 -0
- package/dist/tools/semantic/index.js.map +1 -1
- package/dist/tools/semantic/lsp.d.ts +68 -0
- package/dist/tools/semantic/lsp.d.ts.map +1 -0
- package/dist/tools/semantic/lsp.js +553 -0
- package/dist/tools/semantic/lsp.js.map +1 -0
- package/dist/tools/spec/e2eTestGenerator.d.ts +0 -1
- package/dist/tools/spec/e2eTestGenerator.d.ts.map +1 -1
- package/dist/tools/spec/e2eTestGenerator.js +0 -1
- package/dist/tools/spec/e2eTestGenerator.js.map +1 -1
- package/dist/tools/spec/prdParser.d.ts +0 -1
- package/dist/tools/spec/prdParser.d.ts.map +1 -1
- package/dist/tools/spec/prdParser.js +8 -6
- package/dist/tools/spec/prdParser.js.map +1 -1
- package/dist/tools/spec/requirementId.d.ts +0 -1
- package/dist/tools/spec/requirementId.d.ts.map +1 -1
- package/dist/tools/spec/requirementId.js +0 -1
- package/dist/tools/spec/requirementId.js.map +1 -1
- package/dist/tools/spec/specGenerator.d.ts +0 -1
- package/dist/tools/spec/specGenerator.d.ts.map +1 -1
- package/dist/tools/spec/specGenerator.js +0 -1
- package/dist/tools/spec/specGenerator.js.map +1 -1
- package/dist/tools/spec/specVersioning.d.ts +0 -1
- package/dist/tools/spec/specVersioning.d.ts.map +1 -1
- package/dist/tools/spec/specVersioning.js +0 -1
- package/dist/tools/spec/specVersioning.js.map +1 -1
- package/dist/tools/spec/traceabilityMatrix.d.ts +0 -1
- package/dist/tools/spec/traceabilityMatrix.d.ts.map +1 -1
- package/dist/tools/spec/traceabilityMatrix.js +12 -7
- package/dist/tools/spec/traceabilityMatrix.js.map +1 -1
- package/dist/tools/time/getCurrentTime.d.ts +2 -2
- package/dist/tools/time/getCurrentTime.d.ts.map +1 -1
- package/dist/tools/time/getCurrentTime.js +1 -9
- package/dist/tools/time/getCurrentTime.js.map +1 -1
- package/dist/tools/ui/generateDesignSystem.d.ts +7 -0
- package/dist/tools/ui/generateDesignSystem.d.ts.map +1 -0
- package/dist/tools/ui/generateDesignSystem.js +70 -0
- package/dist/tools/ui/generateDesignSystem.js.map +1 -0
- package/dist/tools/ui/index.d.ts +5 -1
- package/dist/tools/ui/index.d.ts.map +1 -1
- package/dist/tools/ui/index.js +5 -1
- package/dist/tools/ui/index.js.map +1 -1
- package/dist/tools/ui/persistDesignSystem.d.ts +8 -0
- package/dist/tools/ui/persistDesignSystem.d.ts.map +1 -0
- package/dist/tools/ui/persistDesignSystem.js +77 -0
- package/dist/tools/ui/persistDesignSystem.js.map +1 -0
- package/dist/tools/ui/previewUiAscii.d.ts +1 -1
- package/dist/tools/ui/previewUiAscii.d.ts.map +1 -1
- package/dist/tools/ui/searchUiUx.d.ts +8 -0
- package/dist/tools/ui/searchUiUx.d.ts.map +1 -0
- package/dist/tools/ui/searchUiUx.js +82 -0
- package/dist/tools/ui/searchUiUx.js.map +1 -0
- package/dist/tools/ui/searchUiUxStack.d.ts +8 -0
- package/dist/tools/ui/searchUiUxStack.d.ts.map +1 -0
- package/dist/tools/ui/searchUiUxStack.js +83 -0
- package/dist/tools/ui/searchUiUxStack.js.map +1 -0
- package/hooks/hooks.json +32 -10
- package/hooks/scripts/__tests__/skill-injector.test.js +234 -0
- package/hooks/scripts/autonomy-controller.js +101 -0
- package/hooks/scripts/context-save.js +152 -5
- package/hooks/scripts/evolution-engine.js +101 -0
- package/hooks/scripts/keyword-detector.js +1 -1
- package/hooks/scripts/llm-orchestrate.js +224 -37
- package/hooks/scripts/post-edit.js +2 -45
- package/hooks/scripts/post-tool-verify.js +1 -1
- package/hooks/scripts/pre-tool-guard.js +1 -1
- package/hooks/scripts/prompt-dispatcher.js +56 -1
- package/hooks/scripts/sentinel-guard.js +104 -0
- package/hooks/scripts/session-start.js +76 -0
- package/hooks/scripts/skill-injector.js +546 -83
- package/hooks/scripts/skill-requirements.js +83 -0
- package/hooks/scripts/stop-notify.js +207 -0
- package/hooks/scripts/utils.js +8 -8
- package/package.json +55 -18
- package/skills/brand-assets/SKILL.md +138 -0
- package/skills/commit-push-pr/SKILL.md +118 -0
- package/skills/context7-usage/SKILL.md +105 -0
- package/skills/core-capabilities/SKILL.md +164 -0
- package/skills/git-worktree/SKILL.md +184 -0
- package/skills/handoff/SKILL.md +101 -0
- package/skills/parallel-research/SKILL.md +80 -0
- package/skills/priority-todos/SKILL.md +242 -0
- package/skills/techdebt/SKILL.md +122 -0
- package/skills/tool-fallback/SKILL.md +193 -0
- package/skills/typescript-advanced-types/SKILL.md +720 -0
- package/skills/ui-ux-pro-max/SKILL.md +386 -0
- package/skills/vercel-react-best-practices/SKILL.md +304 -0
- package/vibe/config.json +29 -29
- package/vibe/constitution.md +3 -3
- package/vibe/rules/quality/bdd-contract-testing.md +6 -6
- package/vibe/rules/quality/performance.md +236 -0
- package/vibe/rules/standards/git-workflow.md +237 -0
- package/vibe/rules/standards/security.md +305 -0
- package/vibe/rules/writing/document-style.md +74 -0
- package/vibe/setup.sh +6 -6
- package/vibe/templates/constitution-template.md +3 -3
- package/vibe/ui-ux-data/charts.csv +26 -0
- package/vibe/ui-ux-data/colors.csv +97 -0
- package/vibe/ui-ux-data/icons.csv +101 -0
- package/vibe/ui-ux-data/landing.csv +31 -0
- package/vibe/ui-ux-data/products.csv +97 -0
- package/vibe/ui-ux-data/react-performance.csv +45 -0
- package/vibe/ui-ux-data/stacks/astro.csv +54 -0
- package/vibe/ui-ux-data/stacks/flutter.csv +53 -0
- package/vibe/ui-ux-data/stacks/html-tailwind.csv +56 -0
- package/vibe/ui-ux-data/stacks/jetpack-compose.csv +53 -0
- package/vibe/ui-ux-data/stacks/nextjs.csv +53 -0
- package/vibe/ui-ux-data/stacks/nuxt-ui.csv +51 -0
- package/vibe/ui-ux-data/stacks/nuxtjs.csv +59 -0
- package/vibe/ui-ux-data/stacks/react-native.csv +52 -0
- package/vibe/ui-ux-data/stacks/react.csv +54 -0
- package/vibe/ui-ux-data/stacks/shadcn.csv +61 -0
- package/vibe/ui-ux-data/stacks/svelte.csv +54 -0
- package/vibe/ui-ux-data/stacks/swiftui.csv +51 -0
- package/vibe/ui-ux-data/stacks/vue.csv +50 -0
- package/vibe/ui-ux-data/styles.csv +68 -0
- package/vibe/ui-ux-data/typography.csv +58 -0
- package/vibe/ui-ux-data/ui-reasoning.csv +101 -0
- package/vibe/ui-ux-data/ux-guidelines.csv +100 -0
- package/vibe/ui-ux-data/version.json +31 -0
- package/vibe/ui-ux-data/web-interface.csv +31 -0
- package/dist/cli/hud.d.ts +0 -33
- package/dist/cli/hud.d.ts.map +0 -1
- package/dist/cli/hud.js +0 -247
- package/dist/cli/hud.js.map +0 -1
- package/dist/lib/ContextCompressor.d.ts.map +0 -1
- package/dist/lib/ContextCompressor.js +0 -306
- package/dist/lib/ContextCompressor.js.map +0 -1
- package/dist/lib/DeepInit.d.ts.map +0 -1
- package/dist/lib/DeepInit.js.map +0 -1
- package/dist/lib/FrameworkDetector.d.ts.map +0 -1
- package/dist/lib/FrameworkDetector.js.map +0 -1
- package/dist/lib/IterationTracker.d.ts +0 -81
- package/dist/lib/IterationTracker.d.ts.map +0 -1
- package/dist/lib/IterationTracker.js.map +0 -1
- package/dist/lib/MemoryManager.d.ts +0 -86
- package/dist/lib/MemoryManager.d.ts.map +0 -1
- package/dist/lib/MemoryManager.js +0 -287
- package/dist/lib/MemoryManager.js.map +0 -1
- package/dist/lib/ModelRouter.d.ts.map +0 -1
- package/dist/lib/ModelRouter.js.map +0 -1
- package/dist/lib/OrchestrateWorkflow.d.ts.map +0 -1
- package/dist/lib/OrchestrateWorkflow.js.map +0 -1
- package/dist/lib/ProgressTracker.d.ts.map +0 -1
- package/dist/lib/ProgressTracker.js +0 -267
- package/dist/lib/ProgressTracker.js.map +0 -1
- package/dist/lib/ProjectCache.d.ts.map +0 -1
- package/dist/lib/ProjectCache.js.map +0 -1
- package/dist/lib/PythonParser.d.ts.map +0 -1
- package/dist/lib/PythonParser.js +0 -269
- package/dist/lib/PythonParser.js.map +0 -1
- package/dist/lib/ReviewRace.d.ts.map +0 -1
- package/dist/lib/ReviewRace.js +0 -446
- package/dist/lib/ReviewRace.js.map +0 -1
- package/dist/lib/RuleBuildSystem.d.ts +0 -117
- package/dist/lib/RuleBuildSystem.d.ts.map +0 -1
- package/dist/lib/RuleBuildSystem.js +0 -402
- package/dist/lib/RuleBuildSystem.js.map +0 -1
- package/dist/lib/SkillFrontmatter.d.ts +0 -62
- package/dist/lib/SkillFrontmatter.d.ts.map +0 -1
- package/dist/lib/SkillFrontmatter.js.map +0 -1
- package/dist/lib/SkillQualityGate.d.ts.map +0 -1
- package/dist/lib/SkillQualityGate.js.map +0 -1
- package/dist/lib/SkillRepository.d.ts.map +0 -1
- package/dist/lib/SkillRepository.js +0 -477
- package/dist/lib/SkillRepository.js.map +0 -1
- package/dist/lib/UltraQA.d.ts +0 -68
- package/dist/lib/UltraQA.d.ts.map +0 -1
- package/dist/lib/UltraQA.js +0 -232
- package/dist/lib/UltraQA.js.map +0 -1
- package/dist/lib/constants.d.ts +0 -45
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/constants.js +0 -62
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/gemini-api.d.ts +0 -128
- package/dist/lib/gemini-api.d.ts.map +0 -1
- package/dist/lib/gemini-api.js +0 -662
- package/dist/lib/gemini-api.js.map +0 -1
- package/dist/lib/gemini-constants.d.ts +0 -19
- package/dist/lib/gemini-constants.d.ts.map +0 -1
- package/dist/lib/gemini-constants.js +0 -34
- package/dist/lib/gemini-constants.js.map +0 -1
- package/dist/lib/gemini-oauth.d.ts +0 -52
- package/dist/lib/gemini-oauth.d.ts.map +0 -1
- package/dist/lib/gemini-oauth.js +0 -363
- package/dist/lib/gemini-oauth.js.map +0 -1
- package/dist/lib/gemini-storage.d.ts +0 -64
- package/dist/lib/gemini-storage.d.ts.map +0 -1
- package/dist/lib/gemini-storage.js +0 -177
- package/dist/lib/gemini-storage.js.map +0 -1
- package/dist/lib/gpt-api.d.ts +0 -106
- package/dist/lib/gpt-api.d.ts.map +0 -1
- package/dist/lib/gpt-api.js +0 -556
- package/dist/lib/gpt-api.js.map +0 -1
- package/dist/lib/gpt-constants.d.ts +0 -12
- package/dist/lib/gpt-constants.d.ts.map +0 -1
- package/dist/lib/gpt-constants.js +0 -18
- package/dist/lib/gpt-constants.js.map +0 -1
- package/dist/lib/gpt-oauth.d.ts.map +0 -1
- package/dist/lib/gpt-oauth.js +0 -373
- package/dist/lib/gpt-oauth.js.map +0 -1
- package/dist/lib/gpt-storage.d.ts +0 -64
- package/dist/lib/gpt-storage.d.ts.map +0 -1
- package/dist/lib/gpt-storage.js +0 -180
- package/dist/lib/gpt-storage.js.map +0 -1
- package/dist/lib/llm/auth/ApiKeyManager.d.ts.map +0 -1
- package/dist/lib/llm/auth/ApiKeyManager.js.map +0 -1
- package/dist/lib/llm/auth/ConfigManager.d.ts +0 -29
- package/dist/lib/llm/auth/ConfigManager.d.ts.map +0 -1
- package/dist/lib/llm/auth/ConfigManager.js +0 -67
- package/dist/lib/llm/auth/ConfigManager.js.map +0 -1
- package/dist/lib/llm/auth/index.d.ts +0 -25
- package/dist/lib/llm/auth/index.d.ts.map +0 -1
- package/dist/lib/llm/auth/index.js +0 -83
- package/dist/lib/llm/auth/index.js.map +0 -1
- package/dist/lib/llm/index.d.ts.map +0 -1
- package/dist/lib/llm/index.js.map +0 -1
- package/dist/lib/llm/types.d.ts.map +0 -1
- package/dist/lib/llm/types.js.map +0 -1
- package/dist/lib/llm/utils/index.d.ts.map +0 -1
- package/dist/lib/llm/utils/index.js.map +0 -1
- package/dist/lib/llm/utils/retry.d.ts.map +0 -1
- package/dist/lib/llm/utils/retry.js.map +0 -1
- package/dist/lib/llm/utils/stream.d.ts.map +0 -1
- package/dist/lib/llm/utils/stream.js.map +0 -1
- package/dist/lib/memory/KnowledgeGraph.d.ts.map +0 -1
- package/dist/lib/memory/KnowledgeGraph.js.map +0 -1
- package/dist/lib/memory/KnowledgeGraph.test.d.ts.map +0 -1
- package/dist/lib/memory/KnowledgeGraph.test.js +0 -189
- package/dist/lib/memory/KnowledgeGraph.test.js.map +0 -1
- package/dist/lib/memory/MemorySearch.d.ts +0 -27
- package/dist/lib/memory/MemorySearch.d.ts.map +0 -1
- package/dist/lib/memory/MemorySearch.js +0 -145
- package/dist/lib/memory/MemorySearch.js.map +0 -1
- package/dist/lib/memory/MemorySearch.test.d.ts.map +0 -1
- package/dist/lib/memory/MemorySearch.test.js +0 -149
- package/dist/lib/memory/MemorySearch.test.js.map +0 -1
- package/dist/lib/memory/MemoryStorage.d.ts +0 -88
- package/dist/lib/memory/MemoryStorage.d.ts.map +0 -1
- package/dist/lib/memory/MemoryStorage.js +0 -404
- package/dist/lib/memory/MemoryStorage.js.map +0 -1
- package/dist/lib/memory/MemoryStorage.test.d.ts.map +0 -1
- package/dist/lib/memory/MemoryStorage.test.js +0 -198
- package/dist/lib/memory/MemoryStorage.test.js.map +0 -1
- package/dist/lib/memory/ObservationStore.d.ts.map +0 -1
- package/dist/lib/memory/ObservationStore.js.map +0 -1
- package/dist/lib/memory/SessionRAGRetriever.d.ts +0 -66
- package/dist/lib/memory/SessionRAGRetriever.d.ts.map +0 -1
- package/dist/lib/memory/SessionRAGRetriever.js +0 -196
- package/dist/lib/memory/SessionRAGRetriever.js.map +0 -1
- package/dist/lib/memory/SessionRAGRetriever.test.d.ts.map +0 -1
- package/dist/lib/memory/SessionRAGRetriever.test.js +0 -180
- package/dist/lib/memory/SessionRAGRetriever.test.js.map +0 -1
- package/dist/lib/memory/SessionRAGStore.d.ts +0 -153
- package/dist/lib/memory/SessionRAGStore.d.ts.map +0 -1
- package/dist/lib/memory/SessionRAGStore.js +0 -673
- package/dist/lib/memory/SessionRAGStore.js.map +0 -1
- package/dist/lib/memory/SessionRAGStore.test.d.ts.map +0 -1
- package/dist/lib/memory/SessionRAGStore.test.js +0 -326
- package/dist/lib/memory/SessionRAGStore.test.js.map +0 -1
- package/dist/lib/memory/SessionSummarizer.d.ts.map +0 -1
- package/dist/lib/memory/SessionSummarizer.js.map +0 -1
- package/dist/lib/memory/index.d.ts +0 -5
- package/dist/lib/memory/index.d.ts.map +0 -1
- package/dist/lib/memory/index.js +0 -9
- package/dist/lib/memory/index.js.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/dist/orchestrator/AgentExecutor.d.ts +0 -23
- package/dist/orchestrator/AgentExecutor.d.ts.map +0 -1
- package/dist/orchestrator/AgentExecutor.js +0 -231
- package/dist/orchestrator/AgentExecutor.js.map +0 -1
- package/dist/orchestrator/AgentManager.d.ts +0 -73
- package/dist/orchestrator/AgentManager.d.ts.map +0 -1
- package/dist/orchestrator/AgentManager.js +0 -184
- package/dist/orchestrator/AgentManager.js.map +0 -1
- package/dist/orchestrator/BackgroundManager.d.ts +0 -109
- package/dist/orchestrator/BackgroundManager.d.ts.map +0 -1
- package/dist/orchestrator/BackgroundManager.js +0 -456
- package/dist/orchestrator/BackgroundManager.js.map +0 -1
- package/dist/orchestrator/BackgroundManager.test.d.ts.map +0 -1
- package/dist/orchestrator/BackgroundManager.test.js.map +0 -1
- package/dist/orchestrator/LLMCluster.d.ts +0 -70
- package/dist/orchestrator/LLMCluster.d.ts.map +0 -1
- package/dist/orchestrator/LLMCluster.js +0 -91
- package/dist/orchestrator/LLMCluster.js.map +0 -1
- package/dist/orchestrator/MultiLlmResearch.d.ts +0 -27
- package/dist/orchestrator/MultiLlmResearch.d.ts.map +0 -1
- package/dist/orchestrator/MultiLlmResearch.js +0 -145
- package/dist/orchestrator/MultiLlmResearch.js.map +0 -1
- package/dist/orchestrator/PhasePipeline.d.ts +0 -108
- package/dist/orchestrator/PhasePipeline.d.ts.map +0 -1
- package/dist/orchestrator/PhasePipeline.js +0 -313
- package/dist/orchestrator/PhasePipeline.js.map +0 -1
- package/dist/orchestrator/SessionStore.d.ts +0 -41
- package/dist/orchestrator/SessionStore.d.ts.map +0 -1
- package/dist/orchestrator/SessionStore.js +0 -117
- package/dist/orchestrator/SessionStore.js.map +0 -1
- package/dist/orchestrator/SmartRouter.d.ts +0 -68
- package/dist/orchestrator/SmartRouter.d.ts.map +0 -1
- package/dist/orchestrator/SmartRouter.js +0 -256
- package/dist/orchestrator/SmartRouter.js.map +0 -1
- package/dist/orchestrator/SwarmOrchestrator.d.ts +0 -144
- package/dist/orchestrator/SwarmOrchestrator.d.ts.map +0 -1
- package/dist/orchestrator/SwarmOrchestrator.js +0 -361
- package/dist/orchestrator/SwarmOrchestrator.js.map +0 -1
- package/dist/orchestrator/SwarmOrchestrator.test.d.ts.map +0 -1
- package/dist/orchestrator/SwarmOrchestrator.test.js.map +0 -1
- package/dist/orchestrator/agentDiscovery.d.ts.map +0 -1
- package/dist/orchestrator/agentDiscovery.js.map +0 -1
- package/dist/orchestrator/backgroundAgent.d.ts +0 -15
- package/dist/orchestrator/backgroundAgent.d.ts.map +0 -1
- package/dist/orchestrator/backgroundAgent.js +0 -16
- package/dist/orchestrator/backgroundAgent.js.map +0 -1
- package/dist/orchestrator/index.d.ts +0 -179
- package/dist/orchestrator/index.d.ts.map +0 -1
- package/dist/orchestrator/index.js +0 -335
- package/dist/orchestrator/index.js.map +0 -1
- package/dist/orchestrator/orchestrator.d.ts +0 -63
- package/dist/orchestrator/orchestrator.d.ts.map +0 -1
- package/dist/orchestrator/orchestrator.js +0 -212
- package/dist/orchestrator/orchestrator.js.map +0 -1
- package/dist/orchestrator/parallelResearch.d.ts +0 -30
- package/dist/orchestrator/parallelResearch.d.ts.map +0 -1
- package/dist/orchestrator/parallelResearch.js +0 -247
- package/dist/orchestrator/parallelResearch.js.map +0 -1
- package/dist/orchestrator/types.d.ts +0 -170
- package/dist/orchestrator/types.d.ts.map +0 -1
- package/dist/orchestrator/types.js +0 -14
- package/dist/orchestrator/types.js.map +0 -1
- package/dist/types/tool.d.ts.map +0 -1
- package/dist/types/tool.js.map +0 -1
- package/skills/brand-assets.md +0 -137
- package/skills/context7-usage.md +0 -102
- package/skills/git-worktree.md +0 -181
- package/skills/parallel-research.md +0 -77
- package/skills/priority-todos.md +0 -239
- package/skills/tool-fallback.md +0 -190
- package/skills/vibe-capabilities.md +0 -161
- /package/dist/{lib → infra/lib}/ContextCompressor.d.ts +0 -0
- /package/dist/{lib → infra/lib}/DeepInit.d.ts +0 -0
- /package/dist/{lib → infra/lib}/DeepInit.js +0 -0
- /package/dist/{lib → infra/lib}/FrameworkDetector.d.ts +0 -0
- /package/dist/{lib → infra/lib}/FrameworkDetector.js +0 -0
- /package/dist/{lib → infra/lib}/IterationTracker.js +0 -0
- /package/dist/{lib → infra/lib}/ModelRouter.d.ts +0 -0
- /package/dist/{lib → infra/lib}/ModelRouter.js +0 -0
- /package/dist/{lib → infra/lib}/OrchestrateWorkflow.d.ts +0 -0
- /package/dist/{lib → infra/lib}/OrchestrateWorkflow.js +0 -0
- /package/dist/{lib → infra/lib}/ProgressTracker.d.ts +0 -0
- /package/dist/{lib → infra/lib}/ProjectCache.d.ts +0 -0
- /package/dist/{lib → infra/lib}/ProjectCache.js +0 -0
- /package/dist/{lib → infra/lib}/PythonParser.d.ts +0 -0
- /package/dist/{lib → infra/lib}/ReviewRace.d.ts +0 -0
- /package/dist/{lib → infra/lib}/SkillFrontmatter.js +0 -0
- /package/dist/{lib → infra/lib}/SkillQualityGate.d.ts +0 -0
- /package/dist/{lib → infra/lib}/SkillQualityGate.js +0 -0
- /package/dist/{lib → infra/lib}/SkillRepository.d.ts +0 -0
- /package/dist/{lib → infra/lib}/gpt-oauth.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/auth/ApiKeyManager.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/auth/ApiKeyManager.js +0 -0
- /package/dist/{lib → infra/lib}/llm/index.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/index.js +0 -0
- /package/dist/{lib → infra/lib}/llm/types.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/types.js +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/index.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/index.js +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/retry.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/retry.js +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/stream.d.ts +0 -0
- /package/dist/{lib → infra/lib}/llm/utils/stream.js +0 -0
- /package/dist/{lib → infra/lib}/memory/KnowledgeGraph.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/KnowledgeGraph.js +0 -0
- /package/dist/{lib → infra/lib}/memory/KnowledgeGraph.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/MemorySearch.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/MemoryStorage.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/ObservationStore.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/ObservationStore.js +0 -0
- /package/dist/{lib → infra/lib}/memory/SessionRAGRetriever.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/SessionRAGStore.test.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/SessionSummarizer.d.ts +0 -0
- /package/dist/{lib → infra/lib}/memory/SessionSummarizer.js +0 -0
- /package/dist/{lib → infra/lib}/utils.d.ts +0 -0
- /package/dist/{lib → infra/lib}/utils.js +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/BackgroundManager.test.d.ts +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/BackgroundManager.test.js +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/SwarmOrchestrator.test.d.ts +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/SwarmOrchestrator.test.js +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/agentDiscovery.d.ts +0 -0
- /package/dist/{orchestrator → infra/orchestrator}/agentDiscovery.js +0 -0
- /package/dist/{types → infra/types}/tool.d.ts +0 -0
- /package/dist/{types → infra/types}/tool.js +0 -0
- /package/skills/{commerce-patterns.md → commerce-patterns/SKILL.md} +0 -0
- /package/skills/{e2e-commerce.md → e2e-commerce/SKILL.md} +0 -0
- /package/skills/{frontend-design.md → frontend-design/SKILL.md} +0 -0
- /package/skills/{seo-checklist.md → seo-checklist/SKILL.md} +0 -0
- /package/vibe/rules/{core → principles}/communication-guide.md +0 -0
- /package/vibe/rules/{core → principles}/development-philosophy.md +0 -0
- /package/vibe/rules/{core → principles}/quick-start.md +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const CONTROL_CHAR_RE = /[\u0000-\u001F]/g;
|
|
3
|
+
const SECURITY_FILE_PATTERNS = [
|
|
4
|
+
/[/\\]auth[/\\]/i,
|
|
5
|
+
/[/\\]security[/\\]/i,
|
|
6
|
+
/[/\\]\.env/i,
|
|
7
|
+
/[/\\]secrets/i,
|
|
8
|
+
];
|
|
9
|
+
const SENTINEL_PROTECTED_RE = /^src[\\/]lib[\\/]autonomy[\\/]/;
|
|
10
|
+
const DANGEROUS_BASH_RE = /\b(rm\s+-rf|kill\s+-9|drop\s+table|truncate|shutdown|reboot|mkfs|dd\s+if=)\b/i;
|
|
11
|
+
const AUTH_CREDENTIAL_RE = /\b(api[_-]?key|secret|token|password|auth|bearer)\b/i;
|
|
12
|
+
const SCORE_DEFAULTS = {
|
|
13
|
+
LOW: 15,
|
|
14
|
+
MEDIUM: 50,
|
|
15
|
+
HIGH: 80,
|
|
16
|
+
};
|
|
17
|
+
const CustomRiskRuleSchema = z.object({
|
|
18
|
+
actionType: z.string().min(1),
|
|
19
|
+
targetPattern: z.string().optional(),
|
|
20
|
+
riskLevel: z.enum(['LOW', 'MEDIUM', 'HIGH']),
|
|
21
|
+
condition: z.string().optional(),
|
|
22
|
+
});
|
|
23
|
+
export class RiskClassifier {
|
|
24
|
+
customRules;
|
|
25
|
+
constructor(customRules) {
|
|
26
|
+
this.customRules = (customRules ?? []).filter((rule) => {
|
|
27
|
+
try {
|
|
28
|
+
CustomRiskRuleSchema.parse(rule);
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
classify(action, context) {
|
|
37
|
+
const sanitized = this.sanitizeAction(action);
|
|
38
|
+
const customResult = this.evaluateCustomRules(sanitized);
|
|
39
|
+
if (customResult)
|
|
40
|
+
return customResult;
|
|
41
|
+
return this.evaluateDefaultRules(sanitized, context);
|
|
42
|
+
}
|
|
43
|
+
sanitizeAction(action) {
|
|
44
|
+
return {
|
|
45
|
+
...action,
|
|
46
|
+
agentId: action.agentId.replace(CONTROL_CHAR_RE, ''),
|
|
47
|
+
target: action.target.replace(CONTROL_CHAR_RE, ''),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
evaluateCustomRules(action) {
|
|
51
|
+
for (const rule of this.customRules) {
|
|
52
|
+
if (rule.actionType !== action.actionType)
|
|
53
|
+
continue;
|
|
54
|
+
if (rule.targetPattern) {
|
|
55
|
+
try {
|
|
56
|
+
if (!new RegExp(rule.targetPattern, 'i').test(action.target))
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return this.makeAssessment(rule.riskLevel, [`Custom rule matched: ${rule.actionType}`], `Custom rule override for ${rule.actionType}`);
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
evaluateDefaultRules(action, context) {
|
|
68
|
+
const handlers = {
|
|
69
|
+
file_write: () => this.classifyFileWrite(action),
|
|
70
|
+
file_delete: () => this.classifyFileDelete(action, context),
|
|
71
|
+
bash_exec: () => this.classifyBashExec(action),
|
|
72
|
+
git_push: () => this.classifyGitPush(action),
|
|
73
|
+
skill_generate: () => this.classifySkillGenerate(action),
|
|
74
|
+
config_modify: () => this.classifyConfigModify(action),
|
|
75
|
+
dependency_install: () => this.classifyDependencyInstall(),
|
|
76
|
+
external_api_call: () => this.classifyExternalApiCall(action),
|
|
77
|
+
};
|
|
78
|
+
const handler = handlers[action.actionType];
|
|
79
|
+
if (handler)
|
|
80
|
+
return handler();
|
|
81
|
+
return this.makeAssessment('LOW', [], `Unknown action type: ${action.actionType}`);
|
|
82
|
+
}
|
|
83
|
+
classifyFileWrite(action) {
|
|
84
|
+
const normalized = action.target.replace(/\\/g, '/').replace(/^\.\//, '');
|
|
85
|
+
if (SENTINEL_PROTECTED_RE.test(normalized)) {
|
|
86
|
+
return {
|
|
87
|
+
riskLevel: 'HIGH',
|
|
88
|
+
score: 100,
|
|
89
|
+
factors: ['Sentinel protected file modification attempted'],
|
|
90
|
+
reasoning: 'Modifying files in src/lib/autonomy/ is blocked',
|
|
91
|
+
blocked: true,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
for (const pattern of SECURITY_FILE_PATTERNS) {
|
|
95
|
+
if (pattern.test(action.target)) {
|
|
96
|
+
return this.makeAssessment('HIGH', [`Security-sensitive file: ${action.target}`], 'Security file modification requires elevated risk level');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return this.makeAssessment('LOW', [], 'Standard file write operation');
|
|
100
|
+
}
|
|
101
|
+
classifyFileDelete(action, context) {
|
|
102
|
+
if (context?.recentDeleteCount !== undefined && context.recentDeleteCount >= 5) {
|
|
103
|
+
return this.makeAssessment('HIGH', [`Mass delete detected: ${context.recentDeleteCount} files in last 60s`], 'Mass file deletion detected');
|
|
104
|
+
}
|
|
105
|
+
return this.makeAssessment('MEDIUM', [], 'File deletion operation');
|
|
106
|
+
}
|
|
107
|
+
classifyBashExec(action) {
|
|
108
|
+
if (DANGEROUS_BASH_RE.test(action.target)) {
|
|
109
|
+
return this.makeAssessment('HIGH', [`Dangerous command detected in: ${action.target}`], 'Bash command contains dangerous patterns');
|
|
110
|
+
}
|
|
111
|
+
return this.makeAssessment('MEDIUM', [], 'Standard bash execution');
|
|
112
|
+
}
|
|
113
|
+
classifyGitPush(action) {
|
|
114
|
+
const paramsStr = JSON.stringify(action.params ?? {});
|
|
115
|
+
const combined = `${action.target} ${paramsStr}`;
|
|
116
|
+
if (/--force\b/.test(combined) || /["']?force["']?\s*:\s*true/.test(paramsStr)) {
|
|
117
|
+
return this.makeAssessment('HIGH', ['Force push detected'], 'Git force push requires elevated risk level');
|
|
118
|
+
}
|
|
119
|
+
return this.makeAssessment('HIGH', [], 'Git push operation');
|
|
120
|
+
}
|
|
121
|
+
classifySkillGenerate(action) {
|
|
122
|
+
if (/\brule\b/i.test(action.target)) {
|
|
123
|
+
return this.makeAssessment('MEDIUM', ['Rule generation detected'], 'Skill generation involving rules');
|
|
124
|
+
}
|
|
125
|
+
return this.makeAssessment('LOW', [], 'Standard skill generation');
|
|
126
|
+
}
|
|
127
|
+
classifyConfigModify(action) {
|
|
128
|
+
if (/\bsentinel\b/i.test(action.target)) {
|
|
129
|
+
return this.makeAssessment('HIGH', ['Sentinel configuration modification'], 'Modifying sentinel configuration requires elevated risk level');
|
|
130
|
+
}
|
|
131
|
+
return this.makeAssessment('MEDIUM', [], 'Configuration modification');
|
|
132
|
+
}
|
|
133
|
+
classifyDependencyInstall() {
|
|
134
|
+
return this.makeAssessment('MEDIUM', [], 'Dependency installation');
|
|
135
|
+
}
|
|
136
|
+
classifyExternalApiCall(action) {
|
|
137
|
+
const paramsStr = JSON.stringify(action.params ?? {});
|
|
138
|
+
if (AUTH_CREDENTIAL_RE.test(paramsStr)) {
|
|
139
|
+
return this.makeAssessment('HIGH', ['Authentication credentials detected in API call'], 'External API call with authentication');
|
|
140
|
+
}
|
|
141
|
+
return this.makeAssessment('LOW', [], 'Standard external API call');
|
|
142
|
+
}
|
|
143
|
+
makeAssessment(riskLevel, factors, reasoning) {
|
|
144
|
+
return { riskLevel, score: SCORE_DEFAULTS[riskLevel], factors, reasoning };
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=RiskClassifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RiskClassifier.js","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/RiskClassifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C,MAAM,sBAAsB,GAA0B;IACpD,iBAAiB;IACjB,qBAAqB;IACrB,aAAa;IACb,eAAe;CAChB,CAAC;AAEF,MAAM,qBAAqB,GAAG,gCAAgC,CAAC;AAE/D,MAAM,iBAAiB,GACrB,+EAA+E,CAAC;AAElF,MAAM,kBAAkB,GAAG,sDAAsD,CAAC;AAElF,MAAM,cAAc,GAA8B;IAChD,GAAG,EAAE,EAAE;IACP,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;CACT,CAAC;AAqBF,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,aAAa,EAAE,CAAC,CAAC,MAAM,E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,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YACxC,OAAO,IAAI,CAAC,cAAc,CACxB,MAAM,EACN,CAAC,qCAAqC,CAAC,EACvC,+DAA+D,CAChE,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE,EAAE,4BAA4B,CAAC,CAAC;IACzE,CAAC;IAEO,yBAAyB;QAC/B,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE,EAAE,yBAAyB,CAAC,CAAC;IACtE,CAAC;IAEO,uBAAuB,CAAC,MAAwB;QACtD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;QACtD,IAAI,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YACvC,OAAO,IAAI,CAAC,cAAc,CACxB,MAAM,EACN,CAAC,iDAAiD,CAAC,EACnD,uCAAuC,CACxC,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,EAAE,EAAE,4BAA4B,CAAC,CAAC;IACtE,CAAC;IAEO,cAAc,CACpB,SAAoB,EACpB,OAAiB,EACjB,SAAiB;QAEjB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC7E,CAAC;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type Database from 'better-sqlite3';
|
|
2
|
+
import type { AgentActionEvent, RiskLevel } from './schemas.js';
|
|
3
|
+
import type { EventBus } from './EventBus.js';
|
|
4
|
+
import type { AuditStore } from './AuditStore.js';
|
|
5
|
+
import { RiskClassifier } from './RiskClassifier.js';
|
|
6
|
+
import type { CustomRiskRule } from './RiskClassifier.js';
|
|
7
|
+
import { PolicyEngine } from './PolicyEngine.js';
|
|
8
|
+
import type { PolicyDecision } from './PolicyEngine.js';
|
|
9
|
+
export interface InterceptResult {
|
|
10
|
+
allowed: boolean;
|
|
11
|
+
riskLevel: RiskLevel;
|
|
12
|
+
policyDecision: PolicyDecision;
|
|
13
|
+
auditId: string;
|
|
14
|
+
}
|
|
15
|
+
interface StorageProvider {
|
|
16
|
+
getDatabase(): Database.Database;
|
|
17
|
+
}
|
|
18
|
+
export interface SentinelDeps {
|
|
19
|
+
storage: StorageProvider;
|
|
20
|
+
eventBus: EventBus;
|
|
21
|
+
auditStore: AuditStore;
|
|
22
|
+
projectRoot?: string;
|
|
23
|
+
customRules?: CustomRiskRule[];
|
|
24
|
+
}
|
|
25
|
+
export declare class SecuritySentinel {
|
|
26
|
+
private static instance;
|
|
27
|
+
private readonly classifier;
|
|
28
|
+
private readonly policyEngine;
|
|
29
|
+
private readonly eventBus;
|
|
30
|
+
private readonly auditStore;
|
|
31
|
+
private readonly db;
|
|
32
|
+
private readonly projectRoot;
|
|
33
|
+
private readonly recentDeleteStmt;
|
|
34
|
+
private constructor();
|
|
35
|
+
static getInstance(deps: SentinelDeps): SecuritySentinel;
|
|
36
|
+
static resetInstance(): void;
|
|
37
|
+
intercept(action: AgentActionEvent): InterceptResult;
|
|
38
|
+
isImmutable(): boolean;
|
|
39
|
+
getSentinelFiles(): ReadonlyArray<string>;
|
|
40
|
+
getClassifier(): RiskClassifier;
|
|
41
|
+
getPolicyEngine(): PolicyEngine;
|
|
42
|
+
private normalizeAction;
|
|
43
|
+
private normalizePath;
|
|
44
|
+
private buildContext;
|
|
45
|
+
private blockedDecision;
|
|
46
|
+
private emitPolicyCheck;
|
|
47
|
+
private recordAudit;
|
|
48
|
+
}
|
|
49
|
+
export declare function isSentinelProtectedPath(target: string): boolean;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=SecuritySentinel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecuritySentinel.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/Securit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AAO,CAAC,QAAQ,CAAC,gBAAgB,CAAqB;IAEtD,OAAO;IAaP,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB;IAOxD,MAAM,CAAC,aAAa,IAAI,IAAI;IAI5B,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,eAAe;IAmCpD,WAAW,IAAI,OAAO;IAItB,gBAAgB,IAAI,aAAa,CAAC,MAAM,CAAC;IAIzC,aAAa,IAAI,cAAc;IAI/B,eAAe,IAAI,YAAY;IAI/B,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,eAAe;IAuBvB,OAAO,CAAC,WAAW;CAsBpB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAG/D"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { resolve, relative } from 'path';
|
|
2
|
+
import { realpathSync } from 'fs';
|
|
3
|
+
import { RiskClassifier } from './RiskClassifier.js';
|
|
4
|
+
import { PolicyEngine } from './PolicyEngine.js';
|
|
5
|
+
const SENTINEL_PATH_PREFIX = 'src/lib/autonomy/';
|
|
6
|
+
const SENTINEL_FILES = [
|
|
7
|
+
'src/lib/autonomy/RiskClassifier.ts',
|
|
8
|
+
'src/lib/autonomy/PolicyEngine.ts',
|
|
9
|
+
'src/lib/autonomy/SecuritySentinel.ts',
|
|
10
|
+
'src/lib/autonomy/EventBus.ts',
|
|
11
|
+
'src/lib/autonomy/AuditStore.ts',
|
|
12
|
+
'src/lib/autonomy/EventOutbox.ts',
|
|
13
|
+
'src/lib/autonomy/schemas.ts',
|
|
14
|
+
'src/lib/autonomy/index.ts',
|
|
15
|
+
];
|
|
16
|
+
const RECENT_DELETE_WINDOW_MS = 60_000;
|
|
17
|
+
export class SecuritySentinel {
|
|
18
|
+
static instance = null;
|
|
19
|
+
classifier;
|
|
20
|
+
policyEngine;
|
|
21
|
+
eventBus;
|
|
22
|
+
auditStore;
|
|
23
|
+
db;
|
|
24
|
+
projectRoot;
|
|
25
|
+
recentDeleteStmt;
|
|
26
|
+
constructor(deps) {
|
|
27
|
+
this.classifier = new RiskClassifier(deps.customRules);
|
|
28
|
+
this.policyEngine = new PolicyEngine(deps.storage);
|
|
29
|
+
this.eventBus = deps.eventBus;
|
|
30
|
+
this.auditStore = deps.auditStore;
|
|
31
|
+
this.db = deps.storage.getDatabase();
|
|
32
|
+
this.projectRoot = deps.projectRoot ?? process.cwd();
|
|
33
|
+
this.recentDeleteStmt = this.db.prepare(`SELECT COUNT(*) as count FROM audit_events
|
|
34
|
+
WHERE agentId = ? AND actionType = 'file_delete' AND createdAt >= ?`);
|
|
35
|
+
}
|
|
36
|
+
static getInstance(deps) {
|
|
37
|
+
if (!SecuritySentinel.instance) {
|
|
38
|
+
SecuritySentinel.instance = new SecuritySentinel(deps);
|
|
39
|
+
}
|
|
40
|
+
return SecuritySentinel.instance;
|
|
41
|
+
}
|
|
42
|
+
static resetInstance() {
|
|
43
|
+
SecuritySentinel.instance = null;
|
|
44
|
+
}
|
|
45
|
+
intercept(action) {
|
|
46
|
+
const normalizedAction = this.normalizeAction(action);
|
|
47
|
+
// Block paths outside project root
|
|
48
|
+
if (normalizedAction.target.startsWith('..')) {
|
|
49
|
+
const outsideRisk = {
|
|
50
|
+
riskLevel: 'HIGH',
|
|
51
|
+
score: 100,
|
|
52
|
+
factors: ['Path resolves outside project root'],
|
|
53
|
+
reasoning: 'Path traversal outside project root is blocked',
|
|
54
|
+
blocked: true,
|
|
55
|
+
};
|
|
56
|
+
const decision = this.blockedDecision(outsideRisk);
|
|
57
|
+
this.emitPolicyCheck(normalizedAction, outsideRisk, decision);
|
|
58
|
+
const auditId = this.recordAudit(normalizedAction, outsideRisk, decision);
|
|
59
|
+
return { allowed: false, riskLevel: 'HIGH', policyDecision: decision, auditId };
|
|
60
|
+
}
|
|
61
|
+
const context = this.buildContext(normalizedAction);
|
|
62
|
+
const risk = this.classifier.classify(normalizedAction, context);
|
|
63
|
+
const policyDecision = risk.blocked
|
|
64
|
+
? this.blockedDecision(risk)
|
|
65
|
+
: this.policyEngine.evaluate(normalizedAction, risk);
|
|
66
|
+
this.emitPolicyCheck(normalizedAction, risk, policyDecision);
|
|
67
|
+
const auditId = this.recordAudit(normalizedAction, risk, policyDecision);
|
|
68
|
+
return {
|
|
69
|
+
allowed: policyDecision.allowed,
|
|
70
|
+
riskLevel: risk.riskLevel,
|
|
71
|
+
policyDecision,
|
|
72
|
+
auditId,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
isImmutable() {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
getSentinelFiles() {
|
|
79
|
+
return SENTINEL_FILES;
|
|
80
|
+
}
|
|
81
|
+
getClassifier() {
|
|
82
|
+
return this.classifier;
|
|
83
|
+
}
|
|
84
|
+
getPolicyEngine() {
|
|
85
|
+
return this.policyEngine;
|
|
86
|
+
}
|
|
87
|
+
normalizeAction(action) {
|
|
88
|
+
const normalizedTarget = this.normalizePath(action.target);
|
|
89
|
+
return { ...action, target: normalizedTarget };
|
|
90
|
+
}
|
|
91
|
+
normalizePath(target) {
|
|
92
|
+
const resolved = resolve(this.projectRoot, target);
|
|
93
|
+
const rel = relative(this.projectRoot, resolved).replace(/\\/g, '/');
|
|
94
|
+
if (rel.startsWith('..'))
|
|
95
|
+
return rel;
|
|
96
|
+
try {
|
|
97
|
+
const real = realpathSync(resolved);
|
|
98
|
+
const realRel = relative(this.projectRoot, real).replace(/\\/g, '/');
|
|
99
|
+
return realRel.startsWith('..') ? realRel : realRel;
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return rel;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
buildContext(action) {
|
|
106
|
+
if (action.actionType !== 'file_delete')
|
|
107
|
+
return undefined;
|
|
108
|
+
const cutoff = new Date(Date.now() - RECENT_DELETE_WINDOW_MS).toISOString();
|
|
109
|
+
const row = this.recentDeleteStmt.get(action.agentId, cutoff);
|
|
110
|
+
return { recentDeleteCount: row.count };
|
|
111
|
+
}
|
|
112
|
+
blockedDecision(risk) {
|
|
113
|
+
return {
|
|
114
|
+
allowed: false,
|
|
115
|
+
reason: `Sentinel files are protected: ${risk.reasoning}`,
|
|
116
|
+
requiredAction: 'block',
|
|
117
|
+
matchedPolicies: ['sentinel-immutability'],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
emitPolicyCheck(action, risk, decision) {
|
|
121
|
+
try {
|
|
122
|
+
this.eventBus.emit('policy_check', {
|
|
123
|
+
actionEvent: {
|
|
124
|
+
agentId: action.agentId,
|
|
125
|
+
actionType: action.actionType,
|
|
126
|
+
target: action.target,
|
|
127
|
+
params: action.params,
|
|
128
|
+
riskLevel: risk.riskLevel,
|
|
129
|
+
},
|
|
130
|
+
policies: decision.matchedPolicies,
|
|
131
|
+
result: decision.allowed ? 'allowed' : (decision.requiredAction === 'confirm' ? 'needs_confirmation' : 'blocked'),
|
|
132
|
+
duration: 0,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
// Policy check event emission failure should not break intercept
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
recordAudit(action, risk, decision) {
|
|
140
|
+
const outcome = decision.allowed ? 'allowed' : 'blocked';
|
|
141
|
+
return this.auditStore.record({
|
|
142
|
+
correlationId: action.correlationId ?? `sentinel-${Date.now()}`,
|
|
143
|
+
eventType: 'policy_check',
|
|
144
|
+
agentId: action.agentId,
|
|
145
|
+
actionType: action.actionType,
|
|
146
|
+
riskLevel: risk.riskLevel,
|
|
147
|
+
payload: {
|
|
148
|
+
target: action.target,
|
|
149
|
+
riskScore: risk.score,
|
|
150
|
+
factors: risk.factors,
|
|
151
|
+
matchedPolicies: decision.matchedPolicies,
|
|
152
|
+
reason: decision.reason,
|
|
153
|
+
},
|
|
154
|
+
outcome,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
export function isSentinelProtectedPath(target) {
|
|
159
|
+
const normalized = target.replace(/\\/g, '/').replace(/^\.\//, '');
|
|
160
|
+
return normalized.startsWith(SENTINEL_PATH_PREFIX);
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=SecuritySentinel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecuritySentinel.js","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/SecuritySentinel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAKlC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAEjD,MAAM,cAAc,GAA0B;IAC5C,oCAAoC;IACpC,kCAAkC;IAClC,sCAAsC;IACtC,8BAA8B;IAC9B,gCAAgC;IAChC,iCAAiC;IACjC,6BAA6B;IAC7B,2BAA2B;CAC5B,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAqBvC,MAAM,OAAO,gBAAgB;IACnB,MAAM,CAAC,QAAQ,GAA4B,IAAI,CAAC;IAEvC,UAAU,CAAiB;IAC3B,YAAY,CAAe;IAC3B,QAAQ,CAAW;IACnB,UAAU,CAAa;IACvB,EAAE,CAAoB;IACtB,WAAW,CAAS;IACpB,gBAAgB,CAAqB;IAEtD,YAAoB,IAAkB;QACpC,IAAI,CAAC,UAAU,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACvD,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QA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;aACxB;YACD,OAAO;SACR,CAAC,CAAC;IACL,CAAC;;AAGH,MAAM,UAAU,uBAAuB,CAAC,MAAc;IACpD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACnE,OAAO,UAAU,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type Database from 'better-sqlite3';
|
|
2
|
+
export type SuggestionType = 'security' | 'performance' | 'quality' | 'dependency' | 'pattern';
|
|
3
|
+
type SuggestionStatus = 'pending' | 'accepted' | 'dismissed' | 'auto_applied';
|
|
4
|
+
export interface SuggestionRow {
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
priority: number;
|
|
10
|
+
evidence: string;
|
|
11
|
+
suggestedAction: string | null;
|
|
12
|
+
status: string;
|
|
13
|
+
riskLevel: string;
|
|
14
|
+
sourceModule: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
resolvedAt: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateSuggestionInput {
|
|
19
|
+
type: SuggestionType;
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
priority: number;
|
|
23
|
+
evidence: Record<string, unknown>;
|
|
24
|
+
suggestedAction?: string;
|
|
25
|
+
riskLevel?: string;
|
|
26
|
+
sourceModule: string;
|
|
27
|
+
}
|
|
28
|
+
export interface SuggestionStats {
|
|
29
|
+
total: number;
|
|
30
|
+
byType: Record<string, number>;
|
|
31
|
+
byStatus: Record<string, number>;
|
|
32
|
+
pendingCount: number;
|
|
33
|
+
}
|
|
34
|
+
interface StorageProvider {
|
|
35
|
+
getDatabase(): Database.Database;
|
|
36
|
+
}
|
|
37
|
+
export declare class SuggestionStore {
|
|
38
|
+
private readonly db;
|
|
39
|
+
private readonly insertStmt;
|
|
40
|
+
private fts5Available;
|
|
41
|
+
constructor(storage: StorageProvider);
|
|
42
|
+
private initTables;
|
|
43
|
+
create(input: CreateSuggestionInput): SuggestionRow;
|
|
44
|
+
resolve(id: string, status: SuggestionStatus): SuggestionRow;
|
|
45
|
+
getById(id: string): SuggestionRow | null;
|
|
46
|
+
getPending(limit?: number): SuggestionRow[];
|
|
47
|
+
getHighPriority(maxPriority?: number): SuggestionRow[];
|
|
48
|
+
getStats(): SuggestionStats;
|
|
49
|
+
search(query: string, limit?: number): SuggestionRow[];
|
|
50
|
+
private findDuplicate;
|
|
51
|
+
private enforceMaxSuggestions;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=SuggestionStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuggestionStore.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/SuggestionStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAM3C,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAC/F,KAAK,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,CAAC;AAE9E,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC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AqB;CAkB9B"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { uuidv7 } from 'uuidv7';
|
|
2
|
+
const MAX_SUGGESTIONS = 1000;
|
|
3
|
+
const DEDUP_WINDOW_MS = 86_400_000; // 24 hours
|
|
4
|
+
export class SuggestionStore {
|
|
5
|
+
db;
|
|
6
|
+
insertStmt;
|
|
7
|
+
fts5Available = false;
|
|
8
|
+
constructor(storage) {
|
|
9
|
+
this.db = storage.getDatabase();
|
|
10
|
+
this.initTables();
|
|
11
|
+
this.insertStmt = this.db.prepare(`
|
|
12
|
+
INSERT INTO suggestions
|
|
13
|
+
(id, type, title, description, priority, evidence, suggestedAction, status, riskLevel, sourceModule, createdAt)
|
|
14
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, 'pending', ?, ?, ?)
|
|
15
|
+
`);
|
|
16
|
+
}
|
|
17
|
+
initTables() {
|
|
18
|
+
this.db.exec(`
|
|
19
|
+
CREATE TABLE IF NOT EXISTS suggestions (
|
|
20
|
+
id TEXT PRIMARY KEY,
|
|
21
|
+
type TEXT NOT NULL CHECK(type IN ('security','performance','quality','dependency','pattern')),
|
|
22
|
+
title TEXT NOT NULL,
|
|
23
|
+
description TEXT NOT NULL,
|
|
24
|
+
priority INTEGER NOT NULL CHECK(priority BETWEEN 1 AND 5),
|
|
25
|
+
evidence TEXT NOT NULL,
|
|
26
|
+
suggestedAction TEXT,
|
|
27
|
+
status TEXT DEFAULT 'pending' CHECK(status IN ('pending','accepted','dismissed','auto_applied')),
|
|
28
|
+
riskLevel TEXT DEFAULT 'LOW',
|
|
29
|
+
sourceModule TEXT NOT NULL,
|
|
30
|
+
createdAt TEXT NOT NULL,
|
|
31
|
+
resolvedAt TEXT
|
|
32
|
+
);
|
|
33
|
+
CREATE INDEX IF NOT EXISTS idx_suggestion_status_priority ON suggestions(status, priority);
|
|
34
|
+
CREATE INDEX IF NOT EXISTS idx_suggestion_type_created ON suggestions(type, createdAt);
|
|
35
|
+
`);
|
|
36
|
+
try {
|
|
37
|
+
this.db.exec(`
|
|
38
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS suggestions_fts USING fts5(
|
|
39
|
+
title, description,
|
|
40
|
+
content='suggestions', content_rowid='rowid'
|
|
41
|
+
);
|
|
42
|
+
CREATE TRIGGER IF NOT EXISTS suggestions_fts_ai AFTER INSERT ON suggestions BEGIN
|
|
43
|
+
INSERT INTO suggestions_fts(rowid, title, description)
|
|
44
|
+
VALUES (new.rowid, new.title, new.description);
|
|
45
|
+
END;
|
|
46
|
+
`);
|
|
47
|
+
this.fts5Available = true;
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
this.fts5Available = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
create(input) {
|
|
54
|
+
const existing = this.findDuplicate(input.title, input.type);
|
|
55
|
+
if (existing)
|
|
56
|
+
return existing;
|
|
57
|
+
this.enforceMaxSuggestions();
|
|
58
|
+
const id = uuidv7();
|
|
59
|
+
const now = new Date().toISOString();
|
|
60
|
+
const priority = Math.max(1, Math.min(5, input.priority));
|
|
61
|
+
this.insertStmt.run(id, input.type, input.title, input.description, priority, JSON.stringify(input.evidence), input.suggestedAction ?? null, input.riskLevel ?? 'LOW', input.sourceModule, now);
|
|
62
|
+
return this.getById(id);
|
|
63
|
+
}
|
|
64
|
+
resolve(id, status) {
|
|
65
|
+
const now = new Date().toISOString();
|
|
66
|
+
this.db
|
|
67
|
+
.prepare('UPDATE suggestions SET status = ?, resolvedAt = ? WHERE id = ?')
|
|
68
|
+
.run(status, now, id);
|
|
69
|
+
return this.getById(id);
|
|
70
|
+
}
|
|
71
|
+
getById(id) {
|
|
72
|
+
return this.db.prepare('SELECT * FROM suggestions WHERE id = ?').get(id) ?? null;
|
|
73
|
+
}
|
|
74
|
+
getPending(limit = 50) {
|
|
75
|
+
return this.db
|
|
76
|
+
.prepare("SELECT * FROM suggestions WHERE status = 'pending' ORDER BY priority ASC, createdAt ASC LIMIT ?")
|
|
77
|
+
.all(limit);
|
|
78
|
+
}
|
|
79
|
+
getHighPriority(maxPriority = 2) {
|
|
80
|
+
return this.db
|
|
81
|
+
.prepare("SELECT * FROM suggestions WHERE status = 'pending' AND priority <= ? ORDER BY priority ASC, createdAt ASC")
|
|
82
|
+
.all(maxPriority);
|
|
83
|
+
}
|
|
84
|
+
getStats() {
|
|
85
|
+
const total = this.db.prepare('SELECT COUNT(*) as count FROM suggestions').get().count;
|
|
86
|
+
const byType = Object.fromEntries(this.db
|
|
87
|
+
.prepare('SELECT type, COUNT(*) as count FROM suggestions GROUP BY type')
|
|
88
|
+
.all().map((r) => [r.type, r.count]));
|
|
89
|
+
const byStatus = Object.fromEntries(this.db
|
|
90
|
+
.prepare('SELECT status, COUNT(*) as count FROM suggestions GROUP BY status')
|
|
91
|
+
.all().map((r) => [r.status, r.count]));
|
|
92
|
+
const pendingCount = this.db
|
|
93
|
+
.prepare("SELECT COUNT(*) as count FROM suggestions WHERE status = 'pending'")
|
|
94
|
+
.get().count;
|
|
95
|
+
return { total, byType, byStatus, pendingCount };
|
|
96
|
+
}
|
|
97
|
+
search(query, limit = 50) {
|
|
98
|
+
if (!this.fts5Available)
|
|
99
|
+
return [];
|
|
100
|
+
const sanitized = query.replace(/[*"()\-]/g, ' ').trim();
|
|
101
|
+
if (!sanitized)
|
|
102
|
+
return [];
|
|
103
|
+
try {
|
|
104
|
+
return this.db
|
|
105
|
+
.prepare(`SELECT s.* FROM suggestions s
|
|
106
|
+
JOIN suggestions_fts f ON s.rowid = f.rowid
|
|
107
|
+
WHERE suggestions_fts MATCH ?
|
|
108
|
+
ORDER BY rank LIMIT ?`)
|
|
109
|
+
.all(sanitized, limit);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
findDuplicate(title, type) {
|
|
116
|
+
const normalized = title.toLowerCase().replace(/\s+/g, ' ').trim();
|
|
117
|
+
const cutoff = new Date(Date.now() - DEDUP_WINDOW_MS).toISOString();
|
|
118
|
+
const rows = this.db
|
|
119
|
+
.prepare('SELECT * FROM suggestions WHERE type = ? AND createdAt >= ? ORDER BY createdAt DESC')
|
|
120
|
+
.all(type, cutoff);
|
|
121
|
+
for (const row of rows) {
|
|
122
|
+
const rowNormalized = row.title.toLowerCase().replace(/\s+/g, ' ').trim();
|
|
123
|
+
if (rowNormalized === normalized)
|
|
124
|
+
return row;
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
enforceMaxSuggestions() {
|
|
129
|
+
const total = this.db.prepare('SELECT COUNT(*) as count FROM suggestions').get().count;
|
|
130
|
+
if (total < MAX_SUGGESTIONS)
|
|
131
|
+
return;
|
|
132
|
+
const deleteOrder = ['dismissed', 'auto_applied', 'accepted'];
|
|
133
|
+
for (const status of deleteOrder) {
|
|
134
|
+
const oldest = this.db
|
|
135
|
+
.prepare('SELECT id FROM suggestions WHERE status = ? ORDER BY createdAt ASC LIMIT 1')
|
|
136
|
+
.get(status);
|
|
137
|
+
if (oldest) {
|
|
138
|
+
this.db.prepare('DELETE FROM suggestions WHERE id = ?').run(oldest.id);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=SuggestionStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuggestionStore.js","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/SuggestionStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,MAAM,eAAe,GAAG,UAAU,CAAC,CAAC,WAAW;AA0C/C,MAAM,OAAO,eAAe;IACT,EAAE,CAAoB;IACtB,UAAU,CAAqB;IACxC,aAAa,GAAG,KAAK,CAAC;IAE9B,YAAY,OAAwB;QAClC,IAAI,CAAC,EAAE,GAAG,OAAO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I,IAAI,EAAE,CAAC;YACvB,MAAM,aAAa,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;YAC1E,IAAI,aAAa,KAAK,UAAU;gBAAE,OAAO,GAAG,CAAC;QAC/C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,qBAAqB;QAC3B,MAAM,KAAK,GACT,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC,GAAG,EACjE,CAAC,KAAK,CAAC;QAER,IAAI,KAAK,GAAG,eAAe;YAAE,OAAO;QAEpC,MAAM,WAAW,GAAuB,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;QAClF,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;YACjC,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE;iBACnB,OAAO,CAAC,4EAA4E,CAAC;iBACrF,GAAG,CAAC,MAAM,CAA+B,CAAC;YAC7C,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBACvE,OAAO;YACT,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { RiskLevel } from './schemas.js';
|
|
2
|
+
export type StepType = 'spec' | 'review' | 'implement' | 'test' | 'deploy';
|
|
3
|
+
export type StepStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'skipped';
|
|
4
|
+
export type Complexity = 'low' | 'medium' | 'high';
|
|
5
|
+
export interface TaskStep {
|
|
6
|
+
id: string;
|
|
7
|
+
order: number;
|
|
8
|
+
type: StepType;
|
|
9
|
+
description: string;
|
|
10
|
+
dependencies: string[];
|
|
11
|
+
estimatedFiles: number;
|
|
12
|
+
riskLevel: RiskLevel;
|
|
13
|
+
status: StepStatus;
|
|
14
|
+
}
|
|
15
|
+
export interface DecomposedTask {
|
|
16
|
+
id: string;
|
|
17
|
+
originalPrompt: string;
|
|
18
|
+
steps: TaskStep[];
|
|
19
|
+
estimatedComplexity: Complexity;
|
|
20
|
+
requiresConfirmation: boolean;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class CircularDependencyError extends Error {
|
|
24
|
+
constructor(cycle: string[]);
|
|
25
|
+
}
|
|
26
|
+
export declare class TaskDecomposer {
|
|
27
|
+
decompose(userPrompt: string): DecomposedTask;
|
|
28
|
+
private analyzeKeywordComplexity;
|
|
29
|
+
private estimateFileCount;
|
|
30
|
+
private fileCountToComplexity;
|
|
31
|
+
private resolveComplexity;
|
|
32
|
+
private determineStepTypes;
|
|
33
|
+
private buildSteps;
|
|
34
|
+
private assessStepRisk;
|
|
35
|
+
private generateDescription;
|
|
36
|
+
validateDAG(steps: TaskStep[]): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=TaskDecomposer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskDecomposer.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/autonomy/TaskDecomposer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAM9C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC3E,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AACxF,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEnD,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,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