SmithersErrorInstance is a typed, code-bearing Error subclass used throughout Smithers internals. It surfaces when runWorkflow throws, in NodeFailed events emitted during execution, and as JSON in HTTP API error responses. The imports below are the full error utility surface.
build agent command: undefined is not an object (evaluating 'schema._zod.def'):
your task output schema is a Zod v3 object. Smithers reads schema metadata
via Zod v4 internals (_zod.def). Install Zod v4 (bun add zod@^4) and import
z from it. This is a deterministic configuration error; re-running will not fix
it.SmithersErrorInstance carries three pieces of documentation metadata:
Use
KnownSmithersErrorCode for an exhaustive switch over built-in Smithers codes. SmithersErrorCode includes the (string & {}) escape hatch for user-defined custom codes.
Engine
Components
Tools
Agents
Database
Migration errors
smithers migrate preserves the source SQLite store by default. If the legacy
smithers.db cannot be copied into the target backend, Smithers leaves the
original file untouched and reports the first actionable failure.
Corrupt, malformed, encrypted, or non-SQLite source files surface as
DB_QUERY_FAILED with the source dbPath in details. The error message tells
the operator to verify the file with sqlite3 <dbPath> 'PRAGMA integrity_check'
and restore from backup or start fresh if SQLite confirms corruption.
Source files that exist but cannot be opened also surface as DB_QUERY_FAILED.
That message points at the common operational causes: another process holding the
file, unreadable permissions, or a copied SQLite file missing its
smithers.db-wal / smithers.db-shm sidecars.
For Postgres migrations, smithers migrate --to postgres validates the target
connection string before opening the source store. Missing --url,
SMITHERS_POSTGRES_URL, or DATABASE_URL fails fast with INVALID_INPUT so
connection setup problems are not hidden behind unrelated source-store errors.
Effect / Runtime
Hot Reload
Scorers
CLI
Integrations
Unknown legacy account providers are tolerated entry-by-entry. For example, an
old
"provider": "gemini" subscription is skipped with a warning that names the
account label and valid providers, while the remaining valid accounts still
load. Such an entry is left out of the active account list but preserved
verbatim in accounts.json across later agents add and agents remove calls,
so an unrelated change never destroys the credentials its configDir points at.
Run bunx smithers-orchestrator agents remove <label> to delete it, or
bunx smithers-orchestrator agents add --label <label> --replace ... to migrate
it onto a supported provider.
ACCOUNTS_FILE_INVALID is reserved for invalid JSON or entries whose
known provider shape is malformed.
HTTP API Errors
JSON response codes, notSmithersErrorInstance objects.