@poncho-ai/cli 0.10.0 → 0.10.2

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 (71) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/CHANGELOG.md +18 -0
  3. package/dist/{chunk-6JHNHDFF.js → chunk-COLXQM6J.js} +9 -6
  4. package/dist/cli.js +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/{run-interactive-ink-X7VHWGLT.js → run-interactive-ink-Z3U5SV4C.js} +1 -1
  7. package/package.json +3 -3
  8. package/src/index.ts +9 -6
  9. package/.turbo/turbo-test.log +0 -389
  10. package/dist/chunk-42U2R3FH.js +0 -5752
  11. package/dist/chunk-4UDNQZ3G.js +0 -5752
  12. package/dist/chunk-5NHWU4QU.js +0 -5752
  13. package/dist/chunk-6CDE6R7D.js +0 -5752
  14. package/dist/chunk-74HD63WM.js +0 -5819
  15. package/dist/chunk-7TRWWFGI.js +0 -5752
  16. package/dist/chunk-B5HASFPF.js +0 -5803
  17. package/dist/chunk-DFV5DGX4.js +0 -5794
  18. package/dist/chunk-DHQN2X5P.js +0 -5803
  19. package/dist/chunk-G67AWHXV.js +0 -5752
  20. package/dist/chunk-GFGEMANG.js +0 -5820
  21. package/dist/chunk-HYTF3H3J.js +0 -5795
  22. package/dist/chunk-IZJUA24R.js +0 -5750
  23. package/dist/chunk-J2MTY7EY.js +0 -5780
  24. package/dist/chunk-KITZQSRW.js +0 -5801
  25. package/dist/chunk-KKQSJC2U.js +0 -5750
  26. package/dist/chunk-L65TFTEI.js +0 -5752
  27. package/dist/chunk-MGR2GJMB.js +0 -5803
  28. package/dist/chunk-O5NLOW2I.js +0 -5752
  29. package/dist/chunk-OGTT4YJG.js +0 -5752
  30. package/dist/chunk-OHKXVDVM.js +0 -5752
  31. package/dist/chunk-OTOMFL3L.js +0 -5773
  32. package/dist/chunk-PHVOJ2R5.js +0 -5781
  33. package/dist/chunk-Q3WHF2FP.js +0 -5752
  34. package/dist/chunk-RN7FDRZH.js +0 -5752
  35. package/dist/chunk-SWPCETEB.js +0 -5772
  36. package/dist/chunk-VKPDG7AE.js +0 -5803
  37. package/dist/chunk-VP4ABFQK.js +0 -5795
  38. package/dist/chunk-YARNE46F.js +0 -5803
  39. package/dist/chunk-ZCLLCLRR.js +0 -5752
  40. package/dist/chunk-ZHHKZDHY.js +0 -5795
  41. package/dist/run-interactive-ink-2CVZHZLL.js +0 -535
  42. package/dist/run-interactive-ink-3TNAVPQ7.js +0 -534
  43. package/dist/run-interactive-ink-54UJ6WGA.js +0 -535
  44. package/dist/run-interactive-ink-64XY2KJD.js +0 -535
  45. package/dist/run-interactive-ink-7EB3ZX6P.js +0 -535
  46. package/dist/run-interactive-ink-7OSESHKH.js +0 -535
  47. package/dist/run-interactive-ink-BU4ZKI3Z.js +0 -535
  48. package/dist/run-interactive-ink-CH7BVAFL.js +0 -535
  49. package/dist/run-interactive-ink-DFIJTWMT.js +0 -535
  50. package/dist/run-interactive-ink-DORF57NC.js +0 -535
  51. package/dist/run-interactive-ink-EL7MPT4C.js +0 -1957
  52. package/dist/run-interactive-ink-EOW4MLEH.js +0 -535
  53. package/dist/run-interactive-ink-EU3DN4MJ.js +0 -535
  54. package/dist/run-interactive-ink-FFIGZNGR.js +0 -535
  55. package/dist/run-interactive-ink-HMVUIZRO.js +0 -533
  56. package/dist/run-interactive-ink-LNSWAC2D.js +0 -1964
  57. package/dist/run-interactive-ink-M45PYHTA.js +0 -1964
  58. package/dist/run-interactive-ink-MQTTMSSO.js +0 -535
  59. package/dist/run-interactive-ink-NT66KRS5.js +0 -535
  60. package/dist/run-interactive-ink-O5AV46ZE.js +0 -535
  61. package/dist/run-interactive-ink-OC57VVOY.js +0 -535
  62. package/dist/run-interactive-ink-PTUDJKT5.js +0 -535
  63. package/dist/run-interactive-ink-PYQFHCNW.js +0 -537
  64. package/dist/run-interactive-ink-QXIIUBIC.js +0 -534
  65. package/dist/run-interactive-ink-SOGKAQAE.js +0 -522
  66. package/dist/run-interactive-ink-UPMUH72Q.js +0 -520
  67. package/dist/run-interactive-ink-W4NEF7FL.js +0 -522
  68. package/dist/run-interactive-ink-WBPOSHHC.js +0 -535
  69. package/dist/run-interactive-ink-X6PKW7NZ.js +0 -1964
  70. package/dist/run-interactive-ink-XEK5ZPSU.js +0 -535
  71. package/dist/run-interactive-ink-YWJ5OBNI.js +0 -535
@@ -1,1964 +0,0 @@
1
- import {
2
- consumeFirstRunIntro,
3
- inferConversationTitle,
4
- resolveHarnessEnvironment
5
- } from "./chunk-B5HASFPF.js";
6
-
7
- // src/run-interactive-ink.ts
8
- import * as readline from "readline";
9
- import { stdout } from "process";
10
- import {
11
- parseAgentFile
12
- } from "@poncho-ai/harness";
13
-
14
- // src/mascot.ts
15
- var renderTruecolor = (r, g, b, text) => `\x1B[38;2;${r};${g};${b}m${text}`;
16
- var colorizedMascot = [
17
- [
18
- [30, 30, 30, "............................................................"]
19
- ],
20
- [
21
- [30, 30, 30, "............................................................"]
22
- ],
23
- [
24
- [30, 30, 30, "..................."],
25
- [29, 29, 29, "."],
26
- [28, 28, 28, " "],
27
- [25, 25, 25, " "],
28
- [20, 20, 20, " "],
29
- [16, 16, 16, " "],
30
- [19, 20, 20, " "],
31
- [26, 29, 30, " "],
32
- [36, 40, 41, "."],
33
- [44, 50, 51, "."],
34
- [50, 56, 58, "."],
35
- [52, 60, 62, "::"],
36
- [48, 55, 57, "."],
37
- [43, 48, 50, "."],
38
- [35, 39, 40, "."],
39
- [26, 28, 29, " "],
40
- [19, 20, 20, " "],
41
- [16, 17, 17, " "],
42
- [20, 20, 20, " "],
43
- [25, 25, 25, " "],
44
- [28, 28, 28, " "],
45
- [29, 29, 29, "."],
46
- [30, 30, 30, "..................."]
47
- ],
48
- [
49
- [30, 30, 30, "..............."],
50
- [29, 29, 29, "."],
51
- [27, 27, 27, " "],
52
- [21, 21, 21, " "],
53
- [18, 19, 19, " "],
54
- [37, 41, 42, "."],
55
- [69, 78, 81, ":"],
56
- [96, 108, 112, "-"],
57
- [114, 130, 134, "="],
58
- [138, 143, 132, "="],
59
- [165, 149, 107, "+"],
60
- [175, 162, 114, "+"],
61
- [163, 156, 121, "+"],
62
- [165, 160, 128, "+"],
63
- [166, 162, 131, "+"],
64
- [168, 168, 142, "+"],
65
- [167, 172, 153, "+"],
66
- [164, 174, 165, "+"],
67
- [160, 178, 178, "*"],
68
- [159, 180, 184, "*"],
69
- [157, 178, 184, "*"],
70
- [152, 172, 178, "+"],
71
- [140, 158, 163, "+"],
72
- [120, 135, 139, "="],
73
- [99, 111, 115, "-"],
74
- [70, 78, 81, ":"],
75
- [36, 40, 41, "."],
76
- [18, 19, 19, " "],
77
- [21, 21, 21, " "],
78
- [27, 27, 27, " "],
79
- [29, 29, 29, "."],
80
- [30, 30, 30, "..............."]
81
- ],
82
- [
83
- [30, 30, 30, "............"],
84
- [29, 29, 29, "."],
85
- [26, 26, 26, " "],
86
- [18, 19, 19, " "],
87
- [27, 30, 31, "."],
88
- [71, 81, 84, ":"],
89
- [114, 129, 134, "="],
90
- [145, 162, 169, "+"],
91
- [154, 172, 179, "+"],
92
- [154, 168, 169, "+"],
93
- [155, 146, 125, "+"],
94
- [175, 137, 82, "+"],
95
- [205, 154, 56, "+"],
96
- [232, 181, 47, "*"],
97
- [245, 199, 55, "*"],
98
- [247, 209, 73, "#"],
99
- [248, 217, 90, "#"],
100
- [245, 217, 100, "#"],
101
- [239, 212, 106, "#"],
102
- [235, 211, 112, "#"],
103
- [236, 215, 118, "#"],
104
- [229, 208, 115, "#"],
105
- [212, 197, 128, "*"],
106
- [180, 178, 144, "*"],
107
- [161, 171, 165, "+"],
108
- [164, 182, 187, "*"],
109
- [164, 183, 189, "**"],
110
- [166, 186, 191, "*"],
111
- [161, 182, 185, "*"],
112
- [133, 155, 149, "+"],
113
- [87, 110, 91, "-"],
114
- [45, 60, 46, "."],
115
- [19, 22, 19, " "],
116
- [19, 19, 19, " "],
117
- [27, 27, 27, " "],
118
- [29, 29, 29, "."],
119
- [30, 30, 30, "............"]
120
- ],
121
- [
122
- [30, 30, 30, ".........."],
123
- [29, 29, 29, "."],
124
- [24, 24, 24, " "],
125
- [18, 20, 19, " "],
126
- [59, 69, 66, ":"],
127
- [123, 142, 145, "="],
128
- [158, 179, 185, "*"],
129
- [159, 180, 187, "*"],
130
- [159, 179, 186, "*"],
131
- [160, 173, 174, "+"],
132
- [161, 144, 113, "+"],
133
- [190, 137, 64, "+"],
134
- [210, 148, 50, "+"],
135
- [228, 174, 52, "*"],
136
- [240, 188, 49, "*"],
137
- [244, 192, 47, "*"],
138
- [245, 195, 46, "*"],
139
- [246, 202, 61, "#"],
140
- [245, 209, 81, "#"],
141
- [246, 213, 87, "#"],
142
- [246, 213, 89, "#"],
143
- [247, 212, 83, "#"],
144
- [239, 202, 76, "#"],
145
- [237, 202, 80, "#"],
146
- [245, 211, 85, "#"],
147
- [243, 213, 96, "#"],
148
- [224, 202, 114, "#"],
149
- [184, 178, 136, "*"],
150
- [169, 182, 176, "*"],
151
- [173, 194, 198, "*"],
152
- [161, 183, 184, "*"],
153
- [129, 158, 140, "+"],
154
- [116, 150, 120, "="],
155
- [110, 146, 111, "="],
156
- [106, 142, 106, "="],
157
- [109, 143, 97, "="],
158
- [79, 107, 70, "-"],
159
- [35, 47, 32, "."],
160
- [16, 18, 15, " "],
161
- [24, 24, 24, " "],
162
- [29, 29, 29, "."],
163
- [30, 30, 30, ".........."]
164
- ],
165
- [
166
- [30, 30, 30, "........"],
167
- [29, 29, 29, "."],
168
- [25, 25, 25, " "],
169
- [15, 17, 14, " "],
170
- [64, 79, 52, ":"],
171
- [119, 147, 97, "="],
172
- [145, 175, 133, "+"],
173
- [172, 200, 193, "*"],
174
- [182, 207, 210, "#"],
175
- [179, 203, 207, "*"],
176
- [175, 184, 179, "*"],
177
- [173, 137, 91, "+"],
178
- [200, 135, 53, "+"],
179
- [211, 151, 55, "+"],
180
- [229, 172, 46, "*"],
181
- [228, 177, 48, "*"],
182
- [240, 191, 46, "*"],
183
- [238, 193, 57, "*"],
184
- [237, 194, 61, "*"],
185
- [242, 192, 45, "*"],
186
- [242, 193, 46, "*"],
187
- [242, 194, 48, "*"],
188
- [243, 195, 52, "*"],
189
- [243, 195, 54, "*"],
190
- [241, 192, 53, "*"],
191
- [230, 181, 51, "*"],
192
- [228, 179, 53, "*"],
193
- [233, 185, 58, "*"],
194
- [234, 185, 58, "*"],
195
- [234, 193, 80, "*"],
196
- [204, 183, 113, "*"],
197
- [181, 188, 171, "*"],
198
- [155, 178, 173, "*"],
199
- [116, 148, 127, "="],
200
- [100, 135, 104, "="],
201
- [99, 133, 99, "="],
202
- [95, 130, 98, "="],
203
- [95, 132, 95, "="],
204
- [101, 139, 93, "="],
205
- [97, 135, 90, "="],
206
- [75, 109, 73, "-"],
207
- [35, 53, 36, "."],
208
- [14, 16, 14, " "],
209
- [25, 25, 25, " "],
210
- [29, 29, 29, "."],
211
- [30, 30, 30, "........"]
212
- ],
213
- [
214
- [30, 30, 30, "......"],
215
- [29, 29, 29, "."],
216
- [28, 28, 28, " "],
217
- [15, 16, 16, " "],
218
- [25, 37, 29, "."],
219
- [71, 101, 76, "-"],
220
- [96, 130, 94, "="],
221
- [119, 149, 109, "="],
222
- [152, 179, 152, "+"],
223
- [186, 208, 207, "#"],
224
- [192, 212, 217, "#"],
225
- [184, 198, 198, "*"],
226
- [176, 156, 124, "+"],
227
- [204, 145, 69, "+"],
228
- [203, 132, 47, "+"],
229
- [210, 142, 42, "+"],
230
- [213, 150, 43, "+"],
231
- [208, 145, 43, "+"],
232
- [219, 157, 44, "+"],
233
- [215, 155, 44, "+"],
234
- [210, 154, 42, "+"],
235
- [224, 172, 43, "*"],
236
- [235, 186, 49, "*"],
237
- [234, 185, 50, "*"],
238
- [235, 187, 50, "*"],
239
- [241, 195, 54, "*"],
240
- [246, 205, 67, "#"],
241
- [248, 215, 86, "#"],
242
- [249, 223, 105, "#"],
243
- [249, 229, 121, "#"],
244
- [247, 227, 123, "#"],
245
- [246, 224, 117, "#"],
246
- [244, 219, 107, "#"],
247
- [237, 207, 93, "#"],
248
- [220, 191, 92, "*"],
249
- [202, 189, 109, "*"],
250
- [167, 164, 107, "+"],
251
- [121, 132, 87, "="],
252
- [102, 132, 97, "="],
253
- [92, 129, 94, "="],
254
- [82, 119, 88, "-"],
255
- [80, 120, 86, "-"],
256
- [84, 125, 85, "-"],
257
- [90, 129, 86, "-"],
258
- [72, 104, 71, "-"],
259
- [23, 34, 24, "."],
260
- [17, 18, 17, " "],
261
- [27, 27, 27, " "],
262
- [30, 30, 30, "......."]
263
- ],
264
- [
265
- [30, 30, 30, "....."],
266
- [29, 29, 29, "."],
267
- [26, 26, 26, " "],
268
- [10, 11, 8, " "],
269
- [80, 103, 64, "-"],
270
- [111, 144, 96, "="],
271
- [92, 125, 92, "-"],
272
- [105, 138, 102, "="],
273
- [141, 173, 145, "+"],
274
- [182, 208, 203, "#"],
275
- [193, 217, 219, "#"],
276
- [196, 218, 223, "#"],
277
- [192, 201, 192, "*"],
278
- [183, 143, 91, "+"],
279
- [203, 141, 64, "+"],
280
- [200, 130, 45, "="],
281
- [199, 128, 40, "="],
282
- [195, 128, 38, "="],
283
- [209, 146, 43, "+"],
284
- [229, 175, 47, "*"],
285
- [240, 190, 47, "*"],
286
- [244, 197, 48, "*"],
287
- [245, 199, 49, "*"],
288
- [244, 203, 59, "#"],
289
- [237, 197, 68, "*"],
290
- [218, 172, 60, "*"],
291
- [179, 136, 47, "="],
292
- [136, 104, 42, "-"],
293
- [102, 81, 38, ":"],
294
- [80, 67, 35, ":"],
295
- [71, 60, 36, ":"],
296
- [68, 58, 37, ":"],
297
- [72, 61, 43, ":"],
298
- [91, 79, 63, ":"],
299
- [123, 109, 97, "-"],
300
- [136, 120, 110, "="],
301
- [133, 96, 64, "-"],
302
- [147, 85, 30, "-"],
303
- [158, 93, 32, "-"],
304
- [152, 94, 36, "-"],
305
- [153, 112, 51, "="],
306
- [129, 116, 65, "="],
307
- [82, 108, 78, "-"],
308
- [64, 105, 79, "-"],
309
- [60, 103, 78, "-"],
310
- [59, 98, 76, ":"],
311
- [56, 95, 83, ":"],
312
- [27, 52, 46, "."],
313
- [10, 14, 13, " "],
314
- [26, 26, 26, " "],
315
- [29, 29, 29, "."],
316
- [30, 30, 30, "....."]
317
- ],
318
- [
319
- [30, 30, 30, "...."],
320
- [29, 29, 29, "."],
321
- [24, 24, 24, " "],
322
- [11, 14, 10, " "],
323
- [74, 104, 69, "-"],
324
- [104, 135, 96, "="],
325
- [105, 141, 94, "="],
326
- [100, 135, 95, "="],
327
- [107, 143, 101, "="],
328
- [120, 156, 106, "="],
329
- [134, 165, 119, "+"],
330
- [151, 177, 148, "+"],
331
- [190, 214, 213, "#"],
332
- [195, 200, 189, "*"],
333
- [181, 129, 71, "="],
334
- [195, 127, 48, "="],
335
- [203, 134, 46, "+"],
336
- [214, 151, 50, "+"],
337
- [229, 173, 49, "*"],
338
- [234, 184, 51, "*"],
339
- [222, 170, 47, "*"],
340
- [180, 130, 37, "="],
341
- [117, 84, 29, "-"],
342
- [68, 56, 28, "."],
343
- [41, 37, 25, "."],
344
- [23, 25, 23, " "],
345
- [14, 21, 24, " "],
346
- [11, 20, 25, " "],
347
- [11, 22, 27, " "],
348
- [15, 27, 32, " "],
349
- [20, 32, 36, "."],
350
- [24, 36, 39, "."],
351
- [34, 46, 49, "."],
352
- [42, 54, 57, "."],
353
- [55, 68, 70, ":"],
354
- [48, 60, 61, "."],
355
- [40, 49, 53, "."],
356
- [90, 94, 100, "-"],
357
- [122, 89, 68, "-"],
358
- [147, 81, 32, "-"],
359
- [163, 92, 30, "-"],
360
- [168, 96, 31, "-"],
361
- [168, 98, 28, "-"],
362
- [140, 105, 48, "-"],
363
- [74, 97, 74, "-"],
364
- [50, 93, 79, ":"],
365
- [48, 81, 70, ":"],
366
- [52, 78, 70, ":"],
367
- [46, 82, 71, ":"],
368
- [37, 56, 47, "."],
369
- [9, 10, 9, " "],
370
- [25, 25, 25, " "],
371
- [29, 29, 29, "."],
372
- [30, 30, 30, "...."]
373
- ],
374
- [
375
- [30, 30, 30, "...."],
376
- [25, 25, 25, " "],
377
- [7, 10, 7, " "],
378
- [56, 87, 64, ":"],
379
- [81, 115, 76, "-"],
380
- [114, 147, 95, "="],
381
- [108, 141, 86, "="],
382
- [108, 143, 85, "="],
383
- [110, 143, 91, "="],
384
- [111, 145, 88, "="],
385
- [115, 146, 92, "="],
386
- [126, 155, 105, "="],
387
- [150, 163, 121, "+"],
388
- [180, 146, 99, "+"],
389
- [199, 132, 57, "+"],
390
- [207, 138, 48, "+"],
391
- [209, 145, 45, "+"],
392
- [178, 127, 54, "="],
393
- [143, 116, 86, "="],
394
- [134, 123, 118, "="],
395
- [94, 92, 96, "-"],
396
- [25, 32, 34, "."],
397
- [11, 22, 27, " "],
398
- [12, 23, 28, " "],
399
- [13, 26, 29, " "],
400
- [15, 28, 32, " "],
401
- [16, 31, 35, " "],
402
- [18, 34, 38, "."],
403
- [22, 38, 43, "."],
404
- [26, 44, 48, "."],
405
- [30, 48, 51, "."],
406
- [33, 49, 52, "."],
407
- [35, 51, 54, "."],
408
- [37, 52, 55, "."],
409
- [44, 59, 61, "."],
410
- [57, 71, 72, ":"],
411
- [55, 67, 68, ":"],
412
- [61, 70, 71, ":"],
413
- [143, 147, 147, "+"],
414
- [151, 132, 110, "="],
415
- [179, 119, 47, "="],
416
- [194, 125, 36, "="],
417
- [132, 105, 51, "-"],
418
- [72, 96, 74, "-"],
419
- [54, 89, 77, ":"],
420
- [61, 87, 76, ":"],
421
- [60, 74, 64, ":"],
422
- [63, 66, 57, ":"],
423
- [52, 83, 72, ":"],
424
- [47, 88, 76, ":"],
425
- [41, 59, 50, "."],
426
- [8, 10, 9, " "],
427
- [26, 26, 26, " "],
428
- [29, 29, 29, "."],
429
- [30, 30, 30, "..."]
430
- ],
431
- [
432
- [30, 30, 30, "...."],
433
- [8, 9, 8, " "],
434
- [45, 64, 46, "."],
435
- [60, 92, 73, ":"],
436
- [67, 87, 67, ":"],
437
- [72, 100, 66, "-"],
438
- [87, 119, 79, "-"],
439
- [92, 125, 83, "-"],
440
- [95, 127, 84, "-"],
441
- [107, 137, 91, "="],
442
- [102, 129, 88, "="],
443
- [128, 129, 83, "="],
444
- [190, 139, 77, "+"],
445
- [196, 131, 54, "="],
446
- [157, 107, 51, "="],
447
- [118, 96, 77, "-"],
448
- [104, 99, 99, "-"],
449
- [113, 114, 120, "="],
450
- [143, 148, 155, "+"],
451
- [200, 208, 210, "#"],
452
- [143, 149, 149, "+"],
453
- [13, 23, 25, " "],
454
- [11, 23, 26, " "],
455
- [14, 30, 34, " "],
456
- [23, 61, 66, "."],
457
- [47, 120, 125, "-"],
458
- [54, 136, 140, "-"],
459
- [32, 80, 85, ":"],
460
- [21, 43, 48, "."],
461
- [22, 39, 44, "."],
462
- [23, 39, 46, "."],
463
- [25, 40, 46, "."],
464
- [26, 43, 47, "."],
465
- [38, 82, 85, ":"],
466
- [72, 165, 167, "="],
467
- [90, 202, 203, "+"],
468
- [62, 135, 137, "="],
469
- [42, 71, 73, ":"],
470
- [122, 129, 128, "="],
471
- [155, 163, 163, "+"],
472
- [151, 154, 148, "+"],
473
- [170, 182, 178, "*"],
474
- [145, 172, 168, "+"],
475
- [143, 173, 171, "+"],
476
- [98, 135, 127, "="],
477
- [69, 109, 99, "-"],
478
- [68, 105, 93, "-"],
479
- [85, 106, 97, "-"],
480
- [84, 90, 79, "-"],
481
- [124, 141, 136, "="],
482
- [134, 146, 143, "+"],
483
- [52, 49, 45, "."],
484
- [14, 14, 13, " "],
485
- [28, 28, 28, " "],
486
- [30, 30, 30, "..."]
487
- ],
488
- [
489
- [30, 30, 30, "..."],
490
- [17, 17, 17, " "],
491
- [27, 31, 24, "."],
492
- [63, 90, 69, ":"],
493
- [75, 90, 70, ":"],
494
- [75, 86, 62, ":"],
495
- [68, 96, 65, ":"],
496
- [74, 105, 77, "-"],
497
- [79, 112, 82, "-"],
498
- [89, 121, 91, "-"],
499
- [110, 136, 112, "="],
500
- [145, 137, 107, "="],
501
- [177, 114, 48, "="],
502
- [144, 74, 25, "-"],
503
- [123, 71, 41, ":"],
504
- [101, 101, 106, "-"],
505
- [126, 131, 139, "="],
506
- [148, 155, 162, "+"],
507
- [161, 172, 175, "+"],
508
- [174, 185, 187, "*"],
509
- [210, 219, 217, "#"],
510
- [153, 162, 158, "+"],
511
- [20, 30, 32, " "],
512
- [12, 23, 27, " "],
513
- [27, 63, 67, "."],
514
- [64, 153, 154, "="],
515
- [67, 161, 162, "="],
516
- [49, 125, 127, "-"],
517
- [65, 157, 159, "="],
518
- [46, 105, 109, "-"],
519
- [21, 41, 47, "."],
520
- [19, 37, 44, "."],
521
- [19, 37, 43, "."],
522
- [21, 42, 46, "."],
523
- [42, 92, 94, ":"],
524
- [41, 98, 100, ":"],
525
- [29, 67, 70, "."],
526
- [33, 80, 84, ":"],
527
- [22, 55, 59, "."],
528
- [83, 92, 94, "-"],
529
- [148, 154, 157, "+"],
530
- [145, 156, 160, "+"],
531
- [182, 200, 202, "*"],
532
- [202, 222, 222, "#"],
533
- [198, 220, 222, "#"],
534
- [197, 217, 218, "#"],
535
- [195, 215, 215, "#"],
536
- [198, 218, 218, "#"],
537
- [198, 218, 219, "#"],
538
- [184, 199, 201, "*"],
539
- [128, 129, 123, "="],
540
- [91, 82, 72, ":"],
541
- [86, 77, 67, ":"],
542
- [22, 20, 17, " "],
543
- [21, 21, 21, " "],
544
- [29, 29, 29, "."],
545
- [30, 30, 30, ".."]
546
- ],
547
- [
548
- [30, 30, 30, "..."],
549
- [4, 4, 4, " "],
550
- [99, 104, 96, "-"],
551
- [119, 129, 123, "="],
552
- [113, 124, 111, "="],
553
- [110, 138, 121, "="],
554
- [98, 130, 111, "="],
555
- [96, 128, 109, "="],
556
- [145, 173, 165, "+"],
557
- [137, 166, 155, "+"],
558
- [157, 158, 141, "+"],
559
- [152, 83, 29, "-"],
560
- [152, 76, 25, "-"],
561
- [161, 86, 26, "-"],
562
- [143, 92, 49, "-"],
563
- [109, 115, 119, "="],
564
- [123, 128, 135, "="],
565
- [131, 137, 145, "="],
566
- [136, 147, 152, "+"],
567
- [158, 166, 171, "+"],
568
- [183, 190, 192, "*"],
569
- [171, 179, 176, "*"],
570
- [57, 66, 67, ":"],
571
- [12, 25, 28, " "],
572
- [13, 25, 30, " "],
573
- [14, 31, 36, " "],
574
- [17, 35, 40, "."],
575
- [17, 34, 40, "."],
576
- [17, 36, 42, "."],
577
- [18, 41, 46, "."],
578
- [46, 100, 105, ":"],
579
- [66, 146, 149, "="],
580
- [70, 154, 156, "="],
581
- [51, 110, 114, "-"],
582
- [22, 46, 50, "."],
583
- [16, 31, 34, " "],
584
- [15, 30, 33, " "],
585
- [14, 28, 31, " "],
586
- [10, 25, 28, " "],
587
- [74, 82, 84, ":"],
588
- [142, 148, 151, "+"],
589
- [146, 155, 160, "+"],
590
- [184, 200, 204, "*"],
591
- [179, 204, 206, "*"],
592
- [144, 177, 176, "+"],
593
- [180, 205, 206, "*"],
594
- [197, 219, 220, "#"],
595
- [174, 202, 202, "*"],
596
- [153, 186, 184, "*"],
597
- [151, 184, 183, "*"],
598
- [134, 171, 170, "+"],
599
- [108, 125, 119, "="],
600
- [84, 74, 66, ":"],
601
- [55, 49, 43, "."],
602
- [12, 11, 11, " "],
603
- [28, 28, 28, " "],
604
- [30, 30, 30, ".."]
605
- ],
606
- [
607
- [30, 30, 30, ".."],
608
- [25, 25, 25, " "],
609
- [11, 10, 9, " "],
610
- [101, 96, 82, "-"],
611
- [125, 151, 143, "+"],
612
- [137, 177, 172, "+"],
613
- [142, 178, 175, "+"],
614
- [175, 202, 204, "*"],
615
- [194, 216, 218, "#"],
616
- [166, 197, 200, "*"],
617
- [135, 177, 174, "+"],
618
- [163, 193, 189, "*"],
619
- [183, 173, 152, "*"],
620
- [168, 123, 77, "="],
621
- [166, 104, 46, "="],
622
- [151, 95, 45, "-"],
623
- [113, 98, 86, "-"],
624
- [116, 127, 132, "="],
625
- [111, 119, 126, "="],
626
- [105, 112, 119, "-"],
627
- [121, 126, 132, "="],
628
- [188, 196, 198, "*"],
629
- [200, 207, 206, "#"],
630
- [123, 131, 132, "="],
631
- [26, 42, 47, "."],
632
- [20, 35, 41, "."],
633
- [13, 26, 31, " "],
634
- [13, 25, 29, " "],
635
- [13, 27, 31, " "],
636
- [15, 29, 33, " "],
637
- [15, 30, 35, " "],
638
- [15, 30, 36, " "],
639
- [16, 33, 39, "."],
640
- [15, 32, 38, " "],
641
- [13, 29, 33, " "],
642
- [12, 27, 30, " "],
643
- [12, 25, 30, " "],
644
- [11, 22, 28, " "],
645
- [8, 20, 25, " "],
646
- [12, 23, 27, " "],
647
- [126, 134, 134, "="],
648
- [156, 166, 167, "+"],
649
- [185, 203, 204, "*"],
650
- [197, 219, 219, "#"],
651
- [156, 186, 185, "*"],
652
- [126, 161, 158, "+"],
653
- [156, 187, 188, "*"],
654
- [159, 191, 192, "*"],
655
- [131, 170, 168, "+"],
656
- [127, 166, 163, "+"],
657
- [125, 163, 158, "+"],
658
- [121, 157, 154, "+"],
659
- [121, 150, 147, "="],
660
- [95, 93, 82, "-"],
661
- [75, 67, 58, ":"],
662
- [6, 6, 5, " "],
663
- [27, 27, 27, " "],
664
- [29, 29, 29, "."],
665
- [30, 30, 30, "."]
666
- ],
667
- [
668
- [30, 30, 30, ".."],
669
- [21, 21, 21, " "],
670
- [23, 21, 17, " "],
671
- [120, 138, 125, "="],
672
- [126, 164, 159, "+"],
673
- [126, 163, 155, "+"],
674
- [132, 166, 160, "+"],
675
- [135, 168, 168, "+"],
676
- [138, 170, 171, "+"],
677
- [136, 170, 170, "+"],
678
- [135, 171, 171, "+"],
679
- [153, 186, 187, "*"],
680
- [195, 220, 221, "#"],
681
- [201, 225, 226, "#"],
682
- [202, 226, 227, "#"],
683
- [203, 227, 227, "#"],
684
- [195, 217, 218, "#"],
685
- [148, 162, 163, "+"],
686
- [90, 95, 101, "-"],
687
- [106, 111, 121, "-"],
688
- [134, 137, 148, "="],
689
- [164, 170, 178, "+"],
690
- [189, 200, 203, "*"],
691
- [188, 198, 199, "*"],
692
- [122, 130, 131, "="],
693
- [35, 49, 54, "."],
694
- [22, 39, 44, "."],
695
- [16, 30, 35, " "],
696
- [13, 25, 31, " "],
697
- [12, 25, 29, " "],
698
- [11, 25, 28, " "],
699
- [10, 25, 28, " "],
700
- [11, 25, 29, " "],
701
- [12, 25, 31, " "],
702
- [12, 25, 30, " "],
703
- [11, 24, 29, " "],
704
- [15, 27, 31, " "],
705
- [42, 49, 52, "."],
706
- [101, 107, 108, "-"],
707
- [160, 168, 170, "+"],
708
- [150, 162, 166, "+"],
709
- [179, 198, 200, "*"],
710
- [203, 223, 225, "#"],
711
- [184, 209, 211, "#"],
712
- [133, 168, 167, "+"],
713
- [117, 155, 155, "+"],
714
- [124, 159, 157, "+"],
715
- [127, 160, 159, "+"],
716
- [126, 158, 159, "+"],
717
- [121, 151, 153, "+"],
718
- [120, 150, 152, "="],
719
- [120, 149, 152, "="],
720
- [125, 151, 152, "+"],
721
- [98, 95, 86, "-"],
722
- [84, 77, 65, ":"],
723
- [11, 11, 9, " "],
724
- [24, 24, 24, " "],
725
- [29, 29, 29, "."],
726
- [30, 30, 30, "."]
727
- ],
728
- [
729
- [30, 30, 30, ".."],
730
- [21, 21, 21, " "],
731
- [23, 29, 22, " "],
732
- [88, 124, 95, "-"],
733
- [83, 123, 94, "-"],
734
- [88, 129, 96, "-"],
735
- [94, 134, 107, "="],
736
- [132, 165, 162, "+"],
737
- [132, 167, 168, "+"],
738
- [129, 167, 167, "+"],
739
- [129, 168, 167, "+"],
740
- [132, 169, 170, "+"],
741
- [133, 169, 170, "+"],
742
- [138, 173, 175, "+"],
743
- [153, 185, 187, "*"],
744
- [177, 189, 177, "*"],
745
- [170, 123, 71, "="],
746
- [167, 99, 33, "-"],
747
- [140, 82, 39, "-"],
748
- [121, 98, 83, "-"],
749
- [140, 137, 138, "="],
750
- [141, 140, 149, "="],
751
- [142, 143, 155, "+"],
752
- [150, 153, 164, "+"],
753
- [164, 170, 178, "+"],
754
- [178, 187, 192, "*"],
755
- [184, 194, 197, "*"],
756
- [186, 195, 197, "*"],
757
- [192, 199, 201, "*"],
758
- [194, 201, 203, "#"],
759
- [195, 203, 204, "#"],
760
- [198, 206, 207, "#"],
761
- [200, 209, 209, "#"],
762
- [198, 208, 209, "#"],
763
- [190, 201, 203, "*"],
764
- [179, 190, 192, "*"],
765
- [166, 177, 181, "*"],
766
- [141, 149, 155, "+"],
767
- [118, 129, 135, "="],
768
- [125, 151, 154, "+"],
769
- [138, 176, 176, "+"],
770
- [132, 174, 169, "+"],
771
- [135, 176, 172, "+"],
772
- [133, 172, 169, "+"],
773
- [125, 161, 160, "+"],
774
- [124, 158, 158, "+"],
775
- [124, 157, 158, "+"],
776
- [123, 156, 155, "+"],
777
- [123, 157, 134, "+"],
778
- [107, 142, 107, "="],
779
- [104, 139, 109, "="],
780
- [100, 135, 98, "="],
781
- [96, 133, 88, "="],
782
- [84, 119, 82, "-"],
783
- [72, 109, 79, "-"],
784
- [11, 17, 12, " "],
785
- [24, 25, 24, " "],
786
- [29, 29, 29, "."],
787
- [30, 30, 30, "."]
788
- ],
789
- [
790
- [30, 30, 30, ".."],
791
- [25, 25, 25, " "],
792
- [8, 12, 10, " "],
793
- [64, 100, 81, "-"],
794
- [65, 99, 79, "-"],
795
- [74, 109, 84, "-"],
796
- [90, 125, 96, "-"],
797
- [90, 128, 103, "="],
798
- [112, 148, 132, "="],
799
- [112, 149, 139, "="],
800
- [129, 163, 158, "+"],
801
- [135, 169, 170, "+"],
802
- [134, 170, 171, "+"],
803
- [131, 170, 169, "+"],
804
- [129, 170, 168, "+"],
805
- [129, 159, 152, "+"],
806
- [144, 123, 87, "="],
807
- [192, 123, 42, "="],
808
- [202, 128, 32, "="],
809
- [213, 142, 36, "+"],
810
- [220, 153, 38, "+"],
811
- [228, 168, 39, "*"],
812
- [239, 190, 52, "*"],
813
- [244, 206, 75, "#"],
814
- [231, 201, 97, "*"],
815
- [196, 170, 106, "*"],
816
- [148, 131, 101, "="],
817
- [106, 106, 105, "-"],
818
- [97, 105, 116, "-"],
819
- [95, 105, 114, "-"],
820
- [89, 99, 107, "-"],
821
- [82, 91, 100, "-"],
822
- [76, 83, 91, ":"],
823
- [104, 83, 63, "-"],
824
- [135, 88, 39, "-"],
825
- [162, 108, 38, "="],
826
- [204, 147, 42, "+"],
827
- [222, 177, 75, "*"],
828
- [169, 161, 119, "+"],
829
- [132, 160, 151, "+"],
830
- [124, 164, 159, "+"],
831
- [120, 160, 155, "+"],
832
- [122, 161, 159, "+"],
833
- [127, 164, 165, "+"],
834
- [133, 166, 168, "+"],
835
- [128, 162, 159, "+"],
836
- [118, 152, 138, "="],
837
- [116, 152, 112, "="],
838
- [112, 148, 99, "="],
839
- [107, 143, 98, "="],
840
- [89, 127, 91, "-"],
841
- [98, 133, 94, "="],
842
- [84, 121, 85, "-"],
843
- [69, 105, 77, "-"],
844
- [59, 92, 70, ":"],
845
- [4, 7, 6, " "],
846
- [27, 27, 27, " "],
847
- [29, 29, 29, "."],
848
- [30, 30, 30, "."]
849
- ],
850
- [
851
- [30, 30, 30, "..."],
852
- [3, 3, 3, " "],
853
- [62, 81, 83, ":"],
854
- [86, 108, 107, "-"],
855
- [85, 108, 107, "-"],
856
- [89, 110, 110, "-"],
857
- [91, 111, 112, "-"],
858
- [90, 112, 112, "-"],
859
- [97, 118, 117, "-"],
860
- [97, 120, 119, "-"],
861
- [100, 122, 124, "="],
862
- [103, 125, 129, "="],
863
- [103, 124, 130, "="],
864
- [104, 126, 132, "="],
865
- [104, 116, 115, "-"],
866
- [140, 110, 74, "="],
867
- [191, 123, 43, "="],
868
- [167, 100, 33, "-"],
869
- [177, 108, 34, "="],
870
- [205, 136, 37, "+"],
871
- [217, 153, 40, "+"],
872
- [207, 141, 39, "+"],
873
- [186, 120, 36, "="],
874
- [169, 105, 31, "="],
875
- [179, 114, 35, "="],
876
- [203, 139, 42, "+"],
877
- [222, 163, 46, "+"],
878
- [230, 179, 56, "*"],
879
- [225, 182, 73, "*"],
880
- [197, 160, 75, "+"],
881
- [154, 120, 68, "="],
882
- [166, 124, 57, "="],
883
- [209, 161, 56, "+"],
884
- [194, 143, 48, "+"],
885
- [147, 92, 31, "-"],
886
- [121, 69, 29, ":"],
887
- [180, 140, 65, "+"],
888
- [167, 153, 100, "+"],
889
- [123, 135, 128, "="],
890
- [112, 135, 140, "="],
891
- [113, 134, 140, "="],
892
- [114, 137, 142, "="],
893
- [121, 143, 148, "="],
894
- [120, 141, 145, "="],
895
- [114, 135, 133, "="],
896
- [113, 134, 131, "="],
897
- [112, 135, 131, "="],
898
- [112, 135, 129, "="],
899
- [106, 130, 124, "="],
900
- [107, 128, 122, "="],
901
- [94, 115, 112, "-"],
902
- [93, 113, 113, "-"],
903
- [85, 106, 107, "-"],
904
- [55, 70, 72, ":"],
905
- [11, 12, 12, " "],
906
- [28, 28, 28, " "],
907
- [30, 30, 30, ".."]
908
- ],
909
- [
910
- [30, 30, 30, "..."],
911
- [16, 16, 16, " "],
912
- [22, 34, 30, "."],
913
- [59, 83, 79, ":"],
914
- [61, 72, 79, ":"],
915
- [70, 100, 85, "-"],
916
- [79, 116, 93, "-"],
917
- [80, 118, 95, "-"],
918
- [81, 119, 98, "-"],
919
- [92, 123, 115, "-"],
920
- [64, 80, 86, ":"],
921
- [78, 98, 104, "-"],
922
- [125, 162, 162, "+"],
923
- [134, 169, 171, "+"],
924
- [132, 167, 167, "+"],
925
- [133, 150, 142, "+"],
926
- [162, 121, 75, "="],
927
- [213, 151, 60, "+"],
928
- [231, 185, 64, "*"],
929
- [244, 201, 55, "*"],
930
- [245, 199, 49, "*"],
931
- [236, 188, 44, "*"],
932
- [229, 175, 39, "*"],
933
- [240, 188, 45, "*"],
934
- [243, 194, 47, "*"],
935
- [238, 185, 46, "*"],
936
- [236, 182, 49, "*"],
937
- [232, 178, 49, "*"],
938
- [230, 181, 56, "*"],
939
- [229, 183, 59, "*"],
940
- [225, 182, 61, "*"],
941
- [225, 185, 65, "*"],
942
- [196, 156, 63, "+"],
943
- [163, 110, 55, "="],
944
- [152, 95, 50, "-"],
945
- [202, 153, 53, "+"],
946
- [231, 182, 52, "*"],
947
- [233, 193, 72, "*"],
948
- [200, 176, 92, "*"],
949
- [146, 154, 134, "+"],
950
- [130, 156, 161, "+"],
951
- [124, 153, 154, "+"],
952
- [107, 139, 122, "="],
953
- [98, 133, 106, "="],
954
- [82, 109, 93, "-"],
955
- [55, 70, 72, ":"],
956
- [79, 107, 89, "-"],
957
- [91, 124, 99, "-"],
958
- [77, 109, 87, "-"],
959
- [67, 96, 78, "-"],
960
- [68, 93, 81, ":"],
961
- [57, 73, 72, ":"],
962
- [59, 86, 71, ":"],
963
- [15, 25, 20, " "],
964
- [20, 21, 20, " "],
965
- [29, 29, 29, "."],
966
- [30, 30, 30, ".."]
967
- ],
968
- [
969
- [30, 30, 30, "...."],
970
- [7, 8, 8, " "],
971
- [42, 60, 56, "."],
972
- [71, 88, 88, ":"],
973
- [75, 103, 75, "-"],
974
- [97, 127, 81, "-"],
975
- [84, 115, 77, "-"],
976
- [68, 104, 85, "-"],
977
- [76, 111, 90, "-"],
978
- [62, 82, 81, ":"],
979
- [80, 103, 100, "-"],
980
- [109, 145, 125, "="],
981
- [118, 154, 138, "="],
982
- [137, 151, 131, "+"],
983
- [173, 128, 71, "="],
984
- [209, 148, 56, "+"],
985
- [229, 172, 45, "*"],
986
- [239, 190, 45, "*"],
987
- [233, 188, 57, "*"],
988
- [230, 185, 66, "*"],
989
- [220, 161, 38, "+"],
990
- [203, 140, 38, "+"],
991
- [218, 158, 43, "+"],
992
- [244, 197, 62, "*"],
993
- [247, 207, 67, "#"],
994
- [247, 203, 52, "#"],
995
- [245, 202, 53, "*"],
996
- [244, 202, 55, "*"],
997
- [242, 200, 56, "*"],
998
- [220, 184, 60, "*"],
999
- [166, 136, 67, "="],
1000
- [142, 99, 63, "-"],
1001
- [151, 101, 54, "-"],
1002
- [202, 162, 60, "+"],
1003
- [243, 207, 63, "#"],
1004
- [215, 179, 70, "*"],
1005
- [221, 176, 57, "*"],
1006
- [241, 193, 46, "*"],
1007
- [233, 203, 87, "#"],
1008
- [175, 158, 94, "+"],
1009
- [129, 143, 111, "="],
1010
- [105, 138, 114, "="],
1011
- [88, 125, 105, "-"],
1012
- [80, 107, 98, "-"],
1013
- [60, 76, 78, ":"],
1014
- [70, 97, 82, "-"],
1015
- [70, 103, 87, "-"],
1016
- [63, 95, 83, ":"],
1017
- [57, 91, 77, ":"],
1018
- [67, 97, 75, "-"],
1019
- [79, 100, 78, "-"],
1020
- [41, 57, 46, "."],
1021
- [13, 15, 14, " "],
1022
- [28, 28, 28, " "],
1023
- [30, 30, 30, "..."]
1024
- ],
1025
- [
1026
- [30, 30, 30, "...."],
1027
- [25, 25, 25, " "],
1028
- [9, 11, 6, " "],
1029
- [71, 91, 51, ":"],
1030
- [77, 101, 60, "-"],
1031
- [65, 96, 71, ":"],
1032
- [62, 94, 75, ":"],
1033
- [62, 96, 78, ":"],
1034
- [62, 95, 79, ":"],
1035
- [64, 82, 83, ":"],
1036
- [69, 92, 90, ":"],
1037
- [79, 116, 98, "-"],
1038
- [99, 120, 95, "-"],
1039
- [168, 125, 66, "="],
1040
- [215, 147, 44, "+"],
1041
- [226, 168, 45, "*"],
1042
- [200, 142, 47, "+"],
1043
- [205, 156, 69, "+"],
1044
- [214, 171, 85, "*"],
1045
- [197, 158, 81, "+"],
1046
- [168, 121, 60, "="],
1047
- [176, 116, 45, "="],
1048
- [217, 155, 48, "+"],
1049
- [236, 184, 52, "*"],
1050
- [239, 190, 56, "*"],
1051
- [245, 202, 59, "#"],
1052
- [245, 203, 54, "#"],
1053
- [242, 200, 53, "*"],
1054
- [191, 160, 62, "+"],
1055
- [122, 94, 60, "-"],
1056
- [108, 72, 51, ":"],
1057
- [129, 98, 60, "-"],
1058
- [197, 168, 78, "+"],
1059
- [243, 210, 76, "#"],
1060
- [245, 208, 60, "#"],
1061
- [243, 204, 69, "#"],
1062
- [197, 147, 57, "+"],
1063
- [193, 131, 41, "="],
1064
- [228, 182, 69, "*"],
1065
- [244, 205, 73, "#"],
1066
- [240, 211, 96, "#"],
1067
- [176, 158, 89, "+"],
1068
- [116, 128, 95, "="],
1069
- [90, 113, 98, "-"],
1070
- [67, 85, 85, ":"],
1071
- [62, 89, 80, ":"],
1072
- [65, 96, 83, "-"],
1073
- [86, 115, 84, "-"],
1074
- [107, 133, 84, "="],
1075
- [91, 120, 78, "-"],
1076
- [67, 90, 61, ":"],
1077
- [11, 13, 10, " "],
1078
- [25, 25, 25, " "],
1079
- [29, 29, 29, "."],
1080
- [30, 30, 30, "..."]
1081
- ],
1082
- [
1083
- [30, 30, 30, "...."],
1084
- [29, 29, 29, "."],
1085
- [23, 23, 23, " "],
1086
- [11, 13, 8, " "],
1087
- [85, 100, 62, "-"],
1088
- [85, 106, 65, "-"],
1089
- [80, 109, 81, "-"],
1090
- [93, 122, 87, "-"],
1091
- [81, 111, 84, "-"],
1092
- [61, 80, 80, ":"],
1093
- [72, 94, 93, "-"],
1094
- [69, 105, 87, "-"],
1095
- [96, 99, 72, "-"],
1096
- [179, 117, 47, "="],
1097
- [205, 133, 36, "+"],
1098
- [223, 160, 43, "+"],
1099
- [236, 181, 46, "*"],
1100
- [236, 184, 49, "*"],
1101
- [242, 194, 62, "*"],
1102
- [245, 206, 85, "#"],
1103
- [237, 200, 78, "*"],
1104
- [219, 187, 81, "*"],
1105
- [192, 165, 94, "+"],
1106
- [180, 143, 74, "+"],
1107
- [200, 155, 56, "+"],
1108
- [220, 173, 46, "*"],
1109
- [208, 163, 46, "+"],
1110
- [151, 104, 44, "-"],
1111
- [122, 69, 40, ":"],
1112
- [143, 88, 40, "-"],
1113
- [190, 137, 46, "+"],
1114
- [230, 192, 63, "*"],
1115
- [240, 211, 88, "#"],
1116
- [242, 209, 79, "#"],
1117
- [242, 203, 63, "#"],
1118
- [241, 192, 51, "*"],
1119
- [207, 161, 66, "+"],
1120
- [191, 131, 53, "="],
1121
- [219, 156, 38, "+"],
1122
- [239, 188, 43, "*"],
1123
- [242, 196, 48, "*"],
1124
- [217, 176, 60, "*"],
1125
- [157, 114, 49, "="],
1126
- [142, 97, 49, "-"],
1127
- [88, 82, 72, ":"],
1128
- [68, 93, 80, ":"],
1129
- [78, 113, 77, "-"],
1130
- [87, 121, 77, "-"],
1131
- [97, 127, 74, "-"],
1132
- [75, 98, 55, "-"],
1133
- [12, 15, 10, " "],
1134
- [25, 25, 25, " "],
1135
- [29, 29, 29, "."],
1136
- [30, 30, 30, "...."]
1137
- ],
1138
- [
1139
- [30, 30, 30, "....."],
1140
- [29, 29, 29, "."],
1141
- [26, 26, 26, " "],
1142
- [8, 10, 7, " "],
1143
- [76, 98, 68, "-"],
1144
- [100, 128, 85, "="],
1145
- [92, 125, 76, "-"],
1146
- [82, 117, 69, "-"],
1147
- [74, 103, 75, "-"],
1148
- [77, 97, 80, "-"],
1149
- [94, 89, 64, "-"],
1150
- [108, 59, 32, ":"],
1151
- [125, 73, 32, ":"],
1152
- [196, 130, 51, "="],
1153
- [201, 131, 40, "="],
1154
- [205, 138, 40, "+"],
1155
- [223, 163, 49, "+"],
1156
- [233, 176, 44, "*"],
1157
- [204, 158, 50, "+"],
1158
- [124, 106, 79, "-"],
1159
- [123, 126, 137, "="],
1160
- [187, 194, 199, "*"],
1161
- [214, 223, 221, "#"],
1162
- [212, 218, 215, "#"],
1163
- [149, 135, 126, "="],
1164
- [101, 58, 35, ":"],
1165
- [124, 73, 35, ":"],
1166
- [182, 125, 40, "="],
1167
- [237, 182, 47, "*"],
1168
- [242, 195, 51, "*"],
1169
- [239, 202, 64, "*"],
1170
- [240, 205, 77, "#"],
1171
- [241, 201, 64, "*"],
1172
- [241, 194, 47, "*"],
1173
- [239, 185, 45, "*"],
1174
- [234, 177, 52, "*"],
1175
- [191, 127, 40, "="],
1176
- [193, 121, 36, "="],
1177
- [207, 142, 45, "+"],
1178
- [131, 97, 57, "-"],
1179
- [88, 59, 45, ":"],
1180
- [98, 59, 41, ":"],
1181
- [111, 79, 62, "-"],
1182
- [154, 139, 128, "+"],
1183
- [112, 116, 89, "-"],
1184
- [76, 107, 74, "-"],
1185
- [71, 105, 74, "-"],
1186
- [56, 77, 50, ":"],
1187
- [15, 18, 13, " "],
1188
- [26, 26, 26, " "],
1189
- [29, 29, 29, "."],
1190
- [30, 30, 30, "....."]
1191
- ],
1192
- [
1193
- [30, 30, 30, "......"],
1194
- [29, 29, 29, "."],
1195
- [28, 28, 28, " "],
1196
- [13, 14, 14, " "],
1197
- [25, 37, 28, "."],
1198
- [80, 105, 75, "-"],
1199
- [79, 113, 73, "-"],
1200
- [92, 110, 70, "-"],
1201
- [128, 87, 56, "-"],
1202
- [162, 99, 59, "-"],
1203
- [156, 92, 52, "-"],
1204
- [142, 80, 44, "-"],
1205
- [128, 69, 36, ":"],
1206
- [166, 104, 47, "="],
1207
- [197, 127, 43, "="],
1208
- [198, 127, 38, "="],
1209
- [172, 109, 34, "="],
1210
- [113, 66, 30, ":"],
1211
- [96, 77, 67, ":"],
1212
- [114, 108, 113, "-"],
1213
- [153, 156, 167, "+"],
1214
- [168, 174, 179, "*"],
1215
- [135, 129, 128, "="],
1216
- [90, 63, 53, ":"],
1217
- [112, 72, 34, ":"],
1218
- [198, 147, 41, "+"],
1219
- [241, 189, 45, "*"],
1220
- [240, 190, 49, "*"],
1221
- [238, 192, 51, "*"],
1222
- [236, 197, 60, "*"],
1223
- [234, 190, 58, "*"],
1224
- [234, 184, 50, "*"],
1225
- [237, 189, 49, "*"],
1226
- [227, 169, 41, "*"],
1227
- [225, 162, 38, "+"],
1228
- [200, 139, 43, "+"],
1229
- [193, 126, 39, "="],
1230
- [151, 87, 24, "-"],
1231
- [113, 62, 26, ":"],
1232
- [99, 58, 35, ":"],
1233
- [87, 48, 32, ":"],
1234
- [93, 54, 38, ":"],
1235
- [101, 62, 44, ":"],
1236
- [80, 65, 46, ":"],
1237
- [69, 91, 61, ":"],
1238
- [24, 33, 24, "."],
1239
- [16, 17, 16, " "],
1240
- [27, 27, 27, " "],
1241
- [30, 30, 30, "......."]
1242
- ],
1243
- [
1244
- [30, 30, 30, "........"],
1245
- [29, 29, 29, "."],
1246
- [24, 24, 24, " "],
1247
- [10, 12, 11, " "],
1248
- [28, 42, 36, "."],
1249
- [73, 61, 44, ":"],
1250
- [146, 84, 47, "-"],
1251
- [150, 88, 45, "-"],
1252
- [149, 87, 45, "-"],
1253
- [147, 85, 45, "-"],
1254
- [145, 83, 44, "-"],
1255
- [138, 73, 38, "-"],
1256
- [132, 69, 32, ":"],
1257
- [148, 87, 32, "-"],
1258
- [152, 88, 29, "-"],
1259
- [129, 69, 26, ":"],
1260
- [90, 48, 28, ":"],
1261
- [72, 42, 32, "."],
1262
- [72, 43, 32, "."],
1263
- [83, 50, 31, ":"],
1264
- [121, 73, 33, ":"],
1265
- [174, 111, 35, "="],
1266
- [225, 161, 40, "+"],
1267
- [235, 179, 44, "*"],
1268
- [230, 175, 46, "*"],
1269
- [234, 184, 52, "*"],
1270
- [233, 186, 51, "*"],
1271
- [227, 181, 49, "*"],
1272
- [224, 175, 48, "*"],
1273
- [223, 171, 46, "*"],
1274
- [232, 187, 56, "*"],
1275
- [222, 171, 52, "*"],
1276
- [216, 152, 40, "+"],
1277
- [219, 154, 47, "+"],
1278
- [177, 125, 52, "="],
1279
- [141, 98, 44, "-"],
1280
- [102, 92, 56, "-"],
1281
- [70, 94, 72, ":"],
1282
- [80, 72, 54, ":"],
1283
- [72, 52, 39, "."],
1284
- [55, 54, 42, "."],
1285
- [26, 37, 31, "."],
1286
- [11, 14, 13, " "],
1287
- [25, 25, 25, " "],
1288
- [29, 29, 29, "."],
1289
- [30, 30, 30, "........"]
1290
- ],
1291
- [
1292
- [30, 30, 30, ".........."],
1293
- [29, 29, 29, "."],
1294
- [23, 23, 23, " "],
1295
- [14, 11, 10, " "],
1296
- [42, 22, 14, " "],
1297
- [87, 48, 31, ":"],
1298
- [110, 72, 53, ":"],
1299
- [115, 77, 55, "-"],
1300
- [131, 81, 52, "-"],
1301
- [153, 90, 48, "-"],
1302
- [152, 92, 50, "-"],
1303
- [153, 93, 51, "-"],
1304
- [142, 83, 45, "-"],
1305
- [112, 62, 36, ":"],
1306
- [97, 49, 29, ":"],
1307
- [94, 47, 28, ":"],
1308
- [111, 60, 29, ":"],
1309
- [176, 109, 35, "="],
1310
- [216, 149, 40, "+"],
1311
- [230, 170, 42, "*"],
1312
- [231, 173, 43, "*"],
1313
- [218, 156, 41, "+"],
1314
- [219, 159, 44, "+"],
1315
- [229, 176, 52, "*"],
1316
- [228, 175, 49, "*"],
1317
- [222, 164, 43, "+"],
1318
- [220, 163, 44, "+"],
1319
- [225, 170, 44, "*"],
1320
- [236, 186, 51, "*"],
1321
- [234, 187, 68, "*"],
1322
- [210, 148, 51, "+"],
1323
- [209, 139, 36, "+"],
1324
- [211, 161, 69, "+"],
1325
- [123, 118, 78, "="],
1326
- [79, 101, 91, "-"],
1327
- [66, 93, 86, ":"],
1328
- [44, 68, 63, ":"],
1329
- [19, 31, 29, " "],
1330
- [12, 15, 14, " "],
1331
- [24, 24, 24, " "],
1332
- [29, 29, 29, "."],
1333
- [30, 30, 30, ".........."]
1334
- ],
1335
- [
1336
- [30, 30, 30, "............"],
1337
- [29, 29, 29, "."],
1338
- [26, 26, 26, " "],
1339
- [17, 16, 16, " "],
1340
- [21, 15, 12, " "],
1341
- [48, 32, 24, "."],
1342
- [76, 46, 33, "."],
1343
- [108, 57, 33, ":"],
1344
- [124, 68, 40, ":"],
1345
- [119, 67, 39, ":"],
1346
- [106, 58, 33, ":"],
1347
- [105, 57, 32, ":"],
1348
- [117, 65, 35, ":"],
1349
- [109, 58, 30, ":"],
1350
- [138, 78, 29, "-"],
1351
- [206, 137, 36, "+"],
1352
- [224, 165, 47, "+"],
1353
- [228, 170, 48, "*"],
1354
- [217, 155, 41, "+"],
1355
- [212, 152, 41, "+"],
1356
- [218, 161, 43, "+"],
1357
- [226, 167, 45, "*"],
1358
- [224, 164, 44, "+"],
1359
- [218, 157, 42, "++"],
1360
- [226, 167, 42, "*"],
1361
- [237, 183, 47, "*"],
1362
- [241, 193, 60, "*"],
1363
- [218, 165, 64, "+"],
1364
- [198, 135, 44, "+"],
1365
- [181, 131, 47, "="],
1366
- [116, 97, 62, "-"],
1367
- [52, 54, 52, "."],
1368
- [18, 20, 21, " "],
1369
- [18, 18, 18, " "],
1370
- [27, 27, 27, " "],
1371
- [29, 29, 29, "."],
1372
- [30, 30, 30, "............"]
1373
- ],
1374
- [
1375
- [30, 30, 30, "..............."],
1376
- [29, 29, 29, "."],
1377
- [27, 27, 27, " "],
1378
- [19, 19, 19, " "],
1379
- [17, 14, 12, " "],
1380
- [40, 25, 16, "."],
1381
- [73, 43, 24, "."],
1382
- [87, 48, 28, ":"],
1383
- [90, 47, 27, ":"],
1384
- [99, 53, 31, ":"],
1385
- [119, 64, 30, ":"],
1386
- [179, 109, 32, "="],
1387
- [216, 152, 39, "+"],
1388
- [221, 160, 44, "+"],
1389
- [219, 159, 46, "+"],
1390
- [222, 165, 48, "+"],
1391
- [221, 163, 42, "+"],
1392
- [222, 162, 41, "+"],
1393
- [227, 166, 45, "*"],
1394
- [224, 162, 44, "+"],
1395
- [222, 159, 42, "+"],
1396
- [221, 160, 42, "+"],
1397
- [212, 155, 38, "+"],
1398
- [190, 141, 30, "+"],
1399
- [161, 120, 24, "="],
1400
- [109, 85, 30, "-"],
1401
- [44, 37, 23, "."],
1402
- [15, 15, 14, " "],
1403
- [20, 20, 20, " "],
1404
- [27, 27, 27, " "],
1405
- [29, 29, 29, "."],
1406
- [30, 30, 30, "..............."]
1407
- ],
1408
- [
1409
- [30, 30, 30, "..................."],
1410
- [29, 29, 29, "."],
1411
- [28, 28, 28, " "],
1412
- [24, 24, 24, " "],
1413
- [18, 18, 18, " "],
1414
- [14, 13, 13, " "],
1415
- [19, 15, 11, " "],
1416
- [36, 26, 12, " "],
1417
- [55, 41, 15, "."],
1418
- [71, 53, 17, "."],
1419
- [83, 64, 20, ":"],
1420
- [90, 69, 22, ":"],
1421
- [88, 65, 19, ":"],
1422
- [81, 59, 17, ":"],
1423
- [69, 51, 16, "."],
1424
- [53, 40, 15, "."],
1425
- [36, 28, 13, "."],
1426
- [22, 19, 12, " "],
1427
- [16, 15, 13, " "],
1428
- [19, 19, 18, " "],
1429
- [25, 25, 25, " "],
1430
- [28, 28, 28, " "],
1431
- [29, 29, 29, "."],
1432
- [30, 30, 30, "..................."]
1433
- ],
1434
- [
1435
- [30, 30, 30, "............................................................"]
1436
- ],
1437
- [
1438
- [30, 30, 30, "............................................................"]
1439
- ]
1440
- ];
1441
- var getMascotLines = () => colorizedMascot.map((line) => {
1442
- let rendered = "";
1443
- for (const [r, g, b, text] of line) {
1444
- rendered += renderTruecolor(r, g, b, text);
1445
- }
1446
- return `${rendered}\x1B[0m`;
1447
- });
1448
-
1449
- // src/run-interactive-ink.ts
1450
- var C = {
1451
- reset: "\x1B[0m",
1452
- bold: "\x1B[1m",
1453
- dim: "\x1B[2m",
1454
- cyan: "\x1B[36m",
1455
- green: "\x1B[32m",
1456
- yellow: "\x1B[33m",
1457
- red: "\x1B[31m",
1458
- gray: "\x1B[90m",
1459
- magenta: "\x1B[35m"
1460
- };
1461
- var green = (s) => `${C.green}${s}${C.reset}`;
1462
- var yellow = (s) => `${C.yellow}${s}${C.reset}`;
1463
- var red = (s) => `${C.red}${s}${C.reset}`;
1464
- var gray = (s) => `${C.gray}${s}${C.reset}`;
1465
- var magenta = (s) => `${C.magenta}${s}${C.reset}`;
1466
- var FAUX_TOOL_LOG_PATTERN = /Tool Used:|Tool Result:|\blist_skills\b|\bcreate_skill\b|\bedit_skill\b/i;
1467
- var formatDuration = (ms) => ms < 1e3 ? `${ms}ms` : `${(ms / 1e3).toFixed(1)}s`;
1468
- var stringifyValue = (v) => {
1469
- try {
1470
- return JSON.stringify(v);
1471
- } catch {
1472
- return String(v);
1473
- }
1474
- };
1475
- var truncate = (v, max) => v.length <= max ? v : `${v.slice(0, Math.max(0, max - 3))}...`;
1476
- var compactPreview = (v, max = 120) => truncate(stringifyValue(v).replace(/\s+/g, " "), max);
1477
- var loadMetadata = async (workingDir) => {
1478
- let agentName = "agent";
1479
- let model = "unknown";
1480
- let provider = "unknown";
1481
- try {
1482
- const parsed = await parseAgentFile(workingDir);
1483
- agentName = parsed.frontmatter.name ?? agentName;
1484
- model = parsed.frontmatter.model?.name ?? model;
1485
- provider = parsed.frontmatter.model?.provider ?? provider;
1486
- } catch {
1487
- }
1488
- return {
1489
- agentName,
1490
- model,
1491
- provider,
1492
- workingDir,
1493
- environment: resolveHarnessEnvironment()
1494
- };
1495
- };
1496
- var ask = (rl, prompt) => new Promise((res) => {
1497
- rl.question(prompt, (answer) => res(answer));
1498
- });
1499
- var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
1500
- var streamTextAsTokens = async (text) => {
1501
- const tokens = text.match(/\S+\s*|\n/g) ?? [text];
1502
- for (const token of tokens) {
1503
- stdout.write(token);
1504
- const trimmed = token.trim();
1505
- const delay = trimmed.length === 0 ? 0 : Math.max(4, Math.min(18, Math.floor(trimmed.length / 2)));
1506
- await sleep(delay);
1507
- }
1508
- };
1509
- var OWNER_ID = "local-owner";
1510
- var computeTurn = (messages) => Math.max(1, Math.floor(messages.length / 2) + 1);
1511
- var formatDate = (value) => {
1512
- try {
1513
- return new Date(value).toLocaleString();
1514
- } catch {
1515
- return String(value);
1516
- }
1517
- };
1518
- var handleSlash = async (command, state, conversationStore) => {
1519
- const [rawCommand, ...args] = command.trim().split(/\s+/);
1520
- const norm = rawCommand.toLowerCase();
1521
- if (norm === "/help") {
1522
- console.log(
1523
- gray(
1524
- "commands> /help /clear /exit /tools /list /open <id> /new [title] /delete [id] /continue /reset [all]"
1525
- )
1526
- );
1527
- return { shouldExit: false };
1528
- }
1529
- if (norm === "/clear") {
1530
- process.stdout.write("\x1B[2J\x1B[H");
1531
- return { shouldExit: false };
1532
- }
1533
- if (norm === "/exit") {
1534
- return { shouldExit: true };
1535
- }
1536
- if (norm === "/list") {
1537
- const conversations = await conversationStore.list(OWNER_ID);
1538
- if (conversations.length === 0) {
1539
- console.log(gray("conversations> none"));
1540
- return { shouldExit: false };
1541
- }
1542
- console.log(gray("conversations>"));
1543
- for (const conversation of conversations) {
1544
- const activeMarker = state.activeConversationId === conversation.conversationId ? "*" : " ";
1545
- const maxTitleLen = 40;
1546
- const title = conversation.title.length > maxTitleLen ? conversation.title.slice(0, maxTitleLen - 1) + "\u2026" : conversation.title;
1547
- console.log(
1548
- gray(
1549
- `${activeMarker} ${conversation.conversationId} | ${title} | ${formatDate(conversation.updatedAt)}`
1550
- )
1551
- );
1552
- }
1553
- return { shouldExit: false };
1554
- }
1555
- if (norm === "/open") {
1556
- const conversationId = args[0];
1557
- if (!conversationId) {
1558
- console.log(yellow("usage> /open <conversationId>"));
1559
- return { shouldExit: false };
1560
- }
1561
- const conversation = await conversationStore.get(conversationId);
1562
- if (!conversation) {
1563
- console.log(yellow(`conversations> not found: ${conversationId}`));
1564
- return { shouldExit: false };
1565
- }
1566
- state.activeConversationId = conversation.conversationId;
1567
- state.messages = [...conversation.messages];
1568
- state.turn = computeTurn(state.messages);
1569
- console.log(gray(`conversations> opened ${conversation.conversationId}`));
1570
- return { shouldExit: false };
1571
- }
1572
- if (norm === "/new") {
1573
- const title = args.join(" ").trim();
1574
- const conversation = await conversationStore.create(OWNER_ID, title || void 0);
1575
- state.activeConversationId = conversation.conversationId;
1576
- state.messages = [];
1577
- state.turn = 1;
1578
- console.log(gray(`conversations> new ${conversation.conversationId}`));
1579
- return { shouldExit: false };
1580
- }
1581
- if (norm === "/delete") {
1582
- const targetConversationId = args[0] ?? state.activeConversationId ?? "";
1583
- if (!targetConversationId) {
1584
- console.log(yellow("usage> /delete <conversationId>"));
1585
- return { shouldExit: false };
1586
- }
1587
- const removed = await conversationStore.delete(targetConversationId);
1588
- if (!removed) {
1589
- console.log(yellow(`conversations> not found: ${targetConversationId}`));
1590
- return { shouldExit: false };
1591
- }
1592
- if (state.activeConversationId === targetConversationId) {
1593
- state.activeConversationId = null;
1594
- state.messages = [];
1595
- state.turn = 1;
1596
- }
1597
- console.log(gray(`conversations> deleted ${targetConversationId}`));
1598
- return { shouldExit: false };
1599
- }
1600
- if (norm === "/continue") {
1601
- const conversations = await conversationStore.list(OWNER_ID);
1602
- const latest = conversations[0];
1603
- if (!latest) {
1604
- console.log(yellow("conversations> no conversations to continue"));
1605
- return { shouldExit: false };
1606
- }
1607
- state.activeConversationId = latest.conversationId;
1608
- state.messages = [...latest.messages];
1609
- state.turn = computeTurn(state.messages);
1610
- console.log(gray(`conversations> continued ${latest.conversationId}`));
1611
- return { shouldExit: false };
1612
- }
1613
- if (norm === "/reset") {
1614
- if (args[0]?.toLowerCase() === "all") {
1615
- const conversations = await conversationStore.list(OWNER_ID);
1616
- for (const conversation2 of conversations) {
1617
- await conversationStore.delete(conversation2.conversationId);
1618
- }
1619
- state.activeConversationId = null;
1620
- state.messages = [];
1621
- state.turn = 1;
1622
- console.log(gray("conversations> reset all"));
1623
- return { shouldExit: false };
1624
- }
1625
- if (!state.activeConversationId) {
1626
- state.messages = [];
1627
- state.turn = 1;
1628
- console.log(gray("conversations> current session reset"));
1629
- return { shouldExit: false };
1630
- }
1631
- const conversation = await conversationStore.get(state.activeConversationId);
1632
- if (!conversation) {
1633
- state.activeConversationId = null;
1634
- state.messages = [];
1635
- state.turn = 1;
1636
- console.log(yellow("conversations> active conversation no longer exists"));
1637
- return { shouldExit: false };
1638
- }
1639
- await conversationStore.update({
1640
- ...conversation,
1641
- messages: []
1642
- });
1643
- state.messages = [];
1644
- state.turn = 1;
1645
- console.log(gray(`conversations> reset ${conversation.conversationId}`));
1646
- return { shouldExit: false };
1647
- }
1648
- console.log(yellow(`Unknown command: ${command}`));
1649
- return { shouldExit: false };
1650
- };
1651
- var runInteractiveInk = async ({
1652
- harness,
1653
- params,
1654
- workingDir,
1655
- config,
1656
- conversationStore,
1657
- onSetApprovalCallback
1658
- }) => {
1659
- const metadata = await loadMetadata(workingDir);
1660
- const rl = readline.createInterface({
1661
- input: process.stdin,
1662
- output: process.stdout,
1663
- terminal: true
1664
- });
1665
- if (onSetApprovalCallback) {
1666
- onSetApprovalCallback((req) => {
1667
- process.stdout.write("\n");
1668
- const preview = compactPreview(req.input, 100);
1669
- rl.question(
1670
- `${C.yellow}${C.bold}Tool "${req.tool}" requires approval${C.reset}
1671
- ${C.gray}input: ${preview}${C.reset}
1672
- ${C.yellow}approve? (y/n): ${C.reset}`,
1673
- (answer) => {
1674
- const approved = answer.trim().toLowerCase() === "y";
1675
- console.log(
1676
- approved ? green(` approved ${req.tool}`) : magenta(` denied ${req.tool}`)
1677
- );
1678
- req.resolve(approved);
1679
- }
1680
- );
1681
- });
1682
- }
1683
- console.log("");
1684
- for (const line of getMascotLines()) {
1685
- console.log(line);
1686
- }
1687
- console.log(`${C.bold}${C.cyan} poncho${C.reset}`);
1688
- console.log("");
1689
- console.log(
1690
- gray(
1691
- ` ${metadata.agentName} \xB7 ${metadata.provider}/${metadata.model} \xB7 ${metadata.environment}`
1692
- )
1693
- );
1694
- console.log(gray(' Type "exit" to quit, "/help" for commands'));
1695
- console.log(gray(" Press Ctrl+C during a run to stop streaming output."));
1696
- console.log(
1697
- gray(" Conversation controls: /list /open <id> /new [title] /delete [id] /continue /reset [all]\n")
1698
- );
1699
- const intro = await consumeFirstRunIntro(workingDir, {
1700
- agentName: metadata.agentName,
1701
- provider: metadata.provider,
1702
- model: metadata.model,
1703
- config
1704
- });
1705
- if (intro) {
1706
- console.log(green("assistant>"));
1707
- await streamTextAsTokens(intro);
1708
- stdout.write("\n\n");
1709
- }
1710
- let messages = intro ? [{ role: "assistant", content: intro }] : [];
1711
- let turn = 1;
1712
- let activeConversationId = null;
1713
- let showToolPayloads = false;
1714
- let activeRunAbortController = null;
1715
- rl.on("SIGINT", () => {
1716
- if (activeRunAbortController && !activeRunAbortController.signal.aborted) {
1717
- activeRunAbortController.abort();
1718
- process.stdout.write("\n");
1719
- console.log(gray("stop> cancelling current run..."));
1720
- return;
1721
- }
1722
- rl.close();
1723
- });
1724
- const prompt = `${C.cyan}you> ${C.reset}`;
1725
- while (true) {
1726
- let task;
1727
- try {
1728
- task = await ask(rl, prompt);
1729
- } catch {
1730
- break;
1731
- }
1732
- const trimmed = task.trim();
1733
- if (!trimmed) continue;
1734
- if (trimmed.toLowerCase() === "exit") break;
1735
- if (trimmed.startsWith("/")) {
1736
- if (trimmed.toLowerCase() === "/exit") break;
1737
- if (trimmed.toLowerCase() === "/tools") {
1738
- showToolPayloads = !showToolPayloads;
1739
- console.log(gray(`tool payloads: ${showToolPayloads ? "on" : "off"}`));
1740
- continue;
1741
- }
1742
- const interactiveState = {
1743
- messages,
1744
- turn,
1745
- activeConversationId
1746
- };
1747
- const slashResult = await handleSlash(
1748
- trimmed,
1749
- interactiveState,
1750
- conversationStore
1751
- );
1752
- if (slashResult.shouldExit) {
1753
- break;
1754
- }
1755
- messages = interactiveState.messages;
1756
- turn = interactiveState.turn;
1757
- activeConversationId = interactiveState.activeConversationId;
1758
- continue;
1759
- }
1760
- console.log(gray(`
1761
- --- turn ${turn} ---`));
1762
- process.stdout.write(gray("thinking..."));
1763
- let thinkingCleared = false;
1764
- const clearThinking = () => {
1765
- if (thinkingCleared) return;
1766
- thinkingCleared = true;
1767
- readline.clearLine(process.stdout, 0);
1768
- readline.cursorTo(process.stdout, 0);
1769
- };
1770
- let responseText = "";
1771
- let streamedText = "";
1772
- let committedText = false;
1773
- let sawChunk = false;
1774
- let toolEvents = 0;
1775
- const toolTimeline = [];
1776
- const sections = [];
1777
- let currentText = "";
1778
- let currentTools = [];
1779
- let runFailed = false;
1780
- let runCancelled = false;
1781
- let usage;
1782
- let latestRunId = "";
1783
- const startedAt = Date.now();
1784
- activeRunAbortController = new AbortController();
1785
- try {
1786
- for await (const event of harness.run({
1787
- task: trimmed,
1788
- parameters: params,
1789
- messages,
1790
- abortSignal: activeRunAbortController.signal
1791
- })) {
1792
- if (event.type === "run:started") {
1793
- latestRunId = event.runId;
1794
- }
1795
- if (event.type === "model:chunk") {
1796
- sawChunk = true;
1797
- if (currentTools.length > 0) {
1798
- sections.push({ type: "tools", content: currentTools });
1799
- currentTools = [];
1800
- }
1801
- responseText += event.content;
1802
- streamedText += event.content;
1803
- currentText += event.content;
1804
- if (!thinkingCleared) {
1805
- clearThinking();
1806
- process.stdout.write(`${C.green}assistant> ${C.reset}`);
1807
- }
1808
- process.stdout.write(event.content);
1809
- } else if (event.type === "tool:started" || event.type === "tool:completed" || event.type === "tool:error" || event.type === "tool:approval:required" || event.type === "tool:approval:granted" || event.type === "tool:approval:denied") {
1810
- if (streamedText.length > 0) {
1811
- committedText = true;
1812
- streamedText = "";
1813
- process.stdout.write("\n");
1814
- }
1815
- clearThinking();
1816
- if (event.type === "tool:started") {
1817
- if (currentText.length > 0) {
1818
- sections.push({ type: "text", content: currentText });
1819
- currentText = "";
1820
- }
1821
- const preview = showToolPayloads ? compactPreview(event.input, 400) : compactPreview(event.input, 100);
1822
- console.log(yellow(`tools> start ${event.tool} input=${preview}`));
1823
- const toolText = `- start \`${event.tool}\``;
1824
- toolTimeline.push(toolText);
1825
- currentTools.push(toolText);
1826
- toolEvents += 1;
1827
- } else if (event.type === "tool:completed") {
1828
- const preview = showToolPayloads ? compactPreview(event.output, 400) : compactPreview(event.output, 100);
1829
- console.log(
1830
- yellow(
1831
- `tools> done ${event.tool} in ${formatDuration(event.duration)}`
1832
- )
1833
- );
1834
- if (showToolPayloads) {
1835
- console.log(yellow(`tools> output ${preview}`));
1836
- }
1837
- const toolText = `- done \`${event.tool}\` in ${formatDuration(event.duration)}`;
1838
- toolTimeline.push(toolText);
1839
- currentTools.push(toolText);
1840
- } else if (event.type === "tool:error") {
1841
- console.log(
1842
- red(`tools> error ${event.tool}: ${event.error}`)
1843
- );
1844
- const toolText = `- error \`${event.tool}\`: ${event.error}`;
1845
- toolTimeline.push(toolText);
1846
- currentTools.push(toolText);
1847
- } else if (event.type === "tool:approval:required") {
1848
- console.log(
1849
- magenta(`tools> approval required for ${event.tool}`)
1850
- );
1851
- const toolText = `- approval required \`${event.tool}\``;
1852
- toolTimeline.push(toolText);
1853
- currentTools.push(toolText);
1854
- } else if (event.type === "tool:approval:granted") {
1855
- console.log(
1856
- gray(`tools> approval granted (${event.approvalId})`)
1857
- );
1858
- const toolText = `- approval granted (${event.approvalId})`;
1859
- toolTimeline.push(toolText);
1860
- currentTools.push(toolText);
1861
- } else if (event.type === "tool:approval:denied") {
1862
- console.log(
1863
- magenta(`tools> approval denied (${event.approvalId})`)
1864
- );
1865
- const toolText = `- approval denied (${event.approvalId})`;
1866
- toolTimeline.push(toolText);
1867
- currentTools.push(toolText);
1868
- }
1869
- } else if (event.type === "run:error") {
1870
- clearThinking();
1871
- runFailed = true;
1872
- console.log(red(`error> ${event.error.message}`));
1873
- } else if (event.type === "run:cancelled") {
1874
- clearThinking();
1875
- runCancelled = true;
1876
- } else if (event.type === "model:response") {
1877
- usage = event.usage;
1878
- } else if (event.type === "run:completed" && !sawChunk) {
1879
- clearThinking();
1880
- responseText = event.result.response ?? "";
1881
- if (responseText.length > 0) {
1882
- process.stdout.write(
1883
- `${C.green}assistant> ${C.reset}${responseText}
1884
- `
1885
- );
1886
- }
1887
- }
1888
- }
1889
- } catch (error) {
1890
- clearThinking();
1891
- if (activeRunAbortController.signal.aborted) {
1892
- runCancelled = true;
1893
- } else {
1894
- runFailed = true;
1895
- console.log(
1896
- red(
1897
- `error> ${error instanceof Error ? error.message : "Unknown error"}`
1898
- )
1899
- );
1900
- }
1901
- } finally {
1902
- activeRunAbortController = null;
1903
- }
1904
- if (sawChunk && streamedText.length > 0) {
1905
- process.stdout.write("\n");
1906
- } else if (!sawChunk && !runFailed && !runCancelled && responseText.length === 0) {
1907
- clearThinking();
1908
- console.log(green("assistant> (no response)"));
1909
- }
1910
- const fullResponse = responseText || streamedText;
1911
- if (!runFailed && toolEvents === 0 && FAUX_TOOL_LOG_PATTERN.test(fullResponse)) {
1912
- console.log(
1913
- magenta(
1914
- "warning> assistant described tool execution but no real tool events occurred."
1915
- )
1916
- );
1917
- }
1918
- const durationMs = Date.now() - startedAt;
1919
- console.log(
1920
- gray(`meta> ${formatDuration(durationMs)} | tools: ${toolEvents}
1921
- `)
1922
- );
1923
- if (!activeConversationId) {
1924
- const created = await conversationStore.create(
1925
- OWNER_ID,
1926
- inferConversationTitle(trimmed)
1927
- );
1928
- activeConversationId = created.conversationId;
1929
- }
1930
- if (currentTools.length > 0) {
1931
- sections.push({ type: "tools", content: currentTools });
1932
- }
1933
- if (currentText.length > 0) {
1934
- sections.push({ type: "text", content: currentText });
1935
- }
1936
- messages.push({ role: "user", content: trimmed });
1937
- const hasAssistantContent = responseText.length > 0 || toolTimeline.length > 0 || sections.length > 0;
1938
- if (hasAssistantContent) {
1939
- messages.push({
1940
- role: "assistant",
1941
- content: responseText,
1942
- metadata: toolTimeline.length > 0 || sections.length > 0 ? {
1943
- toolActivity: toolTimeline,
1944
- sections: sections.length > 0 ? sections : void 0
1945
- } : void 0
1946
- });
1947
- }
1948
- turn = computeTurn(messages);
1949
- const conversation = await conversationStore.get(activeConversationId);
1950
- if (conversation) {
1951
- const maybeTitle = conversation.messages.length === 0 && (conversation.title === "New conversation" || conversation.title.trim().length === 0) ? inferConversationTitle(trimmed) : conversation.title;
1952
- await conversationStore.update({
1953
- ...conversation,
1954
- title: maybeTitle,
1955
- messages: [...messages],
1956
- runtimeRunId: latestRunId || conversation.runtimeRunId
1957
- });
1958
- }
1959
- }
1960
- rl.close();
1961
- };
1962
- export {
1963
- runInteractiveInk
1964
- };