@co0ontty/wand 1.20.4 → 1.21.4

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.
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export type SessionKind = "pty" | "structured";
2
2
  export type SessionCreateKind = "pty" | "structured";
3
3
  export type SessionProvider = "claude" | "codex";
4
- export type SessionRunner = "claude-cli" | "claude-cli-print" | "pty";
4
+ export type SessionRunner = "claude-cli" | "claude-cli-print" | "codex-cli-exec" | "pty";
5
5
  export type ExecutionMode = "assist" | "agent" | "agent-max" | "default" | "auto-edit" | "full-access" | "native" | "managed";
6
6
  export type AutonomyPolicy = "assist" | "agent" | "agent-max";
7
7
  export type ApprovalPolicy = "ask-every-time" | "approve-once" | "remember-this-turn";
@@ -14,6 +14,9 @@ export interface ProcessEvent {
14
14
  type: "output" | "status" | "started" | "ended" | "usage" | "task" | "notification";
15
15
  sessionId: string;
16
16
  data?: unknown;
17
+ /** Monotonic per-session sequence stamped by the WS broadcast layer for
18
+ * output events. Lets clients spot gaps caused by backpressure drops. */
19
+ seq?: number;
17
20
  }
18
21
  export type ProcessEventHandler = (event: ProcessEvent) => void;
19
22
  export interface EscalationRequest {
@@ -186,6 +189,10 @@ export interface CommandRequest {
186
189
  worktreeEnabled?: boolean;
187
190
  /** Claude 模型(别名或完整 ID)。仅对 claude provider 生效。留空则回落到 config.defaultModel。 */
188
191
  model?: string;
192
+ /** 创建会话时由前端测得的真实列数。后端用它直接 spawn PTY,避免"先 120 列再 resize"的早期错位。 */
193
+ cols?: number;
194
+ /** 创建会话时由前端测得的真实行数。 */
195
+ rows?: number;
189
196
  }
190
197
  export interface InputRequest {
191
198
  input?: string;
@@ -284,7 +291,7 @@ export interface SessionSnapshot {
284
291
  autonomyPolicy?: AutonomyPolicy;
285
292
  approvalPolicy?: ApprovalPolicy;
286
293
  allowedScopes?: EscalationScope[];
287
- status: "running" | "exited" | "failed" | "stopped";
294
+ status: "idle" | "running" | "exited" | "failed" | "stopped";
288
295
  exitCode: number | null;
289
296
  startedAt: string;
290
297
  endedAt: string | null;
@@ -325,6 +332,10 @@ export interface SessionSnapshot {
325
332
  currentTaskTitle?: string;
326
333
  /** 用户为此会话选定的 Claude 模型(别名或完整 ID)。结构化会话下次 spawn 时使用;PTY 会话仅用于展示。 */
327
334
  selectedModel?: string | null;
335
+ /** 当前 PTY 列宽,由最近一次 resize 决定。前端用它来判断本端 fit 是否需要校准。 */
336
+ ptyCols?: number;
337
+ /** 当前 PTY 行数,由最近一次 resize 决定。 */
338
+ ptyRows?: number;
328
339
  }
329
340
  /** Unified event type emitted by ClaudePtyBridge for WebSocket broadcast */
330
341
  export type SessionEventType = "output.raw" | "output.chat" | "chat.turn" | "permission.prompt" | "permission.resolved" | "session.id" | "task" | "ended";