# @smithers-orchestrator/agent-eliza — src

Opt-in Smithers agent harness that runs an elizaOS `AgentRuntime` in-process.
The package entry is `index.js`, which exports `ElizaAgent` only (the
`@smithers-type-exports` block there is tool-managed — never edit it by hand).

- `ElizaAgent.js` — the harness. Lazily constructs and memoizes the runtime
  (`#ensureRuntime`); `preflight()` resolves `@elizaos/core` early so
  missing-dep errors fail the task before `generate()`. `generate()` routes
  prompts through the shared `extractPrompt` from
  `@smithers-orchestrator/agents/BaseCliAgent` and falls back
  `TEXT_LARGE` → `TEXT_SMALL` only on unrecognised-model errors, never on
  transient failures. Aborts use `name = "AbortError"` so the driver's
  classifier treats them as aborts, not retryable task failures.
  `defaultRuntimeFactory` is exported for the test seam.
- `ElizaAgentOptions.ts` — type-only structural elizaOS `Character`/`Plugin`/
  options shapes, so the package compiles without importing `@elizaos/core`
  types.
- `conventions/` — separate subpath export (`./conventions`); see its README.

Gotchas: `@elizaos/core` is a real dependency but is loaded via dynamic import
at first preflight/generate, so this module carries no load-time dependency on
it. `index.d.ts` is generated by `tsup --dts-only` — never hand-edit.
