@co0ontty/wand 4.38.0 → 4.39.0

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": "c2cb25ff02d2e249d43d4559cf48390275040221",
3
- "builtAt": "2026-08-08T01:49:50.381Z",
4
- "version": "4.38.0",
2
+ "commit": "9896125e169fcac60a7a4fd7093eb675dfec329d",
3
+ "builtAt": "2026-08-08T07:24:00.026Z",
4
+ "version": "4.39.0",
5
5
  "channel": "stable"
6
6
  }
package/dist/cli.js CHANGED
@@ -92,6 +92,11 @@ async function main() {
92
92
  }
93
93
  break;
94
94
  }
95
+ case "terminald": {
96
+ const { runTerminalDaemon } = await import("./terminal-daemon-server.js");
97
+ await runTerminalDaemon(configPath);
98
+ break;
99
+ }
95
100
  case "config:path": {
96
101
  process.stdout.write(`${configPath}\n`);
97
102
  break;
@@ -212,6 +217,7 @@ function printHelp() {
212
217
  Commands:
213
218
  wand init Create default files in ~/.wand/
214
219
  wand web Start web console server (or attach to running one)
220
+ wand terminald Run the persistent terminal owner (normally managed automatically)
215
221
  wand config:path Print resolved config path
216
222
  wand config:show Print current config
217
223
  wand config:password Print current login password
@@ -3,6 +3,7 @@ import { WandStorage } from "./storage.js";
3
3
  import { ExecutionMode, ProcessEventHandler, SessionProvider, SessionSnapshot, SessionSource, WandConfig } from "./types.js";
4
4
  import { type PermissionResolution } from "./claude-pty-bridge.js";
5
5
  import { type PtyTerminalSnapshot } from "./pty-terminal-state.js";
6
+ import { type TerminalHost } from "./terminal-host.js";
6
7
  import { type ClaudeHistorySession, type CodexHistorySession, type OpenCodeHistorySession, type QoderHistorySession } from "./provider-history-scanner.js";
7
8
  export type { ClaudeHistorySession, CodexHistorySession, OpenCodeHistorySession, QoderHistorySession, } from "./provider-history-scanner.js";
8
9
  /** Exported for focused policy tests. */
@@ -32,7 +33,14 @@ export declare class ProcessManager extends EventEmitter {
32
33
  private orphanRecoveredCount;
33
34
  private readonly topicCoordinator;
34
35
  private disposed;
35
- constructor(config: WandConfig, storage: WandStorage, configDir?: string);
36
+ private readonly terminalHost;
37
+ constructor(config: WandConfig, storage: WandStorage, configDir?: string, terminalHost?: TerminalHost);
38
+ private makeRestoredRecord;
39
+ private bindRestoredTerminal;
40
+ private initializeClaudeBridge;
41
+ private bindTerminalProcess;
42
+ private handleTerminalExit;
43
+ private handleTerminalData;
36
44
  on(_event: "process", listener: ProcessEventHandler): this;
37
45
  /** 启动时被识别为孤儿 PTY 并标记为 exited 的旧会话数量(仅用于启动摘要展示)。 */
38
46
  getOrphanRecoveredCount(): number;
@@ -53,7 +61,7 @@ export declare class ProcessManager extends EventEmitter {
53
61
  sessionSource?: SessionSource;
54
62
  automationId?: string;
55
63
  interactiveShell?: boolean;
56
- }): SessionSnapshot;
64
+ }): Promise<SessionSnapshot>;
57
65
  list(): SessionSnapshot[];
58
66
  /** Return lightweight snapshots for the session list (no output/messages). */
59
67
  listSlim(): SessionSnapshot[];
@@ -110,7 +118,7 @@ export declare class ProcessManager extends EventEmitter {
110
118
  private cleanupRecord;
111
119
  delete(id: string): void;
112
120
  private deleteClaudeCache;
113
- runStartupCommands(): SessionSnapshot[];
121
+ runStartupCommands(): Promise<SessionSnapshot[]>;
114
122
  private snapshot;
115
123
  /** Lightweight snapshot for list views — omits output and messages. */
116
124
  private snapshotSlim;
@@ -168,7 +176,7 @@ export declare class ProcessManager extends EventEmitter {
168
176
  rows?: number;
169
177
  sessionSource?: SessionSource;
170
178
  automationId?: string;
171
- }): SessionSnapshot;
179
+ }): Promise<SessionSnapshot>;
172
180
  private shouldAutoApprovePermissions;
173
181
  private processCommandForMode;
174
182
  }