@co0ontty/wand 1.75.6 → 1.75.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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "commit": "88e1f0494c2b429666126a28c44a327b53340a1f",
3
- "builtAt": "2026-06-26T10:58:26.311Z",
4
- "version": "1.75.6",
2
+ "commit": "7ae7673cfd6236680dba087cbd52c1ddbf1e5d65",
3
+ "builtAt": "2026-06-26T11:17:58.046Z",
4
+ "version": "1.75.7",
5
5
  "channel": "stable"
6
6
  }
@@ -961,7 +961,7 @@ export class ProcessManager extends EventEmitter {
961
961
  current.ptyBridge.onUserInput(initialInput);
962
962
  }
963
963
  current.ptyProcess.write(initialInput);
964
- current.ptyProcess.write("\n");
964
+ current.ptyProcess.write("\r");
965
965
  };
966
966
  child.onData((chunk) => {
967
967
  const rec = this.sessions.get(id);
@@ -179,9 +179,16 @@ function startResumedPtySession(processes, existingSession, sessionId, defaultMo
179
179
  thinkingEffort: existingSession.thinkingEffort ?? undefined,
180
180
  });
181
181
  }
182
- function getAutoResumeInitialInput(input, view, shortcutKey) {
183
- if (view === "terminal")
184
- return null;
182
+ function getAutoResumeInitialInput(snapshot, input, view, shortcutKey) {
183
+ if (view === "terminal") {
184
+ const isCodexPty = Boolean(snapshot?.provider === "codex" || /^codex\b/.test(snapshot?.command.trim() ?? ""));
185
+ if (!isCodexPty)
186
+ return null;
187
+ if (shortcutKey && shortcutKey !== "enter_text")
188
+ return null;
189
+ if (/[\x00-\x08\x0B-\x1F\x7F]/.test(input.replace(/[\r\n]+$/g, "")))
190
+ return null;
191
+ }
185
192
  if (shortcutKey && shortcutKey !== "enter_text")
186
193
  return null;
187
194
  const trimmedRight = input.replace(/[\r\n]+$/g, "").trimEnd();
@@ -852,8 +859,8 @@ export function registerSessionRoutes(app, processes, structured, storage, defau
852
859
  res.json(snapshot);
853
860
  return;
854
861
  }
855
- const autoResumeInput = getAutoResumeInitialInput(input, view, shortcutKey);
856
862
  const existingSession = processes.get(sessionId) || storage.getSession(sessionId);
863
+ const autoResumeInput = getAutoResumeInitialInput(existingSession, input, view, shortcutKey);
857
864
  if (autoResumeInput !== null && canAutoResumePtyForInput(existingSession, autoResumeInput)) {
858
865
  const snapshot = startResumedPtySession(processes, existingSession, sessionId, defaultMode, {}, autoResumeInput);
859
866
  res.json(snapshot);
package/dist/server.js CHANGED
@@ -2133,6 +2133,10 @@ export async function startServer(config, configPath) {
2133
2133
  return createHttpsServer({ key: ssl.key, cert: ssl.cert }, app);
2134
2134
  })()
2135
2135
  : createHttpServer(app);
2136
+ // Node's 5s default can close an idle socket just before iOS URLSession reuses
2137
+ // it for a later POST, surfacing as "network connection lost" on the client.
2138
+ server.keepAliveTimeout = 75_000;
2139
+ server.headersTimeout = 80_000;
2136
2140
  // 公开下载当前证书 —— 方便从手机/其他终端拉证书并导入信任链。
2137
2141
  // 不鉴权:证书本身是公开材料(不含私钥),泄露不影响安全。
2138
2142
  if (useHttps && activeSslCertPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@co0ontty/wand",
3
- "version": "1.75.6",
3
+ "version": "1.75.7",
4
4
  "description": "A web terminal for local CLI tools like Claude.",
5
5
  "type": "module",
6
6
  "bin": {