mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-25 12:41:14 +00:00
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
28 lines
928 B
TypeScript
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")
|
|
);
|
|
}
|