#749 Phase 0: MCP front-door + durable run_goal agent tool
Description
EditHighway Agents Phase 0 (option B, durable). Two parts:
1) Engine: new tool tools.agent.run_goal — a bounded, RESUMABLE ReAct loop built on DurableContext (ctx.step / set_variable / get_variable / wait_for_event), modeled on the ScriptPlan long-running scheduler precedent. State in ctx variables; per-step checkpointing so it resumes mid-loop after a crash. HITL approval REQUIRED before any outbound/destructive tool; approval/event names scoped to {{workflow_run_id}} (cross-run deadlock lesson). Uses existing call_llm (circuit-broken, function-calling). Trivial wrapper DSL template submits a single run_goal task with inputs={goal}.
2) Separate repo: remote MCP server (FastMCP, Streamable HTTP) wrapping the public REST API: run_goal->POST /api/v1/workflows; get_status->GET /api/v1/workflows/<id> (+ GET /api/v1/approvals?workflow_run_id=..&status=pending); approve->POST /api/v1/approvals/<key>/approve|reject. Auth: customer hw_k1_ API key forwarded as Bearer (verified accepted inline by rbac middleware). Dogfood in opencode.
Plan: ~/.claude/plans/except-highway-the-rest-vivid-shamir.md
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...