Executor plugins
Executors own the provider-specific LLM harness: tool loops, hook injection, session persistence, and telemetry normalisation. The runner orchestrates which executor to call; it never imports Anthropic/OpenAI SDK code directly.
Core interface (PhaseExecutorRuntime)
| Method | Notes |
|---|---|
executePhase(req) | Returns an async iterable of PhaseExecutorEvent chunks (assistant deltas, tool proposals, usage metrics) |
listModels() | Emits ExecutorModelDescriptor rows for dashboards + alias validation |
supports(modelId) | Guards unknown models before network I/O |
Optional:
calculateCost— Tenant-specific pricing adjustments.mcpServer()— Attach executor-local MCP (uncommon).chat(req)— Stateless conversational completion for surfaces that do not need tools, MCP, hooks, or subprocess agents (Coro plan mode onPOST /intake/stream). Implementations should call the provider HTTP API directly. Request carriesmessages, optionalsystemPrompt,model,maxOutputTokens, andsignal; result returns concatenatedoutputplus normalisedusage.
PhaseExecutionRequest highlights
Carries HookPolicy (allowedTools, writeRoots, onPreToolUse), resume handles, combined MCP server list, workflow-scoped subagents, and working-directory metadata.
Capability bits (ExecutorCapabilities)
| Flag | Runner effect |
|---|---|
supportsNativeSubagents | Lets YAML subagents use the executor’s native Task tooling; otherwise Coro registers run_subagent. |
supportsClaudeMdNativeWalkUp | When true, executor loads .claude/CLAUDE.md hierarchies itself. |
supportsNativeFileTools | Suppresses fallback file_* + shell tools if the SDK already exposes them. |
supportsSessionResume | Claude-style sessionId persistence. |
supportsConversationReplay | Stateless models replay conversationHistory. |
supportsThinking | Surfaces reasoningEffort hints from llm.aliases. |
supportsImageInput | Enables multimodal blocks. |
maxContextTokens | Hard ceiling enforced before calling upstream APIs. |
Exactly one resume strategy should be true for a given plugin build.
Reference packages
| Package | Role |
|---|---|
@coro-ai/llm-anthropic | Wraps @anthropic-ai/claude-agent-sdk — native Tasks + CLAUDE.md walk-up. |
@coro-ai/llm-openai | OpenAI Responses / chat-completions style loop with conversation replay. |
Executors must remain workflow-agnostic: no references to campaign, lane, or business guardrails beyond what the runner already encodes in hooks.