@clawops/cli 2.1.0 → 2.1.1

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 CHANGED
@@ -162,6 +162,21 @@ the correct absolute binary path.
162
162
 
163
163
  To add the entry manually instead, paste this into your editor's MCP config:
164
164
 
165
+ ```json
166
+ {
167
+ "mcpServers": {
168
+ "clawops": {
169
+ "command": "npx",
170
+ "args": ["-y", "@clawops/cli", "mcp", "serve", "--read-only"]
171
+ }
172
+ }
173
+ }
174
+ ```
175
+
176
+ That form needs nothing on `$PATH` and is what a directory or an installer will copy. If you
177
+ would rather point at the binary you already have, use its absolute path — the output of
178
+ `which clawops` — with the same arguments:
179
+
165
180
  ```json
166
181
  {
167
182
  "mcpServers": {
@@ -173,7 +188,11 @@ To add the entry manually instead, paste this into your editor's MCP config:
173
188
  }
174
189
  ```
175
190
 
176
- Replace `/path/to/clawops` with the output of `which clawops`. Config file locations:
191
+ Either way, pass the arguments. `mcp serve` is what speaks the protocol, and an explicit config
192
+ is one that still reads clearly a year later. clawops does not strand a client that omits them:
193
+ run with no command at all and a pipe on stdin — how every MCP client starts a server — and it
194
+ starts `mcp serve`, saying so on stderr. Typed at a terminal, `clawops` still prints help.
195
+ Config file locations:
177
196
 
178
197
  | App | Path |
179
198
  |---|---|
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-2I7KCMXZ.js";
13
13
  import {
14
14
  generatePlan
15
- } from "./chunk-A2DS5SB7.js";
15
+ } from "./chunk-YEBFVLOE.js";
16
16
  import {
17
17
  validatePlan
18
18
  } from "./chunk-XFN3YDZE.js";
@@ -873,7 +873,7 @@ async function handleUp(input, server) {
873
873
  const progressToken = void 0;
874
874
  const emit = makeProgressEmitter(server, progressToken);
875
875
  startTask(taskId, `clawops_up stack=${ctx.stackName}`);
876
- const { generatePlan: generatePlan2 } = await import("./generate-YEM73KVB.js");
876
+ const { generatePlan: generatePlan2 } = await import("./generate-JNJ63ZYZ.js");
877
877
  const { applyPlan: applyPlan2 } = await import("./apply-HJ5GAKHW.js");
878
878
  const { resolveNetworkFlags } = await import("./network-args-PYJRJBYO.js");
879
879
  const { detectEgressIp } = await import("./firewall-5VKZ4WBH.js");
@@ -1646,7 +1646,7 @@ function bearerFrom(header) {
1646
1646
  return match?.[1]?.trim();
1647
1647
  }
1648
1648
  async function serveMcp(opts) {
1649
- const { version } = await import("./package-JWDMWPV3.js");
1649
+ const { version } = await import("./package-SAUDFQLG.js");
1650
1650
  const makeServer = () => {
1651
1651
  const server = new McpServer({ name: "clawops", version });
1652
1652
  registerTools(server, opts);
@@ -71,7 +71,7 @@ async function generatePlan(intent, _opts) {
71
71
  "plan/apply is not supported for the local provider. Use `clawops up` directly."
72
72
  );
73
73
  }
74
- const { version } = await import("./package-JWDMWPV3.js");
74
+ const { version } = await import("./package-SAUDFQLG.js");
75
75
  const config = getConfig();
76
76
  const instanceType = await resolveInstanceType(intent);
77
77
  const { guardOpenclawVersion, defaultOpenclawVersion } = await import("./version-guard-XVYW5WFJ.js");
package/dist/cli.js CHANGED
@@ -392,7 +392,7 @@ var up_default = defineCommand2({
392
392
  }
393
393
  return;
394
394
  }
395
- const { generatePlan } = await import("./generate-YEM73KVB.js");
395
+ const { generatePlan } = await import("./generate-JNJ63ZYZ.js");
396
396
  const { applyPlan } = await import("./apply-HJ5GAKHW.js");
397
397
  const { resolveNetworkFlags } = await import("./network-args-PYJRJBYO.js");
398
398
  const { detectEgressIp } = await import("./firewall-5VKZ4WBH.js");
@@ -688,7 +688,7 @@ var plan_default = defineCommand5({
688
688
  },
689
689
  async run({ args }) {
690
690
  const { buildContext } = await import("./context-7VI3R6EK.js");
691
- const { generatePlan } = await import("./generate-YEM73KVB.js");
691
+ const { generatePlan } = await import("./generate-JNJ63ZYZ.js");
692
692
  const { resolveNetworkFlags } = await import("./network-args-PYJRJBYO.js");
693
693
  const { detectEgressIp } = await import("./firewall-5VKZ4WBH.js");
694
694
  const ctx = buildContext(args);
@@ -2375,7 +2375,7 @@ var serveCmd = defineCommand18({
2375
2375
  inspector: { type: "boolean", description: "Enable MCP inspector" }
2376
2376
  },
2377
2377
  async run({ args }) {
2378
- const { serveMcp } = await import("./server-ZJPXPRZT.js");
2378
+ const { serveMcp } = await import("./server-RHON6QMN.js");
2379
2379
  await serveMcp({
2380
2380
  port: args.http ? Number(args.http) : void 0,
2381
2381
  bind: args.bind,
@@ -2456,8 +2456,8 @@ var wireCmd = defineCommand18({
2456
2456
  const { buildContext } = await import("./context-7VI3R6EK.js");
2457
2457
  const { acquireSession, drainPool } = await import("./pool-PIIKJ4L2.js");
2458
2458
  const { extractBaseOutputs } = await import("./outputs-DJHBY7EE.js");
2459
- const { wireGatewayMcp } = await import("./mcp-wire-TE2ZL6HD.js");
2460
- const { MCP_HTTP_PORT } = await import("./server-ZJPXPRZT.js");
2459
+ const { wireGatewayMcp } = await import("./mcp-wire-B57DUNOD.js");
2460
+ const { MCP_HTTP_PORT } = await import("./server-RHON6QMN.js");
2461
2461
  const ac = new AbortController();
2462
2462
  process20.on("SIGINT", () => {
2463
2463
  ac.abort();
@@ -3561,7 +3561,7 @@ async function maybeWireGatewayMcp(opts) {
3561
3561
  if (!wireGateway) return;
3562
3562
  const { connect } = await import("./ssh-VAI5DU5M.js");
3563
3563
  const { getConfigDir: getConfigDir2 } = await import("./store-OVB3DAJR.js");
3564
- const { wireGatewayMcp } = await import("./mcp-wire-TE2ZL6HD.js");
3564
+ const { wireGatewayMcp } = await import("./mcp-wire-B57DUNOD.js");
3565
3565
  const knownHostsPath = path2.join(getConfigDir2(), "known_hosts");
3566
3566
  const spin = spinner("Wiring gateway MCP client...");
3567
3567
  const session = await connect({
@@ -4183,7 +4183,7 @@ import { accessSync, constants } from "fs";
4183
4183
  import { execSync as execSync2 } from "child_process";
4184
4184
  var ISSUES_URL = `${REPO_URL}/issues/new`;
4185
4185
  var BODY_CAP = 2e3;
4186
- var VERSION = true ? "2.1.0" : "dev";
4186
+ var VERSION = true ? "2.1.1" : "dev";
4187
4187
  async function collectContext() {
4188
4188
  const nodeVersion = process23.version;
4189
4189
  const os3 = `${process23.platform} ${process23.arch}`;
@@ -4463,8 +4463,14 @@ function handleError(err) {
4463
4463
  process25.exit(1);
4464
4464
  }
4465
4465
 
4466
+ // src/cli/default-command.ts
4467
+ function resolveArgv(argv2, stdinIsTty) {
4468
+ if (argv2.length === 0 && !stdinIsTty) return ["mcp", "serve"];
4469
+ return [...argv2];
4470
+ }
4471
+
4466
4472
  // src/cli/index.ts
4467
- var CLI_VERSION = true ? "2.1.0" : "dev";
4473
+ var CLI_VERSION = true ? "2.1.1" : "dev";
4468
4474
  var main = defineCommand24({
4469
4475
  meta: {
4470
4476
  name: "clawops",
@@ -4507,8 +4513,14 @@ var main = defineCommand24({
4507
4513
  harden: harden_default
4508
4514
  }
4509
4515
  });
4516
+ var argv = resolveArgv(process.argv.slice(2), Boolean(process.stdin.isTTY));
4517
+ if (argv.length === 2 && argv[0] === "mcp" && process.argv.length === 2) {
4518
+ process.stderr.write(
4519
+ "[clawops] no command given and stdin is not a terminal, so starting `clawops mcp serve`. Pass `mcp serve` explicitly to make this deliberate, or run clawops from a terminal for help.\n"
4520
+ );
4521
+ }
4510
4522
  try {
4511
- await runMain(main);
4523
+ await runMain(main, { rawArgs: argv });
4512
4524
  } catch (err) {
4513
4525
  handleError(err);
4514
4526
  }
@@ -5,7 +5,7 @@ import {
5
5
  isInstanceAlias,
6
6
  parseDiffForTest,
7
7
  planId
8
- } from "./chunk-A2DS5SB7.js";
8
+ } from "./chunk-YEBFVLOE.js";
9
9
  import "./chunk-XFN3YDZE.js";
10
10
  import "./chunk-QDNFADJI.js";
11
11
  import "./chunk-JW5A7E3X.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  MCP_HTTP_PORT
4
- } from "./chunk-AYUX4FOF.js";
4
+ } from "./chunk-OFTAXLOY.js";
5
5
  import "./chunk-R3DTA35B.js";
6
6
  import "./chunk-BOPSG2LI.js";
7
7
  import "./chunk-6ZFIFDBJ.js";
@@ -9,7 +9,7 @@ import "./chunk-3QJBNAHW.js";
9
9
  import "./chunk-2I7KCMXZ.js";
10
10
  import "./chunk-3Z5TDXCJ.js";
11
11
  import "./chunk-AEEMRFZV.js";
12
- import "./chunk-A2DS5SB7.js";
12
+ import "./chunk-YEBFVLOE.js";
13
13
  import "./chunk-XFN3YDZE.js";
14
14
  import "./chunk-2Z7J3ERQ.js";
15
15
  import "./chunk-E4NJSJ54.js";
@@ -2,8 +2,8 @@
2
2
 
3
3
  // package.json
4
4
  var name = "@clawops/cli";
5
- var version = "2.1.0";
6
- var description = "Deploy and operate self-hosted OpenClaw across AWS, GCP, Azure and local VMs \u2014 a CLI and an MCP server in one.";
5
+ var version = "2.1.1";
6
+ var description = "Deploy self-hosted OpenClaw to AWS, GCP, Azure or a local VM \u2014 a CLI and an MCP server in one.";
7
7
  var keywords = [
8
8
  "openclaw",
9
9
  "mcp",
@@ -5,7 +5,7 @@ import {
5
5
  bearerFrom,
6
6
  isLoopbackBind,
7
7
  serveMcp
8
- } from "./chunk-AYUX4FOF.js";
8
+ } from "./chunk-OFTAXLOY.js";
9
9
  import "./chunk-R3DTA35B.js";
10
10
  import "./chunk-BOPSG2LI.js";
11
11
  import "./chunk-6ZFIFDBJ.js";
@@ -13,7 +13,7 @@ import "./chunk-3QJBNAHW.js";
13
13
  import "./chunk-2I7KCMXZ.js";
14
14
  import "./chunk-3Z5TDXCJ.js";
15
15
  import "./chunk-AEEMRFZV.js";
16
- import "./chunk-A2DS5SB7.js";
16
+ import "./chunk-YEBFVLOE.js";
17
17
  import "./chunk-XFN3YDZE.js";
18
18
  import "./chunk-2Z7J3ERQ.js";
19
19
  import "./chunk-E4NJSJ54.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clawops/cli",
3
- "version": "2.1.0",
4
- "description": "Deploy and operate self-hosted OpenClaw across AWS, GCP, Azure and local VMs — a CLI and an MCP server in one.",
3
+ "version": "2.1.1",
4
+ "description": "Deploy self-hosted OpenClaw to AWS, GCP, Azure or a local VM — a CLI and an MCP server in one.",
5
5
  "keywords": [
6
6
  "openclaw",
7
7
  "mcp",