@backendkit-labs/agent-core 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-discovery/AgentPackageLoader.d.ts +14 -0
- package/dist/agent-discovery/AgentPackageLoader.d.ts.map +1 -0
- package/dist/agent-discovery/AgentPackageLoader.js +78 -0
- package/dist/agent-discovery/AgentPackageLoader.js.map +1 -0
- package/dist/agent-discovery/RemoteAgentRegistry.d.ts +31 -0
- package/dist/agent-discovery/RemoteAgentRegistry.d.ts.map +1 -0
- package/dist/agent-discovery/RemoteAgentRegistry.js +103 -0
- package/dist/agent-discovery/RemoteAgentRegistry.js.map +1 -0
- package/dist/agent-discovery/discoverAgents.d.ts +18 -0
- package/dist/agent-discovery/discoverAgents.d.ts.map +1 -0
- package/dist/agent-discovery/discoverAgents.js +59 -0
- package/dist/agent-discovery/discoverAgents.js.map +1 -0
- package/dist/agent-discovery/index.d.ts +5 -0
- package/dist/agent-discovery/index.d.ts.map +1 -0
- package/dist/agent-discovery/index.js +12 -0
- package/dist/agent-discovery/index.js.map +1 -0
- package/dist/agent-discovery/types.d.ts +42 -0
- package/dist/agent-discovery/types.d.ts.map +1 -0
- package/dist/agent-discovery/types.js +3 -0
- package/dist/agent-discovery/types.js.map +1 -0
- package/dist/agent-memory/EpisodicMemory.d.ts +26 -0
- package/dist/agent-memory/EpisodicMemory.d.ts.map +1 -0
- package/dist/agent-memory/EpisodicMemory.js +83 -0
- package/dist/agent-memory/EpisodicMemory.js.map +1 -0
- package/dist/agent-memory/MemorySystem.d.ts +40 -0
- package/dist/agent-memory/MemorySystem.d.ts.map +1 -0
- package/dist/agent-memory/MemorySystem.js +75 -0
- package/dist/agent-memory/MemorySystem.js.map +1 -0
- package/dist/agent-memory/ProceduralMemory.d.ts +26 -0
- package/dist/agent-memory/ProceduralMemory.d.ts.map +1 -0
- package/dist/agent-memory/ProceduralMemory.js +104 -0
- package/dist/agent-memory/ProceduralMemory.js.map +1 -0
- package/dist/agent-memory/SemanticMemory.d.ts +21 -0
- package/dist/agent-memory/SemanticMemory.d.ts.map +1 -0
- package/dist/agent-memory/SemanticMemory.js +68 -0
- package/dist/agent-memory/SemanticMemory.js.map +1 -0
- package/dist/agent-memory/index.d.ts +9 -0
- package/dist/agent-memory/index.d.ts.map +1 -0
- package/dist/agent-memory/index.js +19 -0
- package/dist/agent-memory/index.js.map +1 -0
- package/dist/agent-memory/scoring.d.ts +10 -0
- package/dist/agent-memory/scoring.d.ts.map +1 -0
- package/dist/agent-memory/scoring.js +32 -0
- package/dist/agent-memory/scoring.js.map +1 -0
- package/dist/agent-memory/stores/InMemoryStore.d.ts +10 -0
- package/dist/agent-memory/stores/InMemoryStore.d.ts.map +1 -0
- package/dist/agent-memory/stores/InMemoryStore.js +25 -0
- package/dist/agent-memory/stores/InMemoryStore.js.map +1 -0
- package/dist/agent-memory/stores/JsonFileStore.d.ts +18 -0
- package/dist/agent-memory/stores/JsonFileStore.d.ts.map +1 -0
- package/dist/agent-memory/stores/JsonFileStore.js +61 -0
- package/dist/agent-memory/stores/JsonFileStore.js.map +1 -0
- package/dist/agent-memory/tools.d.ts +6 -0
- package/dist/agent-memory/tools.d.ts.map +1 -0
- package/dist/agent-memory/tools.js +74 -0
- package/dist/agent-memory/tools.js.map +1 -0
- package/dist/agent-memory/types.d.ts +75 -0
- package/dist/agent-memory/types.d.ts.map +1 -0
- package/dist/agent-memory/types.js +4 -0
- package/dist/agent-memory/types.js.map +1 -0
- package/dist/bootstrap/GlobalSeed.d.ts +46 -0
- package/dist/bootstrap/GlobalSeed.d.ts.map +1 -0
- package/dist/bootstrap/GlobalSeed.js +285 -0
- package/dist/bootstrap/GlobalSeed.js.map +1 -0
- package/dist/bootstrap/config.d.ts +24 -0
- package/dist/bootstrap/config.d.ts.map +1 -0
- package/dist/bootstrap/config.js +71 -0
- package/dist/bootstrap/config.js.map +1 -0
- package/dist/checkpoint/index.d.ts +17 -0
- package/dist/checkpoint/index.d.ts.map +1 -0
- package/dist/checkpoint/index.js +207 -0
- package/dist/checkpoint/index.js.map +1 -0
- package/dist/commands/SlashCommandRegistry.d.ts +98 -0
- package/dist/commands/SlashCommandRegistry.d.ts.map +1 -0
- package/dist/commands/SlashCommandRegistry.js +41 -0
- package/dist/commands/SlashCommandRegistry.js.map +1 -0
- package/dist/commands/builtin.d.ts +7 -0
- package/dist/commands/builtin.d.ts.map +1 -0
- package/dist/commands/builtin.js +694 -0
- package/dist/commands/builtin.js.map +1 -0
- package/dist/commands/index.d.ts +4 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +8 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +8 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/pipeline.d.ts +46 -0
- package/dist/context/pipeline.d.ts.map +1 -0
- package/dist/context/pipeline.js +111 -0
- package/dist/context/pipeline.js.map +1 -0
- package/dist/context/stages/stage-instructions.d.ts +12 -0
- package/dist/context/stages/stage-instructions.d.ts.map +1 -0
- package/dist/context/stages/stage-instructions.js +76 -0
- package/dist/context/stages/stage-instructions.js.map +1 -0
- package/dist/context/stages/stage-lessons.d.ts +13 -0
- package/dist/context/stages/stage-lessons.d.ts.map +1 -0
- package/dist/context/stages/stage-lessons.js +83 -0
- package/dist/context/stages/stage-lessons.js.map +1 -0
- package/dist/context/stages/stage-manifest.d.ts +11 -0
- package/dist/context/stages/stage-manifest.d.ts.map +1 -0
- package/dist/context/stages/stage-manifest.js +62 -0
- package/dist/context/stages/stage-manifest.js.map +1 -0
- package/dist/context/stages/stage-project.d.ts +10 -0
- package/dist/context/stages/stage-project.d.ts.map +1 -0
- package/dist/context/stages/stage-project.js +55 -0
- package/dist/context/stages/stage-project.js.map +1 -0
- package/dist/context/stages/stage-session.d.ts +12 -0
- package/dist/context/stages/stage-session.d.ts.map +1 -0
- package/dist/context/stages/stage-session.js +69 -0
- package/dist/context/stages/stage-session.js.map +1 -0
- package/dist/delegation/DelegationBus.d.ts +40 -0
- package/dist/delegation/DelegationBus.d.ts.map +1 -0
- package/dist/delegation/DelegationBus.js +68 -0
- package/dist/delegation/DelegationBus.js.map +1 -0
- package/dist/engine/AgentEngine.d.ts +212 -0
- package/dist/engine/AgentEngine.d.ts.map +1 -0
- package/dist/engine/AgentEngine.js +1037 -0
- package/dist/engine/AgentEngine.js.map +1 -0
- package/dist/engine/AgentRegistry.d.ts +13 -0
- package/dist/engine/AgentRegistry.d.ts.map +1 -0
- package/dist/engine/AgentRegistry.js +37 -0
- package/dist/engine/AgentRegistry.js.map +1 -0
- package/dist/engine/IterationManager.d.ts +79 -0
- package/dist/engine/IterationManager.d.ts.map +1 -0
- package/dist/engine/IterationManager.js +103 -0
- package/dist/engine/IterationManager.js.map +1 -0
- package/dist/engine/ProviderRegistry.d.ts +10 -0
- package/dist/engine/ProviderRegistry.d.ts.map +1 -0
- package/dist/engine/ProviderRegistry.js +28 -0
- package/dist/engine/ProviderRegistry.js.map +1 -0
- package/dist/engine/ToolRegistry.d.ts +54 -0
- package/dist/engine/ToolRegistry.d.ts.map +1 -0
- package/dist/engine/ToolRegistry.js +75 -0
- package/dist/engine/ToolRegistry.js.map +1 -0
- package/dist/engine/createBaseEngine.d.ts +169 -0
- package/dist/engine/createBaseEngine.d.ts.map +1 -0
- package/dist/engine/createBaseEngine.js +91 -0
- package/dist/engine/createBaseEngine.js.map +1 -0
- package/dist/engine/qa-orchestrator.d.ts +56 -0
- package/dist/engine/qa-orchestrator.d.ts.map +1 -0
- package/dist/engine/qa-orchestrator.js +163 -0
- package/dist/engine/qa-orchestrator.js.map +1 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +163 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/MCPClientManager.d.ts +65 -0
- package/dist/mcp/MCPClientManager.d.ts.map +1 -0
- package/dist/mcp/MCPClientManager.js +211 -0
- package/dist/mcp/MCPClientManager.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +6 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/types.d.ts +121 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +3 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/memory/SessionMemory.d.ts +9 -0
- package/dist/memory/SessionMemory.d.ts.map +1 -0
- package/dist/memory/SessionMemory.js +20 -0
- package/dist/memory/SessionMemory.js.map +1 -0
- package/dist/observability/CostTracker.d.ts +19 -0
- package/dist/observability/CostTracker.d.ts.map +1 -0
- package/dist/observability/CostTracker.js +64 -0
- package/dist/observability/CostTracker.js.map +1 -0
- package/dist/observability/MetricsCollector.d.ts +17 -0
- package/dist/observability/MetricsCollector.d.ts.map +1 -0
- package/dist/observability/MetricsCollector.js +70 -0
- package/dist/observability/MetricsCollector.js.map +1 -0
- package/dist/observability/ObservabilityManager.d.ts +33 -0
- package/dist/observability/ObservabilityManager.d.ts.map +1 -0
- package/dist/observability/ObservabilityManager.js +107 -0
- package/dist/observability/ObservabilityManager.js.map +1 -0
- package/dist/observability/Tracer.d.ts +23 -0
- package/dist/observability/Tracer.d.ts.map +1 -0
- package/dist/observability/Tracer.js +65 -0
- package/dist/observability/Tracer.js.map +1 -0
- package/dist/observability/index.d.ts +7 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +14 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/types.d.ts +77 -0
- package/dist/observability/types.d.ts.map +1 -0
- package/dist/observability/types.js +15 -0
- package/dist/observability/types.js.map +1 -0
- package/dist/orchestration/audit/audit-ci-blocker.d.ts +31 -0
- package/dist/orchestration/audit/audit-ci-blocker.d.ts.map +1 -0
- package/dist/orchestration/audit/audit-ci-blocker.js +120 -0
- package/dist/orchestration/audit/audit-ci-blocker.js.map +1 -0
- package/dist/orchestration/audit/audit-finding-tracer.d.ts +33 -0
- package/dist/orchestration/audit/audit-finding-tracer.d.ts.map +1 -0
- package/dist/orchestration/audit/audit-finding-tracer.js +126 -0
- package/dist/orchestration/audit/audit-finding-tracer.js.map +1 -0
- package/dist/orchestration/audit/audit-lessons-learned.d.ts +27 -0
- package/dist/orchestration/audit/audit-lessons-learned.d.ts.map +1 -0
- package/dist/orchestration/audit/audit-lessons-learned.js +155 -0
- package/dist/orchestration/audit/audit-lessons-learned.js.map +1 -0
- package/dist/orchestration/audit/audit-pending-issues.d.ts +21 -0
- package/dist/orchestration/audit/audit-pending-issues.d.ts.map +1 -0
- package/dist/orchestration/audit/audit-pending-issues.js +110 -0
- package/dist/orchestration/audit/audit-pending-issues.js.map +1 -0
- package/dist/orchestration/audit/audit-reflection-bridge.d.ts +39 -0
- package/dist/orchestration/audit/audit-reflection-bridge.d.ts.map +1 -0
- package/dist/orchestration/audit/audit-reflection-bridge.js +65 -0
- package/dist/orchestration/audit/audit-reflection-bridge.js.map +1 -0
- package/dist/orchestration/audit/audit-report-renderer.d.ts +30 -0
- package/dist/orchestration/audit/audit-report-renderer.d.ts.map +1 -0
- package/dist/orchestration/audit/audit-report-renderer.js +249 -0
- package/dist/orchestration/audit/audit-report-renderer.js.map +1 -0
- package/dist/orchestration/audit/audit-report-version-manager.d.ts +52 -0
- package/dist/orchestration/audit/audit-report-version-manager.d.ts.map +1 -0
- package/dist/orchestration/audit/audit-report-version-manager.js +144 -0
- package/dist/orchestration/audit/audit-report-version-manager.js.map +1 -0
- package/dist/orchestration/audit/audit-silent-gates-buffer.d.ts +37 -0
- package/dist/orchestration/audit/audit-silent-gates-buffer.d.ts.map +1 -0
- package/dist/orchestration/audit/audit-silent-gates-buffer.js +129 -0
- package/dist/orchestration/audit/audit-silent-gates-buffer.js.map +1 -0
- package/dist/orchestration/audit/index.d.ts +17 -0
- package/dist/orchestration/audit/index.d.ts.map +1 -0
- package/dist/orchestration/audit/index.js +26 -0
- package/dist/orchestration/audit/index.js.map +1 -0
- package/dist/orchestration/audit/types.d.ts +79 -0
- package/dist/orchestration/audit/types.d.ts.map +1 -0
- package/dist/orchestration/audit/types.js +10 -0
- package/dist/orchestration/audit/types.js.map +1 -0
- package/dist/orchestration/audit-reporter.d.ts +133 -0
- package/dist/orchestration/audit-reporter.d.ts.map +1 -0
- package/dist/orchestration/audit-reporter.js +322 -0
- package/dist/orchestration/audit-reporter.js.map +1 -0
- package/dist/orchestration/config-loader.d.ts +51 -0
- package/dist/orchestration/config-loader.d.ts.map +1 -0
- package/dist/orchestration/config-loader.js +215 -0
- package/dist/orchestration/config-loader.js.map +1 -0
- package/dist/orchestration/domain-detector.d.ts +36 -0
- package/dist/orchestration/domain-detector.d.ts.map +1 -0
- package/dist/orchestration/domain-detector.js +157 -0
- package/dist/orchestration/domain-detector.js.map +1 -0
- package/dist/orchestration/fsm.d.ts +86 -0
- package/dist/orchestration/fsm.d.ts.map +1 -0
- package/dist/orchestration/fsm.js +223 -0
- package/dist/orchestration/fsm.js.map +1 -0
- package/dist/orchestration/gate-resolver.d.ts +42 -0
- package/dist/orchestration/gate-resolver.d.ts.map +1 -0
- package/dist/orchestration/gate-resolver.js +94 -0
- package/dist/orchestration/gate-resolver.js.map +1 -0
- package/dist/orchestration/index.d.ts +15 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +32 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/intent-detector.d.ts +43 -0
- package/dist/orchestration/intent-detector.d.ts.map +1 -0
- package/dist/orchestration/intent-detector.js +249 -0
- package/dist/orchestration/intent-detector.js.map +1 -0
- package/dist/orchestration/keyword-match.d.ts +17 -0
- package/dist/orchestration/keyword-match.d.ts.map +1 -0
- package/dist/orchestration/keyword-match.js +26 -0
- package/dist/orchestration/keyword-match.js.map +1 -0
- package/dist/orchestration/llm-client-adapter.d.ts +11 -0
- package/dist/orchestration/llm-client-adapter.d.ts.map +1 -0
- package/dist/orchestration/llm-client-adapter.js +30 -0
- package/dist/orchestration/llm-client-adapter.js.map +1 -0
- package/dist/orchestration/orchestrator.d.ts +153 -0
- package/dist/orchestration/orchestrator.d.ts.map +1 -0
- package/dist/orchestration/orchestrator.js +471 -0
- package/dist/orchestration/orchestrator.js.map +1 -0
- package/dist/orchestration/policy-engine.d.ts +47 -0
- package/dist/orchestration/policy-engine.d.ts.map +1 -0
- package/dist/orchestration/policy-engine.js +262 -0
- package/dist/orchestration/policy-engine.js.map +1 -0
- package/dist/orchestration/risk-scorer.d.ts +38 -0
- package/dist/orchestration/risk-scorer.d.ts.map +1 -0
- package/dist/orchestration/risk-scorer.js +145 -0
- package/dist/orchestration/risk-scorer.js.map +1 -0
- package/dist/orchestration/task-context.d.ts +195 -0
- package/dist/orchestration/task-context.d.ts.map +1 -0
- package/dist/orchestration/task-context.js +160 -0
- package/dist/orchestration/task-context.js.map +1 -0
- package/dist/orchestration/types.d.ts +111 -0
- package/dist/orchestration/types.d.ts.map +1 -0
- package/dist/orchestration/types.js +37 -0
- package/dist/orchestration/types.js.map +1 -0
- package/dist/qa/index.d.ts +3 -0
- package/dist/qa/index.d.ts.map +1 -0
- package/dist/qa/index.js +6 -0
- package/dist/qa/index.js.map +1 -0
- package/dist/qa/qa-service.d.ts +30 -0
- package/dist/qa/qa-service.d.ts.map +1 -0
- package/dist/qa/qa-service.js +200 -0
- package/dist/qa/qa-service.js.map +1 -0
- package/dist/reflection/commands/domain-commands.d.ts +78 -0
- package/dist/reflection/commands/domain-commands.d.ts.map +1 -0
- package/dist/reflection/commands/domain-commands.js +203 -0
- package/dist/reflection/commands/domain-commands.js.map +1 -0
- package/dist/reflection/domain-registry.d.ts +104 -0
- package/dist/reflection/domain-registry.d.ts.map +1 -0
- package/dist/reflection/domain-registry.js +279 -0
- package/dist/reflection/domain-registry.js.map +1 -0
- package/dist/reflection/domains/agent-domain.d.ts +40 -0
- package/dist/reflection/domains/agent-domain.d.ts.map +1 -0
- package/dist/reflection/domains/agent-domain.js +161 -0
- package/dist/reflection/domains/agent-domain.js.map +1 -0
- package/dist/reflection/domains/audit-domain.d.ts +46 -0
- package/dist/reflection/domains/audit-domain.d.ts.map +1 -0
- package/dist/reflection/domains/audit-domain.js +241 -0
- package/dist/reflection/domains/audit-domain.js.map +1 -0
- package/dist/reflection/domains/bootstrap-domain.d.ts +40 -0
- package/dist/reflection/domains/bootstrap-domain.d.ts.map +1 -0
- package/dist/reflection/domains/bootstrap-domain.js +156 -0
- package/dist/reflection/domains/bootstrap-domain.js.map +1 -0
- package/dist/reflection/domains/commit-domain.d.ts +40 -0
- package/dist/reflection/domains/commit-domain.d.ts.map +1 -0
- package/dist/reflection/domains/commit-domain.js +174 -0
- package/dist/reflection/domains/commit-domain.js.map +1 -0
- package/dist/reflection/domains/test-domain.d.ts +40 -0
- package/dist/reflection/domains/test-domain.d.ts.map +1 -0
- package/dist/reflection/domains/test-domain.js +194 -0
- package/dist/reflection/domains/test-domain.js.map +1 -0
- package/dist/reflection/failure-catalog.d.ts +100 -0
- package/dist/reflection/failure-catalog.d.ts.map +1 -0
- package/dist/reflection/failure-catalog.js +269 -0
- package/dist/reflection/failure-catalog.js.map +1 -0
- package/dist/reflection/historical-loader.d.ts +105 -0
- package/dist/reflection/historical-loader.d.ts.map +1 -0
- package/dist/reflection/historical-loader.js +462 -0
- package/dist/reflection/historical-loader.js.map +1 -0
- package/dist/reflection/hooks/agent-hook.d.ts +72 -0
- package/dist/reflection/hooks/agent-hook.d.ts.map +1 -0
- package/dist/reflection/hooks/agent-hook.js +98 -0
- package/dist/reflection/hooks/agent-hook.js.map +1 -0
- package/dist/reflection/hooks/audit-hook.d.ts +72 -0
- package/dist/reflection/hooks/audit-hook.d.ts.map +1 -0
- package/dist/reflection/hooks/audit-hook.js +112 -0
- package/dist/reflection/hooks/audit-hook.js.map +1 -0
- package/dist/reflection/hooks/bootstrap-hook.d.ts +71 -0
- package/dist/reflection/hooks/bootstrap-hook.d.ts.map +1 -0
- package/dist/reflection/hooks/bootstrap-hook.js +97 -0
- package/dist/reflection/hooks/bootstrap-hook.js.map +1 -0
- package/dist/reflection/hooks/commit-hook.d.ts +63 -0
- package/dist/reflection/hooks/commit-hook.d.ts.map +1 -0
- package/dist/reflection/hooks/commit-hook.js +90 -0
- package/dist/reflection/hooks/commit-hook.js.map +1 -0
- package/dist/reflection/hooks/test-hook.d.ts +65 -0
- package/dist/reflection/hooks/test-hook.d.ts.map +1 -0
- package/dist/reflection/hooks/test-hook.js +99 -0
- package/dist/reflection/hooks/test-hook.js.map +1 -0
- package/dist/reflection/index.d.ts +19 -0
- package/dist/reflection/index.d.ts.map +1 -0
- package/dist/reflection/index.js +40 -0
- package/dist/reflection/index.js.map +1 -0
- package/dist/reflection/lessons-memo-generator.d.ts +60 -0
- package/dist/reflection/lessons-memo-generator.d.ts.map +1 -0
- package/dist/reflection/lessons-memo-generator.js +286 -0
- package/dist/reflection/lessons-memo-generator.js.map +1 -0
- package/dist/reflection/pattern-detector.d.ts +55 -0
- package/dist/reflection/pattern-detector.d.ts.map +1 -0
- package/dist/reflection/pattern-detector.js +137 -0
- package/dist/reflection/pattern-detector.js.map +1 -0
- package/dist/reflection/policy-promoter.d.ts +86 -0
- package/dist/reflection/policy-promoter.d.ts.map +1 -0
- package/dist/reflection/policy-promoter.js +382 -0
- package/dist/reflection/policy-promoter.js.map +1 -0
- package/dist/reflection/reflection-engine.d.ts +160 -0
- package/dist/reflection/reflection-engine.d.ts.map +1 -0
- package/dist/reflection/reflection-engine.js +352 -0
- package/dist/reflection/reflection-engine.js.map +1 -0
- package/dist/reflection/types.d.ts +106 -0
- package/dist/reflection/types.d.ts.map +1 -0
- package/dist/reflection/types.js +64 -0
- package/dist/reflection/types.js.map +1 -0
- package/dist/shared/llm/resilient-client.d.ts +40 -0
- package/dist/shared/llm/resilient-client.d.ts.map +1 -0
- package/dist/shared/llm/resilient-client.js +60 -0
- package/dist/shared/llm/resilient-client.js.map +1 -0
- package/dist/shared/utils/atomic-write.d.ts +7 -0
- package/dist/shared/utils/atomic-write.d.ts.map +1 -0
- package/dist/shared/utils/atomic-write.js +52 -0
- package/dist/shared/utils/atomic-write.js.map +1 -0
- package/dist/shared/utils/git.d.ts +2 -0
- package/dist/shared/utils/git.d.ts.map +1 -0
- package/dist/shared/utils/git.js +17 -0
- package/dist/shared/utils/git.js.map +1 -0
- package/dist/shared/utils/project-key.d.ts +4 -0
- package/dist/shared/utils/project-key.d.ts.map +1 -0
- package/dist/shared/utils/project-key.js +54 -0
- package/dist/shared/utils/project-key.js.map +1 -0
- package/dist/shared/utils/string-utils.d.ts +17 -0
- package/dist/shared/utils/string-utils.d.ts.map +1 -0
- package/dist/shared/utils/string-utils.js +37 -0
- package/dist/shared/utils/string-utils.js.map +1 -0
- package/dist/skills/activator.d.ts +27 -0
- package/dist/skills/activator.d.ts.map +1 -0
- package/dist/skills/activator.js +127 -0
- package/dist/skills/activator.js.map +1 -0
- package/dist/skills/builtins/global.d.ts +7 -0
- package/dist/skills/builtins/global.d.ts.map +1 -0
- package/dist/skills/builtins/global.js +208 -0
- package/dist/skills/builtins/global.js.map +1 -0
- package/dist/skills/builtins/go-pack.d.ts +7 -0
- package/dist/skills/builtins/go-pack.d.ts.map +1 -0
- package/dist/skills/builtins/go-pack.js +263 -0
- package/dist/skills/builtins/go-pack.js.map +1 -0
- package/dist/skills/builtins/java-pack.d.ts +7 -0
- package/dist/skills/builtins/java-pack.d.ts.map +1 -0
- package/dist/skills/builtins/java-pack.js +272 -0
- package/dist/skills/builtins/java-pack.js.map +1 -0
- package/dist/skills/builtins/kotlin-pack.d.ts +9 -0
- package/dist/skills/builtins/kotlin-pack.d.ts.map +1 -0
- package/dist/skills/builtins/kotlin-pack.js +292 -0
- package/dist/skills/builtins/kotlin-pack.js.map +1 -0
- package/dist/skills/builtins/node-pack.d.ts +7 -0
- package/dist/skills/builtins/node-pack.d.ts.map +1 -0
- package/dist/skills/builtins/node-pack.js +750 -0
- package/dist/skills/builtins/node-pack.js.map +1 -0
- package/dist/skills/builtins/python-pack.d.ts +7 -0
- package/dist/skills/builtins/python-pack.d.ts.map +1 -0
- package/dist/skills/builtins/python-pack.js +303 -0
- package/dist/skills/builtins/python-pack.js.map +1 -0
- package/dist/skills/index.d.ts +11 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +24 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/loader.d.ts +39 -0
- package/dist/skills/loader.d.ts.map +1 -0
- package/dist/skills/loader.js +152 -0
- package/dist/skills/loader.js.map +1 -0
- package/dist/skills/manager.d.ts +97 -0
- package/dist/skills/manager.d.ts.map +1 -0
- package/dist/skills/manager.js +296 -0
- package/dist/skills/manager.js.map +1 -0
- package/dist/skills/parse-md-skill.d.ts +14 -0
- package/dist/skills/parse-md-skill.d.ts.map +1 -0
- package/dist/skills/parse-md-skill.js +86 -0
- package/dist/skills/parse-md-skill.js.map +1 -0
- package/dist/skills/providers/github.d.ts +21 -0
- package/dist/skills/providers/github.d.ts.map +1 -0
- package/dist/skills/providers/github.js +146 -0
- package/dist/skills/providers/github.js.map +1 -0
- package/dist/skills/providers/index.d.ts +6 -0
- package/dist/skills/providers/index.d.ts.map +1 -0
- package/dist/skills/providers/index.js +12 -0
- package/dist/skills/providers/index.js.map +1 -0
- package/dist/skills/providers/local.d.ts +16 -0
- package/dist/skills/providers/local.d.ts.map +1 -0
- package/dist/skills/providers/local.js +91 -0
- package/dist/skills/providers/local.js.map +1 -0
- package/dist/skills/providers/obsidian.d.ts +31 -0
- package/dist/skills/providers/obsidian.d.ts.map +1 -0
- package/dist/skills/providers/obsidian.js +141 -0
- package/dist/skills/providers/obsidian.js.map +1 -0
- package/dist/skills/providers/skills-sh.d.ts +32 -0
- package/dist/skills/providers/skills-sh.d.ts.map +1 -0
- package/dist/skills/providers/skills-sh.js +53 -0
- package/dist/skills/providers/skills-sh.js.map +1 -0
- package/dist/skills/providers/types.d.ts +25 -0
- package/dist/skills/providers/types.d.ts.map +1 -0
- package/dist/skills/providers/types.js +3 -0
- package/dist/skills/providers/types.js.map +1 -0
- package/dist/skills/registry.d.ts +18 -0
- package/dist/skills/registry.d.ts.map +1 -0
- package/dist/skills/registry.js +45 -0
- package/dist/skills/registry.js.map +1 -0
- package/dist/skills/types.d.ts +66 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js +3 -0
- package/dist/skills/types.js.map +1 -0
- package/dist/tools/defineTool.d.ts +34 -0
- package/dist/tools/defineTool.d.ts.map +1 -0
- package/dist/tools/defineTool.js +63 -0
- package/dist/tools/defineTool.js.map +1 -0
- package/dist/transport/CallbackTransport.d.ts +12 -0
- package/dist/transport/CallbackTransport.d.ts.map +1 -0
- package/dist/transport/CallbackTransport.js +28 -0
- package/dist/transport/CallbackTransport.js.map +1 -0
- package/dist/transport/StdoutTransport.d.ts +9 -0
- package/dist/transport/StdoutTransport.d.ts.map +1 -0
- package/dist/transport/StdoutTransport.js +63 -0
- package/dist/transport/StdoutTransport.js.map +1 -0
- package/dist/transport/Transport.d.ts +8 -0
- package/dist/transport/Transport.d.ts.map +1 -0
- package/dist/transport/Transport.js +3 -0
- package/dist/transport/Transport.js.map +1 -0
- package/dist/triggers/EventBus.d.ts +14 -0
- package/dist/triggers/EventBus.d.ts.map +1 -0
- package/dist/triggers/EventBus.js +18 -0
- package/dist/triggers/EventBus.js.map +1 -0
- package/dist/triggers/TriggerManager.d.ts +28 -0
- package/dist/triggers/TriggerManager.d.ts.map +1 -0
- package/dist/triggers/TriggerManager.js +158 -0
- package/dist/triggers/TriggerManager.js.map +1 -0
- package/dist/triggers/WebhookServer.d.ts +23 -0
- package/dist/triggers/WebhookServer.d.ts.map +1 -0
- package/dist/triggers/WebhookServer.js +127 -0
- package/dist/triggers/WebhookServer.js.map +1 -0
- package/dist/triggers/createAutonomousAgent.d.ts +49 -0
- package/dist/triggers/createAutonomousAgent.d.ts.map +1 -0
- package/dist/triggers/createAutonomousAgent.js +42 -0
- package/dist/triggers/createAutonomousAgent.js.map +1 -0
- package/dist/triggers/index.d.ts +8 -0
- package/dist/triggers/index.d.ts.map +1 -0
- package/dist/triggers/index.js +12 -0
- package/dist/triggers/index.js.map +1 -0
- package/dist/triggers/types.d.ts +35 -0
- package/dist/triggers/types.d.ts.map +1 -0
- package/dist/triggers/types.js +3 -0
- package/dist/triggers/types.js.map +1 -0
- package/dist/types/index.d.ts +256 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/workflow/WorkflowBuilder.d.ts +22 -0
- package/dist/workflow/WorkflowBuilder.d.ts.map +1 -0
- package/dist/workflow/WorkflowBuilder.js +67 -0
- package/dist/workflow/WorkflowBuilder.js.map +1 -0
- package/dist/workflow/WorkflowRunner.d.ts +22 -0
- package/dist/workflow/WorkflowRunner.d.ts.map +1 -0
- package/dist/workflow/WorkflowRunner.js +97 -0
- package/dist/workflow/WorkflowRunner.js.map +1 -0
- package/dist/workflow/index.d.ts +5 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +10 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/types.d.ts +35 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow/types.js +3 -0
- package/dist/workflow/types.js.map +1 -0
- package/dist/workspace/index.d.ts +55 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +189 -0
- package/dist/workspace/index.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KOTLIN_PACK_SKILLS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Kotlin / Android skill pack (@bk-kotlin).
|
|
6
|
+
* Activated for projects with build.gradle containing kotlin plugin,
|
|
7
|
+
* detected via 'kotlin' stack (same indicator as java but differentiated
|
|
8
|
+
* by triggers and stack field).
|
|
9
|
+
*/
|
|
10
|
+
exports.KOTLIN_PACK_SKILLS = [
|
|
11
|
+
{
|
|
12
|
+
name: 'kotlin-coroutines',
|
|
13
|
+
version: '1.0.0',
|
|
14
|
+
description: 'Kotlin coroutines: suspend functions, Flow, coroutine scopes and error handling',
|
|
15
|
+
scope: 'pack',
|
|
16
|
+
pack: '@bk-kotlin',
|
|
17
|
+
language: ['kotlin'],
|
|
18
|
+
triggers: [
|
|
19
|
+
'coroutine', 'coroutines', 'suspend', 'flow', 'stateflow', 'sharedflow',
|
|
20
|
+
'async', 'launch', 'withcontext', 'dispatcher', 'scope', 'job',
|
|
21
|
+
'concurrencia', 'concurrency', 'asincrono', 'asynchronous',
|
|
22
|
+
],
|
|
23
|
+
systemPromptAddition: `## Kotlin Coroutines
|
|
24
|
+
|
|
25
|
+
### Suspend functions — siempre en el scope correcto
|
|
26
|
+
\`\`\`kotlin
|
|
27
|
+
// Repository
|
|
28
|
+
suspend fun findById(id: String): User? = withContext(Dispatchers.IO) {
|
|
29
|
+
db.userDao().findById(id)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ViewModel
|
|
33
|
+
viewModelScope.launch {
|
|
34
|
+
_uiState.value = UiState.Loading
|
|
35
|
+
runCatching { repository.findById(id) }
|
|
36
|
+
.onSuccess { _uiState.value = UiState.Success(it) }
|
|
37
|
+
.onFailure { _uiState.value = UiState.Error(it.message) }
|
|
38
|
+
}
|
|
39
|
+
\`\`\`
|
|
40
|
+
|
|
41
|
+
### Flow para streams de datos
|
|
42
|
+
\`\`\`kotlin
|
|
43
|
+
// Repository — expone Flow
|
|
44
|
+
fun observeUsers(): Flow<List<User>> = db.userDao().observeAll()
|
|
45
|
+
|
|
46
|
+
// ViewModel — convierte a StateFlow
|
|
47
|
+
val users: StateFlow<List<User>> = repository.observeUsers()
|
|
48
|
+
.stateIn(
|
|
49
|
+
scope = viewModelScope,
|
|
50
|
+
started = SharingStarted.WhileSubscribed(5_000),
|
|
51
|
+
initialValue = emptyList(),
|
|
52
|
+
)
|
|
53
|
+
\`\`\`
|
|
54
|
+
|
|
55
|
+
### Manejo de errores en Flow
|
|
56
|
+
\`\`\`kotlin
|
|
57
|
+
repository.observeUsers()
|
|
58
|
+
.catch { emit(emptyList()) } // recupera de errores
|
|
59
|
+
.collect { users -> ... }
|
|
60
|
+
\`\`\`
|
|
61
|
+
|
|
62
|
+
### Dispatchers
|
|
63
|
+
| Dispatcher | Uso |
|
|
64
|
+
|---|---|
|
|
65
|
+
| \`Dispatchers.Main\` | UI, actualizar estado |
|
|
66
|
+
| \`Dispatchers.IO\` | Red, disco, base de datos |
|
|
67
|
+
| \`Dispatchers.Default\` | CPU-intensivo (sort, parse) |
|
|
68
|
+
|
|
69
|
+
### Reglas
|
|
70
|
+
- Usa \`viewModelScope\` en ViewModels — se cancela automáticamente al limpiar
|
|
71
|
+
- Usa \`lifecycleScope\` en Activities/Fragments — respeta el lifecycle
|
|
72
|
+
- Nunca uses \`GlobalScope\` — no se cancela automáticamente
|
|
73
|
+
- Prefiere \`StateFlow\` sobre \`LiveData\` en código nuevo`,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'compose-patterns',
|
|
77
|
+
version: '1.0.0',
|
|
78
|
+
description: 'Jetpack Compose: composable functions, state hoisting, side effects',
|
|
79
|
+
scope: 'pack',
|
|
80
|
+
pack: '@bk-kotlin',
|
|
81
|
+
language: ['kotlin'],
|
|
82
|
+
triggers: [
|
|
83
|
+
'compose', 'composable', 'jetpack compose', 'ui', 'pantalla', 'screen',
|
|
84
|
+
'remember', 'state', 'recomposition', 'launchedeffect', 'sideeffect',
|
|
85
|
+
'column', 'row', 'box', 'modifier', 'material', 'scaffold',
|
|
86
|
+
],
|
|
87
|
+
systemPromptAddition: `## Jetpack Compose
|
|
88
|
+
|
|
89
|
+
### State hoisting — separa lógica de presentación
|
|
90
|
+
\`\`\`kotlin
|
|
91
|
+
// Stateless (reutilizable, testeable)
|
|
92
|
+
@Composable
|
|
93
|
+
fun UserCard(user: User, onDelete: () -> Unit, modifier: Modifier = Modifier) {
|
|
94
|
+
Card(modifier = modifier) {
|
|
95
|
+
Text(user.name)
|
|
96
|
+
IconButton(onClick = onDelete) { Icon(Icons.Default.Delete, null) }
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Stateful (pantalla completa, conectada al ViewModel)
|
|
101
|
+
@Composable
|
|
102
|
+
fun UserScreen(viewModel: UserViewModel = hiltViewModel()) {
|
|
103
|
+
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
|
|
104
|
+
|
|
105
|
+
when (val state = uiState) {
|
|
106
|
+
is UiState.Loading -> CircularProgressIndicator()
|
|
107
|
+
is UiState.Success -> UserCard(state.user, onDelete = viewModel::delete)
|
|
108
|
+
is UiState.Error -> Text("Error: \${state.message}")
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
\`\`\`
|
|
112
|
+
|
|
113
|
+
### Side effects
|
|
114
|
+
\`\`\`kotlin
|
|
115
|
+
// LaunchedEffect — coroutine atada al lifecycle del composable
|
|
116
|
+
LaunchedEffect(userId) { // se relanza si userId cambia
|
|
117
|
+
viewModel.loadUser(userId)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// DisposableEffect — recursos que necesitan cleanup
|
|
121
|
+
DisposableEffect(Unit) {
|
|
122
|
+
val callback = registerCallback()
|
|
123
|
+
onDispose { callback.unregister() }
|
|
124
|
+
}
|
|
125
|
+
\`\`\`
|
|
126
|
+
|
|
127
|
+
### Modifier — siempre como último parámetro con default
|
|
128
|
+
\`\`\`kotlin
|
|
129
|
+
@Composable
|
|
130
|
+
fun MyComponent(
|
|
131
|
+
title: String,
|
|
132
|
+
modifier: Modifier = Modifier, // convención de Compose
|
|
133
|
+
) { ... }
|
|
134
|
+
\`\`\`
|
|
135
|
+
|
|
136
|
+
### Reglas
|
|
137
|
+
- Funciones composable en PascalCase, sin retorno de valor
|
|
138
|
+
- Hoist el state tan arriba como sea necesario — no más
|
|
139
|
+
- Evita lógica de negocio en composables — solo UI
|
|
140
|
+
- Usa \`collectAsStateWithLifecycle()\` (no \`collectAsState()\`) para respetar el lifecycle`,
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'android-architecture',
|
|
144
|
+
version: '1.0.0',
|
|
145
|
+
description: 'Android Clean Architecture: ViewModel + StateFlow + Repository pattern + Hilt',
|
|
146
|
+
scope: 'pack',
|
|
147
|
+
pack: '@bk-kotlin',
|
|
148
|
+
language: ['kotlin'],
|
|
149
|
+
triggers: [
|
|
150
|
+
'viewmodel', 'repository', 'usecase', 'use case', 'arquitectura',
|
|
151
|
+
'architecture', 'hilt', 'dependency injection', 'inyeccion', 'clean',
|
|
152
|
+
'room', 'retrofit', 'navigation', 'module',
|
|
153
|
+
],
|
|
154
|
+
systemPromptAddition: `## Android Clean Architecture
|
|
155
|
+
|
|
156
|
+
### Capas
|
|
157
|
+
\`\`\`
|
|
158
|
+
UI (Composables)
|
|
159
|
+
↓ observe StateFlow
|
|
160
|
+
ViewModel (viewModelScope)
|
|
161
|
+
↓ suspend fun / Flow
|
|
162
|
+
Repository (interface en domain, impl en data)
|
|
163
|
+
↓
|
|
164
|
+
DataSource (Room DAO / Retrofit API)
|
|
165
|
+
\`\`\`
|
|
166
|
+
|
|
167
|
+
### ViewModel con StateFlow
|
|
168
|
+
\`\`\`kotlin
|
|
169
|
+
@HiltViewModel
|
|
170
|
+
class UserViewModel @Inject constructor(
|
|
171
|
+
private val userRepository: UserRepository,
|
|
172
|
+
) : ViewModel() {
|
|
173
|
+
|
|
174
|
+
private val _uiState = MutableStateFlow<UiState<User>>(UiState.Loading)
|
|
175
|
+
val uiState: StateFlow<UiState<User>> = _uiState.asStateFlow()
|
|
176
|
+
|
|
177
|
+
fun loadUser(id: String) {
|
|
178
|
+
viewModelScope.launch {
|
|
179
|
+
_uiState.value = UiState.Loading
|
|
180
|
+
userRepository.findById(id)
|
|
181
|
+
.onSuccess { _uiState.value = UiState.Success(it) }
|
|
182
|
+
.onFailure { _uiState.value = UiState.Error(it.message ?: "Unknown error") }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
sealed class UiState<out T> {
|
|
188
|
+
data object Loading : UiState<Nothing>()
|
|
189
|
+
data class Success<T>(val data: T) : UiState<T>()
|
|
190
|
+
data class Error(val message: String) : UiState<Nothing>()
|
|
191
|
+
}
|
|
192
|
+
\`\`\`
|
|
193
|
+
|
|
194
|
+
### Repository
|
|
195
|
+
\`\`\`kotlin
|
|
196
|
+
// Interface en domain (sin dependencias Android)
|
|
197
|
+
interface UserRepository {
|
|
198
|
+
suspend fun findById(id: String): Result<User>
|
|
199
|
+
fun observeAll(): Flow<List<User>>
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Implementación en data
|
|
203
|
+
class UserRepositoryImpl @Inject constructor(
|
|
204
|
+
private val dao: UserDao,
|
|
205
|
+
private val api: UserApi,
|
|
206
|
+
) : UserRepository {
|
|
207
|
+
override suspend fun findById(id: String): Result<User> = runCatching {
|
|
208
|
+
dao.findById(id) ?: api.getUser(id).also { dao.insert(it) }
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
\`\`\`
|
|
212
|
+
|
|
213
|
+
### Hilt modules
|
|
214
|
+
\`\`\`kotlin
|
|
215
|
+
@Module
|
|
216
|
+
@InstallIn(SingletonComponent::class)
|
|
217
|
+
abstract class RepositoryModule {
|
|
218
|
+
@Binds @Singleton
|
|
219
|
+
abstract fun bindUserRepo(impl: UserRepositoryImpl): UserRepository
|
|
220
|
+
}
|
|
221
|
+
\`\`\`
|
|
222
|
+
|
|
223
|
+
### Reglas
|
|
224
|
+
- ViewModels no importan clases Android (Context, Activity) — solo lógica
|
|
225
|
+
- Repository oculta la fuente de datos (Room vs API) — el ViewModel no sabe de dónde vienen los datos
|
|
226
|
+
- Usa \`Result<T>\` para operaciones que pueden fallar
|
|
227
|
+
- Room: NUNCA accedas a la base de datos desde el main thread`,
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'kotlin-testing',
|
|
231
|
+
version: '1.0.0',
|
|
232
|
+
description: 'Kotlin testing: JUnit 5, MockK, Turbine for Flow, coroutine test utilities',
|
|
233
|
+
scope: 'pack',
|
|
234
|
+
pack: '@bk-kotlin',
|
|
235
|
+
language: ['kotlin'],
|
|
236
|
+
triggers: [
|
|
237
|
+
'test', 'tests', 'testing', 'prueba', 'mockk', 'mock', 'turbine',
|
|
238
|
+
'coroutinetest', 'junit', 'coevery', 'coassert', 'coverage',
|
|
239
|
+
],
|
|
240
|
+
systemPromptAddition: `## Kotlin Testing
|
|
241
|
+
|
|
242
|
+
### Test de ViewModel con Turbine (Flow)
|
|
243
|
+
\`\`\`kotlin
|
|
244
|
+
@OptIn(ExperimentalCoroutinesApi::class)
|
|
245
|
+
class UserViewModelTest {
|
|
246
|
+
@get:Rule val mainRule = MainCoroutineRule() // reemplaza Dispatchers.Main
|
|
247
|
+
|
|
248
|
+
private val repository: UserRepository = mockk()
|
|
249
|
+
private lateinit var viewModel: UserViewModel
|
|
250
|
+
|
|
251
|
+
@BeforeEach fun setup() { viewModel = UserViewModel(repository) }
|
|
252
|
+
|
|
253
|
+
@Test fun \`loadUser emits Success when repository returns user\`() = runTest {
|
|
254
|
+
val user = User("1", "ana@example.com")
|
|
255
|
+
coEvery { repository.findById("1") } returns Result.success(user)
|
|
256
|
+
|
|
257
|
+
viewModel.uiState.test {
|
|
258
|
+
viewModel.loadUser("1")
|
|
259
|
+
assertThat(awaitItem()).isInstanceOf(UiState.Loading::class.java)
|
|
260
|
+
assertThat(awaitItem()).isEqualTo(UiState.Success(user))
|
|
261
|
+
cancelAndIgnoreRemainingEvents()
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
\`\`\`
|
|
266
|
+
|
|
267
|
+
### MainCoroutineRule (para tests con Dispatchers.Main)
|
|
268
|
+
\`\`\`kotlin
|
|
269
|
+
class MainCoroutineRule : TestWatcher() {
|
|
270
|
+
val testDispatcher = UnconfinedTestDispatcher()
|
|
271
|
+
override fun starting(d: Description) { Dispatchers.setMain(testDispatcher) }
|
|
272
|
+
override fun finished(d: Description) { Dispatchers.resetMain() }
|
|
273
|
+
}
|
|
274
|
+
\`\`\`
|
|
275
|
+
|
|
276
|
+
### Mock con MockK
|
|
277
|
+
\`\`\`kotlin
|
|
278
|
+
val repo: UserRepository = mockk()
|
|
279
|
+
coEvery { repo.findById(any()) } returns Result.success(user) // suspend fun
|
|
280
|
+
every { repo.observeAll() } returns flowOf(listOf(user)) // Flow
|
|
281
|
+
|
|
282
|
+
coVerify { repo.findById("1") }
|
|
283
|
+
\`\`\`
|
|
284
|
+
|
|
285
|
+
### Reglas
|
|
286
|
+
- Usa \`runTest\` para tests de coroutines — maneja automáticamente los dispatchers de test
|
|
287
|
+
- Usa Turbine para testear Flow (\`flow.test { ... }\`)
|
|
288
|
+
- Usa MockK (no Mockito) para mocks en Kotlin — soporte nativo de suspend/coroutines
|
|
289
|
+
- Nombra los tests con backticks: \`\`fun \`loads user when id is valid\`()\`\``,
|
|
290
|
+
},
|
|
291
|
+
];
|
|
292
|
+
//# sourceMappingURL=kotlin-pack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kotlin-pack.js","sourceRoot":"","sources":["../../../src/skills/builtins/kotlin-pack.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACU,QAAA,kBAAkB,GAAY;IACvC;QACI,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,iFAAiF;QAC9F,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,QAAQ,EAAE;YACN,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY;YACvE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK;YAC9D,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc;SAC7D;QACD,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4DAkD8B;KACvD;IACD;QACI,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,qEAAqE;QAClF,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,QAAQ,EAAE;YACN,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ;YACtE,UAAU,EAAE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY;YACpE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;SAC7D;QACD,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6FAqD+D;KACxF;IACD;QACI,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,+EAA+E;QAC5F,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,QAAQ,EAAE;YACN,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc;YAChE,cAAc,EAAE,MAAM,EAAE,sBAAsB,EAAE,WAAW,EAAE,OAAO;YACpE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ;SAC7C;QACD,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAyEgC;KACzD;IACD;QACI,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,4EAA4E;QACzF,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,QAAQ,EAAE;YACN,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS;YAChE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU;SAC9D;QACD,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gFAiDkD;KAC3E;CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-pack.d.ts","sourceRoot":"","sources":["../../../src/skills/builtins/node-pack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,EAquBnC,CAAC"}
|