@shadowob/cloud 1.1.6-dev.331 → 1.1.7

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.
@@ -608,6 +608,7 @@ var RUNNER_STATE_VOLUME_NAME = "shadow-runner-state";
608
608
  var RUNNER_LOG_VOLUME_NAME = "shadow-runner-logs";
609
609
  var RUNNER_CONFIG_VOLUME_NAME = "shadow-runner-config";
610
610
  var RUNNER_TMP_VOLUME_NAME = "shadow-runner-tmp";
611
+ var RUNNER_AGENTS_VOLUME_NAME = "shadow-runner-agents";
611
612
  var NATIVE_RUNNER_HEALTH_PORT = 3100;
612
613
  var OPENCLAW_GATEWAY_PORT = 3101;
613
614
  var OPENCLAW_HEALTH_PORT = 3102;
@@ -698,6 +699,7 @@ var HOME_DIR = RUNNER_HOME_DIR;
698
699
  var WORKSPACE_DIR = "/workspace";
699
700
  var OPENCLAW_SKILLS_DIR = `${HOME_DIR}/.openclaw/skills`;
700
701
  var CC_CONNECT_CONFIG_PATH = `${HOME_DIR}/.cc-connect/config.toml`;
702
+ var SHADOWOB_CLI_CONFIG_PATH = `${HOME_DIR}/.shadowob/shadowob.config.json`;
701
703
  var SHADOW_SLASH_COMMANDS_PATH = `${SHADOWOB_CONFIG_MOUNT_PATH}/slash-commands.json`;
702
704
  function hasRuntimeExtensions(extension) {
703
705
  return Boolean(
@@ -785,13 +787,20 @@ function buildIdentityWorkspaceFiles(agent) {
785
787
  }
786
788
  function shadowobSkillMarkdown() {
787
789
  const here = dirname(fileURLToPath(import.meta.url));
788
- const candidates = [
789
- resolve(process.cwd(), "skills/shadowob-cli/SKILL.md"),
790
- resolve(process.cwd(), "../skills/shadowob-cli/SKILL.md"),
791
- resolve(here, "../../../../skills/shadowob-cli/SKILL.md"),
792
- resolve(here, "../../../../../skills/shadowob-cli/SKILL.md")
793
- ];
794
- const path = candidates.find((candidate) => existsSync(candidate));
790
+ let currentDir = here;
791
+ let path;
792
+ while (true) {
793
+ const candidate = resolve(currentDir, "skills/shadowob-cli/SKILL.md");
794
+ if (existsSync(candidate)) {
795
+ path = candidate;
796
+ break;
797
+ }
798
+ const parentDir = dirname(currentDir);
799
+ if (parentDir === currentDir) {
800
+ break;
801
+ }
802
+ currentDir = parentDir;
803
+ }
795
804
  if (!path) {
796
805
  throw new Error("Cannot find skills/shadowob-cli/SKILL.md for runner package generation");
797
806
  }
@@ -819,6 +828,22 @@ function addShadowobSkill(files, runtimeKind, runtimeId) {
819
828
  files[`${HOME_DIR}/.hermes/skills/shadowob/SKILL.md`] = skill;
820
829
  }
821
830
  }
831
+ function addShadowobCliAuth(files, runtimeExtensions) {
832
+ const bindings = shadowBindings(runtimeExtensions);
833
+ const profiles = {};
834
+ for (const [index, binding] of bindings.entries()) {
835
+ const profileName = binding.buddyId?.trim() || (index === 0 ? "default" : `shadow-${index + 1}`);
836
+ profiles[profileName] = {
837
+ serverUrl: envPlaceholder(binding.serverUrlEnvKey),
838
+ token: envPlaceholder(binding.tokenEnvKey)
839
+ };
840
+ }
841
+ const currentProfile = Object.keys(profiles)[0] ?? "default";
842
+ files[SHADOWOB_CLI_CONFIG_PATH] = json({
843
+ profiles,
844
+ currentProfile
845
+ });
846
+ }
822
847
 
823
848
  // src/runtimes/slash-commands/openclaw.ts
824
849
  var OPENCLAW_SLASH_COMMANDS_SOURCE = "https://docs.openclaw.ai/tools/slash-commands";
@@ -915,6 +940,7 @@ var openclawAdapter = {
915
940
  [SHADOW_SLASH_COMMANDS_PATH]: json(openClawSlashCommands)
916
941
  };
917
942
  addShadowobSkill(runtimeFiles, "openclaw", context.agent.runtime);
943
+ addShadowobCliAuth(runtimeFiles, context.runtimeExtensions);
918
944
  const configData = {
919
945
  "config.json": JSON.stringify(openclawConfig, null, 2),
920
946
  "runtime-files.json": json(runtimeFiles),
@@ -978,6 +1004,7 @@ function buildCcConnectRuntimeFiles(options) {
978
1004
  ...options.nativeFiles ?? {}
979
1005
  };
980
1006
  addShadowobSkill(files, "cc-connect", agent.runtime);
1007
+ addShadowobCliAuth(files, options.runtimeExtensions);
981
1008
  return files;
982
1009
  }
983
1010
  function buildCcConnectPackage(context, options) {
@@ -992,6 +1019,7 @@ function buildCcConnectPackage(context, options) {
992
1019
  const files = buildCcConnectRuntimeFiles({
993
1020
  agent: context.agent,
994
1021
  ccConnectConfig,
1022
+ runtimeExtensions: context.runtimeExtensions,
995
1023
  nativeFiles: options.nativeFiles?.(context),
996
1024
  shadowSlashCommands: options.shadowSlashCommands
997
1025
  });
@@ -1683,6 +1711,7 @@ var hermesAdapter = {
1683
1711
  [SHADOW_SLASH_COMMANDS_PATH]: json(hermesSlashCommands)
1684
1712
  };
1685
1713
  addShadowobSkill(files, "hermes", "hermes");
1714
+ addShadowobCliAuth(files, context.runtimeExtensions);
1686
1715
  const pluginRoot = `${HOME_DIR}/.hermes/plugins/shadowob`;
1687
1716
  files[`${pluginRoot}/plugin.yaml`] = readHermesPluginFile(
1688
1717
  context.cwd,
@@ -5746,6 +5775,7 @@ export {
5746
5775
  RUNNER_LOG_VOLUME_NAME,
5747
5776
  RUNNER_CONFIG_VOLUME_NAME,
5748
5777
  RUNNER_TMP_VOLUME_NAME,
5778
+ RUNNER_AGENTS_VOLUME_NAME,
5749
5779
  runtimeStatePvcName,
5750
5780
  parseJsonc,
5751
5781
  normalizeDeploymentRuntimeContext,
@@ -14,7 +14,7 @@ function createConsoleCommand(container) {
14
14
  });
15
15
  }, 1500);
16
16
  }
17
- const { createServeCommand } = await import("./serve.command-DNE6GPMK.js");
17
+ const { createServeCommand } = await import("./serve.command-RD6I6MFD.js");
18
18
  const serve = createServeCommand(container);
19
19
  await serve.parseAsync(
20
20
  ["--port", port, "--namespace", ...options.namespace, "--host", "127.0.0.1"],
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  collectRuntimeEnvRequirements
3
- } from "./chunk-SUZ2ATT6.js";
3
+ } from "./chunk-ZHVYNIHA.js";
4
4
 
5
5
  // src/interfaces/cli/init.command.ts
6
6
  import { cp, stat, writeFile } from "fs/promises";
@@ -7,7 +7,7 @@ import {
7
7
  normalizeDeploymentRuntimeContext,
8
8
  parseJsonc,
9
9
  runtimeStatePvcName
10
- } from "./chunk-SUZ2ATT6.js";
10
+ } from "./chunk-ZHVYNIHA.js";
11
11
  import {
12
12
  getPluginRegistry,
13
13
  loadAllPlugins
@@ -16,7 +16,7 @@ function createConsoleCommand(container) {
16
16
  });
17
17
  }, 1500);
18
18
  }
19
- const { createServeCommand } = await import("./serve.command-5FMIPQRY.js");
19
+ const { createServeCommand } = await import("./serve.command-XLBJUOV6.js");
20
20
  const serve = createServeCommand(container);
21
21
  await serve.parseAsync(
22
22
  ["--port", port, "--namespace", ...options.namespace, "--host", "127.0.0.1"],
@@ -7,7 +7,7 @@ import {
7
7
  normalizeDeploymentRuntimeContext,
8
8
  parseJsonc,
9
9
  runtimeStatePvcName
10
- } from "./chunk-QET4LT4J.js";
10
+ } from "./chunk-35LJYCQF.js";
11
11
  import {
12
12
  getPluginRegistry,
13
13
  loadAllPlugins
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  collectRuntimeEnvRequirements
4
- } from "./chunk-QET4LT4J.js";
4
+ } from "./chunk-35LJYCQF.js";
5
5
 
6
6
  // src/interfaces/cli/init.command.ts
7
7
  import { cp, stat, writeFile } from "fs/promises";
@@ -611,6 +611,7 @@ var RUNNER_STATE_VOLUME_NAME = "shadow-runner-state";
611
611
  var RUNNER_LOG_VOLUME_NAME = "shadow-runner-logs";
612
612
  var RUNNER_CONFIG_VOLUME_NAME = "shadow-runner-config";
613
613
  var RUNNER_TMP_VOLUME_NAME = "shadow-runner-tmp";
614
+ var RUNNER_AGENTS_VOLUME_NAME = "shadow-runner-agents";
614
615
  var NATIVE_RUNNER_HEALTH_PORT = 3100;
615
616
  var OPENCLAW_GATEWAY_PORT = 3101;
616
617
  var OPENCLAW_HEALTH_PORT = 3102;
@@ -701,6 +702,7 @@ var HOME_DIR = RUNNER_HOME_DIR;
701
702
  var WORKSPACE_DIR = "/workspace";
702
703
  var OPENCLAW_SKILLS_DIR = `${HOME_DIR}/.openclaw/skills`;
703
704
  var CC_CONNECT_CONFIG_PATH = `${HOME_DIR}/.cc-connect/config.toml`;
705
+ var SHADOWOB_CLI_CONFIG_PATH = `${HOME_DIR}/.shadowob/shadowob.config.json`;
704
706
  var SHADOW_SLASH_COMMANDS_PATH = `${SHADOWOB_CONFIG_MOUNT_PATH}/slash-commands.json`;
705
707
  function hasRuntimeExtensions(extension) {
706
708
  return Boolean(
@@ -788,13 +790,20 @@ function buildIdentityWorkspaceFiles(agent) {
788
790
  }
789
791
  function shadowobSkillMarkdown() {
790
792
  const here = dirname(fileURLToPath(import.meta.url));
791
- const candidates = [
792
- resolve(process.cwd(), "skills/shadowob-cli/SKILL.md"),
793
- resolve(process.cwd(), "../skills/shadowob-cli/SKILL.md"),
794
- resolve(here, "../../../../skills/shadowob-cli/SKILL.md"),
795
- resolve(here, "../../../../../skills/shadowob-cli/SKILL.md")
796
- ];
797
- const path = candidates.find((candidate) => existsSync(candidate));
793
+ let currentDir = here;
794
+ let path;
795
+ while (true) {
796
+ const candidate = resolve(currentDir, "skills/shadowob-cli/SKILL.md");
797
+ if (existsSync(candidate)) {
798
+ path = candidate;
799
+ break;
800
+ }
801
+ const parentDir = dirname(currentDir);
802
+ if (parentDir === currentDir) {
803
+ break;
804
+ }
805
+ currentDir = parentDir;
806
+ }
798
807
  if (!path) {
799
808
  throw new Error("Cannot find skills/shadowob-cli/SKILL.md for runner package generation");
800
809
  }
@@ -822,6 +831,22 @@ function addShadowobSkill(files, runtimeKind, runtimeId) {
822
831
  files[`${HOME_DIR}/.hermes/skills/shadowob/SKILL.md`] = skill;
823
832
  }
824
833
  }
834
+ function addShadowobCliAuth(files, runtimeExtensions) {
835
+ const bindings = shadowBindings(runtimeExtensions);
836
+ const profiles = {};
837
+ for (const [index, binding] of bindings.entries()) {
838
+ const profileName = binding.buddyId?.trim() || (index === 0 ? "default" : `shadow-${index + 1}`);
839
+ profiles[profileName] = {
840
+ serverUrl: envPlaceholder(binding.serverUrlEnvKey),
841
+ token: envPlaceholder(binding.tokenEnvKey)
842
+ };
843
+ }
844
+ const currentProfile = Object.keys(profiles)[0] ?? "default";
845
+ files[SHADOWOB_CLI_CONFIG_PATH] = json({
846
+ profiles,
847
+ currentProfile
848
+ });
849
+ }
825
850
 
826
851
  // src/runtimes/slash-commands/openclaw.ts
827
852
  var OPENCLAW_SLASH_COMMANDS_SOURCE = "https://docs.openclaw.ai/tools/slash-commands";
@@ -918,6 +943,7 @@ var openclawAdapter = {
918
943
  [SHADOW_SLASH_COMMANDS_PATH]: json(openClawSlashCommands)
919
944
  };
920
945
  addShadowobSkill(runtimeFiles, "openclaw", context.agent.runtime);
946
+ addShadowobCliAuth(runtimeFiles, context.runtimeExtensions);
921
947
  const configData = {
922
948
  "config.json": JSON.stringify(openclawConfig, null, 2),
923
949
  "runtime-files.json": json(runtimeFiles),
@@ -981,6 +1007,7 @@ function buildCcConnectRuntimeFiles(options) {
981
1007
  ...options.nativeFiles ?? {}
982
1008
  };
983
1009
  addShadowobSkill(files, "cc-connect", agent.runtime);
1010
+ addShadowobCliAuth(files, options.runtimeExtensions);
984
1011
  return files;
985
1012
  }
986
1013
  function buildCcConnectPackage(context, options) {
@@ -995,6 +1022,7 @@ function buildCcConnectPackage(context, options) {
995
1022
  const files = buildCcConnectRuntimeFiles({
996
1023
  agent: context.agent,
997
1024
  ccConnectConfig,
1025
+ runtimeExtensions: context.runtimeExtensions,
998
1026
  nativeFiles: options.nativeFiles?.(context),
999
1027
  shadowSlashCommands: options.shadowSlashCommands
1000
1028
  });
@@ -1686,6 +1714,7 @@ var hermesAdapter = {
1686
1714
  [SHADOW_SLASH_COMMANDS_PATH]: json(hermesSlashCommands)
1687
1715
  };
1688
1716
  addShadowobSkill(files, "hermes", "hermes");
1717
+ addShadowobCliAuth(files, context.runtimeExtensions);
1689
1718
  const pluginRoot = `${HOME_DIR}/.hermes/plugins/shadowob`;
1690
1719
  files[`${pluginRoot}/plugin.yaml`] = readHermesPluginFile(
1691
1720
  context.cwd,
@@ -5755,6 +5784,7 @@ export {
5755
5784
  RUNNER_LOG_VOLUME_NAME,
5756
5785
  RUNNER_CONFIG_VOLUME_NAME,
5757
5786
  RUNNER_TMP_VOLUME_NAME,
5787
+ RUNNER_AGENTS_VOLUME_NAME,
5758
5788
  runtimeStatePvcName,
5759
5789
  getRuntime,
5760
5790
  getAllRuntimes,
package/dist/cli.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createConsoleCommand
4
- } from "./chunk-QV4XWO3P.js";
4
+ } from "./chunk-KODMGZUC.js";
5
5
  import {
6
6
  createInitCommand
7
- } from "./chunk-KEPTCLUO.js";
7
+ } from "./chunk-SAP2DBHO.js";
8
8
  import {
9
9
  formatProvisionState,
10
10
  loadProvisionState,
@@ -17,8 +17,9 @@ import {
17
17
  resolveCloudPackageAssetDir,
18
18
  toProviderSecretEnvKey,
19
19
  withLegacyEnvAliases
20
- } from "./chunk-V2LU736V.js";
20
+ } from "./chunk-LXJBQBGL.js";
21
21
  import {
22
+ RUNNER_AGENTS_VOLUME_NAME,
22
23
  RUNNER_CONFIG_MOUNT_PATH,
23
24
  RUNNER_CONFIG_VOLUME_NAME,
24
25
  RUNNER_LOG_VOLUME_NAME,
@@ -42,7 +43,7 @@ import {
42
43
  resolveConfig,
43
44
  runtimeContextEnv,
44
45
  runtimeStatePvcName
45
- } from "./chunk-QET4LT4J.js";
46
+ } from "./chunk-35LJYCQF.js";
46
47
  import {
47
48
  deepMerge,
48
49
  getPluginRegistry
@@ -1380,7 +1381,7 @@ function createOnboardCommand(container2) {
1380
1381
  } else {
1381
1382
  const answer = await ask(` No ${configPath} found. Create one from template? [Y/n] `);
1382
1383
  if (!answer || answer.toLowerCase() !== "n") {
1383
- const { createInitCommand: createInitCommand2 } = await import("./init.command-O4HG4HKR.js");
1384
+ const { createInitCommand: createInitCommand2 } = await import("./init.command-YVG4X6II.js");
1384
1385
  const init = createInitCommand2(container2);
1385
1386
  await init.parseAsync(["--quick"], { from: "user" });
1386
1387
  } else {
@@ -1397,7 +1398,7 @@ function createOnboardCommand(container2) {
1397
1398
  }
1398
1399
  container2.logger.success("Onboarding complete! Starting console...");
1399
1400
  console.log();
1400
- const { createConsoleCommand: createConsoleCommand2 } = await import("./dashboard.command-J7XOZNXU.js");
1401
+ const { createConsoleCommand: createConsoleCommand2 } = await import("./dashboard.command-ZMQFKLNQ.js");
1401
1402
  const console_ = createConsoleCommand2(container2);
1402
1403
  await console_.parseAsync([], { from: "user" });
1403
1404
  });
@@ -4129,7 +4130,8 @@ function baseVolumeMounts(runtime) {
4129
4130
  { name: RUNNER_STATE_VOLUME_NAME, mountPath: runtime.container.statePath },
4130
4131
  { name: RUNNER_CONFIG_VOLUME_NAME, mountPath: RUNNER_CONFIG_MOUNT_PATH, readOnly: true },
4131
4132
  { name: RUNNER_LOG_VOLUME_NAME, mountPath: runtime.container.logPath },
4132
- { name: RUNNER_TMP_VOLUME_NAME, mountPath: "/tmp" }
4133
+ { name: RUNNER_TMP_VOLUME_NAME, mountPath: "/tmp" },
4134
+ { name: RUNNER_AGENTS_VOLUME_NAME, mountPath: "/workspace/.agents" }
4133
4135
  ];
4134
4136
  }
4135
4137
  function baseVolumes(configMapName) {
@@ -4137,7 +4139,8 @@ function baseVolumes(configMapName) {
4137
4139
  { name: RUNNER_STATE_VOLUME_NAME, emptyDir: {} },
4138
4140
  { name: RUNNER_CONFIG_VOLUME_NAME, configMap: { name: configMapName } },
4139
4141
  { name: RUNNER_LOG_VOLUME_NAME, emptyDir: {} },
4140
- { name: RUNNER_TMP_VOLUME_NAME, emptyDir: {} }
4142
+ { name: RUNNER_TMP_VOLUME_NAME, emptyDir: {} },
4143
+ { name: RUNNER_AGENTS_VOLUME_NAME, emptyDir: {} }
4141
4144
  ];
4142
4145
  }
4143
4146
  function buildAgentPodSpec(options) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createConsoleCommand
3
- } from "./chunk-TV3CBM7R.js";
3
+ } from "./chunk-6YAYCWGK.js";
4
4
  import "./chunk-R5U7XKVJ.js";
5
5
  export {
6
6
  createConsoleCommand
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createConsoleCommand
4
- } from "./chunk-QV4XWO3P.js";
4
+ } from "./chunk-KODMGZUC.js";
5
5
  import "./chunk-AD3JTIU3.js";
6
6
  export {
7
7
  createConsoleCommand
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createConsoleCommand
3
- } from "./chunk-TV3CBM7R.js";
3
+ } from "./chunk-6YAYCWGK.js";
4
4
  import {
5
5
  createInitCommand
6
- } from "./chunk-R52J3PH2.js";
6
+ } from "./chunk-C6OI4ZNO.js";
7
7
  import {
8
8
  formatProvisionState,
9
9
  loadProvisionState,
@@ -26,8 +26,9 @@ import {
26
26
  toProviderSecretEnvKey,
27
27
  validateCloudSaasConfigSnapshot,
28
28
  withLegacyEnvAliases
29
- } from "./chunk-KKK5H7YX.js";
29
+ } from "./chunk-EWB7L7IW.js";
30
30
  import {
31
+ RUNNER_AGENTS_VOLUME_NAME,
31
32
  RUNNER_CONFIG_MOUNT_PATH,
32
33
  RUNNER_CONFIG_VOLUME_NAME,
33
34
  RUNNER_LOG_VOLUME_NAME,
@@ -55,7 +56,7 @@ import {
55
56
  runtimeContextEnv,
56
57
  runtimeStatePvcName,
57
58
  validateCloudConfig
58
- } from "./chunk-SUZ2ATT6.js";
59
+ } from "./chunk-ZHVYNIHA.js";
59
60
  import {
60
61
  deepMerge,
61
62
  getPluginRegistry
@@ -10964,7 +10965,7 @@ function createOnboardCommand(container) {
10964
10965
  } else {
10965
10966
  const answer = await ask(` No ${configPath} found. Create one from template? [Y/n] `);
10966
10967
  if (!answer || answer.toLowerCase() !== "n") {
10967
- const { createInitCommand: createInitCommand2 } = await import("./init.command-6E24K4H3.js");
10968
+ const { createInitCommand: createInitCommand2 } = await import("./init.command-JKE3SXAS.js");
10968
10969
  const init = createInitCommand2(container);
10969
10970
  await init.parseAsync(["--quick"], { from: "user" });
10970
10971
  } else {
@@ -10981,7 +10982,7 @@ function createOnboardCommand(container) {
10981
10982
  }
10982
10983
  container.logger.success("Onboarding complete! Starting console...");
10983
10984
  console.log();
10984
- const { createConsoleCommand: createConsoleCommand2 } = await import("./dashboard.command-RV2NHDKW.js");
10985
+ const { createConsoleCommand: createConsoleCommand2 } = await import("./dashboard.command-2AM45SIT.js");
10985
10986
  const console_ = createConsoleCommand2(container);
10986
10987
  await console_.parseAsync([], { from: "user" });
10987
10988
  });
@@ -13063,7 +13064,8 @@ function baseVolumeMounts(runtime) {
13063
13064
  { name: RUNNER_STATE_VOLUME_NAME, mountPath: runtime.container.statePath },
13064
13065
  { name: RUNNER_CONFIG_VOLUME_NAME, mountPath: RUNNER_CONFIG_MOUNT_PATH, readOnly: true },
13065
13066
  { name: RUNNER_LOG_VOLUME_NAME, mountPath: runtime.container.logPath },
13066
- { name: RUNNER_TMP_VOLUME_NAME, mountPath: "/tmp" }
13067
+ { name: RUNNER_TMP_VOLUME_NAME, mountPath: "/tmp" },
13068
+ { name: RUNNER_AGENTS_VOLUME_NAME, mountPath: "/workspace/.agents" }
13067
13069
  ];
13068
13070
  }
13069
13071
  function baseVolumes(configMapName) {
@@ -13071,7 +13073,8 @@ function baseVolumes(configMapName) {
13071
13073
  { name: RUNNER_STATE_VOLUME_NAME, emptyDir: {} },
13072
13074
  { name: RUNNER_CONFIG_VOLUME_NAME, configMap: { name: configMapName } },
13073
13075
  { name: RUNNER_LOG_VOLUME_NAME, emptyDir: {} },
13074
- { name: RUNNER_TMP_VOLUME_NAME, emptyDir: {} }
13076
+ { name: RUNNER_TMP_VOLUME_NAME, emptyDir: {} },
13077
+ { name: RUNNER_AGENTS_VOLUME_NAME, emptyDir: {} }
13075
13078
  ];
13076
13079
  }
13077
13080
  function buildAgentPodSpec(options) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createInitCommand
3
- } from "./chunk-R52J3PH2.js";
4
- import "./chunk-SUZ2ATT6.js";
3
+ } from "./chunk-C6OI4ZNO.js";
4
+ import "./chunk-ZHVYNIHA.js";
5
5
  import "./chunk-JUPAE5IA.js";
6
6
  import "./chunk-R5U7XKVJ.js";
7
7
  export {
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createInitCommand
4
- } from "./chunk-KEPTCLUO.js";
5
- import "./chunk-QET4LT4J.js";
4
+ } from "./chunk-SAP2DBHO.js";
5
+ import "./chunk-35LJYCQF.js";
6
6
  import "./chunk-6P2K6QZR.js";
7
7
  import "./chunk-AD3JTIU3.js";
8
8
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createServeCommand
3
- } from "./chunk-KKK5H7YX.js";
4
- import "./chunk-SUZ2ATT6.js";
3
+ } from "./chunk-EWB7L7IW.js";
4
+ import "./chunk-ZHVYNIHA.js";
5
5
  import "./chunk-JUPAE5IA.js";
6
6
  import "./chunk-R5U7XKVJ.js";
7
7
  export {
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createServeCommand
4
- } from "./chunk-V2LU736V.js";
5
- import "./chunk-QET4LT4J.js";
4
+ } from "./chunk-LXJBQBGL.js";
5
+ import "./chunk-35LJYCQF.js";
6
6
  import "./chunk-6P2K6QZR.js";
7
7
  import "./chunk-AD3JTIU3.js";
8
8
  export {
@@ -0,0 +1,451 @@
1
+ ---
2
+ name: shadowob
3
+ description: "Use when live Shadow context or actions are needed: channel/DM history, pins, members, server/channel/workspace/shop/app/buddy data, or sending/managing Shadow content via the shadowob CLI."
4
+ metadata:
5
+ {
6
+ "openclaw":
7
+ {
8
+ "emoji": "🏠",
9
+ "requires": { "bins": ["shadowob"] },
10
+ "primaryEnv": "SHADOWOB_TOKEN",
11
+ },
12
+ }
13
+ ---
14
+ allowed-tools: ["exec"]
15
+
16
+ # Shadow CLI
17
+
18
+ Use `shadowob` CLI to interact with Shadow servers.
19
+
20
+ Activate this skill when you need current Shadow context, such as recent channel or DM history,
21
+ pinned messages, member/server/channel state, workspace/shop/app/buddy data, or when you need to
22
+ send or manage Shadow content. Prefer narrow `--json` reads before acting.
23
+
24
+ ## Quickstart
25
+
26
+ ```bash
27
+ # Login (one-time setup)
28
+ shadowob auth login --server-url https://shadowob.com --token <jwt>
29
+
30
+ # List servers
31
+ shadowob servers list --json
32
+
33
+ # Send a message
34
+ shadowob channels send <channel-id> --content "Hello" --json
35
+ ```
36
+
37
+ ## Authentication
38
+
39
+ Set token via:
40
+ 1. `shadowob auth login` (persistent, stored in `~/.shadowob/shadowob.config.json`)
41
+ 2. `--profile <name>` to use a specific profile
42
+ 3. `SHADOWOB_TOKEN` env var (used by SDK directly)
43
+
44
+ ### Profile Commands
45
+
46
+ ```bash
47
+ shadowob auth login --server-url <url> --token <token> --profile <name>
48
+ shadowob auth switch <profile>
49
+ shadowob auth list
50
+ shadowob auth whoami
51
+ shadowob auth logout --profile <name>
52
+ ```
53
+
54
+ ## Servers
55
+
56
+ ```bash
57
+ # List joined servers
58
+ shadowob servers list --json
59
+
60
+ # Get server details
61
+ shadowob servers get <server-id> --json
62
+
63
+ # Create server
64
+ shadowob servers create --name "My Server" --slug myserver --json
65
+
66
+ # Join/Leave
67
+ shadowob servers join <server-id> [--invite-code <code>]
68
+ shadowob servers leave <server-id>
69
+
70
+ # Members
71
+ shadowob servers members <server-id> --json
72
+
73
+ # Discover public servers
74
+ shadowob servers discover --json
75
+ ```
76
+
77
+ ## Channels
78
+
79
+ ```bash
80
+ # List channels
81
+ shadowob channels list --server <server> --json
82
+
83
+ # Get channel
84
+ shadowob channels get <channel-id> --json
85
+
86
+ # Create/Delete
87
+ shadowob channels create --server <server> --name <name> [--type text] --json
88
+ shadowob channels delete <channel-id>
89
+
90
+ # Messages
91
+ shadowob channels messages <channel-id> [--limit 50] [--cursor <cursor>] --json
92
+ shadowob channels send <channel-id> --content "text" [--reply-to <id>] [--thread-id <id>] --json
93
+ shadowob channels edit <message-id> --content "new text" --json
94
+ shadowob channels delete-message <message-id>
95
+
96
+ # Reactions
97
+ shadowob channels react <message-id> --emoji 👍
98
+ shadowob channels unreact <message-id> --emoji 👍
99
+
100
+ # Pins
101
+ shadowob channels pin <message-id> [--channel-id <id>]
102
+ shadowob channels unpin <message-id> [--channel-id <id>]
103
+ shadowob channels pinned <channel-id> --json
104
+ ```
105
+
106
+ ## Threads
107
+
108
+ ```bash
109
+ # List threads
110
+ shadowob threads list <channel-id> --json
111
+
112
+ # Get thread
113
+ shadowob threads get <thread-id> --json
114
+
115
+ # Create/Delete
116
+ shadowob threads create <channel-id> --name <name> --parent-message <id> --json
117
+ shadowob threads delete <thread-id>
118
+
119
+ # Messages
120
+ shadowob threads messages <thread-id> [--limit 50] --json
121
+ shadowob threads send <thread-id> --content "text" --json
122
+ ```
123
+
124
+ ## Direct Messages (DMs)
125
+
126
+ ```bash
127
+ # List DM channels
128
+ shadowob dms list --json
129
+
130
+ # Get DM channel
131
+ shadowob dms get <dm-channel-id> --json
132
+
133
+ # Create DM channel
134
+ shadowob dms create --user-id <user-id> --json
135
+
136
+ # Messages
137
+ shadowob dms messages <dm-channel-id> [--limit 50] --json
138
+ shadowob dms send <dm-channel-id> --content "text" --json
139
+
140
+ # Delete DM channel
141
+ shadowob dms delete <dm-channel-id>
142
+ ```
143
+
144
+ ## Buddies
145
+
146
+ ```bash
147
+ # List buddies
148
+ shadowob buddies list --json
149
+
150
+ # Get buddy
151
+ shadowob buddies get <buddy-id> --json
152
+
153
+ # Create/Update/Delete
154
+ shadowob buddies create --name <name> --username <username> [--display-name <name>] [--avatar-url <url>] --json
155
+ shadowob buddies update <buddy-id> [--name <name>] [--display-name <name>] --json
156
+ shadowob buddies delete <buddy-id>
157
+
158
+ # Control
159
+ shadowob buddies start <buddy-id>
160
+ shadowob buddies stop <buddy-id>
161
+
162
+ # Token
163
+ shadowob buddies token <buddy-id> --json
164
+
165
+ # Config
166
+ shadowob buddies config <buddy-id> --json
167
+ ```
168
+
169
+ ## Workspace
170
+
171
+ ```bash
172
+ # Workspace info
173
+ shadowob workspace get <server-id> --json
174
+ shadowob workspace tree <server-id> --json
175
+ shadowob workspace stats <server-id> --json
176
+
177
+ # Children
178
+ shadowob workspace children <server-id> [--parent-id <id>] --json
179
+
180
+ # Files
181
+ shadowob workspace files get <server-id> <file-id> --json
182
+ shadowob workspace files upload <server-id> --file <path> [--name <name>] [--parent-id <id>] --json
183
+ shadowob workspace files update <server-id> <file-id> [--name <name>] [--parent-id <id>] --json
184
+ shadowob workspace files delete <server-id> <file-id>
185
+ shadowob workspace files search <server-id> [--search-text <text>] [--ext <ext>] [--parent-id <id>] --json
186
+ # Note: files download is not yet implemented in CLI; download via contentRef URL instead.
187
+
188
+ # Folders
189
+ shadowob workspace folders create <server-id> --name <name> [--parent-id <id>] --json
190
+ shadowob workspace folders update <server-id> <folder-id> [--name <name>] [--parent-id <id>] --json
191
+ shadowob workspace folders delete <server-id> <folder-id>
192
+ ```
193
+
194
+ ### Workspace Node Metadata
195
+
196
+ Each workspace node has a `flags` JSONB field with optional metadata:
197
+
198
+ - **Access control**: `flags.access = { scope: "server" | "channel", serverId, channelId? }`. All nodes have at least `scope: "server"` + `serverId`. Channel-scoped nodes require channel membership for access.
199
+ - **Traceability**: `flags.source = "channel_message_attachment"` with `channelId` and `messageId` for files uploaded via channel messages, enabling reverse lookup to the originating message.
200
+ - **Path is server-computed**: `path` is derived from parent path + name, maintained server-side. Do not set path manually — it is auto-updated on rename/move.
201
+
202
+ ## Shop
203
+
204
+ ```bash
205
+ # Shop info
206
+ shadowob shop get <server-id> --json
207
+ shadowob shop get-by-id <shop-id> --json
208
+ shadowob shop me get --json
209
+
210
+ # Products
211
+ shadowob shop products list <server-id> [--status active] [--keyword <text>] [--limit <n>] --json
212
+ shadowob shop products list-by-shop <shop-id> [--status active] [--limit <n>] --json
213
+ shadowob shop products get <server-id> <product-id> --json
214
+ shadowob shop products purchase <shop-id> <product-id> --idempotency-key <unique-operation-id> --json
215
+
216
+ # Offers, deliverables, and shop assets
217
+ shadowob shop offers list <shop-id> --json
218
+ shadowob shop offers create <shop-id> --data '<offer-json>' --json
219
+ shadowob shop offers deliverables create <shop-id> <offer-id> --data '<deliverable-json>' --json
220
+ shadowob shop assets list <shop-id> --json
221
+ shadowob shop assets create <shop-id> --data '<asset-definition-json>' --json
222
+ shadowob shop entitlements list <shop-id> --json
223
+
224
+ # Cart
225
+ shadowob shop cart list <server-id> --json
226
+
227
+ # Orders
228
+ shadowob shop orders list <server-id> --json
229
+ shadowob shop orders get <server-id> <order-id> --json
230
+
231
+ # Wallet
232
+ shadowob shop wallet balance --json
233
+ ```
234
+
235
+ ## Commerce
236
+
237
+ ```bash
238
+ # Product and offer buyer context
239
+ shadowob commerce products context <product-id> --json
240
+ shadowob commerce offers preview <offer-id> --json
241
+ shadowob commerce offers purchase <offer-id> --idempotency-key <unique-operation-id> --json
242
+
243
+ # Chat commerce cards
244
+ shadowob commerce cards list --channel-id <channel-id> [--keyword <text>] --json
245
+ shadowob commerce cards purchase <message-id> <card-id> --idempotency-key <unique-operation-id> --json
246
+
247
+ # Purchases, delivery, protected files, and community assets
248
+ shadowob commerce entitlements list [--server <server>] --json
249
+ shadowob commerce entitlements get <entitlement-id> --json
250
+ shadowob commerce entitlements verify <entitlement-id> --json
251
+ shadowob commerce paid-files open <file-id> --json
252
+ shadowob commerce assets list --json
253
+ shadowob commerce assets consume <grant-id> --idempotency-key <unique-operation-id> --json
254
+
255
+ # Seller income and support actions
256
+ shadowob commerce settlements list --json
257
+ shadowob commerce settlements settle --json
258
+ shadowob commerce tips send --recipient-user-id <user-id> --amount <shrimp> [--message <text>] --json
259
+ shadowob commerce gifts send --recipient-user-id <user-id> --assets '<json-array>' --json
260
+ ```
261
+
262
+ ## Commerce Validation Notes
263
+
264
+ - Use the CLI for setup, inspection, and automation, but validate commerce user stories in the
265
+ browser before calling them complete.
266
+ - Do not add seed code to populate commerce surfaces. Create ordinary local/test records through
267
+ browser flows or explicit setup calls.
268
+ - When inspecting a commerce flow, preserve ids for the handoff: product, offer, order,
269
+ entitlement, shop, server, Buddy, and workspace file where applicable.
270
+ - External app entitlement automation must use Shadow OAuth commerce APIs and remain scoped to the
271
+ app's own `external_app` resource namespace.
272
+
273
+ ## Apps
274
+
275
+ ```bash
276
+ # Server App integrations
277
+ shadowob app list --server <server-id-or-slug> --json
278
+ shadowob app preview --server <server-id-or-slug> --manifest-url <manifest-url> --json
279
+ shadowob app install --server <server-id-or-slug> --manifest-url <manifest-url> --json
280
+ shadowob app uninstall <app-key> --server <server-id-or-slug>
281
+ shadowob app discover --server <server-id-or-slug> --json
282
+ shadowob app inspect <app-key> --server <server-id-or-slug> --json
283
+ shadowob app skills <app-key> --server <server-id-or-slug>
284
+ shadowob app call <app-key> <command> --server <server-id-or-slug> --channel-id <channel-id> --json-input '<raw-command-input-json>' --json
285
+ ```
286
+
287
+ For server App commands, use the `shadowob app` CLI path only. Do not use curl, fetch, raw HTTP
288
+ routes, or the JavaScript SDK to call server App commands. Pass the command input object directly
289
+ to `--json-input`, for example `{"title":"Example","priority":"high"}`; the CLI wraps the HTTP
290
+ request for you and binds Shadow OAuth identity, server membership, App grants, and command policy.
291
+ When a channel message mentions a server App, use the mentioned app key/server id directly and pass
292
+ the current channel id with `--channel-id` when available. If a server App command requires
293
+ approval, do not send a chat form or call the approval endpoint yourself as a Buddy. Wait for a
294
+ person to confirm the Shadow approval popup, then retry the original command.
295
+
296
+ ```bash
297
+ # Legacy workspace apps
298
+ shadowob apps list <server-id> --json
299
+
300
+ # Get app
301
+ shadowob apps get <app-id> --json
302
+
303
+ # Create/Update/Delete
304
+ shadowob apps create <server-id> --name <name> --type <url|workspace|static> [--source-url <url>] [--description <desc>] [--settings <json>] --json
305
+ shadowob apps update <app-id> [--name <name>] [--description <desc>] [--source-url <url>] [--settings <json>] --json
306
+ shadowob apps delete <app-id>
307
+
308
+ # Publish from workspace
309
+ shadowob apps publish <server-id> --folder-id <id> [--name <name>] [--description <desc>] --json
310
+
311
+ # Download source
312
+ shadowob apps download <app-id> [--output <path>]
313
+ ```
314
+
315
+ ## Notifications
316
+
317
+ ```bash
318
+ # List notifications
319
+ shadowob notifications list [--unread-only] [--limit <n>] --json
320
+
321
+ # Get/Read/Delete
322
+ shadowob notifications get <notification-id> --json
323
+ shadowob notifications mark-read <notification-id>
324
+ shadowob notifications mark-all-read
325
+ shadowob notifications delete <notification-id>
326
+
327
+ # Preferences
328
+ shadowob notifications preferences get --json
329
+ shadowob notifications preferences update [--email-enabled <bool>] [--push-enabled <bool>] [--mentions-only <bool>] --json
330
+ ```
331
+
332
+ ## Friends
333
+
334
+ ```bash
335
+ # List friends
336
+ shadowob friends list --json
337
+
338
+ # Friend requests
339
+ shadowob friends requests [--incoming] [--outgoing] --json
340
+ shadowob friends add <username> [--message <text>] --json
341
+ shadowob friends accept <request-id> --json
342
+ shadowob friends reject <request-id> --json
343
+
344
+ # Remove friend
345
+ shadowob friends remove <friendship-id> --json
346
+ ```
347
+
348
+ ## Invites
349
+
350
+ ```bash
351
+ # List your invite codes
352
+ shadowob invites list --json
353
+
354
+ # Create invite code
355
+ shadowob invites create [--max-uses <n>] [--expires-in <hours>] --json
356
+
357
+ # Deactivate/Delete invite
358
+ shadowob invites deactivate <invite-id>
359
+ shadowob invites delete <invite-id>
360
+ ```
361
+
362
+ ## OAuth
363
+
364
+ ```bash
365
+ # List OAuth apps
366
+ shadowob oauth list --json
367
+
368
+ # Create OAuth app
369
+ shadowob oauth create --name <name> [--description <desc>] [--redirect-uri <uri>] [--homepage <url>] --json
370
+
371
+ # Update/Delete OAuth app
372
+ shadowob oauth update <app-id> [--name <name>] [--description <desc>] [--redirect-uri <uri>] [--homepage <url>] --json
373
+ shadowob oauth delete <app-id>
374
+
375
+ # Reset client secret
376
+ shadowob oauth reset-secret <app-id> --json
377
+
378
+ # List authorized apps (user consents)
379
+ shadowob oauth consents --json
380
+
381
+ # Revoke consent for an app
382
+ shadowob oauth revoke <app-id>
383
+
384
+ # External app commerce entitlement checks use OAuth access tokens, not user JWTs
385
+ shadowob oauth commerce check --access-token <oauth-access-token> --resource-id <app-id>:premium --json
386
+ shadowob oauth commerce redeem --access-token <oauth-access-token> --resource-id <app-id>:premium --idempotency-key <provider-operation-id> --json
387
+ ```
388
+
389
+ ## Marketplace
390
+
391
+ ```bash
392
+ # Listings
393
+ shadowob marketplace listings list [--agent-id <id>] [--min-price <n>] [--max-price <n>] --json
394
+ shadowob marketplace listings get <listing-id> --json
395
+ shadowob marketplace listings create --agent-id <id> --price <n> [--description <text>] --json
396
+ shadowob marketplace listings update <listing-id> [--price <n>] [--description <text>] [--active <bool>] --json
397
+ shadowob marketplace listings delete <listing-id>
398
+
399
+ # Contracts
400
+ shadowob marketplace contracts list [--as-renter] [--as-owner] [--active-only] --json
401
+ shadowob marketplace contracts get <contract-id> --json
402
+ shadowob marketplace contracts create --listing-id <id> --hours <n> [--note <text>] --json
403
+ shadowob marketplace contracts cancel <contract-id>
404
+ shadowob marketplace contracts extend <contract-id> --hours <n> --json
405
+ ```
406
+
407
+ ## Media
408
+
409
+ ```bash
410
+ # Upload a file
411
+ shadowob media upload --file <path> [--server <server>] [--channel-id <id>] --json
412
+
413
+ # Download a file
414
+ shadowob media download <file-url> [--output <path>]
415
+ ```
416
+
417
+ ## Search
418
+
419
+ ```bash
420
+ # Search messages
421
+ shadowob search messages --query <text> [--server <server>] [--channel-id <id>] [--author-id <id>] [--after <date>] [--before <date>] [--has-attachments] [--limit <n>] --json
422
+ ```
423
+
424
+ ## Listen (Real-time Events)
425
+
426
+ ```bash
427
+ # Stream mode: listen until timeout or count
428
+ shadowob listen channel <channel-id> --mode stream [--timeout 60] [--count 10] --json
429
+
430
+ # Poll mode: fetch recent messages
431
+ shadowob listen channel <channel-id> --mode poll [--last 50] --json
432
+
433
+ # Filter events
434
+ shadowob listen channel <id> --event-type message:new,reaction:add --json
435
+
436
+ # DM events
437
+ shadowob listen dm <dm-channel-id> [--timeout 60] --json
438
+ ```
439
+
440
+ ## Output Format
441
+
442
+ - Default: human-readable list format
443
+ - `--json`: JSON output for programmatic use
444
+
445
+ ## Error Handling
446
+
447
+ Commands exit with code 1 on error. Use `--json` to get structured errors:
448
+
449
+ ```json
450
+ { "error": "message" }
451
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shadowob/cloud",
3
- "version": "1.1.6-dev.331",
3
+ "version": "1.1.7",
4
4
  "description": "shadowob-cloud — deploy AI agents to Kubernetes",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,8 +58,8 @@
58
58
  "yaml": "^2.8.4",
59
59
  "zod": "^3.25.76",
60
60
  "zustand": "^5.0.13",
61
- "@shadowob/sdk": "1.1.6-dev.331",
62
- "@shadowob/shared": "1.1.6-dev.331"
61
+ "@shadowob/sdk": "1.1.7",
62
+ "@shadowob/shared": "1.1.7"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@playwright/test": "^1.52.0",
@@ -90,6 +90,7 @@
90
90
  },
91
91
  "scripts": {
92
92
  "build": "tsup && rsbuild build",
93
+ "build:cli": "tsup",
93
94
  "dev": "tsup --watch",
94
95
  "dev:backend": "tsup --watch",
95
96
  "dev:frontend": "rsbuild dev",
@@ -98,7 +99,11 @@
98
99
  "console:preview": "rsbuild preview",
99
100
  "generate:plugin-library": "node --import tsx scripts/generate-plugin-library.ts",
100
101
  "generate:schema": "node --import tsx scripts/generate-schema.ts",
102
+ "copy:cli-skill": "node --import tsx scripts/copy-cli-skill.ts",
103
+ "prebuild:cli": "pnpm generate:plugin-library",
101
104
  "prebuild": "pnpm generate:plugin-library",
105
+ "postbuild:cli": "pnpm copy:cli-skill",
106
+ "postbuild": "pnpm copy:cli-skill",
102
107
  "predev": "pnpm generate:plugin-library",
103
108
  "predev:backend": "pnpm generate:plugin-library",
104
109
  "predev:frontend": "pnpm generate:plugin-library",
@@ -108,9 +113,9 @@
108
113
  "pretest": "pnpm generate:plugin-library",
109
114
  "test": "vitest run",
110
115
  "test:watch": "vitest",
111
- "pretest:e2e": "pnpm generate:plugin-library",
116
+ "pretest:e2e": "pnpm build:cli",
112
117
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
113
- "pretest:e2e:cli": "pnpm generate:plugin-library",
118
+ "pretest:e2e:cli": "pnpm build:cli",
114
119
  "test:e2e:cli": "vitest run --config vitest.cli.config.ts",
115
120
  "pretest:e2e:console": "pnpm generate:plugin-library",
116
121
  "test:e2e:console": "playwright test",