@oh-my-pi/pi-coding-agent 15.5.2 → 15.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/types/config/settings-schema.d.ts +27 -0
  3. package/dist/types/config.d.ts +31 -5
  4. package/dist/types/edit/file-snapshot-store.d.ts +18 -0
  5. package/dist/types/edit/hashline/diff.d.ts +30 -0
  6. package/dist/types/edit/hashline/execute.d.ts +29 -0
  7. package/dist/types/edit/hashline/filesystem.d.ts +57 -0
  8. package/dist/types/edit/hashline/index.d.ts +4 -0
  9. package/dist/types/edit/hashline/params.d.ts +12 -0
  10. package/dist/types/edit/index.d.ts +4 -3
  11. package/dist/types/edit/normalize.d.ts +4 -16
  12. package/dist/types/index.d.ts +0 -1
  13. package/dist/types/tools/bash.d.ts +1 -0
  14. package/dist/types/tools/index.d.ts +6 -5
  15. package/dist/types/tools/path-utils.d.ts +18 -0
  16. package/dist/types/utils/changelog.d.ts +8 -3
  17. package/package.json +8 -15
  18. package/src/config/settings-schema.ts +32 -0
  19. package/src/config.ts +42 -15
  20. package/src/edit/file-snapshot-store.ts +22 -0
  21. package/src/edit/hashline/diff.ts +88 -0
  22. package/src/edit/hashline/execute.ts +188 -0
  23. package/src/edit/hashline/filesystem.ts +129 -0
  24. package/src/edit/hashline/index.ts +4 -0
  25. package/src/edit/hashline/params.ts +11 -0
  26. package/src/edit/index.ts +7 -15
  27. package/src/edit/normalize.ts +11 -41
  28. package/src/edit/renderer.ts +1 -1
  29. package/src/edit/streaming.ts +8 -9
  30. package/src/index.ts +0 -1
  31. package/src/internal-urls/docs-index.generated.ts +1 -1
  32. package/src/sdk.ts +8 -1
  33. package/src/tools/ast-edit.ts +1 -1
  34. package/src/tools/ast-grep.ts +3 -3
  35. package/src/tools/bash.ts +74 -10
  36. package/src/tools/index.ts +6 -5
  37. package/src/tools/path-utils.ts +81 -0
  38. package/src/tools/read.ts +14 -72
  39. package/src/tools/search.ts +136 -17
  40. package/src/tools/write.ts +3 -3
  41. package/src/utils/changelog.ts +11 -3
  42. package/src/utils/file-mentions.ts +1 -1
  43. package/dist/types/edit/file-read-cache.d.ts +0 -36
  44. package/dist/types/hashline/anchors.d.ts +0 -26
  45. package/dist/types/hashline/apply.d.ts +0 -14
  46. package/dist/types/hashline/constants.d.ts +0 -40
  47. package/dist/types/hashline/diff-preview.d.ts +0 -2
  48. package/dist/types/hashline/diff.d.ts +0 -16
  49. package/dist/types/hashline/execute.d.ts +0 -4
  50. package/dist/types/hashline/executor.d.ts +0 -56
  51. package/dist/types/hashline/hash.d.ts +0 -76
  52. package/dist/types/hashline/index.d.ts +0 -14
  53. package/dist/types/hashline/input.d.ts +0 -4
  54. package/dist/types/hashline/prefixes.d.ts +0 -7
  55. package/dist/types/hashline/recovery.d.ts +0 -21
  56. package/dist/types/hashline/stream.d.ts +0 -2
  57. package/dist/types/hashline/tokenizer.d.ts +0 -94
  58. package/dist/types/hashline/types.d.ts +0 -75
  59. package/src/edit/file-read-cache.ts +0 -138
  60. package/src/hashline/anchors.ts +0 -104
  61. package/src/hashline/apply.ts +0 -790
  62. package/src/hashline/bigrams.json +0 -649
  63. package/src/hashline/constants.ts +0 -51
  64. package/src/hashline/diff-preview.ts +0 -42
  65. package/src/hashline/diff.ts +0 -82
  66. package/src/hashline/execute.ts +0 -334
  67. package/src/hashline/executor.ts +0 -334
  68. package/src/hashline/grammar.lark +0 -23
  69. package/src/hashline/hash.ts +0 -131
  70. package/src/hashline/index.ts +0 -14
  71. package/src/hashline/input.ts +0 -137
  72. package/src/hashline/prefixes.ts +0 -111
  73. package/src/hashline/recovery.ts +0 -139
  74. package/src/hashline/stream.ts +0 -123
  75. package/src/hashline/tokenizer.ts +0 -473
  76. package/src/hashline/types.ts +0 -66
  77. package/src/prompts/tools/hashline.md +0 -63
@@ -1,649 +0,0 @@
1
- [
2
- "aa",
3
- "ab",
4
- "ac",
5
- "ad",
6
- "ae",
7
- "af",
8
- "ag",
9
- "ah",
10
- "ai",
11
- "aj",
12
- "ak",
13
- "al",
14
- "am",
15
- "an",
16
- "ao",
17
- "ap",
18
- "aq",
19
- "ar",
20
- "as",
21
- "at",
22
- "au",
23
- "av",
24
- "aw",
25
- "ax",
26
- "ay",
27
- "az",
28
- "ba",
29
- "bb",
30
- "bc",
31
- "bd",
32
- "be",
33
- "bf",
34
- "bg",
35
- "bh",
36
- "bi",
37
- "bj",
38
- "bk",
39
- "bl",
40
- "bm",
41
- "bn",
42
- "bo",
43
- "bp",
44
- "br",
45
- "bs",
46
- "bt",
47
- "bu",
48
- "bv",
49
- "bw",
50
- "bx",
51
- "by",
52
- "bz",
53
- "ca",
54
- "cb",
55
- "cc",
56
- "cd",
57
- "ce",
58
- "cf",
59
- "cg",
60
- "ch",
61
- "ci",
62
- "cj",
63
- "ck",
64
- "cl",
65
- "cm",
66
- "cn",
67
- "co",
68
- "cp",
69
- "cq",
70
- "cr",
71
- "cs",
72
- "ct",
73
- "cu",
74
- "cv",
75
- "cw",
76
- "cx",
77
- "cy",
78
- "cz",
79
- "da",
80
- "db",
81
- "dc",
82
- "dd",
83
- "de",
84
- "df",
85
- "dg",
86
- "dh",
87
- "di",
88
- "dj",
89
- "dk",
90
- "dl",
91
- "dm",
92
- "dn",
93
- "do",
94
- "dp",
95
- "dq",
96
- "dr",
97
- "ds",
98
- "dt",
99
- "du",
100
- "dv",
101
- "dw",
102
- "dx",
103
- "dy",
104
- "dz",
105
- "ea",
106
- "eb",
107
- "ec",
108
- "ed",
109
- "ee",
110
- "ef",
111
- "eg",
112
- "eh",
113
- "ei",
114
- "ej",
115
- "ek",
116
- "el",
117
- "em",
118
- "en",
119
- "eo",
120
- "ep",
121
- "eq",
122
- "er",
123
- "es",
124
- "et",
125
- "eu",
126
- "ev",
127
- "ew",
128
- "ex",
129
- "ey",
130
- "ez",
131
- "fa",
132
- "fb",
133
- "fc",
134
- "fd",
135
- "fe",
136
- "ff",
137
- "fg",
138
- "fh",
139
- "fi",
140
- "fj",
141
- "fk",
142
- "fl",
143
- "fm",
144
- "fn",
145
- "fo",
146
- "fp",
147
- "fq",
148
- "fr",
149
- "fs",
150
- "ft",
151
- "fu",
152
- "fv",
153
- "fw",
154
- "fx",
155
- "fy",
156
- "fz",
157
- "ga",
158
- "gb",
159
- "gc",
160
- "gd",
161
- "ge",
162
- "gf",
163
- "gg",
164
- "gh",
165
- "gi",
166
- "gj",
167
- "gl",
168
- "gm",
169
- "gn",
170
- "go",
171
- "gp",
172
- "gr",
173
- "gs",
174
- "gt",
175
- "gu",
176
- "gv",
177
- "gw",
178
- "gx",
179
- "gy",
180
- "gz",
181
- "ha",
182
- "hb",
183
- "hc",
184
- "hd",
185
- "he",
186
- "hf",
187
- "hg",
188
- "hh",
189
- "hi",
190
- "hj",
191
- "hk",
192
- "hl",
193
- "hm",
194
- "hn",
195
- "ho",
196
- "hp",
197
- "hq",
198
- "hr",
199
- "hs",
200
- "ht",
201
- "hu",
202
- "hv",
203
- "hw",
204
- "hx",
205
- "hy",
206
- "hz",
207
- "ia",
208
- "ib",
209
- "ic",
210
- "id",
211
- "ie",
212
- "if",
213
- "ig",
214
- "ih",
215
- "ii",
216
- "ij",
217
- "ik",
218
- "il",
219
- "im",
220
- "in",
221
- "io",
222
- "ip",
223
- "iq",
224
- "ir",
225
- "is",
226
- "it",
227
- "iu",
228
- "iv",
229
- "iw",
230
- "ix",
231
- "iy",
232
- "iz",
233
- "ja",
234
- "jb",
235
- "jc",
236
- "jd",
237
- "je",
238
- "jf",
239
- "jg",
240
- "jh",
241
- "ji",
242
- "jj",
243
- "jk",
244
- "jl",
245
- "jm",
246
- "jn",
247
- "jo",
248
- "jp",
249
- "jq",
250
- "jr",
251
- "js",
252
- "jt",
253
- "ju",
254
- "jw",
255
- "jx",
256
- "jy",
257
- "ka",
258
- "kb",
259
- "kc",
260
- "kd",
261
- "ke",
262
- "kf",
263
- "kg",
264
- "kh",
265
- "ki",
266
- "kj",
267
- "kk",
268
- "kl",
269
- "km",
270
- "kn",
271
- "ko",
272
- "kp",
273
- "kr",
274
- "ks",
275
- "kt",
276
- "ku",
277
- "kv",
278
- "kw",
279
- "kx",
280
- "ky",
281
- "la",
282
- "lb",
283
- "lc",
284
- "ld",
285
- "le",
286
- "lf",
287
- "lg",
288
- "lh",
289
- "li",
290
- "lj",
291
- "lk",
292
- "ll",
293
- "lm",
294
- "ln",
295
- "lo",
296
- "lp",
297
- "lr",
298
- "ls",
299
- "lt",
300
- "lu",
301
- "lv",
302
- "lw",
303
- "lx",
304
- "ly",
305
- "lz",
306
- "ma",
307
- "mb",
308
- "mc",
309
- "md",
310
- "me",
311
- "mf",
312
- "mg",
313
- "mh",
314
- "mi",
315
- "mj",
316
- "mk",
317
- "ml",
318
- "mm",
319
- "mn",
320
- "mo",
321
- "mp",
322
- "mq",
323
- "mr",
324
- "ms",
325
- "mt",
326
- "mu",
327
- "mv",
328
- "mw",
329
- "mx",
330
- "my",
331
- "mz",
332
- "na",
333
- "nb",
334
- "nc",
335
- "nd",
336
- "ne",
337
- "nf",
338
- "ng",
339
- "nh",
340
- "ni",
341
- "nj",
342
- "nk",
343
- "nl",
344
- "nm",
345
- "nn",
346
- "no",
347
- "np",
348
- "nr",
349
- "ns",
350
- "nt",
351
- "nu",
352
- "nv",
353
- "nw",
354
- "nx",
355
- "ny",
356
- "nz",
357
- "oa",
358
- "ob",
359
- "oc",
360
- "od",
361
- "oe",
362
- "of",
363
- "og",
364
- "oh",
365
- "oi",
366
- "oj",
367
- "ok",
368
- "ol",
369
- "om",
370
- "on",
371
- "oo",
372
- "op",
373
- "oq",
374
- "or",
375
- "os",
376
- "ot",
377
- "ou",
378
- "ov",
379
- "ow",
380
- "ox",
381
- "oy",
382
- "oz",
383
- "pa",
384
- "pb",
385
- "pc",
386
- "pd",
387
- "pe",
388
- "pf",
389
- "pg",
390
- "ph",
391
- "pi",
392
- "pj",
393
- "pk",
394
- "pl",
395
- "pm",
396
- "pn",
397
- "po",
398
- "pp",
399
- "pq",
400
- "pr",
401
- "ps",
402
- "pt",
403
- "pu",
404
- "pv",
405
- "pw",
406
- "px",
407
- "py",
408
- "pz",
409
- "qa",
410
- "qb",
411
- "qc",
412
- "qd",
413
- "qe",
414
- "qh",
415
- "qi",
416
- "ql",
417
- "qm",
418
- "qn",
419
- "qo",
420
- "qp",
421
- "qq",
422
- "qr",
423
- "qs",
424
- "qt",
425
- "qu",
426
- "qw",
427
- "qx",
428
- "qy",
429
- "ra",
430
- "rb",
431
- "rc",
432
- "rd",
433
- "re",
434
- "rf",
435
- "rg",
436
- "rh",
437
- "ri",
438
- "rk",
439
- "rl",
440
- "rm",
441
- "rn",
442
- "ro",
443
- "rp",
444
- "rq",
445
- "rr",
446
- "rs",
447
- "rt",
448
- "ru",
449
- "rv",
450
- "rw",
451
- "rx",
452
- "ry",
453
- "rz",
454
- "sa",
455
- "sb",
456
- "sc",
457
- "sd",
458
- "se",
459
- "sf",
460
- "sg",
461
- "sh",
462
- "si",
463
- "sj",
464
- "sk",
465
- "sl",
466
- "sm",
467
- "sn",
468
- "so",
469
- "sp",
470
- "sq",
471
- "sr",
472
- "ss",
473
- "st",
474
- "su",
475
- "sv",
476
- "sw",
477
- "sx",
478
- "sy",
479
- "sz",
480
- "ta",
481
- "tb",
482
- "tc",
483
- "td",
484
- "te",
485
- "tf",
486
- "tg",
487
- "th",
488
- "ti",
489
- "tj",
490
- "tk",
491
- "tl",
492
- "tm",
493
- "tn",
494
- "to",
495
- "tp",
496
- "tr",
497
- "ts",
498
- "tt",
499
- "tu",
500
- "tv",
501
- "tw",
502
- "tx",
503
- "ty",
504
- "tz",
505
- "ua",
506
- "ub",
507
- "uc",
508
- "ud",
509
- "ue",
510
- "uf",
511
- "ug",
512
- "uh",
513
- "ui",
514
- "uj",
515
- "uk",
516
- "ul",
517
- "um",
518
- "un",
519
- "uo",
520
- "up",
521
- "uq",
522
- "ur",
523
- "us",
524
- "ut",
525
- "uu",
526
- "uv",
527
- "uw",
528
- "ux",
529
- "uy",
530
- "uz",
531
- "va",
532
- "vb",
533
- "vc",
534
- "vd",
535
- "ve",
536
- "vf",
537
- "vg",
538
- "vh",
539
- "vi",
540
- "vj",
541
- "vk",
542
- "vl",
543
- "vm",
544
- "vn",
545
- "vo",
546
- "vp",
547
- "vq",
548
- "vr",
549
- "vs",
550
- "vt",
551
- "vu",
552
- "vv",
553
- "vw",
554
- "vx",
555
- "vy",
556
- "vz",
557
- "wa",
558
- "wb",
559
- "wc",
560
- "wd",
561
- "we",
562
- "wf",
563
- "wg",
564
- "wh",
565
- "wi",
566
- "wj",
567
- "wk",
568
- "wl",
569
- "wm",
570
- "wn",
571
- "wo",
572
- "wp",
573
- "wr",
574
- "ws",
575
- "wt",
576
- "wu",
577
- "wv",
578
- "ww",
579
- "wx",
580
- "wy",
581
- "xa",
582
- "xb",
583
- "xc",
584
- "xd",
585
- "xe",
586
- "xf",
587
- "xh",
588
- "xi",
589
- "xl",
590
- "xm",
591
- "xn",
592
- "xo",
593
- "xp",
594
- "xr",
595
- "xs",
596
- "xt",
597
- "xu",
598
- "xx",
599
- "xy",
600
- "xz",
601
- "ya",
602
- "yb",
603
- "yc",
604
- "yd",
605
- "ye",
606
- "yf",
607
- "yg",
608
- "yh",
609
- "yi",
610
- "yj",
611
- "yk",
612
- "yl",
613
- "ym",
614
- "yn",
615
- "yo",
616
- "yp",
617
- "yr",
618
- "ys",
619
- "yt",
620
- "yu",
621
- "yv",
622
- "yw",
623
- "yx",
624
- "yy",
625
- "yz",
626
- "za",
627
- "zb",
628
- "zc",
629
- "zd",
630
- "ze",
631
- "zf",
632
- "zg",
633
- "zh",
634
- "zi",
635
- "zk",
636
- "zl",
637
- "zm",
638
- "zn",
639
- "zo",
640
- "zp",
641
- "zr",
642
- "zs",
643
- "zt",
644
- "zu",
645
- "zw",
646
- "zx",
647
- "zy",
648
- "zz"
649
- ]
@@ -1,51 +0,0 @@
1
- /** Lines of context shown either side of a hash mismatch. */
2
- export const MISMATCH_CONTEXT = 2;
3
-
4
- /** Optional patch envelope start marker; silently consumed when present. */
5
- export const BEGIN_PATCH_MARKER = "*** Begin Patch";
6
-
7
- /** Optional patch envelope end marker; terminates parsing when encountered. */
8
- export const END_PATCH_MARKER = "*** End Patch";
9
-
10
- /**
11
- * Recovery sentinel emitted by the agent loop when a contaminated
12
- * `to=functions.edit` stream is truncated mid-call (see
13
- * `docs/ERRATA-GPT5-HARMONY.md`). Behaves like `END_PATCH_MARKER` for
14
- * parsing — terminates the line loop — and additionally surfaces a
15
- * warning in the tool result so the model knows to re-issue any
16
- * remaining edits.
17
- */
18
- export const ABORT_MARKER = "*** Abort";
19
-
20
- /** Warning text appended to the tool result when ABORT_MARKER terminates parsing. */
21
- export const ABORT_WARNING =
22
- "Tool stream truncated mid-call due to detected output corruption. Applied ops above are valid. Re-issue any remaining edits.";
23
-
24
- /**
25
- * Warning text appended when two consecutive `A-B:` ops on the exact same
26
- * range get coalesced (model painted a before/after pair). The second op
27
- * wins; the first op's payload is silently discarded.
28
- */
29
- export const REPLACE_PAIR_COALESCED_WARNING =
30
- "Detected an identical-range before/after replace pair; kept only the second block's payload. Issue ONE op per range — the payload is the final desired content, never both old and new.";
31
-
32
- /**
33
- * Warning text appended when un-prefixed continuation lines are accepted as
34
- * implicit payload (lenient legacy behavior). The model authored a multi-line
35
- * replace without `+` prefixes; the parser accepted it because the lines did
36
- * not classify as ops/headers/payloads, but the canonical syntax requires `+`
37
- * on every continuation line after the op.
38
- */
39
- export const IMPLICIT_CONTINUATION_WARNING =
40
- "Accepted continuation line(s) without the `+` prefix as implicit payload. Canonical syntax is `A-B:` followed by `+` on every continuation row; without `+`, lines that look like ops will be parsed as new ops instead of payload. Prefer the explicit form.";
41
-
42
- /**
43
- * Warning text appended when an inner `LINE:TEXT` (or sub-range `A-B:TEXT`)
44
- * op arrives while an outer `A-B:` replace is still pending and the inner
45
- * anchor falls inside the outer range. The model used the read-output
46
- * `LINE:TEXT` format as if it were a payload-continuation line; we strip the
47
- * `LINE:` prefix and append the body to the pending payload, but warn so the
48
- * canonical `+`-continuation form remains preferred.
49
- */
50
- export const PAYLOAD_LINE_PREFIX_DEMOTED_WARNING =
51
- "Detected one or more `LINE:TEXT` lines whose anchors fell inside a pending replace range; treated them as payload-continuation lines and stripped the `LINE:` prefix. Inside a multi-line `A-B:` block, payload lines after the first should be prefixed with `+` — never reuse the read-output gutter format.";
@@ -1,42 +0,0 @@
1
- import type { CompactHashlineDiffOptions, CompactHashlineDiffPreview } from "./types";
2
-
3
- export function buildCompactHashlineDiffPreview(
4
- diff: string,
5
- _options: CompactHashlineDiffOptions = {},
6
- ): CompactHashlineDiffPreview {
7
- const lines = diff.length === 0 ? [] : diff.split("\n");
8
- let addedLines = 0;
9
- let removedLines = 0;
10
-
11
- // `generateDiffString` numbers `+` lines with the post-edit line number,
12
- // `-` lines with the pre-edit line number, and context lines with the
13
- // pre-edit line number. To emit fresh line numbers usable for follow-up edits,
14
- // we convert context-line numbers to post-edit positions by tracking the
15
- // running offset (added so far - removed so far) as we walk the diff.
16
- const formatted = lines.map(line => {
17
- const kind = line[0];
18
- if (kind !== "+" && kind !== "-" && kind !== " ") return line;
19
-
20
- const body = line.slice(1);
21
- const sep = body.indexOf("|");
22
- if (sep === -1) return line;
23
-
24
- const lineNumber = Number.parseInt(body.slice(0, sep), 10);
25
- const content = body.slice(sep + 1);
26
-
27
- switch (kind) {
28
- case "+":
29
- addedLines++;
30
- return `+${lineNumber}:${content}`;
31
- case "-":
32
- removedLines++;
33
- return `-${lineNumber}:${content}`;
34
- default: {
35
- const newLineNumber = lineNumber + addedLines - removedLines;
36
- return ` ${newLineNumber}:${content}`;
37
- }
38
- }
39
- });
40
-
41
- return { preview: formatted.join("\n"), addedLines, removedLines };
42
- }