30 lines
1.0 KiB
Markdown
30 lines
1.0 KiB
Markdown
|
|
# Task ID: 146
|
||
|
|
|
||
|
|
**Title:** AgentRuntime interface definition
|
||
|
|
|
||
|
|
**Status:** pending
|
||
|
|
|
||
|
|
**Dependencies:** None
|
||
|
|
|
||
|
|
**Priority:** medium
|
||
|
|
|
||
|
|
**Description:** Define AgentRuntime adapter interface for swappable agent implementations
|
||
|
|
|
||
|
|
**Details:**
|
||
|
|
|
||
|
|
Create src/mcpd/src/services/agent-runtime.ts:
|
||
|
|
1. Define RuntimeSessionOpts: { agentId, projectId, taskId?, image, persona (prompt files) }
|
||
|
|
2. Define RuntimeStatus: 'starting' | 'running' | 'completed' | 'failed'
|
||
|
|
3. Define RuntimeResult: { branch: string, headCommit: string, summary: string, prUrl?: string }
|
||
|
|
4. Define AgentRuntime interface:
|
||
|
|
- startSession(opts: RuntimeSessionOpts): Promise<{ sessionId: string }>
|
||
|
|
- send(sessionId: string, message: string): Promise<void>
|
||
|
|
- status(sessionId: string): Promise<RuntimeStatus>
|
||
|
|
- result(sessionId: string): Promise<RuntimeResult>
|
||
|
|
- endSession(sessionId: string): Promise<void>
|
||
|
|
5. This is an interface, not an implementation - allows swapping runtimes later
|
||
|
|
|
||
|
|
**Test Strategy:**
|
||
|
|
|
||
|
|
Type tests: verify interface can be implemented, verify all methods have correct signatures.
|