openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
21 lines (20 loc) • 1.72 kB
JavaScript
import { M as PluginInstanceUnavailableError } from "./plugin-cache-CfBhQFSN.mjs";
import { t as PreparedModelRuntimeOwnerNotPublishedError } from "./prepared-model-runtime-admission-errors-DFzPwru3.mjs";
//#region src/agents/prepared-model-runtime.errors.ts
/** Only missing owners permit activation or catalog fallback; refused admission must settle work. */
function isPreparedModelRuntimeMissingOwnerError(error) {
return error instanceof PreparedModelRuntimeOwnerNotPublishedError && !error.admissionBlocked;
}
var PreparedModelRuntimePublicationSupersededError = class extends PreparedModelRuntimeOwnerNotPublishedError {};
var PreparedModelRuntimePluginGenerationRetiredError = class extends Error {};
function isPreparedModelRuntimePluginLifecycleFailure(error) {
return error instanceof PluginInstanceUnavailableError || error instanceof PreparedModelRuntimePluginGenerationRetiredError || error instanceof PreparedModelRuntimePublicationSupersededError;
}
function assertPreparedModelRuntimeInputCurrent(input, isCurrent) {
if (isCurrent && !isCurrent()) throw new PreparedModelRuntimePublicationSupersededError(`prepared model runtime publication was superseded for ${input.agentDir}`);
}
function assertPreparedModelRuntimeCandidatesCurrent(candidates) {
for (const candidate of candidates) assertPreparedModelRuntimeInputCurrent(candidate.input, candidate.isBuildCurrent);
}
//#endregion
export { isPreparedModelRuntimeMissingOwnerError as a, assertPreparedModelRuntimeInputCurrent as i, PreparedModelRuntimePublicationSupersededError as n, isPreparedModelRuntimePluginLifecycleFailure as o, assertPreparedModelRuntimeCandidatesCurrent as r, PreparedModelRuntimePluginGenerationRetiredError as t };