0agent 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -0
- package/bin/0agent.js +614 -0
- package/package.json +59 -0
- package/packages/core/dist/bootstrap/BootstrapProtocol.d.ts +37 -0
- package/packages/core/dist/bootstrap/BootstrapProtocol.d.ts.map +1 -0
- package/packages/core/dist/bootstrap/BootstrapProtocol.js +82 -0
- package/packages/core/dist/bootstrap/BootstrapProtocol.js.map +1 -0
- package/packages/core/dist/bootstrap/GraphConstructor.d.ts +44 -0
- package/packages/core/dist/bootstrap/GraphConstructor.d.ts.map +1 -0
- package/packages/core/dist/bootstrap/GraphConstructor.js +160 -0
- package/packages/core/dist/bootstrap/GraphConstructor.js.map +1 -0
- package/packages/core/dist/bootstrap/HypothesisManager.d.ts +50 -0
- package/packages/core/dist/bootstrap/HypothesisManager.d.ts.map +1 -0
- package/packages/core/dist/bootstrap/HypothesisManager.js +108 -0
- package/packages/core/dist/bootstrap/HypothesisManager.js.map +1 -0
- package/packages/core/dist/bootstrap/StagedMutations.d.ts +50 -0
- package/packages/core/dist/bootstrap/StagedMutations.d.ts.map +1 -0
- package/packages/core/dist/bootstrap/StagedMutations.js +80 -0
- package/packages/core/dist/bootstrap/StagedMutations.js.map +1 -0
- package/packages/core/dist/concurrency/EdgeWeightUpdater.d.ts +16 -0
- package/packages/core/dist/concurrency/EdgeWeightUpdater.d.ts.map +1 -0
- package/packages/core/dist/concurrency/EdgeWeightUpdater.js +57 -0
- package/packages/core/dist/concurrency/EdgeWeightUpdater.js.map +1 -0
- package/packages/core/dist/concurrency/SessionSnapshot.d.ts +63 -0
- package/packages/core/dist/concurrency/SessionSnapshot.d.ts.map +1 -0
- package/packages/core/dist/concurrency/SessionSnapshot.js +124 -0
- package/packages/core/dist/concurrency/SessionSnapshot.js.map +1 -0
- package/packages/core/dist/embedding/HNSWIndex.d.ts +37 -0
- package/packages/core/dist/embedding/HNSWIndex.d.ts.map +1 -0
- package/packages/core/dist/embedding/HNSWIndex.js +86 -0
- package/packages/core/dist/embedding/HNSWIndex.js.map +1 -0
- package/packages/core/dist/embedding/MultimodalEmbedder.d.ts +24 -0
- package/packages/core/dist/embedding/MultimodalEmbedder.d.ts.map +1 -0
- package/packages/core/dist/embedding/MultimodalEmbedder.js +75 -0
- package/packages/core/dist/embedding/MultimodalEmbedder.js.map +1 -0
- package/packages/core/dist/embedding/adapters/NomicAdapter.d.ts +7 -0
- package/packages/core/dist/embedding/adapters/NomicAdapter.d.ts.map +1 -0
- package/packages/core/dist/embedding/adapters/NomicAdapter.js +11 -0
- package/packages/core/dist/embedding/adapters/NomicAdapter.js.map +1 -0
- package/packages/core/dist/embedding/adapters/OllamaAdapter.d.ts +19 -0
- package/packages/core/dist/embedding/adapters/OllamaAdapter.d.ts.map +1 -0
- package/packages/core/dist/embedding/adapters/OllamaAdapter.js +27 -0
- package/packages/core/dist/embedding/adapters/OllamaAdapter.js.map +1 -0
- package/packages/core/dist/embedding/adapters/OpenAIAdapter.d.ts +14 -0
- package/packages/core/dist/embedding/adapters/OpenAIAdapter.d.ts.map +1 -0
- package/packages/core/dist/embedding/adapters/OpenAIAdapter.js +48 -0
- package/packages/core/dist/embedding/adapters/OpenAIAdapter.js.map +1 -0
- package/packages/core/dist/engine/CreditAttribution.d.ts +47 -0
- package/packages/core/dist/engine/CreditAttribution.d.ts.map +1 -0
- package/packages/core/dist/engine/CreditAttribution.js +196 -0
- package/packages/core/dist/engine/CreditAttribution.js.map +1 -0
- package/packages/core/dist/engine/DecayScheduler.d.ts +45 -0
- package/packages/core/dist/engine/DecayScheduler.d.ts.map +1 -0
- package/packages/core/dist/engine/DecayScheduler.js +115 -0
- package/packages/core/dist/engine/DecayScheduler.js.map +1 -0
- package/packages/core/dist/engine/InferenceEngine.d.ts +95 -0
- package/packages/core/dist/engine/InferenceEngine.d.ts.map +1 -0
- package/packages/core/dist/engine/InferenceEngine.js +242 -0
- package/packages/core/dist/engine/InferenceEngine.js.map +1 -0
- package/packages/core/dist/engine/SelectionPolicy.d.ts +29 -0
- package/packages/core/dist/engine/SelectionPolicy.d.ts.map +1 -0
- package/packages/core/dist/engine/SelectionPolicy.js +58 -0
- package/packages/core/dist/engine/SelectionPolicy.js.map +1 -0
- package/packages/core/dist/engine/SelfImprovementEngine.d.ts +58 -0
- package/packages/core/dist/engine/SelfImprovementEngine.d.ts.map +1 -0
- package/packages/core/dist/engine/SelfImprovementEngine.js +265 -0
- package/packages/core/dist/engine/SelfImprovementEngine.js.map +1 -0
- package/packages/core/dist/engine/SelfImprovementPrompt.d.ts +10 -0
- package/packages/core/dist/engine/SelfImprovementPrompt.d.ts.map +1 -0
- package/packages/core/dist/engine/SelfImprovementPrompt.js +193 -0
- package/packages/core/dist/engine/SelfImprovementPrompt.js.map +1 -0
- package/packages/core/dist/engine/WeightPropagation.d.ts +77 -0
- package/packages/core/dist/engine/WeightPropagation.d.ts.map +1 -0
- package/packages/core/dist/engine/WeightPropagation.js +101 -0
- package/packages/core/dist/engine/WeightPropagation.js.map +1 -0
- package/packages/core/dist/engine/WorkflowSuggestionEngine.d.ts +26 -0
- package/packages/core/dist/engine/WorkflowSuggestionEngine.d.ts.map +1 -0
- package/packages/core/dist/engine/WorkflowSuggestionEngine.js +54 -0
- package/packages/core/dist/engine/WorkflowSuggestionEngine.js.map +1 -0
- package/packages/core/dist/entity/AliasIndex.d.ts +39 -0
- package/packages/core/dist/entity/AliasIndex.d.ts.map +1 -0
- package/packages/core/dist/entity/AliasIndex.js +81 -0
- package/packages/core/dist/entity/AliasIndex.js.map +1 -0
- package/packages/core/dist/entity/ContextActivator.d.ts +53 -0
- package/packages/core/dist/entity/ContextActivator.d.ts.map +1 -0
- package/packages/core/dist/entity/ContextActivator.js +163 -0
- package/packages/core/dist/entity/ContextActivator.js.map +1 -0
- package/packages/core/dist/entity/EntityHierarchy.d.ts +48 -0
- package/packages/core/dist/entity/EntityHierarchy.d.ts.map +1 -0
- package/packages/core/dist/entity/EntityHierarchy.js +134 -0
- package/packages/core/dist/entity/EntityHierarchy.js.map +1 -0
- package/packages/core/dist/entity/EntityResolutionPipeline.d.ts +48 -0
- package/packages/core/dist/entity/EntityResolutionPipeline.d.ts.map +1 -0
- package/packages/core/dist/entity/EntityResolutionPipeline.js +221 -0
- package/packages/core/dist/entity/EntityResolutionPipeline.js.map +1 -0
- package/packages/core/dist/entity/MCPEnrichedResolver.d.ts +17 -0
- package/packages/core/dist/entity/MCPEnrichedResolver.d.ts.map +1 -0
- package/packages/core/dist/entity/MCPEnrichedResolver.js +19 -0
- package/packages/core/dist/entity/MCPEnrichedResolver.js.map +1 -0
- package/packages/core/dist/entity/NodeResolutionService.d.ts +46 -0
- package/packages/core/dist/entity/NodeResolutionService.d.ts.map +1 -0
- package/packages/core/dist/entity/NodeResolutionService.js +150 -0
- package/packages/core/dist/entity/NodeResolutionService.js.map +1 -0
- package/packages/core/dist/entity/PersonalityAccumulator.d.ts +41 -0
- package/packages/core/dist/entity/PersonalityAccumulator.d.ts.map +1 -0
- package/packages/core/dist/entity/PersonalityAccumulator.js +126 -0
- package/packages/core/dist/entity/PersonalityAccumulator.js.map +1 -0
- package/packages/core/dist/entity/PersonalityProfile.d.ts +31 -0
- package/packages/core/dist/entity/PersonalityProfile.d.ts.map +1 -0
- package/packages/core/dist/entity/PersonalityProfile.js +94 -0
- package/packages/core/dist/entity/PersonalityProfile.js.map +1 -0
- package/packages/core/dist/entity/index.d.ts +4 -0
- package/packages/core/dist/entity/index.d.ts.map +1 -0
- package/packages/core/dist/entity/index.js +4 -0
- package/packages/core/dist/entity/index.js.map +1 -0
- package/packages/core/dist/graph/GraphEdge.d.ts +37 -0
- package/packages/core/dist/graph/GraphEdge.d.ts.map +1 -0
- package/packages/core/dist/graph/GraphEdge.js +29 -0
- package/packages/core/dist/graph/GraphEdge.js.map +1 -0
- package/packages/core/dist/graph/GraphNode.d.ts +52 -0
- package/packages/core/dist/graph/GraphNode.d.ts.map +1 -0
- package/packages/core/dist/graph/GraphNode.js +41 -0
- package/packages/core/dist/graph/GraphNode.js.map +1 -0
- package/packages/core/dist/graph/GraphQuery.d.ts +46 -0
- package/packages/core/dist/graph/GraphQuery.d.ts.map +1 -0
- package/packages/core/dist/graph/GraphQuery.js +47 -0
- package/packages/core/dist/graph/GraphQuery.js.map +1 -0
- package/packages/core/dist/graph/KnowledgeGraph.d.ts +38 -0
- package/packages/core/dist/graph/KnowledgeGraph.d.ts.map +1 -0
- package/packages/core/dist/graph/KnowledgeGraph.js +345 -0
- package/packages/core/dist/graph/KnowledgeGraph.js.map +1 -0
- package/packages/core/dist/graph/SubGraph.d.ts +36 -0
- package/packages/core/dist/graph/SubGraph.d.ts.map +1 -0
- package/packages/core/dist/graph/SubGraph.js +86 -0
- package/packages/core/dist/graph/SubGraph.js.map +1 -0
- package/packages/core/dist/index.d.ts +54 -0
- package/packages/core/dist/index.d.ts.map +1 -0
- package/packages/core/dist/index.js +62 -0
- package/packages/core/dist/index.js.map +1 -0
- package/packages/core/dist/maintenance/CompactionOrchestrator.d.ts +22 -0
- package/packages/core/dist/maintenance/CompactionOrchestrator.d.ts.map +1 -0
- package/packages/core/dist/maintenance/CompactionOrchestrator.js +62 -0
- package/packages/core/dist/maintenance/CompactionOrchestrator.js.map +1 -0
- package/packages/core/dist/maintenance/EdgePruner.d.ts +20 -0
- package/packages/core/dist/maintenance/EdgePruner.d.ts.map +1 -0
- package/packages/core/dist/maintenance/EdgePruner.js +65 -0
- package/packages/core/dist/maintenance/EdgePruner.js.map +1 -0
- package/packages/core/dist/maintenance/GraphCheckpoint.d.ts +51 -0
- package/packages/core/dist/maintenance/GraphCheckpoint.d.ts.map +1 -0
- package/packages/core/dist/maintenance/GraphCheckpoint.js +81 -0
- package/packages/core/dist/maintenance/GraphCheckpoint.js.map +1 -0
- package/packages/core/dist/maintenance/GraphRollback.d.ts +36 -0
- package/packages/core/dist/maintenance/GraphRollback.d.ts.map +1 -0
- package/packages/core/dist/maintenance/GraphRollback.js +154 -0
- package/packages/core/dist/maintenance/GraphRollback.js.map +1 -0
- package/packages/core/dist/maintenance/NodeDeduplicator.d.ts +26 -0
- package/packages/core/dist/maintenance/NodeDeduplicator.d.ts.map +1 -0
- package/packages/core/dist/maintenance/NodeDeduplicator.js +171 -0
- package/packages/core/dist/maintenance/NodeDeduplicator.js.map +1 -0
- package/packages/core/dist/maintenance/SubgraphArchiver.d.ts +18 -0
- package/packages/core/dist/maintenance/SubgraphArchiver.d.ts.map +1 -0
- package/packages/core/dist/maintenance/SubgraphArchiver.js +180 -0
- package/packages/core/dist/maintenance/SubgraphArchiver.js.map +1 -0
- package/packages/core/dist/memory/ArchivalMemory.d.ts +28 -0
- package/packages/core/dist/memory/ArchivalMemory.d.ts.map +1 -0
- package/packages/core/dist/memory/ArchivalMemory.js +26 -0
- package/packages/core/dist/memory/ArchivalMemory.js.map +1 -0
- package/packages/core/dist/memory/BlinkingMemory.d.ts +34 -0
- package/packages/core/dist/memory/BlinkingMemory.d.ts.map +1 -0
- package/packages/core/dist/memory/BlinkingMemory.js +44 -0
- package/packages/core/dist/memory/BlinkingMemory.js.map +1 -0
- package/packages/core/dist/memory/WorkingMemory.d.ts +38 -0
- package/packages/core/dist/memory/WorkingMemory.d.ts.map +1 -0
- package/packages/core/dist/memory/WorkingMemory.js +70 -0
- package/packages/core/dist/memory/WorkingMemory.js.map +1 -0
- package/packages/core/dist/storage/ObjectStore.d.ts +24 -0
- package/packages/core/dist/storage/ObjectStore.d.ts.map +1 -0
- package/packages/core/dist/storage/ObjectStore.js +50 -0
- package/packages/core/dist/storage/ObjectStore.js.map +1 -0
- package/packages/core/dist/storage/TraceStore.d.ts +16 -0
- package/packages/core/dist/storage/TraceStore.d.ts.map +1 -0
- package/packages/core/dist/storage/TraceStore.js +19 -0
- package/packages/core/dist/storage/TraceStore.js.map +1 -0
- package/packages/core/dist/storage/WeightEventLog.d.ts +11 -0
- package/packages/core/dist/storage/WeightEventLog.d.ts.map +1 -0
- package/packages/core/dist/storage/WeightEventLog.js +16 -0
- package/packages/core/dist/storage/WeightEventLog.js.map +1 -0
- package/packages/core/dist/storage/adapters/SQLiteAdapter.d.ts +86 -0
- package/packages/core/dist/storage/adapters/SQLiteAdapter.d.ts.map +1 -0
- package/packages/core/dist/storage/adapters/SQLiteAdapter.js +514 -0
- package/packages/core/dist/storage/adapters/SQLiteAdapter.js.map +1 -0
- package/packages/core/dist/trace/DeferredTrace.d.ts +43 -0
- package/packages/core/dist/trace/DeferredTrace.d.ts.map +1 -0
- package/packages/core/dist/trace/DeferredTrace.js +44 -0
- package/packages/core/dist/trace/DeferredTrace.js.map +1 -0
- package/packages/core/dist/trace/OutcomeTrace.d.ts +38 -0
- package/packages/core/dist/trace/OutcomeTrace.d.ts.map +1 -0
- package/packages/core/dist/trace/OutcomeTrace.js +9 -0
- package/packages/core/dist/trace/OutcomeTrace.js.map +1 -0
- package/packages/core/dist/trace/SkillTraceDecorator.d.ts +25 -0
- package/packages/core/dist/trace/SkillTraceDecorator.d.ts.map +1 -0
- package/packages/core/dist/trace/SkillTraceDecorator.js +41 -0
- package/packages/core/dist/trace/SkillTraceDecorator.js.map +1 -0
- package/packages/core/dist/trace/TraceReplay.d.ts +25 -0
- package/packages/core/dist/trace/TraceReplay.d.ts.map +1 -0
- package/packages/core/dist/trace/TraceReplay.js +40 -0
- package/packages/core/dist/trace/TraceReplay.js.map +1 -0
- package/packages/core/dist/trace/TraversalLedger.d.ts +33 -0
- package/packages/core/dist/trace/TraversalLedger.d.ts.map +1 -0
- package/packages/core/dist/trace/TraversalLedger.js +61 -0
- package/packages/core/dist/trace/TraversalLedger.js.map +1 -0
- package/packages/core/dist/types/SelfImprovement.d.ts +174 -0
- package/packages/core/dist/types/SelfImprovement.d.ts.map +1 -0
- package/packages/core/dist/types/SelfImprovement.js +23 -0
- package/packages/core/dist/types/SelfImprovement.js.map +1 -0
- package/packages/core/dist/types/SkillDefinition.d.ts +68 -0
- package/packages/core/dist/types/SkillDefinition.d.ts.map +1 -0
- package/packages/core/dist/types/SkillDefinition.js +12 -0
- package/packages/core/dist/types/SkillDefinition.js.map +1 -0
- package/packages/daemon/dist/BackgroundWorkers.d.ts +55 -0
- package/packages/daemon/dist/BackgroundWorkers.d.ts.map +1 -0
- package/packages/daemon/dist/BackgroundWorkers.js +121 -0
- package/packages/daemon/dist/BackgroundWorkers.js.map +1 -0
- package/packages/daemon/dist/EntityScopedContext.d.ts +22 -0
- package/packages/daemon/dist/EntityScopedContext.d.ts.map +1 -0
- package/packages/daemon/dist/EntityScopedContext.js +85 -0
- package/packages/daemon/dist/EntityScopedContext.js.map +1 -0
- package/packages/daemon/dist/HTTPServer.d.ts +27 -0
- package/packages/daemon/dist/HTTPServer.d.ts.map +1 -0
- package/packages/daemon/dist/HTTPServer.js +62 -0
- package/packages/daemon/dist/HTTPServer.js.map +1 -0
- package/packages/daemon/dist/SessionManager.d.ts +95 -0
- package/packages/daemon/dist/SessionManager.d.ts.map +1 -0
- package/packages/daemon/dist/SessionManager.js +205 -0
- package/packages/daemon/dist/SessionManager.js.map +1 -0
- package/packages/daemon/dist/SkillRegistry.d.ts +34 -0
- package/packages/daemon/dist/SkillRegistry.d.ts.map +1 -0
- package/packages/daemon/dist/SkillRegistry.js +90 -0
- package/packages/daemon/dist/SkillRegistry.js.map +1 -0
- package/packages/daemon/dist/SkillVariableResolver.d.ts +24 -0
- package/packages/daemon/dist/SkillVariableResolver.d.ts.map +1 -0
- package/packages/daemon/dist/SkillVariableResolver.js +85 -0
- package/packages/daemon/dist/SkillVariableResolver.js.map +1 -0
- package/packages/daemon/dist/WebSocketEvents.d.ts +107 -0
- package/packages/daemon/dist/WebSocketEvents.d.ts.map +1 -0
- package/packages/daemon/dist/WebSocketEvents.js +111 -0
- package/packages/daemon/dist/WebSocketEvents.js.map +1 -0
- package/packages/daemon/dist/ZeroAgentDaemon.d.ts +39 -0
- package/packages/daemon/dist/ZeroAgentDaemon.d.ts.map +1 -0
- package/packages/daemon/dist/ZeroAgentDaemon.js +161 -0
- package/packages/daemon/dist/ZeroAgentDaemon.js.map +1 -0
- package/packages/daemon/dist/config/ConfigSchema.d.ts +631 -0
- package/packages/daemon/dist/config/ConfigSchema.d.ts.map +1 -0
- package/packages/daemon/dist/config/ConfigSchema.js +107 -0
- package/packages/daemon/dist/config/ConfigSchema.js.map +1 -0
- package/packages/daemon/dist/config/DaemonConfig.d.ts +10 -0
- package/packages/daemon/dist/config/DaemonConfig.d.ts.map +1 -0
- package/packages/daemon/dist/config/DaemonConfig.js +34 -0
- package/packages/daemon/dist/config/DaemonConfig.js.map +1 -0
- package/packages/daemon/dist/index.d.ts +10 -0
- package/packages/daemon/dist/index.d.ts.map +1 -0
- package/packages/daemon/dist/index.js +8 -0
- package/packages/daemon/dist/index.js.map +1 -0
- package/packages/daemon/dist/routes/entities.d.ts +6 -0
- package/packages/daemon/dist/routes/entities.d.ts.map +1 -0
- package/packages/daemon/dist/routes/entities.js +54 -0
- package/packages/daemon/dist/routes/entities.js.map +1 -0
- package/packages/daemon/dist/routes/graph.d.ts +6 -0
- package/packages/daemon/dist/routes/graph.d.ts.map +1 -0
- package/packages/daemon/dist/routes/graph.js +61 -0
- package/packages/daemon/dist/routes/graph.js.map +1 -0
- package/packages/daemon/dist/routes/health.d.ts +15 -0
- package/packages/daemon/dist/routes/health.d.ts.map +1 -0
- package/packages/daemon/dist/routes/health.js +11 -0
- package/packages/daemon/dist/routes/health.js.map +1 -0
- package/packages/daemon/dist/routes/sessions.d.ts +6 -0
- package/packages/daemon/dist/routes/sessions.d.ts.map +1 -0
- package/packages/daemon/dist/routes/sessions.js +43 -0
- package/packages/daemon/dist/routes/sessions.js.map +1 -0
- package/packages/daemon/dist/routes/skills.d.ts +6 -0
- package/packages/daemon/dist/routes/skills.d.ts.map +1 -0
- package/packages/daemon/dist/routes/skills.js +62 -0
- package/packages/daemon/dist/routes/skills.js.map +1 -0
- package/packages/daemon/dist/routes/subagents.d.ts +3 -0
- package/packages/daemon/dist/routes/subagents.d.ts.map +1 -0
- package/packages/daemon/dist/routes/subagents.js +14 -0
- package/packages/daemon/dist/routes/subagents.js.map +1 -0
- package/packages/daemon/dist/routes/traces.d.ts +6 -0
- package/packages/daemon/dist/routes/traces.d.ts.map +1 -0
- package/packages/daemon/dist/routes/traces.js +31 -0
- package/packages/daemon/dist/routes/traces.js.map +1 -0
- package/packages/daemon/dist/start.d.ts +7 -0
- package/packages/daemon/dist/start.d.ts.map +1 -0
- package/packages/daemon/dist/start.js +24 -0
- package/packages/daemon/dist/start.js.map +1 -0
- package/packages/mcp-hub/dist/FilteredProxy.d.ts +20 -0
- package/packages/mcp-hub/dist/FilteredProxy.d.ts.map +1 -0
- package/packages/mcp-hub/dist/FilteredProxy.js +43 -0
- package/packages/mcp-hub/dist/FilteredProxy.js.map +1 -0
- package/packages/mcp-hub/dist/MCPDiscovery.d.ts +18 -0
- package/packages/mcp-hub/dist/MCPDiscovery.d.ts.map +1 -0
- package/packages/mcp-hub/dist/MCPDiscovery.js +86 -0
- package/packages/mcp-hub/dist/MCPDiscovery.js.map +1 -0
- package/packages/mcp-hub/dist/MCPHub.d.ts +48 -0
- package/packages/mcp-hub/dist/MCPHub.d.ts.map +1 -0
- package/packages/mcp-hub/dist/MCPHub.js +100 -0
- package/packages/mcp-hub/dist/MCPHub.js.map +1 -0
- package/packages/mcp-hub/dist/builtin/BrowserMCP.d.ts +6 -0
- package/packages/mcp-hub/dist/builtin/BrowserMCP.d.ts.map +1 -0
- package/packages/mcp-hub/dist/builtin/BrowserMCP.js +69 -0
- package/packages/mcp-hub/dist/builtin/BrowserMCP.js.map +1 -0
- package/packages/mcp-hub/dist/builtin/FilesystemMCP.d.ts +11 -0
- package/packages/mcp-hub/dist/builtin/FilesystemMCP.d.ts.map +1 -0
- package/packages/mcp-hub/dist/builtin/FilesystemMCP.js +104 -0
- package/packages/mcp-hub/dist/builtin/FilesystemMCP.js.map +1 -0
- package/packages/mcp-hub/dist/builtin/MemoryMCP.d.ts +9 -0
- package/packages/mcp-hub/dist/builtin/MemoryMCP.d.ts.map +1 -0
- package/packages/mcp-hub/dist/builtin/MemoryMCP.js +185 -0
- package/packages/mcp-hub/dist/builtin/MemoryMCP.js.map +1 -0
- package/packages/mcp-hub/dist/builtin/ShellMCP.d.ts +8 -0
- package/packages/mcp-hub/dist/builtin/ShellMCP.d.ts.map +1 -0
- package/packages/mcp-hub/dist/builtin/ShellMCP.js +74 -0
- package/packages/mcp-hub/dist/builtin/ShellMCP.js.map +1 -0
- package/packages/mcp-hub/dist/index.d.ts +9 -0
- package/packages/mcp-hub/dist/index.d.ts.map +1 -0
- package/packages/mcp-hub/dist/index.js +8 -0
- package/packages/mcp-hub/dist/index.js.map +1 -0
- package/packages/mcp-hub/dist/types.d.ts +30 -0
- package/packages/mcp-hub/dist/types.d.ts.map +1 -0
- package/packages/mcp-hub/dist/types.js +2 -0
- package/packages/mcp-hub/dist/types.js.map +1 -0
- package/packages/subagent/dist/CapabilityToken.d.ts +66 -0
- package/packages/subagent/dist/CapabilityToken.d.ts.map +1 -0
- package/packages/subagent/dist/CapabilityToken.js +120 -0
- package/packages/subagent/dist/CapabilityToken.js.map +1 -0
- package/packages/subagent/dist/ResourceDefaults.d.ts +16 -0
- package/packages/subagent/dist/ResourceDefaults.d.ts.map +1 -0
- package/packages/subagent/dist/ResourceDefaults.js +68 -0
- package/packages/subagent/dist/ResourceDefaults.js.map +1 -0
- package/packages/subagent/dist/SkillInputResolver.d.ts +30 -0
- package/packages/subagent/dist/SkillInputResolver.d.ts.map +1 -0
- package/packages/subagent/dist/SkillInputResolver.js +59 -0
- package/packages/subagent/dist/SkillInputResolver.js.map +1 -0
- package/packages/subagent/dist/SkillInvoker.d.ts +33 -0
- package/packages/subagent/dist/SkillInvoker.d.ts.map +1 -0
- package/packages/subagent/dist/SkillInvoker.js +69 -0
- package/packages/subagent/dist/SkillInvoker.js.map +1 -0
- package/packages/subagent/dist/SubagentOrchestrator.d.ts +52 -0
- package/packages/subagent/dist/SubagentOrchestrator.d.ts.map +1 -0
- package/packages/subagent/dist/SubagentOrchestrator.js +198 -0
- package/packages/subagent/dist/SubagentOrchestrator.js.map +1 -0
- package/packages/subagent/dist/SubagentResult.d.ts +34 -0
- package/packages/subagent/dist/SubagentResult.d.ts.map +1 -0
- package/packages/subagent/dist/SubagentResult.js +21 -0
- package/packages/subagent/dist/SubagentResult.js.map +1 -0
- package/packages/subagent/dist/Watchdog.d.ts +23 -0
- package/packages/subagent/dist/Watchdog.d.ts.map +1 -0
- package/packages/subagent/dist/Watchdog.js +44 -0
- package/packages/subagent/dist/Watchdog.js.map +1 -0
- package/packages/subagent/dist/index.d.ts +15 -0
- package/packages/subagent/dist/index.d.ts.map +1 -0
- package/packages/subagent/dist/index.js +23 -0
- package/packages/subagent/dist/index.js.map +1 -0
- package/packages/subagent/dist/sandbox/BwrapBackend.d.ts +14 -0
- package/packages/subagent/dist/sandbox/BwrapBackend.d.ts.map +1 -0
- package/packages/subagent/dist/sandbox/BwrapBackend.js +171 -0
- package/packages/subagent/dist/sandbox/BwrapBackend.js.map +1 -0
- package/packages/subagent/dist/sandbox/CloudBackend.d.ts +28 -0
- package/packages/subagent/dist/sandbox/CloudBackend.d.ts.map +1 -0
- package/packages/subagent/dist/sandbox/CloudBackend.js +52 -0
- package/packages/subagent/dist/sandbox/CloudBackend.js.map +1 -0
- package/packages/subagent/dist/sandbox/DockerBackend.d.ts +14 -0
- package/packages/subagent/dist/sandbox/DockerBackend.d.ts.map +1 -0
- package/packages/subagent/dist/sandbox/DockerBackend.js +149 -0
- package/packages/subagent/dist/sandbox/DockerBackend.js.map +1 -0
- package/packages/subagent/dist/sandbox/FirecrackerBackend.d.ts +17 -0
- package/packages/subagent/dist/sandbox/FirecrackerBackend.d.ts.map +1 -0
- package/packages/subagent/dist/sandbox/FirecrackerBackend.js +54 -0
- package/packages/subagent/dist/sandbox/FirecrackerBackend.js.map +1 -0
- package/packages/subagent/dist/sandbox/PodmanBackend.d.ts +13 -0
- package/packages/subagent/dist/sandbox/PodmanBackend.d.ts.map +1 -0
- package/packages/subagent/dist/sandbox/PodmanBackend.js +144 -0
- package/packages/subagent/dist/sandbox/PodmanBackend.js.map +1 -0
- package/packages/subagent/dist/sandbox/ProcessBackend.d.ts +16 -0
- package/packages/subagent/dist/sandbox/ProcessBackend.d.ts.map +1 -0
- package/packages/subagent/dist/sandbox/ProcessBackend.js +152 -0
- package/packages/subagent/dist/sandbox/ProcessBackend.js.map +1 -0
- package/packages/subagent/dist/sandbox/SandboxManager.d.ts +17 -0
- package/packages/subagent/dist/sandbox/SandboxManager.d.ts.map +1 -0
- package/packages/subagent/dist/sandbox/SandboxManager.js +45 -0
- package/packages/subagent/dist/sandbox/SandboxManager.js.map +1 -0
- package/packages/subagent/dist/sandbox/types.d.ts +35 -0
- package/packages/subagent/dist/sandbox/types.d.ts.map +1 -0
- package/packages/subagent/dist/sandbox/types.js +5 -0
- package/packages/subagent/dist/sandbox/types.js.map +1 -0
- package/packages/subagent-runtime/dist/AgentLoop.d.ts +46 -0
- package/packages/subagent-runtime/dist/AgentLoop.d.ts.map +1 -0
- package/packages/subagent-runtime/dist/AgentLoop.js +85 -0
- package/packages/subagent-runtime/dist/AgentLoop.js.map +1 -0
- package/packages/subagent-runtime/dist/MCPProxy.d.ts +24 -0
- package/packages/subagent-runtime/dist/MCPProxy.d.ts.map +1 -0
- package/packages/subagent-runtime/dist/MCPProxy.js +31 -0
- package/packages/subagent-runtime/dist/MCPProxy.js.map +1 -0
- package/packages/subagent-runtime/dist/OutputChannel.d.ts +10 -0
- package/packages/subagent-runtime/dist/OutputChannel.d.ts.map +1 -0
- package/packages/subagent-runtime/dist/OutputChannel.js +14 -0
- package/packages/subagent-runtime/dist/OutputChannel.js.map +1 -0
- package/packages/subagent-runtime/dist/ResourceTracker.d.ts +29 -0
- package/packages/subagent-runtime/dist/ResourceTracker.d.ts.map +1 -0
- package/packages/subagent-runtime/dist/ResourceTracker.js +46 -0
- package/packages/subagent-runtime/dist/ResourceTracker.js.map +1 -0
- package/packages/subagent-runtime/dist/TokenValidator.d.ts +17 -0
- package/packages/subagent-runtime/dist/TokenValidator.d.ts.map +1 -0
- package/packages/subagent-runtime/dist/TokenValidator.js +29 -0
- package/packages/subagent-runtime/dist/TokenValidator.js.map +1 -0
- package/packages/subagent-runtime/dist/index.d.ts +6 -0
- package/packages/subagent-runtime/dist/index.d.ts.map +1 -0
- package/packages/subagent-runtime/dist/index.js +11 -0
- package/packages/subagent-runtime/dist/index.js.map +1 -0
- package/packages/subagent-runtime/dist/main.d.ts +2 -0
- package/packages/subagent-runtime/dist/main.d.ts.map +1 -0
- package/packages/subagent-runtime/dist/main.js +102 -0
- package/packages/subagent-runtime/dist/main.js.map +1 -0
- package/seeds/b2b-outbound/package.json +6 -0
- package/seeds/research/package.json +6 -0
- package/seeds/software-engineering/install.ts +78 -0
- package/seeds/software-engineering/package.json +6 -0
- package/seeds/software-engineering/sprint-workflow.json +102 -0
- package/skills/build.yaml +97 -0
- package/skills/debug.yaml +117 -0
- package/skills/design-review.yaml +119 -0
- package/skills/doc.yaml +107 -0
- package/skills/office-hours.yaml +76 -0
- package/skills/plan-ceo-review.yaml +84 -0
- package/skills/plan-eng-review.yaml +96 -0
- package/skills/qa.yaml +116 -0
- package/skills/refactor.yaml +125 -0
- package/skills/research.yaml +108 -0
- package/skills/retro.yaml +106 -0
- package/skills/review.yaml +101 -0
- package/skills/security-audit.yaml +114 -0
- package/skills/ship.yaml +108 -0
- package/skills/test-writer.yaml +131 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: security-audit
|
|
2
|
+
description: "Security officer — OWASP Top 10 + STRIDE threat analysis"
|
|
3
|
+
trigger: /security-audit
|
|
4
|
+
category: review
|
|
5
|
+
|
|
6
|
+
args:
|
|
7
|
+
- name: scope
|
|
8
|
+
description: "Scope of the audit: 'diff' for recent changes, 'full' for entire project"
|
|
9
|
+
required: false
|
|
10
|
+
default: "diff"
|
|
11
|
+
|
|
12
|
+
subagent:
|
|
13
|
+
trust_level: 1
|
|
14
|
+
tools:
|
|
15
|
+
- read_file
|
|
16
|
+
- search_files
|
|
17
|
+
- execute_command
|
|
18
|
+
- git_diff
|
|
19
|
+
graph_scope:
|
|
20
|
+
mode: entities
|
|
21
|
+
entity_ids:
|
|
22
|
+
- $CURRENT_PROJECT
|
|
23
|
+
sandbox:
|
|
24
|
+
type: auto
|
|
25
|
+
network_access: none
|
|
26
|
+
network_allowlist: []
|
|
27
|
+
filesystem_access: readonly
|
|
28
|
+
filesystem_scope: $PROJECT_DIR
|
|
29
|
+
has_browser: false
|
|
30
|
+
duration_ms: 900000
|
|
31
|
+
model_override: null
|
|
32
|
+
|
|
33
|
+
workflow:
|
|
34
|
+
follows:
|
|
35
|
+
- review
|
|
36
|
+
feeds_into:
|
|
37
|
+
- qa
|
|
38
|
+
|
|
39
|
+
output:
|
|
40
|
+
format: markdown
|
|
41
|
+
artifacts:
|
|
42
|
+
- security-report
|
|
43
|
+
saves_to: .0agent/artifacts/security/
|
|
44
|
+
|
|
45
|
+
outcome:
|
|
46
|
+
verifier: rule_based
|
|
47
|
+
success_criteria: "Security report covers all OWASP Top 10 categories and includes STRIDE analysis with severity ratings"
|
|
48
|
+
failure_criteria: "Security report is incomplete or misses critical vulnerability categories"
|
|
49
|
+
signal_source: null
|
|
50
|
+
deferred_ttl_hours: null
|
|
51
|
+
|
|
52
|
+
role_prompt: |
|
|
53
|
+
You are a security engineer performing an OWASP Top 10 + STRIDE threat model analysis. Your job is to find real security vulnerabilities, not theoretical risks.
|
|
54
|
+
|
|
55
|
+
You have read-only filesystem access, file search, command execution (for static analysis tools), and git diff. No network access, no browser.
|
|
56
|
+
|
|
57
|
+
Your audit process:
|
|
58
|
+
|
|
59
|
+
1. **Determine scope.** If scope is "diff", focus on recently changed files (use git_diff). If scope is "full", audit the entire project. Even in "diff" mode, follow data flows from changed code into unchanged code — vulnerabilities often hide at boundaries.
|
|
60
|
+
|
|
61
|
+
2. **OWASP Top 10 Analysis.** Systematically check each category:
|
|
62
|
+
|
|
63
|
+
- **A01: Broken Access Control** — Are there endpoints without auth checks? Can users access other users' data? Are there IDOR vulnerabilities? Check route handlers, middleware, and authorization logic.
|
|
64
|
+
|
|
65
|
+
- **A02: Cryptographic Failures** — Hardcoded secrets, weak algorithms, missing encryption for sensitive data, improper key management. Search for API keys, passwords, tokens in code. Check .env handling.
|
|
66
|
+
|
|
67
|
+
- **A03: Injection** — SQL injection, command injection, XSS, template injection. Look for string concatenation in queries, unsanitized user input reaching shell commands, innerHTML usage. Check for parameterized queries.
|
|
68
|
+
|
|
69
|
+
- **A04: Insecure Design** — Missing rate limiting, no account lockout, predictable resource IDs, missing CSRF protection. These are architectural issues, not implementation bugs.
|
|
70
|
+
|
|
71
|
+
- **A05: Security Misconfiguration** — Default credentials, unnecessary features enabled, overly permissive CORS, missing security headers, verbose error messages in production.
|
|
72
|
+
|
|
73
|
+
- **A06: Vulnerable Components** — Check package.json/Cargo.toml/requirements.txt for known vulnerable dependencies. Look for outdated packages with known CVEs.
|
|
74
|
+
|
|
75
|
+
- **A07: Authentication Failures** — Weak password policies, missing MFA, session fixation, JWT issues (no expiry, weak signing, algorithm confusion).
|
|
76
|
+
|
|
77
|
+
- **A08: Software and Data Integrity** — Missing integrity checks on updates, CI/CD pipeline vulnerabilities, unsigned packages, deserialization of untrusted data.
|
|
78
|
+
|
|
79
|
+
- **A09: Logging and Monitoring Failures** — Missing audit logs, logging sensitive data (passwords, tokens), no alerting on suspicious activity.
|
|
80
|
+
|
|
81
|
+
- **A10: Server-Side Request Forgery (SSRF)** — User-controlled URLs passed to server-side HTTP clients, no URL validation, access to internal services.
|
|
82
|
+
|
|
83
|
+
3. **STRIDE Threat Model.** For each major component:
|
|
84
|
+
- **S**poofing: Can an attacker impersonate a user or component?
|
|
85
|
+
- **T**ampering: Can data be modified in transit or at rest?
|
|
86
|
+
- **R**epudiation: Can actions be performed without audit trail?
|
|
87
|
+
- **I**nformation Disclosure: Can sensitive data leak?
|
|
88
|
+
- **D**enial of Service: Can the system be made unavailable?
|
|
89
|
+
- **E**levation of Privilege: Can a low-privilege user gain admin access?
|
|
90
|
+
|
|
91
|
+
4. **Classify findings by severity:**
|
|
92
|
+
- **Critical**: Remotely exploitable, no authentication required, leads to data breach or RCE
|
|
93
|
+
- **High**: Exploitable with authentication, leads to significant data access or privilege escalation
|
|
94
|
+
- **Medium**: Requires specific conditions to exploit, limited impact
|
|
95
|
+
- **Low**: Theoretical risk, defense-in-depth improvement
|
|
96
|
+
- **Info**: Best practice recommendation, no immediate risk
|
|
97
|
+
|
|
98
|
+
5. **Produce a security report.** Structure:
|
|
99
|
+
- **Executive Summary**: One paragraph — overall security posture and top risks
|
|
100
|
+
- **Scope**: What was audited (files, components, commit range)
|
|
101
|
+
- **OWASP Top 10 Findings**: Organized by category, each with severity, description, affected code (file:line), proof of concept or exploitation scenario, and remediation recommendation
|
|
102
|
+
- **STRIDE Analysis**: Per-component threat model table
|
|
103
|
+
- **Dependency Audit**: Vulnerable dependencies with CVE references
|
|
104
|
+
- **Recommendations**: Prioritized action items
|
|
105
|
+
- **Verdict**: PASS / CONDITIONAL PASS / FAIL
|
|
106
|
+
|
|
107
|
+
Rules:
|
|
108
|
+
- Focus on exploitable vulnerabilities, not theoretical concerns. "This could theoretically be a problem" is not a finding.
|
|
109
|
+
- Every finding must include the affected file and line number. Vague findings waste engineering time.
|
|
110
|
+
- Every finding must include a specific remediation recommendation. "Fix this" is not a recommendation.
|
|
111
|
+
- Proof of concept or exploitation scenario is required for Critical and High findings.
|
|
112
|
+
- Do not report false positives as findings. If you are unsure, say "potential issue, needs manual verification."
|
|
113
|
+
- Check for secrets in the codebase: API keys, passwords, tokens. This is always worth doing regardless of scope.
|
|
114
|
+
- If you find a Critical vulnerability, lead with it. Do not bury it in a long report.
|
package/skills/ship.yaml
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
name: ship
|
|
2
|
+
description: "Release engineer — create PR, verify CI, merge and deploy"
|
|
3
|
+
trigger: /ship
|
|
4
|
+
category: ship
|
|
5
|
+
|
|
6
|
+
args:
|
|
7
|
+
- name: target
|
|
8
|
+
description: "The target branch to merge into"
|
|
9
|
+
required: false
|
|
10
|
+
default: "main"
|
|
11
|
+
|
|
12
|
+
subagent:
|
|
13
|
+
trust_level: 1
|
|
14
|
+
tools:
|
|
15
|
+
- git_diff
|
|
16
|
+
- git_log
|
|
17
|
+
- git_push
|
|
18
|
+
- github_pr_create
|
|
19
|
+
- github_pr_status
|
|
20
|
+
- execute_command
|
|
21
|
+
- read_file
|
|
22
|
+
graph_scope:
|
|
23
|
+
mode: entities
|
|
24
|
+
entity_ids:
|
|
25
|
+
- $CURRENT_PROJECT
|
|
26
|
+
sandbox:
|
|
27
|
+
type: auto
|
|
28
|
+
network_access: allowlist
|
|
29
|
+
network_allowlist:
|
|
30
|
+
- api.github.com
|
|
31
|
+
- github.com
|
|
32
|
+
filesystem_access: scoped
|
|
33
|
+
filesystem_scope: $PROJECT_DIR
|
|
34
|
+
has_browser: false
|
|
35
|
+
duration_ms: 300000
|
|
36
|
+
model_override: null
|
|
37
|
+
|
|
38
|
+
workflow:
|
|
39
|
+
follows:
|
|
40
|
+
- qa
|
|
41
|
+
feeds_into:
|
|
42
|
+
- retro
|
|
43
|
+
|
|
44
|
+
output:
|
|
45
|
+
format: json
|
|
46
|
+
artifacts:
|
|
47
|
+
- pr-url
|
|
48
|
+
saves_to: null
|
|
49
|
+
|
|
50
|
+
outcome:
|
|
51
|
+
verifier: automatic
|
|
52
|
+
success_criteria: "PR is created and CI passes"
|
|
53
|
+
failure_criteria: "PR creation fails or CI fails"
|
|
54
|
+
signal_source: ci_status
|
|
55
|
+
deferred_ttl_hours: null
|
|
56
|
+
|
|
57
|
+
role_prompt: |
|
|
58
|
+
You are a release engineer. Your job is to create a pull request, verify CI passes, and prepare the code for merge.
|
|
59
|
+
|
|
60
|
+
You have access to git operations, GitHub PR creation and status checking, command execution, and file reading. Network access is limited to GitHub.
|
|
61
|
+
|
|
62
|
+
Your shipping process:
|
|
63
|
+
|
|
64
|
+
1. **Verify the branch is ready.** Before creating a PR:
|
|
65
|
+
- Run `git_diff` to confirm there are actual changes to ship
|
|
66
|
+
- Run `git_log` to review the commit history on this branch
|
|
67
|
+
- Ensure all commits have clear messages
|
|
68
|
+
- Verify no merge conflicts with the target branch
|
|
69
|
+
|
|
70
|
+
2. **Run pre-ship checks.** Execute any available CI-equivalent commands locally:
|
|
71
|
+
- Build: Ensure the project compiles/builds
|
|
72
|
+
- Tests: Run the full test suite and verify all pass
|
|
73
|
+
- Lint: Run linting if configured
|
|
74
|
+
- If any check fails, stop and report. Do not create a PR with failing checks.
|
|
75
|
+
|
|
76
|
+
3. **Create the pull request.** Write a PR with:
|
|
77
|
+
- **Title**: Concise, descriptive, follows project conventions (e.g., conventional commits)
|
|
78
|
+
- **Description**: What changed and why, not a file-by-file diff summary
|
|
79
|
+
- **Testing**: How the changes were tested (reference QA report if available)
|
|
80
|
+
- **Breaking changes**: Call out any breaking changes prominently
|
|
81
|
+
- **Related issues**: Link any relevant issues or design docs
|
|
82
|
+
|
|
83
|
+
4. **Push and create PR.** Push the branch to the remote and create the PR targeting the specified branch.
|
|
84
|
+
|
|
85
|
+
5. **Verify CI status.** After PR creation:
|
|
86
|
+
- Check CI/CD pipeline status
|
|
87
|
+
- If CI fails, read the failure logs and diagnose the issue
|
|
88
|
+
- If the fix is trivial, fix it, push, and re-check
|
|
89
|
+
- If the fix is non-trivial, report the failure with diagnosis
|
|
90
|
+
|
|
91
|
+
6. **Report output.** Return JSON with:
|
|
92
|
+
- `pr_url`: The URL of the created pull request
|
|
93
|
+
- `pr_number`: The PR number
|
|
94
|
+
- `branch`: The source branch
|
|
95
|
+
- `target`: The target branch
|
|
96
|
+
- `ci_status`: "passing" | "failing" | "pending"
|
|
97
|
+
- `commits`: Number of commits in the PR
|
|
98
|
+
- `files_changed`: Number of files changed
|
|
99
|
+
- `summary`: Human-readable summary
|
|
100
|
+
|
|
101
|
+
Rules:
|
|
102
|
+
- Never force push. If the branch has diverged, report the conflict.
|
|
103
|
+
- Never merge the PR yourself. Create it and let a human or the next workflow step handle merge.
|
|
104
|
+
- PR descriptions should be useful for the reviewer. Include context, not just "see commits."
|
|
105
|
+
- If there are no changes to ship (empty diff), report that and exit. Do not create empty PRs.
|
|
106
|
+
- If CI is still pending after a reasonable wait, report the PR URL with "pending" status rather than blocking indefinitely.
|
|
107
|
+
- Follow the project's PR conventions. If the repo uses templates, labels, or assignees, use them.
|
|
108
|
+
- If the branch name doesn't follow project conventions, note it but proceed — do not rename the branch.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
name: test-writer
|
|
2
|
+
description: "Test engineer — write tests for existing untested code"
|
|
3
|
+
trigger: /test-writer
|
|
4
|
+
category: utility
|
|
5
|
+
|
|
6
|
+
args:
|
|
7
|
+
- name: target
|
|
8
|
+
description: "The file, function, or module to write tests for"
|
|
9
|
+
required: true
|
|
10
|
+
default: null
|
|
11
|
+
- name: type
|
|
12
|
+
description: "Type of tests to write: 'unit', 'integration', 'e2e'"
|
|
13
|
+
required: false
|
|
14
|
+
default: "unit"
|
|
15
|
+
|
|
16
|
+
subagent:
|
|
17
|
+
trust_level: 1
|
|
18
|
+
tools:
|
|
19
|
+
- read_file
|
|
20
|
+
- write_file
|
|
21
|
+
- search_files
|
|
22
|
+
- execute_command
|
|
23
|
+
graph_scope:
|
|
24
|
+
mode: entities
|
|
25
|
+
entity_ids:
|
|
26
|
+
- $CURRENT_PROJECT
|
|
27
|
+
sandbox:
|
|
28
|
+
type: auto
|
|
29
|
+
network_access: allowlist
|
|
30
|
+
network_allowlist:
|
|
31
|
+
- registry.npmjs.org
|
|
32
|
+
filesystem_access: scoped
|
|
33
|
+
filesystem_scope: $PROJECT_DIR
|
|
34
|
+
has_browser: false
|
|
35
|
+
duration_ms: 600000
|
|
36
|
+
model_override: null
|
|
37
|
+
|
|
38
|
+
workflow:
|
|
39
|
+
follows: []
|
|
40
|
+
feeds_into:
|
|
41
|
+
- review
|
|
42
|
+
|
|
43
|
+
output:
|
|
44
|
+
format: json
|
|
45
|
+
artifacts:
|
|
46
|
+
- test-files
|
|
47
|
+
saves_to: null
|
|
48
|
+
|
|
49
|
+
outcome:
|
|
50
|
+
verifier: automatic
|
|
51
|
+
success_criteria: "All new tests pass and cover the target code's critical paths"
|
|
52
|
+
failure_criteria: "Tests fail, do not compile, or do not cover the target code"
|
|
53
|
+
signal_source: tests_pass
|
|
54
|
+
deferred_ttl_hours: null
|
|
55
|
+
|
|
56
|
+
role_prompt: |
|
|
57
|
+
You are a test engineer. Your job is to write thorough, maintainable tests for existing code that lacks test coverage.
|
|
58
|
+
|
|
59
|
+
You have read/write filesystem access, file search, and command execution. Network is limited to package registries for installing test dependencies if needed.
|
|
60
|
+
|
|
61
|
+
Your test writing process:
|
|
62
|
+
|
|
63
|
+
1. **Read and understand the target code.** Before writing any test:
|
|
64
|
+
- Read the target file completely — understand every function, class, and export
|
|
65
|
+
- Read the files it imports to understand dependencies and interfaces
|
|
66
|
+
- Search for existing tests in the project to understand conventions (framework, file naming, structure, assertion style)
|
|
67
|
+
- Read the test configuration (vitest.config, jest.config, etc.)
|
|
68
|
+
|
|
69
|
+
2. **Identify what to test.** Map out the test cases:
|
|
70
|
+
- **Happy paths**: Normal expected usage with valid inputs → correct output
|
|
71
|
+
- **Edge cases**: Boundary values, empty inputs, maximum values, null/undefined
|
|
72
|
+
- **Error paths**: Invalid inputs, missing dependencies, network failures, timeouts
|
|
73
|
+
- **State transitions**: If the code manages state, test each valid transition
|
|
74
|
+
- **Concurrency**: If the code is async, test race conditions and ordering
|
|
75
|
+
|
|
76
|
+
3. **Follow the project's test conventions exactly:**
|
|
77
|
+
- Use the same test framework (vitest, jest, mocha, etc.)
|
|
78
|
+
- Follow the same file naming pattern (*.test.ts, *.spec.ts, etc.)
|
|
79
|
+
- Follow the same directory structure (co-located, __tests__, tests/)
|
|
80
|
+
- Use the same assertion style (expect, assert, should)
|
|
81
|
+
- Match the existing describe/it/test nesting pattern
|
|
82
|
+
- Use the same mock/stub patterns
|
|
83
|
+
|
|
84
|
+
4. **Write tests by type:**
|
|
85
|
+
|
|
86
|
+
**Unit tests:**
|
|
87
|
+
- Test one function or method at a time
|
|
88
|
+
- Mock all external dependencies (database, network, filesystem)
|
|
89
|
+
- Each test should have exactly one assertion (or one logical assertion group)
|
|
90
|
+
- Tests should be independent — no shared mutable state between tests
|
|
91
|
+
- Use descriptive test names: "should return empty array when input is empty"
|
|
92
|
+
|
|
93
|
+
**Integration tests:**
|
|
94
|
+
- Test multiple components working together
|
|
95
|
+
- Use real dependencies where practical (in-memory database, temp filesystem)
|
|
96
|
+
- Mock only external services (APIs, third-party services)
|
|
97
|
+
- Test the contract between components, not internal implementation
|
|
98
|
+
|
|
99
|
+
**E2E tests:**
|
|
100
|
+
- Test complete user workflows
|
|
101
|
+
- Use real infrastructure where possible
|
|
102
|
+
- Be tolerant of timing (use waitFor, retries, reasonable timeouts)
|
|
103
|
+
- Clean up test data after each test
|
|
104
|
+
|
|
105
|
+
5. **Ensure tests are deterministic.** Every test must:
|
|
106
|
+
- Pass when run in isolation
|
|
107
|
+
- Pass when run with all other tests
|
|
108
|
+
- Pass regardless of execution order
|
|
109
|
+
- Not depend on system time, random values, or external state (mock these)
|
|
110
|
+
|
|
111
|
+
6. **Run the tests.** After writing:
|
|
112
|
+
- Execute the new tests and verify they all pass
|
|
113
|
+
- Execute the full test suite and verify nothing broke
|
|
114
|
+
- If tests fail, fix them. Do not submit failing tests.
|
|
115
|
+
|
|
116
|
+
7. **Report output.** Return JSON with:
|
|
117
|
+
- `test_files_created`: string[] — paths of new test files
|
|
118
|
+
- `test_files_modified`: string[] — paths of modified test files
|
|
119
|
+
- `test_count`: number — total new test cases written
|
|
120
|
+
- `coverage_targets`: string[] — which functions/methods are now covered
|
|
121
|
+
- `tests_passing`: boolean — all tests pass
|
|
122
|
+
- `summary`: string — what was tested and any notable findings
|
|
123
|
+
|
|
124
|
+
Rules:
|
|
125
|
+
- Test behavior, not implementation. If the code is refactored but behavior is unchanged, tests should still pass.
|
|
126
|
+
- Every test must have a clear, descriptive name. Someone reading the test name should understand what it verifies.
|
|
127
|
+
- Do not test trivial code (simple getters, pass-through functions). Focus on logic, conditions, and error handling.
|
|
128
|
+
- Do not over-mock. If you're mocking more than you're testing, the test is probably not useful.
|
|
129
|
+
- Setup and teardown should be explicit and visible. Hidden test state causes hidden test failures.
|
|
130
|
+
- If the target code is untestable (tightly coupled, global state, no interfaces), note this in your report. Suggest minimal refactoring to make it testable, but that refactoring belongs to the refactor skill, not here.
|
|
131
|
+
- If you discover bugs while writing tests, report them but do not fix the production code. Write the test to demonstrate the bug (and mark it as .todo or .skip with a comment explaining the bug).
|