@clawos-dev/clawd 0.2.151 → 0.2.152-beta.321.8f612f5

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/cli.cjs +10 -1
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -4536,6 +4536,9 @@ var init_persona_schemas = __esm({
4536
4536
  enabled: external_exports.boolean().optional(),
4537
4537
  autoAllowBashIfSandboxed: external_exports.boolean().optional(),
4538
4538
  allowUnsandboxedCommands: external_exports.boolean().optional(),
4539
+ // 命令前缀白名单(CC `sandbox.excludedCommands`):匹配的命令在沙箱外运行,
4540
+ // 用于需逃出沙箱的工具(如 'docker *' / 'aliyun *' 要访问宿主 socket / 凭证)。
4541
+ excludedCommands: external_exports.array(external_exports.string()).optional(),
4539
4542
  filesystem: external_exports.object({
4540
4543
  denyRead: external_exports.array(external_exports.string()).optional(),
4541
4544
  allowRead: external_exports.array(external_exports.string()).optional(),
@@ -32009,6 +32012,9 @@ function applyProfile(base, profile) {
32009
32012
  if (pn.allowedDomains) n.allowedDomains = unionArr(n.allowedDomains, pn.allowedDomains);
32010
32013
  if (pn.allowLocalBinding !== void 0) n.allowLocalBinding = pn.allowLocalBinding;
32011
32014
  }
32015
+ if (profile.sandbox?.excludedCommands) {
32016
+ base.sandbox.excludedCommands = unionArr(base.sandbox.excludedCommands, profile.sandbox.excludedCommands);
32017
+ }
32012
32018
  return base;
32013
32019
  }
32014
32020
  function composeGuestSandbox(base, userWorkDir, spawnCwd) {
@@ -35703,6 +35709,8 @@ var DEFAULT_PERSONAS = [
35703
35709
  // 故其 profile 无需 carve 这个路径;html-slides 没有 daemon 侧流程、要在 cc 沙箱内直接 `set -a; . $HOME/.clawd/
35704
35710
  // deploy-kit/.secrets/aliyun.env; set +a` 后调 aliyun CLI(env 凭证绕过沙箱外的 ~/.aliyun/),所以这里**额外**把
35705
35711
  // 这个凭证文件加进 allowRead(denyRead '~/' 之上的精确凿洞,单文件、最小暴露,同 ~/.npmrc 先例)。
35712
+ // excludedCommands: ['aliyun *'] —— 额外把 aliyun CLI 放沙箱外跑(逃出 seatbelt 直接用宿主凭证/网络),
35713
+ // 与上面沙箱内 env 凭证方案并存,按运行时实际命令前缀匹配生效。
35706
35714
  sandboxProfile: {
35707
35715
  permissions: {
35708
35716
  defaultMode: "bypassPermissions",
@@ -35716,7 +35724,8 @@ var DEFAULT_PERSONAS = [
35716
35724
  network: {
35717
35725
  allowedDomains: ["*.com", "*.org", "*.io", "*.net", "*.dev", "*.app", "*.cn", "*.co", "*.chat", "*.ai"],
35718
35726
  allowLocalBinding: true
35719
- }
35727
+ },
35728
+ excludedCommands: ["aliyun *"]
35720
35729
  }
35721
35730
  },
35722
35731
  codexSandbox: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.151",
3
+ "version": "0.2.152-beta.321.8f612f5",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",