Files
openclaw/src/system-agent/inference-error.ts
Peter Steinberger a6a0716486 feat(setup): rename Crestodian to OpenClaw system agent
User-facing name is now OpenClaw (the system speaks); internal code name is
system-agent. Gateway methods crestodian.* -> openclaw.chat/openclaw.setup.*,
agent tool -> openclaw, reserved agent ids openclaw + retired crestodian.
openclaw setup routes: onboarding flags -> onboard, -m/--yes -> system agent,
bare configured interactive -> OpenClaw chat, unconfigured -> onboarding.
Hidden crestodian CLI and /crestodian TUI aliases kept; docs moved to
docs/cli/openclaw.md with redirect stub. macOS/Android strings in lockstep.

Refs #107237
2026-07-14 11:03:02 -07:00

28 lines
928 B
TypeScript

type SystemAgentInferenceStage = "agent-turn" | "planner" | "conversation";
/** Safe public error for an OpenClaw turn that could not complete with intelligence. */
export class SystemAgentInferenceUnavailableError extends Error {
readonly code = "SYSTEM_AGENT_INFERENCE_UNAVAILABLE";
constructor(
readonly stage: SystemAgentInferenceStage,
readonly failures: readonly unknown[] = [],
) {
super(
"OpenClaw could not reach working inference. Run `openclaw onboard` to reconnect and live-test AI, then try again.",
);
this.name = "SystemAgentInferenceUnavailableError";
}
}
export function isSystemAgentInferenceUnavailableError(
error: unknown,
): error is SystemAgentInferenceUnavailableError {
return (
error instanceof SystemAgentInferenceUnavailableError ||
(error instanceof Error &&
"code" in error &&
error.code === "SYSTEM_AGENT_INFERENCE_UNAVAILABLE")
);
}