@clawops/cli 1.7.4 → 1.7.5
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/README.md +1 -1
- package/dist/{apply-PZ5IIU7Z.js → apply-GBZ2H2IK.js} +2 -2
- package/dist/{chunk-O3F7OGH7.js → chunk-3NTYPOLR.js} +16 -16
- package/dist/{chunk-OPUM3FDW.js → chunk-AWZCTBV6.js} +1 -1
- package/dist/{chunk-5SPESD5N.js → chunk-S76W2ANQ.js} +1 -1
- package/dist/{chunk-FSUWPL7Q.js → chunk-UW3XOER4.js} +1 -1
- package/dist/cli.js +41 -52
- package/dist/{generate-DYNAQRD7.js → generate-EEJDYZVY.js} +1 -1
- package/dist/{mcp-wire-SLL4TLSC.js → mcp-wire-WDEN4BOT.js} +1 -1
- package/dist/{package-3RCGT5UR.js → package-6EAENRST.js} +1 -1
- package/dist/{remote-config-PFB66RPY.js → remote-config-MCX7UWRS.js} +1 -1
- package/dist/{server-7TEMRTRY.js → server-OJJ7ICVA.js} +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -275,7 +275,7 @@ clawops down --yes # Destroy local-provider stack
|
|
|
275
275
|
| `config` | Get/set remote OpenClaw config values (`--dry-run` shows would-write JSON) |
|
|
276
276
|
| `agents` | List or restart OpenClaw agents |
|
|
277
277
|
| `gateway` | Restart the OpenClaw gateway service |
|
|
278
|
-
| `backup` | Create
|
|
278
|
+
| `backup` | Create an OpenClaw state backup (`restore` returns in clawops 2.x — see [limitations](docs/limitations.md#backup-and-restore)) |
|
|
279
279
|
| `stacks` | List named stacks and their state |
|
|
280
280
|
| `doctor` | Check Node version, config, SSH key, provider credentials, and Pulumi home |
|
|
281
281
|
| `secret` | Manage secrets: `list`, `set`, `delete`, `rotate`, `audit` |
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
applyPlan
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-S76W2ANQ.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-3NTYPOLR.js";
|
|
9
9
|
import "./chunk-P5LKWRPL.js";
|
|
10
10
|
import "./chunk-PVUVI35Y.js";
|
|
11
11
|
import "./chunk-A2I76FTA.js";
|
|
@@ -7,6 +7,16 @@ var CONFIG_PATH_ENV = `-e OPENCLAW_CONFIG_PATH=${CONFIG_MOUNT_PATH}`;
|
|
|
7
7
|
var ADD_HOST_FLAG = "--add-host=host.docker.internal:host-gateway";
|
|
8
8
|
var PORT_PIN = `--port ${GATEWAY_PORT}`;
|
|
9
9
|
var COMMON_RUN_FLAGS = `${CONFIG_PATH_ENV} ${ADD_HOST_FLAG}`;
|
|
10
|
+
var ENV_FILE_PATH = "/home/clawops/openclaw.env";
|
|
11
|
+
function gatewayRunCommand(opts) {
|
|
12
|
+
const { image, configPath, envFilePath = ENV_FILE_PATH, pathPrefix = "" } = opts;
|
|
13
|
+
const envFileArg = `$([ -s ${envFilePath} ] && echo --env-file ${envFilePath})`;
|
|
14
|
+
return pathPrefix + [
|
|
15
|
+
"docker stop openclaw 2>/dev/null || true",
|
|
16
|
+
"docker rm openclaw 2>/dev/null || true",
|
|
17
|
+
`docker run -d --name openclaw --restart unless-stopped -p ${GATEWAY_PORT}:${GATEWAY_PORT} ${COMMON_RUN_FLAGS} ${envFileArg} -v ${configPath}:${CONFIG_MOUNT_PATH}:ro ${image} node openclaw.mjs gateway run --allow-unconfigured ${PORT_PIN}`
|
|
18
|
+
].join(" && ");
|
|
19
|
+
}
|
|
10
20
|
|
|
11
21
|
// src/plan/remote-config.ts
|
|
12
22
|
var OPENCLAW_CONFIG_LINUX = "/home/clawops/openclaw.json";
|
|
@@ -69,22 +79,11 @@ async function restartGateway(session, signal) {
|
|
|
69
79
|
const imgCmd = `${pathPrefix}docker inspect openclaw --format '{{.Config.Image}}' 2>/dev/null || echo 'ghcr.io/openclaw/openclaw:latest'`;
|
|
70
80
|
const imgResult = os === "Darwin" ? await session.exec(imgCmd, signal) : await execWithFallbackSudo(session, imgCmd, signal);
|
|
71
81
|
const image = imgResult.stdout.trim();
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const tokenVal = token?.["token"];
|
|
78
|
-
if (tokenVal) {
|
|
79
|
-
gatewayCmd = `node openclaw.mjs gateway run --allow-unconfigured ${PORT_PIN} --token '${tokenVal}'`;
|
|
80
|
-
}
|
|
81
|
-
} catch {
|
|
82
|
-
}
|
|
83
|
-
const restartCmd = pathPrefix + [
|
|
84
|
-
"docker stop openclaw 2>/dev/null || true",
|
|
85
|
-
"docker rm openclaw 2>/dev/null || true",
|
|
86
|
-
`docker run -d --name openclaw --restart unless-stopped -p ${GATEWAY_PORT}:${GATEWAY_PORT} ${COMMON_RUN_FLAGS} -v ${configPath}:/app/config.json:ro ${image} ${gatewayCmd}`
|
|
87
|
-
].join(" && ");
|
|
82
|
+
const restartCmd = gatewayRunCommand({
|
|
83
|
+
image,
|
|
84
|
+
configPath,
|
|
85
|
+
pathPrefix
|
|
86
|
+
});
|
|
88
87
|
const result = os === "Darwin" ? await session.exec(restartCmd, signal) : await execWithFallbackSudo(session, restartCmd, signal);
|
|
89
88
|
if (result.code !== 0) {
|
|
90
89
|
throw new Error(`Gateway restart failed: ${result.stderr}`);
|
|
@@ -122,6 +121,7 @@ function deepMerge(base, overlay) {
|
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
export {
|
|
124
|
+
gatewayRunCommand,
|
|
125
125
|
OPENCLAW_CONFIG_LINUX,
|
|
126
126
|
OPENCLAW_CONFIG_MACOS,
|
|
127
127
|
OPENCLAW_CONFIG,
|
|
@@ -45,7 +45,7 @@ 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-6EAENRST.js");
|
|
49
49
|
const config = getConfig();
|
|
50
50
|
const instanceType = intent.instanceType ?? "small";
|
|
51
51
|
const { guardOpenclawVersion, defaultOpenclawVersion } = await import("./version-guard-MZAO4KHS.js");
|
package/dist/cli.js
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
monitor_default,
|
|
4
4
|
validateOpenclawConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UW3XOER4.js";
|
|
6
6
|
import {
|
|
7
7
|
MCP_APPS,
|
|
8
8
|
buildMcpEntry,
|
|
9
9
|
writeAppConfigs
|
|
10
10
|
} from "./chunk-OIGTOLB3.js";
|
|
11
11
|
import "./chunk-DQDAWNGB.js";
|
|
12
|
-
import
|
|
12
|
+
import {
|
|
13
|
+
gatewayRunCommand
|
|
14
|
+
} from "./chunk-3NTYPOLR.js";
|
|
13
15
|
import "./chunk-P5LKWRPL.js";
|
|
14
16
|
import {
|
|
15
17
|
resolveSpecDir
|
|
@@ -318,7 +320,7 @@ var up_default = defineCommand2({
|
|
|
318
320
|
async function applyLocalConfigOverlay(opts) {
|
|
319
321
|
const { connect } = await import("./ssh-CNJNLM3E.js");
|
|
320
322
|
const { resolveSecrets } = await import("./secrets-SVZWNAPK.js");
|
|
321
|
-
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-
|
|
323
|
+
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-MCX7UWRS.js");
|
|
322
324
|
let overlay;
|
|
323
325
|
try {
|
|
324
326
|
overlay = JSON.parse(readFileSync(opts.configPath, "utf-8"));
|
|
@@ -495,7 +497,7 @@ var plan_default = defineCommand5({
|
|
|
495
497
|
},
|
|
496
498
|
async run({ args }) {
|
|
497
499
|
const { buildContext } = await import("./context-5LCUG2QR.js");
|
|
498
|
-
const { generatePlan } = await import("./generate-
|
|
500
|
+
const { generatePlan } = await import("./generate-EEJDYZVY.js");
|
|
499
501
|
const ctx = buildContext(args);
|
|
500
502
|
if (ctx.adapter.name === "local") {
|
|
501
503
|
throw new UsageError(
|
|
@@ -585,7 +587,7 @@ var apply_default = defineCommand6({
|
|
|
585
587
|
},
|
|
586
588
|
async run({ args }) {
|
|
587
589
|
const { validatePlan } = await import("./validate-CFQ4FH2T.js");
|
|
588
|
-
const { applyPlan } = await import("./apply-
|
|
590
|
+
const { applyPlan } = await import("./apply-GBZ2H2IK.js");
|
|
589
591
|
const planPath = args._?.[0];
|
|
590
592
|
if (!planPath) {
|
|
591
593
|
throw new UsageError("Usage: clawops apply <plan.json>");
|
|
@@ -996,11 +998,7 @@ import process13 from "process";
|
|
|
996
998
|
var OPENCLAW_CONFIG = "/home/clawops/openclaw.json";
|
|
997
999
|
var OPENCLAW_TMP = "/tmp/clawops-config.json.tmp";
|
|
998
1000
|
function dockerRunCmd(image) {
|
|
999
|
-
return
|
|
1000
|
-
"docker stop openclaw 2>/dev/null || true",
|
|
1001
|
-
"docker rm openclaw 2>/dev/null || true",
|
|
1002
|
-
`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 ${OPENCLAW_CONFIG}:/app/config.json:ro ${image}`
|
|
1003
|
-
].join(" && ");
|
|
1001
|
+
return gatewayRunCommand({ image, configPath: OPENCLAW_CONFIG });
|
|
1004
1002
|
}
|
|
1005
1003
|
function getPath(obj, dotKey) {
|
|
1006
1004
|
return dotKey.split(".").reduce((cur, k) => {
|
|
@@ -1257,7 +1255,10 @@ import { defineCommand as defineCommand13 } from "citty";
|
|
|
1257
1255
|
import process15 from "process";
|
|
1258
1256
|
var OPENCLAW_CONFIG2 = "/home/clawops/openclaw.json";
|
|
1259
1257
|
function dockerRunCmd2(version) {
|
|
1260
|
-
return
|
|
1258
|
+
return gatewayRunCommand({
|
|
1259
|
+
image: `ghcr.io/openclaw/openclaw:${version}`,
|
|
1260
|
+
configPath: OPENCLAW_CONFIG2
|
|
1261
|
+
});
|
|
1261
1262
|
}
|
|
1262
1263
|
var gateway_default = defineCommand13({
|
|
1263
1264
|
meta: {
|
|
@@ -1367,18 +1368,18 @@ var gateway_default = defineCommand13({
|
|
|
1367
1368
|
|
|
1368
1369
|
// src/cli/commands/backup.ts
|
|
1369
1370
|
import { defineCommand as defineCommand14 } from "citty";
|
|
1370
|
-
import { createWriteStream
|
|
1371
|
+
import { createWriteStream } from "fs";
|
|
1371
1372
|
import { pipeline } from "stream/promises";
|
|
1372
1373
|
import process16 from "process";
|
|
1373
1374
|
var backup_default = defineCommand14({
|
|
1374
1375
|
meta: {
|
|
1375
1376
|
name: "backup",
|
|
1376
|
-
description: "Create
|
|
1377
|
+
description: "Create an OpenClaw backup (restore is unavailable on this release line)"
|
|
1377
1378
|
},
|
|
1378
1379
|
args: {
|
|
1379
|
-
action: { type: "positional", description: "Action: create
|
|
1380
|
+
action: { type: "positional", description: "Action: create (restore returns in clawops 2.x)", required: true },
|
|
1380
1381
|
out: { type: "string", description: "[create] Local path to write the backup archive" },
|
|
1381
|
-
file: { type: "string", description: "[restore] Local backup archive
|
|
1382
|
+
file: { type: "string", description: "[restore] Local backup archive (restore is unavailable)" },
|
|
1382
1383
|
stack: { type: "string", description: "Target stack name" },
|
|
1383
1384
|
yes: { type: "boolean", description: "[restore] Skip confirmation prompt" }
|
|
1384
1385
|
},
|
|
@@ -1438,44 +1439,32 @@ var backup_default = defineCommand14({
|
|
|
1438
1439
|
const outPath = typeof args.out === "string" ? args.out : `openclaw-backup-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}.tar.gz`;
|
|
1439
1440
|
info(`Writing backup to ${outPath}...`);
|
|
1440
1441
|
const spin = spinner("Creating backup on remote host...");
|
|
1442
|
+
const remoteArchive = "/tmp/clawops-backup.tar.gz";
|
|
1443
|
+
const createResult = await session.exec(
|
|
1444
|
+
`docker exec openclaw sh -lc 'rm -f ${remoteArchive} && openclaw backup create --output ${remoteArchive} --verify --json'`,
|
|
1445
|
+
abortController.signal
|
|
1446
|
+
);
|
|
1447
|
+
if (createResult.code !== 0) {
|
|
1448
|
+
spin.stop();
|
|
1449
|
+
throw new Error(`Backup failed on the remote host: ${createResult.stderr.slice(0, 300)}`);
|
|
1450
|
+
}
|
|
1441
1451
|
const backupStream = await session.stream(
|
|
1442
|
-
|
|
1452
|
+
`docker exec openclaw cat ${remoteArchive}`,
|
|
1443
1453
|
abortController.signal
|
|
1444
1454
|
);
|
|
1445
1455
|
spin.stop();
|
|
1446
1456
|
const fileStream = createWriteStream(outPath);
|
|
1447
1457
|
await pipeline(backupStream, fileStream);
|
|
1458
|
+
await session.exec(
|
|
1459
|
+
`docker exec openclaw rm -f ${remoteArchive}`,
|
|
1460
|
+
abortController.signal
|
|
1461
|
+
);
|
|
1448
1462
|
success(`Backup saved to ${outPath}`);
|
|
1463
|
+
info("The archive contains credentials \u2014 store it accordingly.");
|
|
1449
1464
|
} else {
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
throw new UsageError("--file is required for backup restore");
|
|
1453
|
-
}
|
|
1454
|
-
if (!args.yes) {
|
|
1455
|
-
const { createInterface: createInterface3 } = await import("readline/promises");
|
|
1456
|
-
const rl = createInterface3({ input: process16.stdin, output: process16.stdout });
|
|
1457
|
-
try {
|
|
1458
|
-
const answer = await rl.question(
|
|
1459
|
-
`Restore backup from "${filePath}" to stack "${ctx.stackName}"? This will overwrite existing data. (y/N) `
|
|
1460
|
-
);
|
|
1461
|
-
if (answer.trim().toLowerCase() !== "y") {
|
|
1462
|
-
info("Restore cancelled.");
|
|
1463
|
-
return;
|
|
1464
|
-
}
|
|
1465
|
-
} finally {
|
|
1466
|
-
rl.close();
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
info(`Restoring from ${filePath}...`);
|
|
1470
|
-
const spin = spinner("Transferring and restoring backup...");
|
|
1471
|
-
const restoreStream = await session.stream(
|
|
1472
|
-
"docker exec -i openclaw openclaw-ctl backup restore --stdin",
|
|
1473
|
-
abortController.signal
|
|
1465
|
+
throw new UsageError(
|
|
1466
|
+
"Restore is not available on this clawops release.\nOpenClaw up to 2026.7.1-2 provides `backup create` and `backup verify` only; restore arrived in OpenClaw 2.0 and will be supported by clawops 2.x.\nTo recover manually: copy the archive to the host, then extract it into the gateway container with the gateway stopped."
|
|
1474
1467
|
);
|
|
1475
|
-
const fileStream = createReadStream(filePath);
|
|
1476
|
-
await pipeline(fileStream, restoreStream);
|
|
1477
|
-
spin.stop();
|
|
1478
|
-
success("Backup restored successfully");
|
|
1479
1468
|
}
|
|
1480
1469
|
} finally {
|
|
1481
1470
|
release();
|
|
@@ -1907,7 +1896,7 @@ var serveCmd = defineCommand17({
|
|
|
1907
1896
|
inspector: { type: "boolean", description: "Enable MCP inspector" }
|
|
1908
1897
|
},
|
|
1909
1898
|
async run({ args }) {
|
|
1910
|
-
const { serveMcp } = await import("./server-
|
|
1899
|
+
const { serveMcp } = await import("./server-OJJ7ICVA.js");
|
|
1911
1900
|
await serveMcp({
|
|
1912
1901
|
port: args.http ? Number(args.http) : void 0,
|
|
1913
1902
|
bind: args.bind,
|
|
@@ -1985,7 +1974,7 @@ var wireCmd = defineCommand17({
|
|
|
1985
1974
|
const { buildContext } = await import("./context-5LCUG2QR.js");
|
|
1986
1975
|
const { acquireSession, drainPool } = await import("./pool-QGFQRMGU.js");
|
|
1987
1976
|
const { extractBaseOutputs } = await import("./outputs-DJHBY7EE.js");
|
|
1988
|
-
const { wireGatewayMcp } = await import("./mcp-wire-
|
|
1977
|
+
const { wireGatewayMcp } = await import("./mcp-wire-WDEN4BOT.js");
|
|
1989
1978
|
const ac = new AbortController();
|
|
1990
1979
|
process19.on("SIGINT", () => {
|
|
1991
1980
|
ac.abort();
|
|
@@ -2506,7 +2495,7 @@ var setup_default = defineCommand18({
|
|
|
2506
2495
|
default: false
|
|
2507
2496
|
}]);
|
|
2508
2497
|
if (applyNow) {
|
|
2509
|
-
const { applyPlan } = await import("./apply-
|
|
2498
|
+
const { applyPlan } = await import("./apply-GBZ2H2IK.js");
|
|
2510
2499
|
const plan = JSON.parse(readFileSync3(outputPath, "utf-8"));
|
|
2511
2500
|
try {
|
|
2512
2501
|
await applyPlan(plan, {
|
|
@@ -2537,7 +2526,7 @@ async function runLocalDeploy(opts) {
|
|
|
2537
2526
|
const { setConfig: setConfig2, getConfig: getConfig2, getConfigDir: getConfigDir2 } = await import("./store-SDUR52Z5.js");
|
|
2538
2527
|
const { localBootstrap } = await import("./bootstrap-HL4DNUNG.js");
|
|
2539
2528
|
const { connect } = await import("./ssh-CNJNLM3E.js");
|
|
2540
|
-
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-
|
|
2529
|
+
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-MCX7UWRS.js");
|
|
2541
2530
|
const { resolveSecrets } = await import("./secrets-SVZWNAPK.js");
|
|
2542
2531
|
const knownHostsPath = path3.join(getConfigDir2(), "known_hosts");
|
|
2543
2532
|
const existing = getConfig2();
|
|
@@ -3009,7 +2998,7 @@ async function maybeWireGatewayMcp(opts) {
|
|
|
3009
2998
|
if (!wireGateway) return;
|
|
3010
2999
|
const { connect } = await import("./ssh-CNJNLM3E.js");
|
|
3011
3000
|
const { getConfigDir: getConfigDir2 } = await import("./store-SDUR52Z5.js");
|
|
3012
|
-
const { wireGatewayMcp } = await import("./mcp-wire-
|
|
3001
|
+
const { wireGatewayMcp } = await import("./mcp-wire-WDEN4BOT.js");
|
|
3013
3002
|
const knownHostsPath = path3.join(getConfigDir2(), "known_hosts");
|
|
3014
3003
|
const spin = spinner("Wiring gateway MCP client...");
|
|
3015
3004
|
const session = await connect({
|
|
@@ -3341,7 +3330,7 @@ var rotateCmd = defineCommand19({
|
|
|
3341
3330
|
info(`Re-applying config overlay to stack "${targetStack}"\u2026`);
|
|
3342
3331
|
try {
|
|
3343
3332
|
const { buildContext } = await import("./context-5LCUG2QR.js");
|
|
3344
|
-
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-
|
|
3333
|
+
const { readRemoteConfig, atomicWriteConfig, restartGateway, deepMerge } = await import("./remote-config-MCX7UWRS.js");
|
|
3345
3334
|
const { resolveSecrets } = await import("./secrets-SVZWNAPK.js");
|
|
3346
3335
|
const { acquireSession, drainPool } = await import("./pool-QGFQRMGU.js");
|
|
3347
3336
|
const { localStateToConnectionInfo } = await import("./state-PRBIIN7I.js");
|
|
@@ -3527,7 +3516,7 @@ import { accessSync as accessSync2, constants as constants2 } from "fs";
|
|
|
3527
3516
|
import { execSync as execSync2 } from "child_process";
|
|
3528
3517
|
var ISSUES_URL = `${REPO_URL}/issues/new`;
|
|
3529
3518
|
var BODY_CAP = 2e3;
|
|
3530
|
-
var VERSION = true ? "1.7.
|
|
3519
|
+
var VERSION = true ? "1.7.5" : "dev";
|
|
3531
3520
|
async function collectContext() {
|
|
3532
3521
|
const nodeVersion = process22.version;
|
|
3533
3522
|
const os3 = `${process22.platform} ${process22.arch}`;
|
|
@@ -3767,7 +3756,7 @@ function handleError(err) {
|
|
|
3767
3756
|
}
|
|
3768
3757
|
|
|
3769
3758
|
// src/cli/index.ts
|
|
3770
|
-
var CLI_VERSION = true ? "1.7.
|
|
3759
|
+
var CLI_VERSION = true ? "1.7.5" : "dev";
|
|
3771
3760
|
var main = defineCommand23({
|
|
3772
3761
|
meta: {
|
|
3773
3762
|
name: "clawops",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
applyPlan
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-S76W2ANQ.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-AWZCTBV6.js";
|
|
13
13
|
import {
|
|
14
14
|
validatePlan
|
|
15
15
|
} from "./chunk-6X45DDGH.js";
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
handleConfigValidate,
|
|
24
24
|
okText,
|
|
25
25
|
resolveConn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UW3XOER4.js";
|
|
27
27
|
import {
|
|
28
28
|
acquireSession,
|
|
29
29
|
drainPool
|
|
30
30
|
} from "./chunk-DQDAWNGB.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-3NTYPOLR.js";
|
|
32
32
|
import {
|
|
33
33
|
buildContext
|
|
34
34
|
} from "./chunk-P5LKWRPL.js";
|
|
@@ -476,7 +476,7 @@ async function handleAgentsList(input, _server) {
|
|
|
476
476
|
const conn = await resolveConn(ctx);
|
|
477
477
|
const { session, release } = await acquireSession(conn);
|
|
478
478
|
try {
|
|
479
|
-
const result = await session.exec('docker exec openclaw openclaw
|
|
479
|
+
const result = await session.exec('docker exec openclaw openclaw agents list --json 2>&1 || echo "[]"');
|
|
480
480
|
return okText(result.stdout.trim());
|
|
481
481
|
} finally {
|
|
482
482
|
release();
|
|
@@ -500,7 +500,7 @@ async function handleAgentsRestart(input, server) {
|
|
|
500
500
|
const { session, release } = await acquireSession(conn);
|
|
501
501
|
try {
|
|
502
502
|
const result = await session.exec(
|
|
503
|
-
`docker exec openclaw openclaw
|
|
503
|
+
`docker exec openclaw openclaw agents restart ${input.agentId} 2>&1`
|
|
504
504
|
);
|
|
505
505
|
if (result.code !== 0) {
|
|
506
506
|
return errText(`Failed to restart agent: ${result.stderr || result.stdout}`);
|
|
@@ -1307,7 +1307,7 @@ If none of the above resolves the issue:
|
|
|
1307
1307
|
|
|
1308
1308
|
// src/mcp/server.ts
|
|
1309
1309
|
async function serveMcp(opts) {
|
|
1310
|
-
const { version } = await import("./package-
|
|
1310
|
+
const { version } = await import("./package-6EAENRST.js");
|
|
1311
1311
|
const server = new McpServer({ name: "clawops", version });
|
|
1312
1312
|
registerTools(server, opts);
|
|
1313
1313
|
registerResources(server);
|