@co0ontty/wand 1.18.1 → 1.20.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
@@ -135,6 +135,48 @@ export interface WorktreeMergeResult {
135
135
  errorCode?: string;
136
136
  reason?: string;
137
137
  }
138
+ export interface GitStatusFileEntry {
139
+ path: string;
140
+ /** Two-char porcelain status (e.g. " M", "MM", "??", "A ") */
141
+ status: string;
142
+ /** True 当条目是 submodule(来源于 porcelain v2 的 sub 字段第一位为 S)。 */
143
+ isSubmodule?: boolean;
144
+ /** submodule 子状态:指针是否变化 / 内部是否 dirty / 是否有未跟踪文件。 */
145
+ submoduleState?: {
146
+ commitChanged: boolean;
147
+ hasTrackedChanges: boolean;
148
+ hasUntracked: boolean;
149
+ };
150
+ }
151
+ export interface GitStatusResult {
152
+ isGit: boolean;
153
+ branch?: string;
154
+ /** Number of files with any change (modified / added / deleted / untracked). */
155
+ modifiedCount?: number;
156
+ files?: GitStatusFileEntry[];
157
+ head?: string;
158
+ repoRoot?: string;
159
+ /** Truthy when the repo has no commits yet (initial state). */
160
+ initialCommit?: boolean;
161
+ /** Most recent reachable tag (e.g. "v1.2.3"). */
162
+ latestTag?: string;
163
+ /** Auto-suggested next tag derived by bumping the patch segment. */
164
+ suggestedNextTag?: string;
165
+ error?: string;
166
+ }
167
+ export interface QuickCommitResult {
168
+ ok: boolean;
169
+ commit?: {
170
+ hash: string;
171
+ message: string;
172
+ };
173
+ tag?: {
174
+ name: string;
175
+ };
176
+ pushed?: boolean;
177
+ /** commit 已成功但 push 失败时填入;前端用它显示"已提交但 push 失败"。 */
178
+ pushError?: string;
179
+ }
138
180
  export interface CommandRequest {
139
181
  command: string;
140
182
  provider?: SessionProvider;
@@ -264,14 +306,8 @@ export interface SessionSnapshot {
264
306
  /** Pending structured user inputs queued while an assistant response is in flight. */
265
307
  queuedMessages?: string[];
266
308
  structuredState?: StructuredSessionState;
267
- /** Session lifecycle state */
268
- lifecycleState?: "running" | "idle" | "archived";
269
- /** Last activity timestamp */
270
- lastActivityAt?: string | null;
271
309
  /** 此会话是从哪个 Wand 会话恢复而来 */
272
310
  resumedFromSessionId?: string | null;
273
- /** 此会话被哪个恢复后的会话替代 */
274
- resumedToSessionId?: string | null;
275
311
  /** 服务器重启时是否自动恢复 */
276
312
  autoRecovered?: boolean;
277
313
  /** 是否启用自动批准权限 */
@@ -290,14 +326,6 @@ export interface SessionSnapshot {
290
326
  /** 用户为此会话选定的 Claude 模型(别名或完整 ID)。结构化会话下次 spawn 时使用;PTY 会话仅用于展示。 */
291
327
  selectedModel?: string | null;
292
328
  }
293
- export type SessionLifecycleState = "initializing" | "running" | "idle" | "thinking" | "waiting-input" | "archived";
294
- export interface SessionLifecycle {
295
- state: SessionLifecycleState;
296
- stateSince: number;
297
- lastActivityAt: number;
298
- archivedBy?: "user" | "timeout" | "error";
299
- archiveReason?: string;
300
- }
301
329
  /** Unified event type emitted by ClaudePtyBridge for WebSocket broadcast */
302
330
  export type SessionEventType = "output.raw" | "output.chat" | "chat.turn" | "permission.prompt" | "permission.resolved" | "session.id" | "task" | "ended";
303
331
  export interface SessionEvent {