openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
25 lines (24 loc) • 980 B
JavaScript
import { r as defaultRuntime } from "./runtime-B-SLYP-m.mjs";
import { t as exitCliAfterOutput } from "./one-shot-exit-DkbGSQD5.mjs";
import { n as readInstallOwner, t as formatInstallOwnerMessage } from "./install-owner-DDPQXcjQ.mjs";
//#region src/cli/update-cli/host-owned.ts
/** Refuse before update admission can touch service, package, or operator state. */
async function refuseHostOwnedUpdate(e, t) {
const n = await readInstallOwner(e);
if (n) reportHostOwnedUpdate(n, t);
}
function reportHostOwnedUpdate(e, t) {
const n = e ? formatInstallOwnerMessage(e) : "This installation is managed by its host. Update it through the host application.";
if (t.json) defaultRuntime.writeJson({
status: "host-managed",
reason: "host-owned-install",
installKind: "host",
installOwner: e,
message: n,
steps: []
});
else defaultRuntime.error(n);
exitCliAfterOutput(defaultRuntime, 1);
}
//#endregion
export { reportHostOwnedUpdate as n, refuseHostOwnedUpdate as t };