remodex-cli 1.0.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/LICENSE +12 -0
- package/README.md +105 -0
- package/dist/archive-store.d.ts +28 -0
- package/dist/archive-store.js +68 -0
- package/dist/archive-store.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +88 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex-process.d.ts +186 -0
- package/dist/codex-process.js +2111 -0
- package/dist/codex-process.js.map +1 -0
- package/dist/debug-trace-store.d.ts +15 -0
- package/dist/debug-trace-store.js +78 -0
- package/dist/debug-trace-store.js.map +1 -0
- package/dist/doctor.d.ts +58 -0
- package/dist/doctor.js +670 -0
- package/dist/doctor.js.map +1 -0
- package/dist/firebase-auth.d.ts +35 -0
- package/dist/firebase-auth.js +132 -0
- package/dist/firebase-auth.js.map +1 -0
- package/dist/gallery-store.d.ts +67 -0
- package/dist/gallery-store.js +333 -0
- package/dist/gallery-store.js.map +1 -0
- package/dist/git-assist.d.ts +7 -0
- package/dist/git-assist.js +51 -0
- package/dist/git-assist.js.map +1 -0
- package/dist/git-operations.d.ts +63 -0
- package/dist/git-operations.js +292 -0
- package/dist/git-operations.js.map +1 -0
- package/dist/image-store.d.ts +23 -0
- package/dist/image-store.js +142 -0
- package/dist/image-store.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +198 -0
- package/dist/index.js.map +1 -0
- package/dist/mdns.d.ts +7 -0
- package/dist/mdns.js +49 -0
- package/dist/mdns.js.map +1 -0
- package/dist/parser.d.ts +620 -0
- package/dist/parser.js +423 -0
- package/dist/parser.js.map +1 -0
- package/dist/path-utils.d.ts +4 -0
- package/dist/path-utils.js +34 -0
- package/dist/path-utils.js.map +1 -0
- package/dist/project-history.d.ts +10 -0
- package/dist/project-history.js +73 -0
- package/dist/project-history.js.map +1 -0
- package/dist/prompt-history-backup.d.ts +15 -0
- package/dist/prompt-history-backup.js +46 -0
- package/dist/prompt-history-backup.js.map +1 -0
- package/dist/proxy.d.ts +15 -0
- package/dist/proxy.js +95 -0
- package/dist/proxy.js.map +1 -0
- package/dist/push-i18n.d.ts +7 -0
- package/dist/push-i18n.js +75 -0
- package/dist/push-i18n.js.map +1 -0
- package/dist/push-relay.d.ts +29 -0
- package/dist/push-relay.js +70 -0
- package/dist/push-relay.js.map +1 -0
- package/dist/recording-store.d.ts +51 -0
- package/dist/recording-store.js +158 -0
- package/dist/recording-store.js.map +1 -0
- package/dist/screenshot.d.ts +28 -0
- package/dist/screenshot.js +98 -0
- package/dist/screenshot.js.map +1 -0
- package/dist/sdk-process.d.ts +180 -0
- package/dist/sdk-process.js +960 -0
- package/dist/sdk-process.js.map +1 -0
- package/dist/session.d.ts +144 -0
- package/dist/session.js +687 -0
- package/dist/session.js.map +1 -0
- package/dist/sessions-index.d.ts +130 -0
- package/dist/sessions-index.js +1817 -0
- package/dist/sessions-index.js.map +1 -0
- package/dist/setup-launchd.d.ts +9 -0
- package/dist/setup-launchd.js +115 -0
- package/dist/setup-launchd.js.map +1 -0
- package/dist/setup-systemd.d.ts +9 -0
- package/dist/setup-systemd.js +122 -0
- package/dist/setup-systemd.js.map +1 -0
- package/dist/startup-info.d.ts +9 -0
- package/dist/startup-info.js +116 -0
- package/dist/startup-info.js.map +1 -0
- package/dist/usage.d.ts +69 -0
- package/dist/usage.js +545 -0
- package/dist/usage.js.map +1 -0
- package/dist/version.d.ts +13 -0
- package/dist/version.js +43 -0
- package/dist/version.js.map +1 -0
- package/dist/websocket.d.ts +132 -0
- package/dist/websocket.js +3551 -0
- package/dist/websocket.js.map +1 -0
- package/dist/worktree-store.d.ts +26 -0
- package/dist/worktree-store.js +61 -0
- package/dist/worktree-store.js.map +1 -0
- package/dist/worktree.d.ts +47 -0
- package/dist/worktree.js +330 -0
- package/dist/worktree.js.map +1 -0
- package/package.json +62 -0
package/dist/parser.d.ts
ADDED
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
import type { GalleryImageInfo } from "./gallery-store.js";
|
|
2
|
+
import type { ImageRef } from "./image-store.js";
|
|
3
|
+
import type { WindowInfo } from "./screenshot.js";
|
|
4
|
+
import type { WorktreeInfo } from "./worktree.js";
|
|
5
|
+
export type { ImageRef } from "./image-store.js";
|
|
6
|
+
export interface AssistantTextContent {
|
|
7
|
+
type: "text";
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AssistantToolUseContent {
|
|
11
|
+
type: "tool_use";
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
input: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface AssistantThinkingContent {
|
|
17
|
+
type: "thinking";
|
|
18
|
+
thinking: string;
|
|
19
|
+
}
|
|
20
|
+
export type AssistantContent = AssistantTextContent | AssistantToolUseContent | AssistantThinkingContent;
|
|
21
|
+
/** Shape of the assistant message object within ServerMessage. */
|
|
22
|
+
export interface AssistantMessage {
|
|
23
|
+
id: string;
|
|
24
|
+
role: "assistant";
|
|
25
|
+
content: AssistantContent[];
|
|
26
|
+
model: string;
|
|
27
|
+
}
|
|
28
|
+
export type PermissionMode = "default" | "acceptEdits" | "bypassPermissions" | "plan";
|
|
29
|
+
export type ExecutionMode = "default" | "acceptEdits" | "fullAccess";
|
|
30
|
+
export type CodexApprovalPolicy = "untrusted" | "on-request" | "on-failure" | "never";
|
|
31
|
+
export type Provider = "claude" | "codex";
|
|
32
|
+
export type ClientMessage = {
|
|
33
|
+
type: "start";
|
|
34
|
+
projectPath: string;
|
|
35
|
+
provider?: Provider;
|
|
36
|
+
sessionId?: string;
|
|
37
|
+
continue?: boolean;
|
|
38
|
+
permissionMode?: PermissionMode;
|
|
39
|
+
executionMode?: ExecutionMode;
|
|
40
|
+
approvalPolicy?: CodexApprovalPolicy;
|
|
41
|
+
planMode?: boolean;
|
|
42
|
+
sandboxMode?: string;
|
|
43
|
+
model?: string;
|
|
44
|
+
effort?: "low" | "medium" | "high" | "max";
|
|
45
|
+
maxTurns?: number;
|
|
46
|
+
maxBudgetUsd?: number;
|
|
47
|
+
fallbackModel?: string;
|
|
48
|
+
forkSession?: boolean;
|
|
49
|
+
persistSession?: boolean;
|
|
50
|
+
modelReasoningEffort?: string;
|
|
51
|
+
networkAccessEnabled?: boolean;
|
|
52
|
+
webSearchMode?: string;
|
|
53
|
+
useWorktree?: boolean;
|
|
54
|
+
worktreeBranch?: string;
|
|
55
|
+
existingWorktreePath?: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: "input";
|
|
58
|
+
text: string;
|
|
59
|
+
sessionId?: string;
|
|
60
|
+
images?: Array<{
|
|
61
|
+
base64: string;
|
|
62
|
+
mimeType: string;
|
|
63
|
+
}>;
|
|
64
|
+
imageId?: string;
|
|
65
|
+
imageBase64?: string;
|
|
66
|
+
mimeType?: string;
|
|
67
|
+
skill?: {
|
|
68
|
+
name: string;
|
|
69
|
+
path: string;
|
|
70
|
+
};
|
|
71
|
+
} | {
|
|
72
|
+
type: "push_register";
|
|
73
|
+
token: string;
|
|
74
|
+
platform: "ios" | "android" | "web";
|
|
75
|
+
locale?: string;
|
|
76
|
+
privacyMode?: boolean;
|
|
77
|
+
} | {
|
|
78
|
+
type: "push_unregister";
|
|
79
|
+
token: string;
|
|
80
|
+
} | {
|
|
81
|
+
type: "set_permission_mode";
|
|
82
|
+
mode: PermissionMode;
|
|
83
|
+
executionMode?: ExecutionMode;
|
|
84
|
+
approvalPolicy?: CodexApprovalPolicy;
|
|
85
|
+
planMode?: boolean;
|
|
86
|
+
sessionId?: string;
|
|
87
|
+
} | {
|
|
88
|
+
type: "set_sandbox_mode";
|
|
89
|
+
sandboxMode: string;
|
|
90
|
+
sessionId?: string;
|
|
91
|
+
} | {
|
|
92
|
+
type: "approve";
|
|
93
|
+
id: string;
|
|
94
|
+
updatedInput?: Record<string, unknown>;
|
|
95
|
+
clearContext?: boolean;
|
|
96
|
+
sessionId?: string;
|
|
97
|
+
} | {
|
|
98
|
+
type: "approve_always";
|
|
99
|
+
id: string;
|
|
100
|
+
sessionId?: string;
|
|
101
|
+
} | {
|
|
102
|
+
type: "reject";
|
|
103
|
+
id: string;
|
|
104
|
+
message?: string;
|
|
105
|
+
sessionId?: string;
|
|
106
|
+
} | {
|
|
107
|
+
type: "answer";
|
|
108
|
+
toolUseId: string;
|
|
109
|
+
result: string;
|
|
110
|
+
sessionId?: string;
|
|
111
|
+
} | {
|
|
112
|
+
type: "list_sessions";
|
|
113
|
+
} | {
|
|
114
|
+
type: "stop_session";
|
|
115
|
+
sessionId: string;
|
|
116
|
+
} | {
|
|
117
|
+
type: "rename_session";
|
|
118
|
+
sessionId: string;
|
|
119
|
+
name?: string;
|
|
120
|
+
provider?: string;
|
|
121
|
+
providerSessionId?: string;
|
|
122
|
+
projectPath?: string;
|
|
123
|
+
} | {
|
|
124
|
+
type: "get_history";
|
|
125
|
+
sessionId: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: "list_recent_sessions";
|
|
128
|
+
limit?: number;
|
|
129
|
+
offset?: number;
|
|
130
|
+
projectPath?: string;
|
|
131
|
+
provider?: "claude" | "codex";
|
|
132
|
+
namedOnly?: boolean;
|
|
133
|
+
searchQuery?: string;
|
|
134
|
+
} | {
|
|
135
|
+
type: "resume_session";
|
|
136
|
+
sessionId: string;
|
|
137
|
+
projectPath: string;
|
|
138
|
+
permissionMode?: PermissionMode;
|
|
139
|
+
executionMode?: ExecutionMode;
|
|
140
|
+
approvalPolicy?: CodexApprovalPolicy;
|
|
141
|
+
planMode?: boolean;
|
|
142
|
+
provider?: Provider;
|
|
143
|
+
sandboxMode?: string;
|
|
144
|
+
model?: string;
|
|
145
|
+
effort?: "low" | "medium" | "high" | "max";
|
|
146
|
+
maxTurns?: number;
|
|
147
|
+
maxBudgetUsd?: number;
|
|
148
|
+
fallbackModel?: string;
|
|
149
|
+
forkSession?: boolean;
|
|
150
|
+
persistSession?: boolean;
|
|
151
|
+
modelReasoningEffort?: string;
|
|
152
|
+
networkAccessEnabled?: boolean;
|
|
153
|
+
webSearchMode?: string;
|
|
154
|
+
} | {
|
|
155
|
+
type: "list_gallery";
|
|
156
|
+
project?: string;
|
|
157
|
+
sessionId?: string;
|
|
158
|
+
} | {
|
|
159
|
+
type: "read_file";
|
|
160
|
+
projectPath: string;
|
|
161
|
+
filePath: string;
|
|
162
|
+
maxLines?: number;
|
|
163
|
+
} | {
|
|
164
|
+
type: "list_files";
|
|
165
|
+
projectPath: string;
|
|
166
|
+
} | {
|
|
167
|
+
type: "get_diff";
|
|
168
|
+
projectPath: string;
|
|
169
|
+
staged?: boolean;
|
|
170
|
+
} | {
|
|
171
|
+
type: "get_diff_image";
|
|
172
|
+
projectPath: string;
|
|
173
|
+
filePath: string;
|
|
174
|
+
version: "old" | "new" | "both";
|
|
175
|
+
} | {
|
|
176
|
+
type: "interrupt";
|
|
177
|
+
sessionId?: string;
|
|
178
|
+
} | {
|
|
179
|
+
type: "list_project_history";
|
|
180
|
+
} | {
|
|
181
|
+
type: "remove_project_history";
|
|
182
|
+
projectPath: string;
|
|
183
|
+
} | {
|
|
184
|
+
type: "list_worktrees";
|
|
185
|
+
projectPath: string;
|
|
186
|
+
} | {
|
|
187
|
+
type: "remove_worktree";
|
|
188
|
+
projectPath: string;
|
|
189
|
+
worktreePath: string;
|
|
190
|
+
} | {
|
|
191
|
+
type: "rewind";
|
|
192
|
+
sessionId: string;
|
|
193
|
+
targetUuid: string;
|
|
194
|
+
mode: "conversation" | "code" | "both";
|
|
195
|
+
} | {
|
|
196
|
+
type: "rewind_dry_run";
|
|
197
|
+
sessionId: string;
|
|
198
|
+
targetUuid: string;
|
|
199
|
+
} | {
|
|
200
|
+
type: "list_windows";
|
|
201
|
+
} | {
|
|
202
|
+
type: "take_screenshot";
|
|
203
|
+
mode: "fullscreen" | "window";
|
|
204
|
+
windowId?: number;
|
|
205
|
+
projectPath: string;
|
|
206
|
+
sessionId?: string;
|
|
207
|
+
} | {
|
|
208
|
+
type: "get_debug_bundle";
|
|
209
|
+
sessionId: string;
|
|
210
|
+
traceLimit?: number;
|
|
211
|
+
includeDiff?: boolean;
|
|
212
|
+
} | {
|
|
213
|
+
type: "get_usage";
|
|
214
|
+
} | {
|
|
215
|
+
type: "list_recordings";
|
|
216
|
+
} | {
|
|
217
|
+
type: "get_recording";
|
|
218
|
+
sessionId: string;
|
|
219
|
+
} | {
|
|
220
|
+
type: "get_message_images";
|
|
221
|
+
claudeSessionId: string;
|
|
222
|
+
messageUuid: string;
|
|
223
|
+
} | {
|
|
224
|
+
type: "backup_prompt_history";
|
|
225
|
+
data: string;
|
|
226
|
+
appVersion: string;
|
|
227
|
+
dbVersion: number;
|
|
228
|
+
} | {
|
|
229
|
+
type: "restore_prompt_history";
|
|
230
|
+
} | {
|
|
231
|
+
type: "get_prompt_history_backup_info";
|
|
232
|
+
} | {
|
|
233
|
+
type: "archive_session";
|
|
234
|
+
sessionId: string;
|
|
235
|
+
provider: Provider;
|
|
236
|
+
projectPath: string;
|
|
237
|
+
} | {
|
|
238
|
+
type: "refresh_branch";
|
|
239
|
+
sessionId: string;
|
|
240
|
+
} | {
|
|
241
|
+
type: "git_stage";
|
|
242
|
+
projectPath: string;
|
|
243
|
+
files?: string[];
|
|
244
|
+
hunks?: {
|
|
245
|
+
file: string;
|
|
246
|
+
hunkIndex: number;
|
|
247
|
+
}[];
|
|
248
|
+
} | {
|
|
249
|
+
type: "git_unstage";
|
|
250
|
+
projectPath: string;
|
|
251
|
+
files?: string[];
|
|
252
|
+
} | {
|
|
253
|
+
type: "git_unstage_hunks";
|
|
254
|
+
projectPath: string;
|
|
255
|
+
hunks: {
|
|
256
|
+
file: string;
|
|
257
|
+
hunkIndex: number;
|
|
258
|
+
}[];
|
|
259
|
+
} | {
|
|
260
|
+
type: "git_commit";
|
|
261
|
+
projectPath: string;
|
|
262
|
+
sessionId?: string;
|
|
263
|
+
message?: string;
|
|
264
|
+
autoGenerate?: boolean;
|
|
265
|
+
} | {
|
|
266
|
+
type: "git_push";
|
|
267
|
+
projectPath: string;
|
|
268
|
+
} | {
|
|
269
|
+
type: "git_branches";
|
|
270
|
+
projectPath: string;
|
|
271
|
+
} | {
|
|
272
|
+
type: "git_create_branch";
|
|
273
|
+
projectPath: string;
|
|
274
|
+
name: string;
|
|
275
|
+
checkout?: boolean;
|
|
276
|
+
} | {
|
|
277
|
+
type: "git_checkout_branch";
|
|
278
|
+
projectPath: string;
|
|
279
|
+
branch: string;
|
|
280
|
+
} | {
|
|
281
|
+
type: "git_revert_file";
|
|
282
|
+
projectPath: string;
|
|
283
|
+
files: string[];
|
|
284
|
+
} | {
|
|
285
|
+
type: "git_revert_hunks";
|
|
286
|
+
projectPath: string;
|
|
287
|
+
hunks: {
|
|
288
|
+
file: string;
|
|
289
|
+
hunkIndex: number;
|
|
290
|
+
}[];
|
|
291
|
+
} | {
|
|
292
|
+
type: "git_fetch";
|
|
293
|
+
projectPath: string;
|
|
294
|
+
} | {
|
|
295
|
+
type: "git_pull";
|
|
296
|
+
projectPath: string;
|
|
297
|
+
} | {
|
|
298
|
+
type: "git_remote_status";
|
|
299
|
+
projectPath: string;
|
|
300
|
+
};
|
|
301
|
+
/** Image change detected in a git diff (binary image file). */
|
|
302
|
+
export interface ImageChange {
|
|
303
|
+
filePath: string;
|
|
304
|
+
isNew: boolean;
|
|
305
|
+
isDeleted: boolean;
|
|
306
|
+
isSvg: boolean;
|
|
307
|
+
oldSize?: number;
|
|
308
|
+
newSize?: number;
|
|
309
|
+
/** Base64-encoded old image (included only for on-demand loads). */
|
|
310
|
+
oldBase64?: string;
|
|
311
|
+
/** Base64-encoded new image (included only for on-demand loads). */
|
|
312
|
+
newBase64?: string;
|
|
313
|
+
mimeType: string;
|
|
314
|
+
/** Whether the image can be loaded on demand (auto-display or loadable range). */
|
|
315
|
+
loadable: boolean;
|
|
316
|
+
/** Whether the image qualifies for auto-display (≤ auto threshold). */
|
|
317
|
+
autoDisplay?: boolean;
|
|
318
|
+
}
|
|
319
|
+
export interface DebugTraceEvent {
|
|
320
|
+
ts: string;
|
|
321
|
+
sessionId: string;
|
|
322
|
+
direction: "incoming" | "outgoing" | "internal";
|
|
323
|
+
channel: "ws" | "session" | "bridge";
|
|
324
|
+
type: string;
|
|
325
|
+
detail?: string;
|
|
326
|
+
}
|
|
327
|
+
export type ServerMessage = {
|
|
328
|
+
type: "system";
|
|
329
|
+
subtype: string;
|
|
330
|
+
sessionId?: string;
|
|
331
|
+
claudeSessionId?: string;
|
|
332
|
+
model?: string;
|
|
333
|
+
provider?: Provider;
|
|
334
|
+
projectPath?: string;
|
|
335
|
+
approvalPolicy?: string;
|
|
336
|
+
executionMode?: ExecutionMode;
|
|
337
|
+
planMode?: boolean;
|
|
338
|
+
slashCommands?: string[];
|
|
339
|
+
skills?: string[];
|
|
340
|
+
skillMetadata?: Array<{
|
|
341
|
+
name: string;
|
|
342
|
+
path: string;
|
|
343
|
+
description: string;
|
|
344
|
+
shortDescription?: string;
|
|
345
|
+
enabled: boolean;
|
|
346
|
+
scope: string;
|
|
347
|
+
displayName?: string;
|
|
348
|
+
defaultPrompt?: string;
|
|
349
|
+
brandColor?: string;
|
|
350
|
+
}>;
|
|
351
|
+
worktreePath?: string;
|
|
352
|
+
worktreeBranch?: string;
|
|
353
|
+
permissionMode?: PermissionMode;
|
|
354
|
+
sandboxMode?: string;
|
|
355
|
+
modelReasoningEffort?: string;
|
|
356
|
+
networkAccessEnabled?: boolean;
|
|
357
|
+
webSearchMode?: string;
|
|
358
|
+
clearContext?: boolean;
|
|
359
|
+
sourceSessionId?: string;
|
|
360
|
+
tipCode?: string;
|
|
361
|
+
} | {
|
|
362
|
+
type: "assistant";
|
|
363
|
+
message: AssistantMessage;
|
|
364
|
+
messageUuid?: string;
|
|
365
|
+
} | {
|
|
366
|
+
type: "tool_result";
|
|
367
|
+
toolUseId: string;
|
|
368
|
+
content: string;
|
|
369
|
+
toolName?: string;
|
|
370
|
+
images?: ImageRef[];
|
|
371
|
+
userMessageUuid?: string;
|
|
372
|
+
rawContentBlocks?: unknown[];
|
|
373
|
+
} | {
|
|
374
|
+
type: "result";
|
|
375
|
+
subtype: string;
|
|
376
|
+
result?: string;
|
|
377
|
+
error?: string;
|
|
378
|
+
cost?: number;
|
|
379
|
+
duration?: number;
|
|
380
|
+
sessionId?: string;
|
|
381
|
+
stopReason?: string;
|
|
382
|
+
inputTokens?: number;
|
|
383
|
+
cachedInputTokens?: number;
|
|
384
|
+
outputTokens?: number;
|
|
385
|
+
toolCalls?: number;
|
|
386
|
+
fileEdits?: number;
|
|
387
|
+
} | {
|
|
388
|
+
type: "error";
|
|
389
|
+
message: string;
|
|
390
|
+
errorCode?: string;
|
|
391
|
+
} | {
|
|
392
|
+
type: "status";
|
|
393
|
+
status: ProcessStatus;
|
|
394
|
+
} | {
|
|
395
|
+
type: "history";
|
|
396
|
+
messages: ServerMessage[];
|
|
397
|
+
} | {
|
|
398
|
+
type: "permission_request";
|
|
399
|
+
toolUseId: string;
|
|
400
|
+
toolName: string;
|
|
401
|
+
input: Record<string, unknown>;
|
|
402
|
+
} | {
|
|
403
|
+
type: "permission_resolved";
|
|
404
|
+
toolUseId: string;
|
|
405
|
+
} | {
|
|
406
|
+
type: "stream_delta";
|
|
407
|
+
text: string;
|
|
408
|
+
} | {
|
|
409
|
+
type: "thinking_delta";
|
|
410
|
+
text: string;
|
|
411
|
+
} | {
|
|
412
|
+
type: "file_content";
|
|
413
|
+
filePath: string;
|
|
414
|
+
content: string;
|
|
415
|
+
language?: string;
|
|
416
|
+
error?: string;
|
|
417
|
+
totalLines?: number;
|
|
418
|
+
truncated?: boolean;
|
|
419
|
+
} | {
|
|
420
|
+
type: "file_list";
|
|
421
|
+
files: string[];
|
|
422
|
+
} | {
|
|
423
|
+
type: "project_history";
|
|
424
|
+
projects: string[];
|
|
425
|
+
} | {
|
|
426
|
+
type: "diff_result";
|
|
427
|
+
diff: string;
|
|
428
|
+
error?: string;
|
|
429
|
+
errorCode?: string;
|
|
430
|
+
imageChanges?: ImageChange[];
|
|
431
|
+
} | {
|
|
432
|
+
type: "diff_image_result";
|
|
433
|
+
filePath: string;
|
|
434
|
+
version: "old" | "new" | "both";
|
|
435
|
+
base64?: string;
|
|
436
|
+
mimeType?: string;
|
|
437
|
+
error?: string;
|
|
438
|
+
oldBase64?: string;
|
|
439
|
+
newBase64?: string;
|
|
440
|
+
} | {
|
|
441
|
+
type: "worktree_list";
|
|
442
|
+
worktrees: WorktreeInfo[];
|
|
443
|
+
mainBranch?: string;
|
|
444
|
+
} | {
|
|
445
|
+
type: "worktree_removed";
|
|
446
|
+
worktreePath: string;
|
|
447
|
+
} | {
|
|
448
|
+
type: "tool_use_summary";
|
|
449
|
+
summary: string;
|
|
450
|
+
precedingToolUseIds: string[];
|
|
451
|
+
} | {
|
|
452
|
+
type: "rewind_preview";
|
|
453
|
+
canRewind: boolean;
|
|
454
|
+
filesChanged?: string[];
|
|
455
|
+
insertions?: number;
|
|
456
|
+
deletions?: number;
|
|
457
|
+
error?: string;
|
|
458
|
+
} | {
|
|
459
|
+
type: "rewind_result";
|
|
460
|
+
success: boolean;
|
|
461
|
+
mode: "conversation" | "code" | "both";
|
|
462
|
+
error?: string;
|
|
463
|
+
} | {
|
|
464
|
+
type: "user_input";
|
|
465
|
+
text: string;
|
|
466
|
+
userMessageUuid?: string;
|
|
467
|
+
isSynthetic?: boolean;
|
|
468
|
+
isMeta?: boolean;
|
|
469
|
+
imageCount?: number;
|
|
470
|
+
} | {
|
|
471
|
+
type: "window_list";
|
|
472
|
+
windows: WindowInfo[];
|
|
473
|
+
} | {
|
|
474
|
+
type: "screenshot_result";
|
|
475
|
+
success: boolean;
|
|
476
|
+
image?: GalleryImageInfo;
|
|
477
|
+
error?: string;
|
|
478
|
+
} | {
|
|
479
|
+
type: "debug_bundle";
|
|
480
|
+
sessionId: string;
|
|
481
|
+
generatedAt: string;
|
|
482
|
+
session: {
|
|
483
|
+
id: string;
|
|
484
|
+
provider: Provider;
|
|
485
|
+
status: ProcessStatus;
|
|
486
|
+
projectPath: string;
|
|
487
|
+
worktreePath?: string;
|
|
488
|
+
worktreeBranch?: string;
|
|
489
|
+
claudeSessionId?: string;
|
|
490
|
+
createdAt: string;
|
|
491
|
+
lastActivityAt: string;
|
|
492
|
+
};
|
|
493
|
+
pastMessageCount: number;
|
|
494
|
+
historySummary: string[];
|
|
495
|
+
debugTrace: DebugTraceEvent[];
|
|
496
|
+
traceFilePath: string;
|
|
497
|
+
reproRecipe: {
|
|
498
|
+
wsUrlHint: string;
|
|
499
|
+
startBridgeCommand: string;
|
|
500
|
+
resumeSessionMessage: Record<string, unknown>;
|
|
501
|
+
getHistoryMessage: Record<string, unknown>;
|
|
502
|
+
getDebugBundleMessage: Record<string, unknown>;
|
|
503
|
+
notes: string[];
|
|
504
|
+
};
|
|
505
|
+
agentPrompt: string;
|
|
506
|
+
diff: string;
|
|
507
|
+
diffError?: string;
|
|
508
|
+
savedBundlePath?: string;
|
|
509
|
+
} | {
|
|
510
|
+
type: "usage_result";
|
|
511
|
+
providers: UsageInfoPayload[];
|
|
512
|
+
} | {
|
|
513
|
+
type: "message_images_result";
|
|
514
|
+
messageUuid: string;
|
|
515
|
+
images: ImageRef[];
|
|
516
|
+
} | {
|
|
517
|
+
type: "prompt_history_backup_result";
|
|
518
|
+
success: boolean;
|
|
519
|
+
backedUpAt?: string;
|
|
520
|
+
error?: string;
|
|
521
|
+
} | {
|
|
522
|
+
type: "prompt_history_restore_result";
|
|
523
|
+
success: boolean;
|
|
524
|
+
data?: string;
|
|
525
|
+
appVersion?: string;
|
|
526
|
+
dbVersion?: number;
|
|
527
|
+
backedUpAt?: string;
|
|
528
|
+
error?: string;
|
|
529
|
+
} | {
|
|
530
|
+
type: "prompt_history_backup_info";
|
|
531
|
+
exists: boolean;
|
|
532
|
+
appVersion?: string;
|
|
533
|
+
dbVersion?: number;
|
|
534
|
+
backedUpAt?: string;
|
|
535
|
+
sizeBytes?: number;
|
|
536
|
+
} | {
|
|
537
|
+
type: "rename_result";
|
|
538
|
+
sessionId: string;
|
|
539
|
+
name: string | null;
|
|
540
|
+
success: boolean;
|
|
541
|
+
error?: string;
|
|
542
|
+
} | {
|
|
543
|
+
type: "git_stage_result";
|
|
544
|
+
success: boolean;
|
|
545
|
+
error?: string;
|
|
546
|
+
} | {
|
|
547
|
+
type: "git_unstage_result";
|
|
548
|
+
success: boolean;
|
|
549
|
+
error?: string;
|
|
550
|
+
} | {
|
|
551
|
+
type: "git_unstage_hunks_result";
|
|
552
|
+
success: boolean;
|
|
553
|
+
error?: string;
|
|
554
|
+
} | {
|
|
555
|
+
type: "git_commit_result";
|
|
556
|
+
success: boolean;
|
|
557
|
+
commitHash?: string;
|
|
558
|
+
message?: string;
|
|
559
|
+
error?: string;
|
|
560
|
+
} | {
|
|
561
|
+
type: "git_push_result";
|
|
562
|
+
success: boolean;
|
|
563
|
+
error?: string;
|
|
564
|
+
} | {
|
|
565
|
+
type: "git_branches_result";
|
|
566
|
+
current: string;
|
|
567
|
+
branches: string[];
|
|
568
|
+
checkedOutBranches?: string[];
|
|
569
|
+
remoteStatusByBranch?: Record<string, {
|
|
570
|
+
ahead: number;
|
|
571
|
+
behind: number;
|
|
572
|
+
hasUpstream: boolean;
|
|
573
|
+
}>;
|
|
574
|
+
error?: string;
|
|
575
|
+
} | {
|
|
576
|
+
type: "git_create_branch_result";
|
|
577
|
+
success: boolean;
|
|
578
|
+
error?: string;
|
|
579
|
+
} | {
|
|
580
|
+
type: "git_checkout_branch_result";
|
|
581
|
+
success: boolean;
|
|
582
|
+
error?: string;
|
|
583
|
+
} | {
|
|
584
|
+
type: "git_revert_file_result";
|
|
585
|
+
success: boolean;
|
|
586
|
+
error?: string;
|
|
587
|
+
} | {
|
|
588
|
+
type: "git_revert_hunks_result";
|
|
589
|
+
success: boolean;
|
|
590
|
+
error?: string;
|
|
591
|
+
} | {
|
|
592
|
+
type: "git_fetch_result";
|
|
593
|
+
success: boolean;
|
|
594
|
+
error?: string;
|
|
595
|
+
} | {
|
|
596
|
+
type: "git_pull_result";
|
|
597
|
+
success: boolean;
|
|
598
|
+
message?: string;
|
|
599
|
+
error?: string;
|
|
600
|
+
} | {
|
|
601
|
+
type: "git_remote_status_result";
|
|
602
|
+
ahead: number;
|
|
603
|
+
behind: number;
|
|
604
|
+
branch: string;
|
|
605
|
+
hasUpstream: boolean;
|
|
606
|
+
};
|
|
607
|
+
export interface UsageWindowPayload {
|
|
608
|
+
utilization: number;
|
|
609
|
+
resetsAt: string;
|
|
610
|
+
}
|
|
611
|
+
export interface UsageInfoPayload {
|
|
612
|
+
provider: "claude" | "codex";
|
|
613
|
+
fiveHour: UsageWindowPayload | null;
|
|
614
|
+
sevenDay: UsageWindowPayload | null;
|
|
615
|
+
error?: string;
|
|
616
|
+
}
|
|
617
|
+
export type ProcessStatus = "starting" | "idle" | "running" | "waiting_approval" | "compacting";
|
|
618
|
+
/** Normalize tool_result content: may be string or array of content blocks. */
|
|
619
|
+
export declare function normalizeToolResultContent(content: string | unknown[]): string;
|
|
620
|
+
export declare function parseClientMessage(data: string): ClientMessage | null;
|