Skip to content

Commit fc34077

Browse files
committed
refactor: generalize coding agent to behavior + business; part 1
- Split monolithic simpleCodeGeneratorAgent into baseAgentBehavior and PhasicAgentBehavior - CodeGeneratorAgent now inherits Agent class (DO) and uses behavior - AgentBehavior relies on AgentInfrastructure (provided by DO) to work, allows to write non-DO coding agents (like cli based) - Phasic for legacy state machine app builder, Agentic for agent driven loop - Agentic would support multiple project types - 'app', 'workflow', 'slides/docs'
1 parent 9d5a178 commit fc34077

38 files changed

+1889
-1279
lines changed

worker/agents/assistants/codeDebugger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { executeInference } from '../inferutils/infer';
1010
import { InferenceContext, ModelConfig } from '../inferutils/config.types';
1111
import { createObjectLogger } from '../../logger';
1212
import type { ToolDefinition } from '../tools/types';
13-
import { CodingAgentInterface } from '../services/implementations/CodingAgent';
1413
import { AGENT_CONFIG } from '../inferutils/config';
1514
import { buildDebugTools } from '../tools/customTools';
1615
import { RenderToolCall } from '../operations/UserConversationProcessor';
@@ -19,6 +18,7 @@ import { PROMPT_UTILS } from '../prompts';
1918
import { RuntimeError } from 'worker/services/sandbox/sandboxTypes';
2019
import { FileState } from '../core/state';
2120
import { InferError } from '../inferutils/core';
21+
import { ICodingAgent } from '../services/interfaces/ICodingAgent';
2222

2323
const SYSTEM_PROMPT = `You are an elite autonomous code debugging specialist with deep expertise in root-cause analysis, modern web frameworks (React, Vite, Cloudflare Workers), TypeScript/JavaScript, build tools, and runtime environments.
2424
@@ -544,7 +544,7 @@ type LoopDetectionState = {
544544

545545
export type DebugSession = {
546546
filesIndex: FileState[];
547-
agent: CodingAgentInterface;
547+
agent: ICodingAgent;
548548
runtimeErrors?: RuntimeError[];
549549
};
550550

0 commit comments

Comments
 (0)