@clawops/cli 1.7.5 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apply-GBZ2H2IK.js → apply-F3KY2HTB.js} +3 -2
- package/dist/{chunk-S76W2ANQ.js → chunk-35WVQY3X.js} +2 -2
- package/dist/chunk-EI7CQQ7D.js +14 -0
- package/dist/{chunk-UW3XOER4.js → chunk-FNS56UQY.js} +1 -1
- package/dist/{chunk-AWZCTBV6.js → chunk-RAZZ256T.js} +2 -2
- package/dist/{chunk-3NTYPOLR.js → chunk-SEZMVVAS.js} +24 -2
- package/dist/{chunk-2YOP6N7X.js → chunk-UKTP332Z.js} +4 -10
- package/dist/cli.js +28 -22
- package/dist/{generate-EEJDYZVY.js → generate-VDNZC4QM.js} +1 -1
- package/dist/{mcp-wire-WDEN4BOT.js → mcp-wire-FR3W2CB6.js} +2 -1
- package/dist/{package-6EAENRST.js → package-HTNU53G5.js} +1 -1
- package/dist/{remote-config-MCX7UWRS.js → remote-config-QDLN4UMG.js} +2 -1
- package/dist/{server-OJJ7ICVA.js → server-ZQ72NTW2.js} +16 -14
- package/dist/{version-guard-MZAO4KHS.js → version-guard-VUCNZXQS.js} +2 -1
- package/dist/{versions-OEPAS2EL.js → versions-2UVAT6PQ.js} +2 -1
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
applyPlan
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-35WVQY3X.js";
|
|
5
5
|
import "./chunk-6ZFIFDBJ.js";
|
|
6
6
|
import "./chunk-BOPSG2LI.js";
|
|
7
7
|
import "./chunk-6X45DDGH.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-SEZMVVAS.js";
|
|
9
9
|
import "./chunk-P5LKWRPL.js";
|
|
10
|
+
import "./chunk-EI7CQQ7D.js";
|
|
10
11
|
import "./chunk-PVUVI35Y.js";
|
|
11
12
|
import "./chunk-A2I76FTA.js";
|
|
12
13
|
import "./chunk-CX5SL5HP.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
deepMerge,
|
|
14
14
|
readRemoteConfig,
|
|
15
15
|
restartGateway
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SEZMVVAS.js";
|
|
17
17
|
import {
|
|
18
18
|
buildContext
|
|
19
19
|
} from "./chunk-P5LKWRPL.js";
|
|
@@ -35,7 +35,7 @@ ${validation.errors.join("\n")}`
|
|
|
35
35
|
"plan/apply is not supported for the local provider. Use `clawops up` directly."
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
-
const { guardOpenclawVersion } = await import("./version-guard-
|
|
38
|
+
const { guardOpenclawVersion } = await import("./version-guard-VUCNZXQS.js");
|
|
39
39
|
await guardOpenclawVersion(plan.spec.openclaw.version);
|
|
40
40
|
const ctx = buildContext({
|
|
41
41
|
stack: plan.spec.stackName,
|
|
@@ -45,10 +45,10 @@ async function generatePlan(intent, _opts) {
|
|
|
45
45
|
"plan/apply is not supported for the local provider. Use `clawops up` directly."
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
const { version } = await import("./package-
|
|
48
|
+
const { version } = await import("./package-HTNU53G5.js");
|
|
49
49
|
const config = getConfig();
|
|
50
50
|
const instanceType = intent.instanceType ?? "small";
|
|
51
|
-
const { guardOpenclawVersion, defaultOpenclawVersion } = await import("./version-guard-
|
|
51
|
+
const { guardOpenclawVersion, defaultOpenclawVersion } = await import("./version-guard-VUCNZXQS.js");
|
|
52
52
|
const openclawVersion = await guardOpenclawVersion(
|
|
53
53
|
intent.openclawVersion ?? await defaultOpenclawVersion()
|
|
54
54
|
);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
err,
|
|
4
|
+
ok
|
|
5
|
+
} from "./chunk-EI7CQQ7D.js";
|
|
2
6
|
|
|
3
7
|
// src/openclaw/run-flags.ts
|
|
4
8
|
var CONFIG_MOUNT_PATH = "/app/config.json";
|
|
@@ -8,6 +12,19 @@ var ADD_HOST_FLAG = "--add-host=host.docker.internal:host-gateway";
|
|
|
8
12
|
var PORT_PIN = `--port ${GATEWAY_PORT}`;
|
|
9
13
|
var COMMON_RUN_FLAGS = `${CONFIG_PATH_ENV} ${ADD_HOST_FLAG}`;
|
|
10
14
|
var ENV_FILE_PATH = "/home/clawops/openclaw.env";
|
|
15
|
+
var IMAGE_INSPECT_CMD = `docker inspect openclaw --format '{{.Config.Image}}'`;
|
|
16
|
+
function imageForRestart(inspectStdout) {
|
|
17
|
+
const image = inspectStdout.trim();
|
|
18
|
+
if (!image || image.includes("Error") || !image.includes(":")) {
|
|
19
|
+
return err(
|
|
20
|
+
"No running OpenClaw container found, so there is no image version to reuse. Deploy one with `clawops up --openclaw-version <version>`. clawops does not fall back to `latest` or `stable` here: both now point at OpenClaw 2.0, which this release line does not support."
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
return ok(image);
|
|
24
|
+
}
|
|
25
|
+
function versionOf(image) {
|
|
26
|
+
return image.split(":")[1] ?? "unknown";
|
|
27
|
+
}
|
|
11
28
|
function gatewayRunCommand(opts) {
|
|
12
29
|
const { image, configPath, envFilePath = ENV_FILE_PATH, pathPrefix = "" } = opts;
|
|
13
30
|
const envFileArg = `$([ -s ${envFilePath} ] && echo --env-file ${envFilePath})`;
|
|
@@ -76,9 +93,11 @@ async function restartGateway(session, signal) {
|
|
|
76
93
|
const os = await detectOS(session, signal);
|
|
77
94
|
const configPath = configPathForOS(os);
|
|
78
95
|
const pathPrefix = os === "Darwin" ? 'export PATH="/usr/local/bin:/opt/homebrew/bin:/Applications/Docker.app/Contents/Resources/bin:$PATH" && ' : "";
|
|
79
|
-
const imgCmd = `${pathPrefix}
|
|
96
|
+
const imgCmd = `${pathPrefix}${IMAGE_INSPECT_CMD}`;
|
|
80
97
|
const imgResult = os === "Darwin" ? await session.exec(imgCmd, signal) : await execWithFallbackSudo(session, imgCmd, signal);
|
|
81
|
-
const
|
|
98
|
+
const resolved = imageForRestart(imgResult.stdout);
|
|
99
|
+
if (!resolved.ok) throw new Error(resolved.error);
|
|
100
|
+
const image = resolved.value;
|
|
82
101
|
const restartCmd = gatewayRunCommand({
|
|
83
102
|
image,
|
|
84
103
|
configPath,
|
|
@@ -121,6 +140,9 @@ function deepMerge(base, overlay) {
|
|
|
121
140
|
}
|
|
122
141
|
|
|
123
142
|
export {
|
|
143
|
+
IMAGE_INSPECT_CMD,
|
|
144
|
+
imageForRestart,
|
|
145
|
+
versionOf,
|
|
124
146
|
gatewayRunCommand,
|
|
125
147
|
OPENCLAW_CONFIG_LINUX,
|
|
126
148
|
OPENCLAW_CONFIG_MACOS,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
err,
|
|
4
|
+
ok
|
|
5
|
+
} from "./chunk-EI7CQQ7D.js";
|
|
2
6
|
import {
|
|
3
7
|
resolveSpecDir
|
|
4
8
|
} from "./chunk-PVUVI35Y.js";
|
|
@@ -6,16 +10,6 @@ import {
|
|
|
6
10
|
// src/openclaw/versions.ts
|
|
7
11
|
import { readFileSync } from "fs";
|
|
8
12
|
import { join } from "path";
|
|
9
|
-
|
|
10
|
-
// src/types/result.ts
|
|
11
|
-
function ok(value) {
|
|
12
|
-
return { ok: true, value };
|
|
13
|
-
}
|
|
14
|
-
function err(error) {
|
|
15
|
-
return { ok: false, error };
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// src/openclaw/versions.ts
|
|
19
13
|
var MOVING_TAGS = ["latest", "stable", "dev", "main"];
|
|
20
14
|
function isMovingTag(v) {
|
|
21
15
|
return MOVING_TAGS.includes(v);
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
monitor_default,
|
|
4
4
|
validateOpenclawConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FNS56UQY.js";
|
|
6
6
|
import {
|
|
7
7
|
MCP_APPS,
|
|
8
8
|
buildMcpEntry,
|
|
@@ -10,9 +10,13 @@ import {
|
|
|
10
10
|
} from "./chunk-OIGTOLB3.js";
|
|
11
11
|
import "./chunk-DQDAWNGB.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
IMAGE_INSPECT_CMD,
|
|
14
|
+
gatewayRunCommand,
|
|
15
|
+
imageForRestart,
|
|
16
|
+
versionOf
|
|
17
|
+
} from "./chunk-SEZMVVAS.js";
|
|
15
18
|
import "./chunk-P5LKWRPL.js";
|
|
19
|
+
import "./chunk-EI7CQQ7D.js";
|
|
16
20
|
import {
|
|
17
21
|
resolveSpecDir
|
|
18
22
|
} from "./chunk-PVUVI35Y.js";
|
|
@@ -213,7 +217,7 @@ var up_default = defineCommand2({
|
|
|
213
217
|
},
|
|
214
218
|
async run({ args }) {
|
|
215
219
|
const { buildContext } = await import("./context-5LCUG2QR.js");
|
|
216
|
-
const { guardOpenclawVersion, defaultOpenclawVersion } = await import("./version-guard-
|
|
220
|
+
const { guardOpenclawVersion, defaultOpenclawVersion } = await import("./version-guard-VUCNZXQS.js");
|
|
217
221
|
const ctx = buildContext(args);
|
|
218
222
|
const requestedVersion = typeof args["openclaw-version"] === "string" ? args["openclaw-version"] : await defaultOpenclawVersion();
|
|
219
223
|
const openclawVersion = await guardOpenclawVersion(requestedVersion);
|
|
@@ -320,7 +324,7 @@ var up_default = defineCommand2({
|
|
|
320
324
|
async function applyLocalConfigOverlay(opts) {
|
|
321
325
|
const { connect } = await import("./ssh-CNJNLM3E.js");
|
|
322
326
|
const { resolveSecrets } = await import("./secrets-SVZWNAPK.js");
|
|
323
|
-
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-
|
|
327
|
+
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-QDLN4UMG.js");
|
|
324
328
|
let overlay;
|
|
325
329
|
try {
|
|
326
330
|
overlay = JSON.parse(readFileSync(opts.configPath, "utf-8"));
|
|
@@ -497,7 +501,7 @@ var plan_default = defineCommand5({
|
|
|
497
501
|
},
|
|
498
502
|
async run({ args }) {
|
|
499
503
|
const { buildContext } = await import("./context-5LCUG2QR.js");
|
|
500
|
-
const { generatePlan } = await import("./generate-
|
|
504
|
+
const { generatePlan } = await import("./generate-VDNZC4QM.js");
|
|
501
505
|
const ctx = buildContext(args);
|
|
502
506
|
if (ctx.adapter.name === "local") {
|
|
503
507
|
throw new UsageError(
|
|
@@ -587,7 +591,7 @@ var apply_default = defineCommand6({
|
|
|
587
591
|
},
|
|
588
592
|
async run({ args }) {
|
|
589
593
|
const { validatePlan } = await import("./validate-CFQ4FH2T.js");
|
|
590
|
-
const { applyPlan } = await import("./apply-
|
|
594
|
+
const { applyPlan } = await import("./apply-F3KY2HTB.js");
|
|
591
595
|
const planPath = args._?.[0];
|
|
592
596
|
if (!planPath) {
|
|
593
597
|
throw new UsageError("Usage: clawops apply <plan.json>");
|
|
@@ -1326,11 +1330,13 @@ var gateway_default = defineCommand13({
|
|
|
1326
1330
|
);
|
|
1327
1331
|
}
|
|
1328
1332
|
} else if (action === "restart") {
|
|
1329
|
-
const imgResult = await session.exec(
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1333
|
+
const imgResult = await session.exec(IMAGE_INSPECT_CMD, abortController.signal);
|
|
1334
|
+
const image = imageForRestart(imgResult.stdout);
|
|
1335
|
+
if (!image.ok) {
|
|
1336
|
+
failure(image.error);
|
|
1337
|
+
process15.exit(1);
|
|
1338
|
+
}
|
|
1339
|
+
const version = versionOf(image.value);
|
|
1334
1340
|
const spin = spinner("Restarting gateway...");
|
|
1335
1341
|
const result = await session.exec(dockerRunCmd2(version), abortController.signal);
|
|
1336
1342
|
spin.stop();
|
|
@@ -1700,7 +1706,7 @@ var doctor_default = defineCommand16({
|
|
|
1700
1706
|
process18.stdout.write("\nOpenClaw\n");
|
|
1701
1707
|
try {
|
|
1702
1708
|
const yaml = await import("./js-yaml-PTEEG4FO.js");
|
|
1703
|
-
const { loadVersionSpec, describeRange } = await import("./versions-
|
|
1709
|
+
const { loadVersionSpec, describeRange } = await import("./versions-2UVAT6PQ.js");
|
|
1704
1710
|
const support = loadVersionSpec(yaml).support;
|
|
1705
1711
|
success(`Supported range ${describeRange(support)} (recommended ${support.recommended})`);
|
|
1706
1712
|
if (!support.max) {
|
|
@@ -1760,7 +1766,7 @@ var doctor_default = defineCommand16({
|
|
|
1760
1766
|
const deployedVersion = image.includes(":") ? image.slice(image.lastIndexOf(":") + 1) : "";
|
|
1761
1767
|
if (deployedVersion) {
|
|
1762
1768
|
const yaml = await import("./js-yaml-PTEEG4FO.js");
|
|
1763
|
-
const { loadVersionSpec, checkVersion, isMovingTag } = await import("./versions-
|
|
1769
|
+
const { loadVersionSpec, checkVersion, isMovingTag } = await import("./versions-2UVAT6PQ.js");
|
|
1764
1770
|
const support = loadVersionSpec(yaml).support;
|
|
1765
1771
|
if (isMovingTag(deployedVersion)) {
|
|
1766
1772
|
warn(
|
|
@@ -1896,7 +1902,7 @@ var serveCmd = defineCommand17({
|
|
|
1896
1902
|
inspector: { type: "boolean", description: "Enable MCP inspector" }
|
|
1897
1903
|
},
|
|
1898
1904
|
async run({ args }) {
|
|
1899
|
-
const { serveMcp } = await import("./server-
|
|
1905
|
+
const { serveMcp } = await import("./server-ZQ72NTW2.js");
|
|
1900
1906
|
await serveMcp({
|
|
1901
1907
|
port: args.http ? Number(args.http) : void 0,
|
|
1902
1908
|
bind: args.bind,
|
|
@@ -1974,7 +1980,7 @@ var wireCmd = defineCommand17({
|
|
|
1974
1980
|
const { buildContext } = await import("./context-5LCUG2QR.js");
|
|
1975
1981
|
const { acquireSession, drainPool } = await import("./pool-QGFQRMGU.js");
|
|
1976
1982
|
const { extractBaseOutputs } = await import("./outputs-DJHBY7EE.js");
|
|
1977
|
-
const { wireGatewayMcp } = await import("./mcp-wire-
|
|
1983
|
+
const { wireGatewayMcp } = await import("./mcp-wire-FR3W2CB6.js");
|
|
1978
1984
|
const ac = new AbortController();
|
|
1979
1985
|
process19.on("SIGINT", () => {
|
|
1980
1986
|
ac.abort();
|
|
@@ -2495,7 +2501,7 @@ var setup_default = defineCommand18({
|
|
|
2495
2501
|
default: false
|
|
2496
2502
|
}]);
|
|
2497
2503
|
if (applyNow) {
|
|
2498
|
-
const { applyPlan } = await import("./apply-
|
|
2504
|
+
const { applyPlan } = await import("./apply-F3KY2HTB.js");
|
|
2499
2505
|
const plan = JSON.parse(readFileSync3(outputPath, "utf-8"));
|
|
2500
2506
|
try {
|
|
2501
2507
|
await applyPlan(plan, {
|
|
@@ -2526,7 +2532,7 @@ async function runLocalDeploy(opts) {
|
|
|
2526
2532
|
const { setConfig: setConfig2, getConfig: getConfig2, getConfigDir: getConfigDir2 } = await import("./store-SDUR52Z5.js");
|
|
2527
2533
|
const { localBootstrap } = await import("./bootstrap-HL4DNUNG.js");
|
|
2528
2534
|
const { connect } = await import("./ssh-CNJNLM3E.js");
|
|
2529
|
-
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-
|
|
2535
|
+
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-QDLN4UMG.js");
|
|
2530
2536
|
const { resolveSecrets } = await import("./secrets-SVZWNAPK.js");
|
|
2531
2537
|
const knownHostsPath = path3.join(getConfigDir2(), "known_hosts");
|
|
2532
2538
|
const existing = getConfig2();
|
|
@@ -2998,7 +3004,7 @@ async function maybeWireGatewayMcp(opts) {
|
|
|
2998
3004
|
if (!wireGateway) return;
|
|
2999
3005
|
const { connect } = await import("./ssh-CNJNLM3E.js");
|
|
3000
3006
|
const { getConfigDir: getConfigDir2 } = await import("./store-SDUR52Z5.js");
|
|
3001
|
-
const { wireGatewayMcp } = await import("./mcp-wire-
|
|
3007
|
+
const { wireGatewayMcp } = await import("./mcp-wire-FR3W2CB6.js");
|
|
3002
3008
|
const knownHostsPath = path3.join(getConfigDir2(), "known_hosts");
|
|
3003
3009
|
const spin = spinner("Wiring gateway MCP client...");
|
|
3004
3010
|
const session = await connect({
|
|
@@ -3330,7 +3336,7 @@ var rotateCmd = defineCommand19({
|
|
|
3330
3336
|
info(`Re-applying config overlay to stack "${targetStack}"\u2026`);
|
|
3331
3337
|
try {
|
|
3332
3338
|
const { buildContext } = await import("./context-5LCUG2QR.js");
|
|
3333
|
-
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-
|
|
3339
|
+
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-QDLN4UMG.js");
|
|
3334
3340
|
const { resolveSecrets } = await import("./secrets-SVZWNAPK.js");
|
|
3335
3341
|
const { acquireSession, drainPool } = await import("./pool-QGFQRMGU.js");
|
|
3336
3342
|
const { localStateToConnectionInfo } = await import("./state-PRBIIN7I.js");
|
|
@@ -3516,7 +3522,7 @@ import { accessSync as accessSync2, constants as constants2 } from "fs";
|
|
|
3516
3522
|
import { execSync as execSync2 } from "child_process";
|
|
3517
3523
|
var ISSUES_URL = `${REPO_URL}/issues/new`;
|
|
3518
3524
|
var BODY_CAP = 2e3;
|
|
3519
|
-
var VERSION = true ? "1.7.
|
|
3525
|
+
var VERSION = true ? "1.7.6" : "dev";
|
|
3520
3526
|
async function collectContext() {
|
|
3521
3527
|
const nodeVersion = process22.version;
|
|
3522
3528
|
const os3 = `${process22.platform} ${process22.arch}`;
|
|
@@ -3756,7 +3762,7 @@ function handleError(err) {
|
|
|
3756
3762
|
}
|
|
3757
3763
|
|
|
3758
3764
|
// src/cli/index.ts
|
|
3759
|
-
var CLI_VERSION = true ? "1.7.
|
|
3765
|
+
var CLI_VERSION = true ? "1.7.6" : "dev";
|
|
3760
3766
|
var main = defineCommand23({
|
|
3761
3767
|
meta: {
|
|
3762
3768
|
name: "clawops",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
applyPlan
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-35WVQY3X.js";
|
|
5
5
|
import "./chunk-6ZFIFDBJ.js";
|
|
6
6
|
import "./chunk-BOPSG2LI.js";
|
|
7
7
|
import {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-3QJBNAHW.js";
|
|
10
10
|
import {
|
|
11
11
|
generatePlan
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RAZZ256T.js";
|
|
13
13
|
import {
|
|
14
14
|
validatePlan
|
|
15
15
|
} from "./chunk-6X45DDGH.js";
|
|
@@ -23,15 +23,21 @@ import {
|
|
|
23
23
|
handleConfigValidate,
|
|
24
24
|
okText,
|
|
25
25
|
resolveConn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FNS56UQY.js";
|
|
27
27
|
import {
|
|
28
28
|
acquireSession,
|
|
29
29
|
drainPool
|
|
30
30
|
} from "./chunk-DQDAWNGB.js";
|
|
31
|
-
import
|
|
31
|
+
import {
|
|
32
|
+
IMAGE_INSPECT_CMD,
|
|
33
|
+
OPENCLAW_CONFIG,
|
|
34
|
+
gatewayRunCommand,
|
|
35
|
+
imageForRestart
|
|
36
|
+
} from "./chunk-SEZMVVAS.js";
|
|
32
37
|
import {
|
|
33
38
|
buildContext
|
|
34
39
|
} from "./chunk-P5LKWRPL.js";
|
|
40
|
+
import "./chunk-EI7CQQ7D.js";
|
|
35
41
|
import "./chunk-PVUVI35Y.js";
|
|
36
42
|
import "./chunk-3XK66DKK.js";
|
|
37
43
|
import "./chunk-Q7NQY5HV.js";
|
|
@@ -529,16 +535,12 @@ async function handleGatewayRestart(input, server) {
|
|
|
529
535
|
const conn = await resolveConn(ctx);
|
|
530
536
|
const { session, release } = await acquireSession(conn);
|
|
531
537
|
try {
|
|
532
|
-
const imgResult = await session.exec(
|
|
533
|
-
|
|
538
|
+
const imgResult = await session.exec(IMAGE_INSPECT_CMD);
|
|
539
|
+
const image = imageForRestart(imgResult.stdout);
|
|
540
|
+
if (!image.ok) return errText(image.error);
|
|
541
|
+
const result = await session.exec(
|
|
542
|
+
gatewayRunCommand({ image: image.value, configPath: OPENCLAW_CONFIG })
|
|
534
543
|
);
|
|
535
|
-
const image = imgResult.stdout.trim();
|
|
536
|
-
const cmd = [
|
|
537
|
-
"docker stop openclaw 2>/dev/null || true",
|
|
538
|
-
"docker rm openclaw 2>/dev/null || true",
|
|
539
|
-
`docker run -d --name openclaw --restart unless-stopped -p 18789:18789 -e OPENCLAW_CONFIG_PATH=/app/config.json --add-host=host.docker.internal:host-gateway -v /home/clawops/openclaw.json:/app/config.json:ro ${image}`
|
|
540
|
-
].join(" && ");
|
|
541
|
-
const result = await session.exec(cmd);
|
|
542
544
|
if (result.code !== 0) {
|
|
543
545
|
return errText(`Gateway restart failed: ${result.stderr}`);
|
|
544
546
|
}
|
|
@@ -1307,7 +1309,7 @@ If none of the above resolves the issue:
|
|
|
1307
1309
|
|
|
1308
1310
|
// src/mcp/server.ts
|
|
1309
1311
|
async function serveMcp(opts) {
|
|
1310
|
-
const { version } = await import("./package-
|
|
1312
|
+
const { version } = await import("./package-HTNU53G5.js");
|
|
1311
1313
|
const server = new McpServer({ name: "clawops", version });
|
|
1312
1314
|
registerTools(server, opts);
|
|
1313
1315
|
registerResources(server);
|