fastclaw-cli 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1040,27 +1040,14 @@ function registerBotRuntimeCommands(bot) {
1040
1040
  const runtime = bot.command("runtime").description("OpenClaw runtime introspection (requires running bot)");
1041
1041
  runtime.command("status <id>").description("Get OpenClaw runtime status").option("--all", "Include all status sections").option("--usage", "Include usage info").option("--deep", "Deep connectivity check").option("--timeout <ms>", "Timeout for deep checks").action(
1042
1042
  withErrorHandler(async (id, cmdOpts) => {
1043
- const { client, cfg } = await resolveClientForBot(bot, id);
1043
+ const { client } = await resolveClientForBot(bot, id);
1044
1044
  const res = await client.getRuntimeStatus(id, {
1045
1045
  all: cmdOpts.all,
1046
1046
  usage: cmdOpts.usage,
1047
1047
  deep: cmdOpts.deep,
1048
1048
  timeout: cmdOpts.timeout
1049
1049
  });
1050
- if (cfg.json) {
1051
- printJson(res);
1052
- } else {
1053
- const data = res;
1054
- const gw = data.gateway;
1055
- const os = data.os;
1056
- const sessions = data.sessions;
1057
- printKeyValue({
1058
- "OS": os?.label ?? "unknown",
1059
- "Gateway": gw?.reachable ? `reachable (${gw.mode})` : `${gw?.error ?? "unreachable"}`,
1060
- "Sessions": String(sessions?.count ?? "?"),
1061
- "Update Channel": data.updateChannel ?? "unknown"
1062
- });
1063
- }
1050
+ printJson(res);
1064
1051
  })
1065
1052
  );
1066
1053
  runtime.command("sessions <id>").description("List OpenClaw sessions").option("--agent <name>", "Filter by agent").option("--all-agents", "Show sessions from all agents").option("--active", "Show only active sessions").action(
@@ -1171,7 +1158,7 @@ function registerBotRuntimeCommands(bot) {
1171
1158
  }
1172
1159
  })
1173
1160
  );
1174
- runtime.command("exec <id>").description("Execute arbitrary openclaw CLI command (e.g. --cmd 'status --all --json')").requiredOption("-c, --cmd <command>", "The openclaw CLI command to execute").action(
1161
+ runtime.command("exec <id>").description("Execute arbitrary command in bot pod (e.g. --cmd 'id -un')").requiredOption("-c, --cmd <command>", "The command to execute in the pod").action(
1175
1162
  withErrorHandler(async (id, cmdOpts) => {
1176
1163
  const { client } = await resolveClientForBot(bot, id);
1177
1164
  const res = await client.runtimeExec(id, { command: cmdOpts.cmd });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastclaw-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "CLI and SDK for managing FastClaw bots",
5
5
  "type": "module",
6
6
  "main": "dist/sdk.js",