openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
48 lines (47 loc) • 1.92 kB
JavaScript
import "./incognito-session-error-BUzgcwoZ.mjs";
import "./errors-CEQyfSPE.mjs";
import { r as testing$1 } from "./manager-sn_kcSXp.mjs";
import { a as testing$2, i as requireAcpRuntimeBackend } from "./registry-CwtcY73s.mjs";
import { c as readAcpSessionEntryAsync$1 } from "./session-meta-CSN8P5u2.mjs";
import { n as resolveAcpAgentPolicyError, r as resolveAcpDispatchPolicyError } from "./policy-B6crihax.mjs";
import "./acpx-Ch8W9GG0.mjs";
//#region src/plugin-sdk/acp-runtime.ts
/** Keep internal actor authority outside the released one-argument SDK contract. */
const readAcpSessionEntryAsync = readAcpSessionEntryAsync$1;
function resolveAcpSessionAvailability(params) {
const policyError = resolveAcpDispatchPolicyError(params.config) ?? resolveAcpAgentPolicyError(params.config, params.agentId);
if (policyError) return {
available: false,
message: policyError.message
};
try {
requireAcpRuntimeBackend(params.backendId);
return { available: true };
} catch (error) {
return {
available: false,
message: error instanceof Error ? error.message : "ACP runtime backend is unavailable."
};
}
}
/** Lazy ACP test helper facade combining control-plane and runtime registry helpers. */
const testing = new Proxy({}, {
get(_target, prop, receiver) {
if (Reflect.has(testing$1, prop)) return Reflect.get(testing$1, prop, receiver);
return Reflect.get(testing$2, prop, receiver);
},
has(_target, prop) {
return Reflect.has(testing$1, prop) || Reflect.has(testing$2, prop);
},
ownKeys() {
return Array.from(/* @__PURE__ */ new Set([...Reflect.ownKeys(testing$1), ...Reflect.ownKeys(testing$2)]));
},
getOwnPropertyDescriptor(_target, prop) {
if (Reflect.has(testing$1, prop) || Reflect.has(testing$2, prop)) return {
configurable: true,
enumerable: true
};
}
});
//#endregion
export { resolveAcpSessionAvailability as n, testing as r, readAcpSessionEntryAsync as t };