@co0ontty/wand 1.3.4 → 1.4.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.
package/dist/types.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ export type SessionKind = "pty" | "structured";
2
+ export type SessionCreateKind = "pty" | "structured";
3
+ export type SessionRunner = "claude-cli" | "claude-cli-print" | "pty";
1
4
  export type ExecutionMode = "assist" | "agent" | "agent-max" | "default" | "auto-edit" | "full-access" | "native" | "managed";
2
5
  export type AutonomyPolicy = "assist" | "agent" | "agent-max";
3
6
  export type ApprovalPolicy = "ask-every-time" | "approve-once" | "remember-this-turn";
@@ -123,8 +126,17 @@ export interface ConversationTurn {
123
126
  totalCostUsd?: number;
124
127
  };
125
128
  }
129
+ export interface StructuredSessionState {
130
+ runner: SessionRunner;
131
+ model?: string;
132
+ lastError: string | null;
133
+ inFlight: boolean;
134
+ activeRequestId: string | null;
135
+ }
126
136
  export interface SessionSnapshot {
127
137
  id: string;
138
+ sessionKind?: SessionKind;
139
+ runner?: SessionRunner;
128
140
  command: string;
129
141
  cwd: string;
130
142
  mode: ExecutionMode;
@@ -150,6 +162,7 @@ export interface SessionSnapshot {
150
162
  claudeSessionId: string | null;
151
163
  /** Structured conversation messages derived from PTY output. */
152
164
  messages?: ConversationTurn[];
165
+ structuredState?: StructuredSessionState;
153
166
  /** Session lifecycle state */
154
167
  lifecycleState?: "running" | "idle" | "archived";
155
168
  /** Last activity timestamp */
@@ -160,6 +173,15 @@ export interface SessionSnapshot {
160
173
  resumedToSessionId?: string | null;
161
174
  /** 服务器重启时是否自动恢复 */
162
175
  autoRecovered?: boolean;
176
+ /** 是否启用自动批准权限 */
177
+ autoApprovePermissions?: boolean;
178
+ /** 自动批准统计(按类别分) */
179
+ approvalStats?: {
180
+ tool: number;
181
+ command: number;
182
+ file: number;
183
+ total: number;
184
+ };
163
185
  }
164
186
  export type SessionLifecycleState = "initializing" | "running" | "idle" | "thinking" | "waiting-input" | "archived";
165
187
  export interface SessionLifecycle {