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.
- package/README.md +2 -0
- package/dist/index-B2GqfEZV.cjs +1564 -0
- package/dist/index-QItBXhux.mjs +1540 -0
- package/dist/index.cjs +997 -260
- package/dist/index.mjs +996 -259
- package/dist/install-B0DnBGS_.mjs +29 -0
- package/dist/install-C809w0Cj.cjs +31 -0
- package/dist/install-DEPy62QN.mjs +97 -0
- package/dist/install-GZIzyuIE.cjs +99 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +265 -460
- package/dist/lib.d.mts +265 -460
- package/dist/lib.mjs +1 -1
- package/dist/run-BmEaINbl.cjs +250 -0
- package/dist/run-DMbKhYfb.mjs +247 -0
- package/dist/types-BRICSarm.mjs +870 -0
- package/dist/types-BTQRfIr3.cjs +892 -0
- package/dist/types-CEvzGLMI.cjs +882 -0
- package/dist/types-D39L8JSd.mjs +850 -0
- package/dist/types-DYBiuNUQ.cjs +883 -0
- package/dist/types-Df5dlWLV.mjs +871 -0
- package/dist/types-hotUTaWz.cjs +863 -0
- package/dist/types-tLWMaptR.mjs +879 -0
- package/dist/uninstall-BGgl5V8F.mjs +29 -0
- package/dist/uninstall-BWHglipH.mjs +40 -0
- package/dist/uninstall-CdHMb6wi.cjs +31 -0
- package/dist/uninstall-FXyyAuGU.cjs +42 -0
- package/package.json +8 -2
- package/ripgrep/COPYING +3 -0
- package/ripgrep/arm64-darwin/rg +0 -0
- package/ripgrep/arm64-darwin/ripgrep.node +0 -0
- package/ripgrep/arm64-linux/rg +0 -0
- package/ripgrep/arm64-linux/ripgrep.node +0 -0
- package/ripgrep/x64-darwin/rg +0 -0
- package/ripgrep/x64-darwin/ripgrep.node +0 -0
- package/ripgrep/x64-linux/rg +0 -0
- package/ripgrep/x64-linux/ripgrep.node +0 -0
- package/ripgrep/x64-win32/rg.exe +0 -0
- package/ripgrep/x64-win32/ripgrep.node +0 -0
- 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
|
-
*
|
|
7
|
-
*
|
|
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
|
-
}, "
|
|
17
|
-
input_tokens:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
service_tier
|
|
22
|
-
}, {
|
|
23
|
-
input_tokens:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
service_tier
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
type: z.ZodLiteral<"user">;
|
|
31
|
+
isSidechain: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
isMeta: z.ZodOptional<z.ZodBoolean>;
|
|
33
33
|
uuid: z.ZodString;
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
167
|
-
|
|
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
|
-
|
|
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
|
-
}, "
|
|
251
|
-
input_tokens:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
service_tier
|
|
256
|
-
}, {
|
|
257
|
-
input_tokens:
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
service_tier
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
cache_creation_input_tokens
|
|
268
|
-
cache_read_input_tokens
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
input_tokens:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
service_tier
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
input_tokens:
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
service_tier
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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
|
-
}, "
|
|
430
|
-
type: "summary"
|
|
431
|
-
summary:
|
|
432
|
-
leafUuid:
|
|
433
|
-
}, {
|
|
434
|
-
type: "summary"
|
|
435
|
-
summary:
|
|
436
|
-
leafUuid:
|
|
437
|
-
}
|
|
438
|
-
|
|
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
|
-
|
|
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
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
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
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
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
|
-
|
|
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 };
|