@clawos-dev/clawd 0.2.211-beta.421.2a1dd21 → 0.2.211

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 +22 -5
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -41576,8 +41576,7 @@ function composeGuestSandbox(base, userWorkDir, spawnCwd) {
41576
41576
  "~/.clawd/bin",
41577
41577
  "~/Library/Application Support/@clawos/clawd-desktop/ota-bundles",
41578
41578
  "~/.clawd/config.json",
41579
- "~/.clawd/auth.json",
41580
- "~/.clawd/contact-ssh.log"
41579
+ "~/.clawd/auth.json"
41581
41580
  ]);
41582
41581
  return s;
41583
41582
  }
@@ -41796,7 +41795,7 @@ var CONTACT_SSH_SYSTEM_PROMPT_HINT = `## \u8DE8\u8BBE\u5907\u6587\u4EF6\u8BBF\u9
41796
41795
 
41797
41796
  **\u6CE8\u610F**\uFF1A
41798
41797
  - \u6388\u6743\u76EE\u5F55\u6570\u636E\u6E90\u5B9E\u65F6\uFF08jail \u6BCF\u6B21\u8BFB A \u4FA7\u6700\u65B0\u914D\u7F6E\uFF09\uFF0CA \u6539\u4E86\u6388\u6743\u540E\u4F60\u4E0B\u4E00\u6B21\u62E8\u53F7\u7ACB\u5373\u611F\u77E5
41799
- - \u6392\u969C\uFF1A\u672C\u673A debug \u65E5\u5FD7\u5728 \`~/.clawd/contact-ssh.log\`\uFF08\u4F60\u81EA\u5DF1\u4E5F\u80FD \`tail\` \u6392\u969C\uFF0C\u6807 \`relay.*\` \u662F\u4F60\u672C\u6B21\u62E8\u53F7\uFF0C\`key.*\` \u662F puller \u62C9 privkey\uFF0C\`tunnel.*\` \u662F\u5BF9\u7AEF\u63A5\u8FDE\u7ED3\u679C\uFF0C\`jail.*\` \u662F\u5BF9\u7AEF exposedDirs \u6388\u6743\u5224\u5B9A\uFF09
41798
+ - \u6392\u969C\uFF1A\u672C\u673A debug \u65E5\u5FD7\u5728 \`~/.clawd/contact-ssh.log\`\uFF08\u7528\u6237\u53EF \`tail -f\` \u770B\u6BCF\u4E00\u6B65\uFF09\uFF0C\u4F60\u51FA\u9519\u65F6\u544A\u8BC9\u7528\u6237\u67E5\u8FD9\u4E2A\u6587\u4EF6
41800
41799
  - \u5982\u679C \`ls ~/.clawd/contact-ssh-keys/\` \u4E3A\u7A7A\uFF0C\u8BF4\u660E\u8FD8\u6CA1\u6709\u5BF9\u7AEF\u6388\u6743\u4F60\u6216 key \u8FD8\u6CA1\u62C9\u5230\uFF08B \u4FA7 daemon \u6BCF 60s \u4E00\u6B21\u81EA\u52A8\u62C9\uFF09\uFF0C\u5982\u5B9E\u544A\u8BC9\u7528\u6237
41801
41800
  `;
41802
41801
 
@@ -53874,6 +53873,8 @@ function pumpClientToOutbound(client, outbound, peerDeviceId, peerDisplayName, d
53874
53873
  let bytesClientToOutbound = 0;
53875
53874
  let bytesOutboundToClient = 0;
53876
53875
  let settled = false;
53876
+ const preOpenQueue = [];
53877
+ let preOpenQueuedBytes = 0;
53877
53878
  const cleanup = (reason, code = 1e3) => {
53878
53879
  if (settled) return;
53879
53880
  settled = true;
@@ -53903,9 +53904,20 @@ function pumpClientToOutbound(client, outbound, peerDeviceId, peerDisplayName, d
53903
53904
  };
53904
53905
  outbound.on("open", () => {
53905
53906
  outboundOpened = true;
53907
+ const queuedFrames = preOpenQueue.length;
53908
+ if (queuedFrames > 0) {
53909
+ for (const buf of preOpenQueue) outbound.send(buf, { binary: true });
53910
+ preOpenQueue.length = 0;
53911
+ sshLog.info(
53912
+ "relay.preopen-flush",
53913
+ "outbound \u5C31\u7EEA\u524D\u7F13\u51B2\u7684 client \u5B57\u8282\u5DF2\u6309\u5E8F flush\uFF08\u542B SSH banner\uFF09",
53914
+ { peerDeviceId, peerDisplayName, queuedFrames, queuedBytes: preOpenQueuedBytes }
53915
+ );
53916
+ }
53906
53917
  sshLog.info("relay.dial-open", "outbound ws open\uFF0C\u8FDB\u5165\u53CC\u5411 pipe", {
53907
53918
  peerDeviceId,
53908
- peerDisplayName
53919
+ peerDisplayName,
53920
+ preOpenQueuedFrames: queuedFrames
53909
53921
  });
53910
53922
  });
53911
53923
  outbound.on("message", (data) => {
@@ -53930,7 +53942,12 @@ function pumpClientToOutbound(client, outbound, peerDeviceId, peerDisplayName, d
53930
53942
  const buf = toBuffer(data);
53931
53943
  if (!buf) return;
53932
53944
  bytesClientToOutbound += buf.length;
53933
- if (outbound.readyState === outbound.OPEN) outbound.send(buf, { binary: true });
53945
+ if (outbound.readyState === outbound.OPEN) {
53946
+ outbound.send(buf, { binary: true });
53947
+ } else {
53948
+ preOpenQueue.push(buf);
53949
+ preOpenQueuedBytes += buf.length;
53950
+ }
53934
53951
  });
53935
53952
  client.on("close", () => cleanup("client close", 1e3));
53936
53953
  client.on("error", (err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.211-beta.421.2a1dd21",
3
+ "version": "0.2.211",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",