happy-coder 0.1.9 → 0.1.11

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.
Files changed (40) hide show
  1. package/README.md +2 -0
  2. package/dist/index-B2GqfEZV.cjs +1564 -0
  3. package/dist/index-QItBXhux.mjs +1540 -0
  4. package/dist/index.cjs +997 -260
  5. package/dist/index.mjs +996 -259
  6. package/dist/install-B0DnBGS_.mjs +29 -0
  7. package/dist/install-C809w0Cj.cjs +31 -0
  8. package/dist/install-DEPy62QN.mjs +97 -0
  9. package/dist/install-GZIzyuIE.cjs +99 -0
  10. package/dist/lib.cjs +1 -1
  11. package/dist/lib.d.cts +265 -460
  12. package/dist/lib.d.mts +265 -460
  13. package/dist/lib.mjs +1 -1
  14. package/dist/run-BmEaINbl.cjs +250 -0
  15. package/dist/run-DMbKhYfb.mjs +247 -0
  16. package/dist/types-BRICSarm.mjs +870 -0
  17. package/dist/types-BTQRfIr3.cjs +892 -0
  18. package/dist/types-CEvzGLMI.cjs +882 -0
  19. package/dist/types-D39L8JSd.mjs +850 -0
  20. package/dist/types-DYBiuNUQ.cjs +883 -0
  21. package/dist/types-Df5dlWLV.mjs +871 -0
  22. package/dist/types-hotUTaWz.cjs +863 -0
  23. package/dist/types-tLWMaptR.mjs +879 -0
  24. package/dist/uninstall-BGgl5V8F.mjs +29 -0
  25. package/dist/uninstall-BWHglipH.mjs +40 -0
  26. package/dist/uninstall-CdHMb6wi.cjs +31 -0
  27. package/dist/uninstall-FXyyAuGU.cjs +42 -0
  28. package/package.json +8 -2
  29. package/ripgrep/COPYING +3 -0
  30. package/ripgrep/arm64-darwin/rg +0 -0
  31. package/ripgrep/arm64-darwin/ripgrep.node +0 -0
  32. package/ripgrep/arm64-linux/rg +0 -0
  33. package/ripgrep/arm64-linux/ripgrep.node +0 -0
  34. package/ripgrep/x64-darwin/rg +0 -0
  35. package/ripgrep/x64-darwin/ripgrep.node +0 -0
  36. package/ripgrep/x64-linux/rg +0 -0
  37. package/ripgrep/x64-linux/ripgrep.node +0 -0
  38. package/ripgrep/x64-win32/rg.exe +0 -0
  39. package/ripgrep/x64-win32/ripgrep.node +0 -0
  40. package/scripts/ripgrep_launcher.cjs +57 -0
package/dist/lib.d.mts CHANGED
@@ -3,8 +3,8 @@ import { EventEmitter } from 'node:events';
3
3
  import { ExpoPushMessage } from 'expo-server-sdk';
4
4
 
5
5
  /**
6
- * COPIED FROM https://github.com/ex3ndr/handy/blob/main/sources/sync/claude-code-schema.ts
7
- * EDIT IN SYNC WITH ORIGINAL
6
+ * Simplified schema that only validates fields actually used in the codebase
7
+ * while preserving all other fields through passthrough()
8
8
  */
9
9
 
10
10
  declare const UsageSchema: z.ZodObject<{
@@ -13,471 +13,275 @@ declare const UsageSchema: z.ZodObject<{
13
13
  cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
14
14
  output_tokens: z.ZodNumber;
15
15
  service_tier: z.ZodOptional<z.ZodString>;
16
- }, "strip", z.ZodTypeAny, {
17
- input_tokens: number;
18
- output_tokens: number;
19
- cache_creation_input_tokens?: number | undefined;
20
- cache_read_input_tokens?: number | undefined;
21
- service_tier?: string | undefined;
22
- }, {
23
- input_tokens: number;
24
- output_tokens: number;
25
- cache_creation_input_tokens?: number | undefined;
26
- cache_read_input_tokens?: number | undefined;
27
- service_tier?: string | undefined;
28
- }>;
16
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
17
+ input_tokens: z.ZodNumber;
18
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
19
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
20
+ output_tokens: z.ZodNumber;
21
+ service_tier: z.ZodOptional<z.ZodString>;
22
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
23
+ input_tokens: z.ZodNumber;
24
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
25
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
26
+ output_tokens: z.ZodNumber;
27
+ service_tier: z.ZodOptional<z.ZodString>;
28
+ }, z.ZodTypeAny, "passthrough">>;
29
29
  declare const RawJSONLinesSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
30
- cwd: z.ZodString;
31
- sessionId: z.ZodString;
32
- version: z.ZodString;
30
+ type: z.ZodLiteral<"user">;
31
+ isSidechain: z.ZodOptional<z.ZodBoolean>;
32
+ isMeta: z.ZodOptional<z.ZodBoolean>;
33
33
  uuid: z.ZodString;
34
- timestamp: z.ZodString;
35
- parent_tool_use_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
- } & {
34
+ message: z.ZodObject<{
35
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
36
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
37
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
38
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
39
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
40
+ }, z.ZodTypeAny, "passthrough">>;
41
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
37
42
  type: z.ZodLiteral<"user">;
43
+ isSidechain: z.ZodOptional<z.ZodBoolean>;
44
+ isMeta: z.ZodOptional<z.ZodBoolean>;
45
+ uuid: z.ZodString;
38
46
  message: z.ZodObject<{
39
- role: z.ZodLiteral<"user">;
40
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
41
- tool_use_id: z.ZodString;
42
- type: z.ZodLiteral<"tool_result">;
43
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
44
- type: z.ZodLiteral<"text">;
45
- text: z.ZodString;
46
- }, "strip", z.ZodTypeAny, {
47
- type: "text";
48
- text: string;
49
- }, {
50
- type: "text";
51
- text: string;
52
- }>, "many">]>;
53
- is_error: z.ZodOptional<z.ZodBoolean>;
54
- }, "strip", z.ZodTypeAny, {
55
- type: "tool_result";
56
- tool_use_id: string;
57
- content: string | {
58
- type: "text";
59
- text: string;
60
- }[];
61
- is_error?: boolean | undefined;
62
- }, {
63
- type: "tool_result";
64
- tool_use_id: string;
65
- content: string | {
66
- type: "text";
67
- text: string;
68
- }[];
69
- is_error?: boolean | undefined;
70
- }>, z.ZodObject<{
71
- type: z.ZodLiteral<"text">;
72
- text: z.ZodString;
73
- }, "strip", z.ZodTypeAny, {
74
- type: "text";
75
- text: string;
76
- }, {
77
- type: "text";
78
- text: string;
79
- }>]>, "many">]>;
80
- }, "strip", z.ZodTypeAny, {
81
- content: string | ({
82
- type: "text";
83
- text: string;
84
- } | {
85
- type: "tool_result";
86
- tool_use_id: string;
87
- content: string | {
88
- type: "text";
89
- text: string;
90
- }[];
91
- is_error?: boolean | undefined;
92
- })[];
93
- role: "user";
94
- }, {
95
- content: string | ({
96
- type: "text";
97
- text: string;
98
- } | {
99
- type: "tool_result";
100
- tool_use_id: string;
101
- content: string | {
102
- type: "text";
103
- text: string;
104
- }[];
105
- is_error?: boolean | undefined;
106
- })[];
107
- role: "user";
108
- }>;
47
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
48
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
49
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
50
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
51
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
52
+ }, z.ZodTypeAny, "passthrough">>;
53
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
54
+ type: z.ZodLiteral<"user">;
55
+ isSidechain: z.ZodOptional<z.ZodBoolean>;
109
56
  isMeta: z.ZodOptional<z.ZodBoolean>;
110
- toolUseResult: z.ZodOptional<z.ZodUnknown>;
111
- }, "strip", z.ZodTypeAny, {
112
- message: {
113
- content: string | ({
114
- type: "text";
115
- text: string;
116
- } | {
117
- type: "tool_result";
118
- tool_use_id: string;
119
- content: string | {
120
- type: "text";
121
- text: string;
122
- }[];
123
- is_error?: boolean | undefined;
124
- })[];
125
- role: "user";
126
- };
127
- type: "user";
128
- cwd: string;
129
- sessionId: string;
130
- version: string;
131
- uuid: string;
132
- timestamp: string;
133
- parent_tool_use_id?: string | null | undefined;
134
- isMeta?: boolean | undefined;
135
- toolUseResult?: unknown;
136
- }, {
137
- message: {
138
- content: string | ({
139
- type: "text";
140
- text: string;
141
- } | {
142
- type: "tool_result";
143
- tool_use_id: string;
144
- content: string | {
145
- type: "text";
146
- text: string;
147
- }[];
148
- is_error?: boolean | undefined;
149
- })[];
150
- role: "user";
151
- };
152
- type: "user";
153
- cwd: string;
154
- sessionId: string;
155
- version: string;
156
- uuid: string;
157
- timestamp: string;
158
- parent_tool_use_id?: string | null | undefined;
159
- isMeta?: boolean | undefined;
160
- toolUseResult?: unknown;
161
- }>, z.ZodObject<{
162
- cwd: z.ZodString;
163
- sessionId: z.ZodString;
164
- version: z.ZodString;
165
57
  uuid: z.ZodString;
166
- timestamp: z.ZodString;
167
- parent_tool_use_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
- } & {
58
+ message: z.ZodObject<{
59
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
60
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
61
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
62
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63
+ content: z.ZodUnion<[z.ZodString, z.ZodAny]>;
64
+ }, z.ZodTypeAny, "passthrough">>;
65
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
169
66
  type: z.ZodLiteral<"assistant">;
170
67
  message: z.ZodObject<{
171
- id: z.ZodString;
172
- type: z.ZodLiteral<"message">;
173
- role: z.ZodLiteral<"assistant">;
174
- model: z.ZodString;
175
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
176
- type: z.ZodLiteral<"text">;
177
- text: z.ZodString;
178
- }, "strip", z.ZodTypeAny, {
179
- type: "text";
180
- text: string;
181
- }, {
182
- type: "text";
183
- text: string;
184
- }>, z.ZodObject<{
185
- type: z.ZodLiteral<"thinking">;
186
- thinking: z.ZodString;
187
- signature: z.ZodString;
188
- }, "strip", z.ZodTypeAny, {
189
- type: "thinking";
190
- thinking: string;
191
- signature: string;
192
- }, {
193
- type: "thinking";
194
- thinking: string;
195
- signature: string;
196
- }>, z.ZodObject<{
197
- type: z.ZodLiteral<"tool_use">;
198
- id: z.ZodString;
199
- name: z.ZodString;
200
- input: z.ZodUnknown;
201
- }, "strip", z.ZodTypeAny, {
202
- type: "tool_use";
203
- id: string;
204
- name: string;
205
- input?: unknown;
206
- }, {
207
- type: "tool_use";
208
- id: string;
209
- name: string;
210
- input?: unknown;
211
- }>, z.ZodObject<{
212
- tool_use_id: z.ZodString;
213
- type: z.ZodLiteral<"tool_result">;
214
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
215
- type: z.ZodLiteral<"text">;
216
- text: z.ZodString;
217
- }, "strip", z.ZodTypeAny, {
218
- type: "text";
219
- text: string;
220
- }, {
221
- type: "text";
222
- text: string;
223
- }>, "many">]>;
224
- is_error: z.ZodOptional<z.ZodBoolean>;
225
- }, "strip", z.ZodTypeAny, {
226
- type: "tool_result";
227
- tool_use_id: string;
228
- content: string | {
229
- type: "text";
230
- text: string;
231
- }[];
232
- is_error?: boolean | undefined;
233
- }, {
234
- type: "tool_result";
235
- tool_use_id: string;
236
- content: string | {
237
- type: "text";
238
- text: string;
239
- }[];
240
- is_error?: boolean | undefined;
241
- }>]>, "many">;
242
- stop_reason: z.ZodNullable<z.ZodString>;
243
- stop_sequence: z.ZodNullable<z.ZodString>;
244
- usage: z.ZodObject<{
68
+ usage: z.ZodOptional<z.ZodObject<{
245
69
  input_tokens: z.ZodNumber;
246
70
  cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
247
71
  cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
248
72
  output_tokens: z.ZodNumber;
249
73
  service_tier: z.ZodOptional<z.ZodString>;
250
- }, "strip", z.ZodTypeAny, {
251
- input_tokens: number;
252
- output_tokens: number;
253
- cache_creation_input_tokens?: number | undefined;
254
- cache_read_input_tokens?: number | undefined;
255
- service_tier?: string | undefined;
256
- }, {
257
- input_tokens: number;
258
- output_tokens: number;
259
- cache_creation_input_tokens?: number | undefined;
260
- cache_read_input_tokens?: number | undefined;
261
- service_tier?: string | undefined;
262
- }>;
263
- }, "strip", z.ZodTypeAny, {
264
- usage: {
265
- input_tokens: number;
266
- output_tokens: number;
267
- cache_creation_input_tokens?: number | undefined;
268
- cache_read_input_tokens?: number | undefined;
269
- service_tier?: string | undefined;
270
- };
271
- type: "message";
272
- id: string;
273
- content: ({
274
- type: "text";
275
- text: string;
276
- } | {
277
- type: "thinking";
278
- thinking: string;
279
- signature: string;
280
- } | {
281
- type: "tool_use";
282
- id: string;
283
- name: string;
284
- input?: unknown;
285
- } | {
286
- type: "tool_result";
287
- tool_use_id: string;
288
- content: string | {
289
- type: "text";
290
- text: string;
291
- }[];
292
- is_error?: boolean | undefined;
293
- })[];
294
- role: "assistant";
295
- model: string;
296
- stop_reason: string | null;
297
- stop_sequence: string | null;
298
- }, {
299
- usage: {
300
- input_tokens: number;
301
- output_tokens: number;
302
- cache_creation_input_tokens?: number | undefined;
303
- cache_read_input_tokens?: number | undefined;
304
- service_tier?: string | undefined;
305
- };
306
- type: "message";
307
- id: string;
308
- content: ({
309
- type: "text";
310
- text: string;
311
- } | {
312
- type: "thinking";
313
- thinking: string;
314
- signature: string;
315
- } | {
316
- type: "tool_use";
317
- id: string;
318
- name: string;
319
- input?: unknown;
320
- } | {
321
- type: "tool_result";
322
- tool_use_id: string;
323
- content: string | {
324
- type: "text";
325
- text: string;
326
- }[];
327
- is_error?: boolean | undefined;
328
- })[];
329
- role: "assistant";
330
- model: string;
331
- stop_reason: string | null;
332
- stop_sequence: string | null;
333
- }>;
334
- requestId: z.ZodOptional<z.ZodString>;
335
- }, "strip", z.ZodTypeAny, {
336
- message: {
337
- usage: {
338
- input_tokens: number;
339
- output_tokens: number;
340
- cache_creation_input_tokens?: number | undefined;
341
- cache_read_input_tokens?: number | undefined;
342
- service_tier?: string | undefined;
343
- };
344
- type: "message";
345
- id: string;
346
- content: ({
347
- type: "text";
348
- text: string;
349
- } | {
350
- type: "thinking";
351
- thinking: string;
352
- signature: string;
353
- } | {
354
- type: "tool_use";
355
- id: string;
356
- name: string;
357
- input?: unknown;
358
- } | {
359
- type: "tool_result";
360
- tool_use_id: string;
361
- content: string | {
362
- type: "text";
363
- text: string;
364
- }[];
365
- is_error?: boolean | undefined;
366
- })[];
367
- role: "assistant";
368
- model: string;
369
- stop_reason: string | null;
370
- stop_sequence: string | null;
371
- };
372
- type: "assistant";
373
- cwd: string;
374
- sessionId: string;
375
- version: string;
376
- uuid: string;
377
- timestamp: string;
378
- parent_tool_use_id?: string | null | undefined;
379
- requestId?: string | undefined;
380
- }, {
381
- message: {
382
- usage: {
383
- input_tokens: number;
384
- output_tokens: number;
385
- cache_creation_input_tokens?: number | undefined;
386
- cache_read_input_tokens?: number | undefined;
387
- service_tier?: string | undefined;
388
- };
389
- type: "message";
390
- id: string;
391
- content: ({
392
- type: "text";
393
- text: string;
394
- } | {
395
- type: "thinking";
396
- thinking: string;
397
- signature: string;
398
- } | {
399
- type: "tool_use";
400
- id: string;
401
- name: string;
402
- input?: unknown;
403
- } | {
404
- type: "tool_result";
405
- tool_use_id: string;
406
- content: string | {
407
- type: "text";
408
- text: string;
409
- }[];
410
- is_error?: boolean | undefined;
411
- })[];
412
- role: "assistant";
413
- model: string;
414
- stop_reason: string | null;
415
- stop_sequence: string | null;
416
- };
417
- type: "assistant";
418
- cwd: string;
419
- sessionId: string;
420
- version: string;
421
- uuid: string;
422
- timestamp: string;
423
- parent_tool_use_id?: string | null | undefined;
424
- requestId?: string | undefined;
425
- }>, z.ZodObject<{
74
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75
+ input_tokens: z.ZodNumber;
76
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
77
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
78
+ output_tokens: z.ZodNumber;
79
+ service_tier: z.ZodOptional<z.ZodString>;
80
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
81
+ input_tokens: z.ZodNumber;
82
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
83
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
84
+ output_tokens: z.ZodNumber;
85
+ service_tier: z.ZodOptional<z.ZodString>;
86
+ }, z.ZodTypeAny, "passthrough">>>;
87
+ content: z.ZodAny;
88
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
89
+ usage: z.ZodOptional<z.ZodObject<{
90
+ input_tokens: z.ZodNumber;
91
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
92
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
93
+ output_tokens: z.ZodNumber;
94
+ service_tier: z.ZodOptional<z.ZodString>;
95
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
96
+ input_tokens: z.ZodNumber;
97
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
98
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
99
+ output_tokens: z.ZodNumber;
100
+ service_tier: z.ZodOptional<z.ZodString>;
101
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
102
+ input_tokens: z.ZodNumber;
103
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
104
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
105
+ output_tokens: z.ZodNumber;
106
+ service_tier: z.ZodOptional<z.ZodString>;
107
+ }, z.ZodTypeAny, "passthrough">>>;
108
+ content: z.ZodAny;
109
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
110
+ usage: z.ZodOptional<z.ZodObject<{
111
+ input_tokens: z.ZodNumber;
112
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
113
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
114
+ output_tokens: z.ZodNumber;
115
+ service_tier: z.ZodOptional<z.ZodString>;
116
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
117
+ input_tokens: z.ZodNumber;
118
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
119
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
120
+ output_tokens: z.ZodNumber;
121
+ service_tier: z.ZodOptional<z.ZodString>;
122
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
123
+ input_tokens: z.ZodNumber;
124
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
125
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
126
+ output_tokens: z.ZodNumber;
127
+ service_tier: z.ZodOptional<z.ZodString>;
128
+ }, z.ZodTypeAny, "passthrough">>>;
129
+ content: z.ZodAny;
130
+ }, z.ZodTypeAny, "passthrough">>;
131
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
132
+ type: z.ZodLiteral<"assistant">;
133
+ message: z.ZodObject<{
134
+ usage: z.ZodOptional<z.ZodObject<{
135
+ input_tokens: z.ZodNumber;
136
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
137
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
138
+ output_tokens: z.ZodNumber;
139
+ service_tier: z.ZodOptional<z.ZodString>;
140
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
141
+ input_tokens: z.ZodNumber;
142
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
143
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
144
+ output_tokens: z.ZodNumber;
145
+ service_tier: z.ZodOptional<z.ZodString>;
146
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
147
+ input_tokens: z.ZodNumber;
148
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
149
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
150
+ output_tokens: z.ZodNumber;
151
+ service_tier: z.ZodOptional<z.ZodString>;
152
+ }, z.ZodTypeAny, "passthrough">>>;
153
+ content: z.ZodAny;
154
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
155
+ usage: z.ZodOptional<z.ZodObject<{
156
+ input_tokens: z.ZodNumber;
157
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
158
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
159
+ output_tokens: z.ZodNumber;
160
+ service_tier: z.ZodOptional<z.ZodString>;
161
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
162
+ input_tokens: z.ZodNumber;
163
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
164
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
165
+ output_tokens: z.ZodNumber;
166
+ service_tier: z.ZodOptional<z.ZodString>;
167
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
168
+ input_tokens: z.ZodNumber;
169
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
170
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
171
+ output_tokens: z.ZodNumber;
172
+ service_tier: z.ZodOptional<z.ZodString>;
173
+ }, z.ZodTypeAny, "passthrough">>>;
174
+ content: z.ZodAny;
175
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
176
+ usage: z.ZodOptional<z.ZodObject<{
177
+ input_tokens: z.ZodNumber;
178
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
179
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
180
+ output_tokens: z.ZodNumber;
181
+ service_tier: z.ZodOptional<z.ZodString>;
182
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
183
+ input_tokens: z.ZodNumber;
184
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
185
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
186
+ output_tokens: z.ZodNumber;
187
+ service_tier: z.ZodOptional<z.ZodString>;
188
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
189
+ input_tokens: z.ZodNumber;
190
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
191
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
192
+ output_tokens: z.ZodNumber;
193
+ service_tier: z.ZodOptional<z.ZodString>;
194
+ }, z.ZodTypeAny, "passthrough">>>;
195
+ content: z.ZodAny;
196
+ }, z.ZodTypeAny, "passthrough">>;
197
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
198
+ type: z.ZodLiteral<"assistant">;
199
+ message: z.ZodObject<{
200
+ usage: z.ZodOptional<z.ZodObject<{
201
+ input_tokens: z.ZodNumber;
202
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
203
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
204
+ output_tokens: z.ZodNumber;
205
+ service_tier: z.ZodOptional<z.ZodString>;
206
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
207
+ input_tokens: z.ZodNumber;
208
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
209
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
210
+ output_tokens: z.ZodNumber;
211
+ service_tier: z.ZodOptional<z.ZodString>;
212
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
213
+ input_tokens: z.ZodNumber;
214
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
215
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
216
+ output_tokens: z.ZodNumber;
217
+ service_tier: z.ZodOptional<z.ZodString>;
218
+ }, z.ZodTypeAny, "passthrough">>>;
219
+ content: z.ZodAny;
220
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
221
+ usage: z.ZodOptional<z.ZodObject<{
222
+ input_tokens: z.ZodNumber;
223
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
224
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
225
+ output_tokens: z.ZodNumber;
226
+ service_tier: z.ZodOptional<z.ZodString>;
227
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
228
+ input_tokens: z.ZodNumber;
229
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
230
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
231
+ output_tokens: z.ZodNumber;
232
+ service_tier: z.ZodOptional<z.ZodString>;
233
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
234
+ input_tokens: z.ZodNumber;
235
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
236
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
237
+ output_tokens: z.ZodNumber;
238
+ service_tier: z.ZodOptional<z.ZodString>;
239
+ }, z.ZodTypeAny, "passthrough">>>;
240
+ content: z.ZodAny;
241
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
242
+ usage: z.ZodOptional<z.ZodObject<{
243
+ input_tokens: z.ZodNumber;
244
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
245
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
246
+ output_tokens: z.ZodNumber;
247
+ service_tier: z.ZodOptional<z.ZodString>;
248
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
249
+ input_tokens: z.ZodNumber;
250
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
251
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
252
+ output_tokens: z.ZodNumber;
253
+ service_tier: z.ZodOptional<z.ZodString>;
254
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
255
+ input_tokens: z.ZodNumber;
256
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
257
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
258
+ output_tokens: z.ZodNumber;
259
+ service_tier: z.ZodOptional<z.ZodString>;
260
+ }, z.ZodTypeAny, "passthrough">>>;
261
+ content: z.ZodAny;
262
+ }, z.ZodTypeAny, "passthrough">>;
263
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
426
264
  type: z.ZodLiteral<"summary">;
427
265
  summary: z.ZodString;
428
266
  leafUuid: z.ZodString;
429
- }, "strip", z.ZodTypeAny, {
430
- type: "summary";
431
- summary: string;
432
- leafUuid: string;
433
- }, {
434
- type: "summary";
435
- summary: string;
436
- leafUuid: string;
437
- }>, z.ZodObject<{
438
- cwd: z.ZodString;
439
- sessionId: z.ZodString;
440
- version: z.ZodString;
267
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
268
+ type: z.ZodLiteral<"summary">;
269
+ summary: z.ZodString;
270
+ leafUuid: z.ZodString;
271
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
272
+ type: z.ZodLiteral<"summary">;
273
+ summary: z.ZodString;
274
+ leafUuid: z.ZodString;
275
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
276
+ type: z.ZodLiteral<"system">;
441
277
  uuid: z.ZodString;
442
- timestamp: z.ZodString;
443
- parent_tool_use_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
- } & {
278
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
445
279
  type: z.ZodLiteral<"system">;
446
- content: z.ZodString;
447
- isMeta: z.ZodOptional<z.ZodBoolean>;
448
- level: z.ZodOptional<z.ZodString>;
449
- parentUuid: z.ZodOptional<z.ZodString>;
450
- isSidechain: z.ZodOptional<z.ZodBoolean>;
451
- userType: z.ZodOptional<z.ZodString>;
452
- }, "strip", z.ZodTypeAny, {
453
- type: "system";
454
- content: string;
455
- cwd: string;
456
- sessionId: string;
457
- version: string;
458
- uuid: string;
459
- timestamp: string;
460
- parent_tool_use_id?: string | null | undefined;
461
- isMeta?: boolean | undefined;
462
- level?: string | undefined;
463
- parentUuid?: string | undefined;
464
- isSidechain?: boolean | undefined;
465
- userType?: string | undefined;
466
- }, {
467
- type: "system";
468
- content: string;
469
- cwd: string;
470
- sessionId: string;
471
- version: string;
472
- uuid: string;
473
- timestamp: string;
474
- parent_tool_use_id?: string | null | undefined;
475
- isMeta?: boolean | undefined;
476
- level?: string | undefined;
477
- parentUuid?: string | undefined;
478
- isSidechain?: boolean | undefined;
479
- userType?: string | undefined;
480
- }>]>;
280
+ uuid: z.ZodString;
281
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
282
+ type: z.ZodLiteral<"system">;
283
+ uuid: z.ZodString;
284
+ }, z.ZodTypeAny, "passthrough">>]>;
481
285
  type RawJSONLines = z.infer<typeof RawJSONLinesSchema>;
482
286
 
483
287
  /**
@@ -553,14 +357,10 @@ type Metadata = {
553
357
  host: string;
554
358
  version?: string;
555
359
  name?: string;
556
- usage?: {
557
- [model: string]: {
558
- input?: number;
559
- input_cache?: number;
560
- output?: number;
561
- output_reasoning?: number;
562
- usd?: number;
563
- };
360
+ os?: string;
361
+ summary?: {
362
+ text: string;
363
+ updatedAt: number;
564
364
  };
565
365
  };
566
366
  type AgentState = {
@@ -593,10 +393,14 @@ declare class ApiSessionClient extends EventEmitter {
593
393
  * @param body - Message body (can be MessageContent or raw content for agent messages)
594
394
  */
595
395
  sendClaudeSessionMessage(body: RawJSONLines): void;
396
+ sendSessionEvent(event: {
397
+ type: 'switch';
398
+ mode: 'local' | 'remote';
399
+ }, id?: string): void;
596
400
  /**
597
401
  * Send a ping message to keep the connection alive
598
402
  */
599
- keepAlive(thinking: boolean): void;
403
+ keepAlive(thinking: boolean, mode: 'local' | 'remote'): void;
600
404
  /**
601
405
  * Send session death message
602
406
  */
@@ -719,9 +523,10 @@ declare class Configuration {
719
523
  readonly logsDir: string;
720
524
  readonly settingsFile: string;
721
525
  readonly privateKeyFile: string;
722
- constructor(location: 'global' | 'local');
526
+ readonly daemonPidFile: string;
527
+ constructor(location: 'global' | 'local' | string);
723
528
  }
724
529
  declare let configuration: Configuration;
725
- declare function initializeConfiguration(location: 'global' | 'local'): void;
530
+ declare function initializeConfiguration(location: 'global' | 'local' | string): void;
726
531
 
727
532
  export { ApiClient, ApiSessionClient, type RawJSONLines, RawJSONLinesSchema, configuration, initLoggerWithGlobalConfiguration, initializeConfiguration, logger };