UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

49 lines (48 loc) • 3.85 kB
import { t as formatErrorMessage } from "../errors-BKzCeTYb.mjs"; import { n as createLazyRuntimeMethodBinder } from "../lazy-runtime-zGjszCtt.mjs"; import { r as theme } from "../theme-BOI0xyRZ.mjs"; import { o as finishUpdateRun } from "../update-run-write-gdMM-b0r.mjs"; import { i as getUpdateRun } from "../update-run-reader-7kFqqMpW.mjs"; import { c as recordUpdateRunDiagnostic, f as recordUpdateRunStep, n as adoptUpdateRun, p as recordUpdateRunVerification } from "../update-run-ledger-kQmrTutl.mjs"; import { t as formatDocsLink } from "../links-41lO3DKP.mjs"; import { t as addGatewayServiceCommands } from "../register-service-commands-DyRFDtr8.mjs"; import { o as refreshUpdateRunReportArtifact } from "../update-failure-report-artifact-DFGofaeU.mjs"; import { n as sendUpdateResultTelemetry } from "../update-result-telemetry-BPoScmDe.mjs"; import { a as prepareManagedUpdateRequesterIdentity, r as createManagedUpdateRequesterAuthority } from "../update-requester-authority-ZobjNbhT.mjs"; //#region src/cli/daemon-cli/register.ts /** Register the legacy daemon command group. */ function registerDaemonCli(e) { const t = e.command("daemon").description("Manage the Gateway service (launchd/systemd/schtasks)").option("--json", "Output JSON", false).addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/gateway", "docs.openclaw.ai/cli/gateway")}\n`); addGatewayServiceCommands(t, { statusDescription: "Show service install status + check connectivity/capability" }); } //#endregion //#region src/cli/daemon-cli/update-run.ts /** Stable recovery entry used by installed managed-update drivers. */ async function finishDaemonUpdateRun(e, t, n = {}) { const r = finishUpdateRun(e, t, n, (e) => void sendUpdateResultTelemetry(e, { env: n.env })); try { await refreshUpdateRunReportArtifact(r, n); } catch (e) { console.warn(`Update report could not be saved: ${formatErrorMessage(e)}`); } return r; } //#endregion //#region src/cli/daemon-cli.ts const install = createLazyRuntimeMethodBinder(() => import("../install-Bw7nT2Qa.mjs")); const lifecycle = createLazyRuntimeMethodBinder(() => import("../lifecycle-z2ThHck5.mjs")); const status = createLazyRuntimeMethodBinder(() => import("../status-SsXpF7ED.mjs")); const lifecycleContext = createLazyRuntimeMethodBinder(() => import("../lifecycle-context-BK_sQZhm.mjs")); const serviceHandoff = createLazyRuntimeMethodBinder(() => import("../update-managed-service-handoff-Dbo_NrUW.mjs")); const runDaemonInstall = install((e) => e.runDaemonInstall); const runDaemonRestart = lifecycle((e) => e.runDaemonRestart); const runDaemonStart = lifecycle((e) => e.runDaemonStart); const runDaemonStop = lifecycle((e) => e.runDaemonStop); const runDaemonUninstall = lifecycle((e) => e.runDaemonUninstall); const runDaemonStatus = status((e) => e.runDaemonStatus); const isManagedUpdateRequesterOwner = lifecycleContext((e) => e.isManagedUpdateRequesterOwner); const waitForGatewayUpdateRecovery = lifecycleContext((e) => e.waitForGatewayUpdateRecovery); const assertForegroundUpdateOrigin = serviceHandoff((e) => e.assertForegroundUpdateOrigin); const runManagedHandoffSentinelChild = createLazyRuntimeMethodBinder(() => import("../update-managed-service-handoff-sentinel-CH5V5Sac.mjs"))((e) => e.executeInstalledHandoffSentinelOperation); //#endregion export { addGatewayServiceCommands, adoptUpdateRun, assertForegroundUpdateOrigin, createManagedUpdateRequesterAuthority, finishDaemonUpdateRun as finishUpdateRun, getUpdateRun, isManagedUpdateRequesterOwner, prepareManagedUpdateRequesterIdentity, recordUpdateRunDiagnostic, recordUpdateRunStep, recordUpdateRunVerification, registerDaemonCli, runDaemonInstall, runDaemonRestart, runDaemonStart, runDaemonStatus, runDaemonStop, runDaemonUninstall, runManagedHandoffSentinelChild, waitForGatewayUpdateRecovery };