mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-19 09:01:39 -06:00
409fb7abca
Enforce configured Telegram direct-message tool policies across queued runs and native harnesses. Unsupported restricted harnesses now refuse visibly; turns without explicit policy keep existing tool access. Co-authored-by: Ayaan Zaidi <hi@obviy.us>
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
|
|
export class CodexThreadStartRequestError extends Error {
|
|
constructor(cause: unknown) {
|
|
super(formatErrorMessage(cause), { cause });
|
|
this.name = "CodexThreadStartRequestError";
|
|
}
|
|
}
|
|
|
|
export class CodexThreadBindingConflictError extends Error {
|
|
constructor(threadId: string, operation: string) {
|
|
super(`Codex thread binding changed while ${operation}: ${threadId}`);
|
|
this.name = "CodexThreadBindingConflictError";
|
|
}
|
|
}
|
|
|
|
export class CodexRestrictedToolSurfaceAttestationError extends Error {
|
|
constructor(cause: unknown) {
|
|
super("Codex restricted-tool-surface MCP attestation failed", { cause });
|
|
this.name = "CodexRestrictedToolSurfaceAttestationError";
|
|
}
|
|
}
|
|
|
|
export class CodexThreadBindingConflictAfterCleanupError extends CodexThreadBindingConflictError {}
|
|
|
|
export class CodexAdoptedThreadActiveError extends Error {
|
|
constructor() {
|
|
super("Codex session became active in another runner; wait for it to finish before continuing");
|
|
this.name = "CodexAdoptedThreadActiveError";
|
|
}
|
|
}
|