token-goat 2.9.30 → 2.9.31

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 (172) hide show
  1. package/README.md +24 -7
  2. package/SECURITY.md +10 -2
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/dist/native/linux-arm64/tg-hook +0 -0
  5. package/dist/native/linux-x64/tg-hook +0 -0
  6. package/dist/native/win32-arm64/tg-hook.exe +0 -0
  7. package/dist/native/win32-x64/tg-hook.exe +0 -0
  8. package/dist/{token-goat-chunk-QSBRTGM2.mjs → token-goat-chunk-25TRAWET.mjs} +17 -7
  9. package/dist/token-goat-chunk-2KXO6V2B.mjs +203 -0
  10. package/dist/{token-goat-chunk-IVKIZWAB.mjs → token-goat-chunk-2M7E4PF7.mjs} +41 -12
  11. package/dist/{token-goat-chunk-SMVRN2HU.mjs → token-goat-chunk-2UPZGKKY.mjs} +2 -2
  12. package/dist/token-goat-chunk-2WLPWKHV.mjs +135 -0
  13. package/dist/token-goat-chunk-2XBMMDBD.mjs +126 -0
  14. package/dist/token-goat-chunk-32ZOY4N5.mjs +23 -0
  15. package/dist/token-goat-chunk-3EZRNKTK.mjs +188 -0
  16. package/dist/token-goat-chunk-4ADZHI7J.mjs +63 -0
  17. package/dist/token-goat-chunk-4GBVPH3D.mjs +242 -0
  18. package/dist/{token-goat-chunk-KWPNJBDH.mjs → token-goat-chunk-4GILLLWY.mjs} +7 -4
  19. package/dist/{token-goat-chunk-67TQJ76B.mjs → token-goat-chunk-4NAPX7BA.mjs} +36 -3
  20. package/dist/{token-goat-chunk-PU7V3FD6.mjs → token-goat-chunk-4SC7UJYV.mjs} +3354 -2553
  21. package/dist/token-goat-chunk-4SMRO4TO.mjs +366 -0
  22. package/dist/{token-goat-chunk-AFLYLHDH.mjs → token-goat-chunk-4ZBFWLXF.mjs} +283 -427
  23. package/dist/{token-goat-chunk-JDWCRD6M.mjs → token-goat-chunk-57BIAXJL.mjs} +73 -40
  24. package/dist/token-goat-chunk-5AC66HNP.mjs +115 -0
  25. package/dist/token-goat-chunk-5IMLKSOP.mjs +145 -0
  26. package/dist/token-goat-chunk-646E6U44.mjs +398 -0
  27. package/dist/token-goat-chunk-65N4RHP4.mjs +33 -0
  28. package/dist/{token-goat-chunk-JN4XMLSD.mjs → token-goat-chunk-6DG6HWP3.mjs} +8 -2
  29. package/dist/token-goat-chunk-6ENQSNRZ.mjs +573 -0
  30. package/dist/token-goat-chunk-6ZY4GNF2.mjs +91 -0
  31. package/dist/{token-goat-chunk-VPBBTSJR.mjs → token-goat-chunk-76FGDLRO.mjs} +262 -255
  32. package/dist/{token-goat-chunk-7IN2MKDS.mjs → token-goat-chunk-7EZTZOMC.mjs} +121 -289
  33. package/dist/{token-goat-chunk-OJBNYTJP.mjs → token-goat-chunk-7MAOA6X4.mjs} +640 -80
  34. package/dist/token-goat-chunk-7R2ZVVAX.mjs +218 -0
  35. package/dist/{token-goat-chunk-PD5VKH46.mjs → token-goat-chunk-AUNGYYQX.mjs} +2 -2
  36. package/dist/{token-goat-chunk-HG45AF2B.mjs → token-goat-chunk-AUQYRMMH.mjs} +794 -37
  37. package/dist/token-goat-chunk-B3PEKBYG.mjs +128 -0
  38. package/dist/{token-goat-chunk-A3CK6N5Z.mjs → token-goat-chunk-BA4HI6BW.mjs} +1309 -110
  39. package/dist/{token-goat-chunk-JB6QN6VF.mjs → token-goat-chunk-BFCWY73P.mjs} +59 -23
  40. package/dist/{token-goat-chunk-B45VMIIH.mjs → token-goat-chunk-BWGFUZZE.mjs} +7 -5
  41. package/dist/{token-goat-chunk-P4QMM4WK.mjs → token-goat-chunk-C75NA7PL.mjs} +50 -23
  42. package/dist/token-goat-chunk-CBIQ7WTD.mjs +87 -0
  43. package/dist/token-goat-chunk-CETM74KC.mjs +307 -0
  44. package/dist/{token-goat-chunk-H2PHHGM5.mjs → token-goat-chunk-CIMQ2BB3.mjs} +57 -12
  45. package/dist/{token-goat-chunk-N2NMER56.mjs → token-goat-chunk-CJLS3CDL.mjs} +46 -4
  46. package/dist/{token-goat-chunk-VES7EL7O.mjs → token-goat-chunk-CO3UYX6G.mjs} +1 -1
  47. package/dist/token-goat-chunk-COPNXRJM.mjs +154 -0
  48. package/dist/token-goat-chunk-CSJ5L3NL.mjs +479 -0
  49. package/dist/{token-goat-chunk-4LCCNRTG.mjs → token-goat-chunk-CVCEVUGK.mjs} +8 -6
  50. package/dist/{token-goat-chunk-B2RZZCSS.mjs → token-goat-chunk-CXHOFN7R.mjs} +37 -20
  51. package/dist/token-goat-chunk-D735C4QM.mjs +603 -0
  52. package/dist/{token-goat-chunk-APGZXSPS.mjs → token-goat-chunk-DGS2LVNA.mjs} +47 -30
  53. package/dist/{token-goat-chunk-54K3EUV3.mjs → token-goat-chunk-DOWRSMWO.mjs} +1 -1
  54. package/dist/token-goat-chunk-E45INMY3.mjs +71 -0
  55. package/dist/token-goat-chunk-EC5F37F4.mjs +244 -0
  56. package/dist/{token-goat-chunk-XTQAOTSO.mjs → token-goat-chunk-EDBDRVH5.mjs} +4 -1
  57. package/dist/{token-goat-chunk-5BCIJXMO.mjs → token-goat-chunk-EELTBKDM.mjs} +14 -10
  58. package/dist/{token-goat-chunk-W3QCJS6G.mjs → token-goat-chunk-F4HYL64R.mjs} +8 -6
  59. package/dist/token-goat-chunk-F6PAUIEK.mjs +624 -0
  60. package/dist/token-goat-chunk-FDSREWLX.mjs +692 -0
  61. package/dist/token-goat-chunk-GGGG7RWB.mjs +236 -0
  62. package/dist/{token-goat-chunk-C63JQV5K.mjs → token-goat-chunk-GL3ETKSC.mjs} +233 -15
  63. package/dist/token-goat-chunk-GVB2MUST.mjs +1298 -0
  64. package/dist/token-goat-chunk-GWFLAUMQ.mjs +307 -0
  65. package/dist/{token-goat-chunk-ZEJVMUQH.mjs → token-goat-chunk-HLPW63A7.mjs} +2 -2
  66. package/dist/{token-goat-chunk-GOLEOXZP.mjs → token-goat-chunk-HU4TORC5.mjs} +44 -26
  67. package/dist/{token-goat-chunk-Z57YODA2.mjs → token-goat-chunk-I7VKZZAW.mjs} +2 -2
  68. package/dist/{token-goat-chunk-NYKZLXMK.mjs → token-goat-chunk-IA6XSPE3.mjs} +6 -6
  69. package/dist/{token-goat-chunk-E3OQX2XT.mjs → token-goat-chunk-IAGXMHIK.mjs} +81 -42
  70. package/dist/{token-goat-chunk-HYBFA5X3.mjs → token-goat-chunk-IK2DRMFX.mjs} +24 -68
  71. package/dist/{token-goat-chunk-COBQGL5S.mjs → token-goat-chunk-INNPTRUX.mjs} +249 -299
  72. package/dist/{token-goat-chunk-7NADEDKJ.mjs → token-goat-chunk-JJ5BX4F4.mjs} +6 -1
  73. package/dist/{token-goat-chunk-PEPTHRFF.mjs → token-goat-chunk-JVFSHVFJ.mjs} +6 -6
  74. package/dist/token-goat-chunk-KGEFFSHD.mjs +50 -0
  75. package/dist/token-goat-chunk-KQBLRPBN.mjs +433 -0
  76. package/dist/{token-goat-chunk-Q5VTGRH7.mjs → token-goat-chunk-LCNQ2CNN.mjs} +55 -319
  77. package/dist/token-goat-chunk-M3LFJDPU.mjs +58 -0
  78. package/dist/token-goat-chunk-M52KPT3C.mjs +87 -0
  79. package/dist/token-goat-chunk-MBEG42H7.mjs +150 -0
  80. package/dist/{token-goat-chunk-EVC4TOLE.mjs → token-goat-chunk-METECDOH.mjs} +3 -12
  81. package/dist/{token-goat-chunk-T4FK7VOV.mjs → token-goat-chunk-MHX7XCC3.mjs} +2 -1
  82. package/dist/token-goat-chunk-N5LSOVSU.mjs +137 -0
  83. package/dist/{token-goat-chunk-LOBGHXPB.mjs → token-goat-chunk-N5MMR2IW.mjs} +1 -1
  84. package/dist/token-goat-chunk-N7B3JQ2C.mjs +160 -0
  85. package/dist/{token-goat-chunk-RHXKCZX3.mjs → token-goat-chunk-NISNMD7T.mjs} +2182 -2959
  86. package/dist/token-goat-chunk-NMD42SFQ.mjs +434 -0
  87. package/dist/token-goat-chunk-NOSS5VWY.mjs +174 -0
  88. package/dist/{token-goat-chunk-KQNZDCBD.mjs → token-goat-chunk-NSNSPPBG.mjs} +25 -3
  89. package/dist/token-goat-chunk-OBOFIHKN.mjs +38 -0
  90. package/dist/token-goat-chunk-OBRFJ5O5.mjs +76 -0
  91. package/dist/{token-goat-chunk-JTQQGXZH.mjs → token-goat-chunk-ODBT2USM.mjs} +124 -57
  92. package/dist/token-goat-chunk-OS5EM5PP.mjs +107 -0
  93. package/dist/token-goat-chunk-OUKDTVNU.mjs +1178 -0
  94. package/dist/token-goat-chunk-OXFMP75N.mjs +566 -0
  95. package/dist/{token-goat-chunk-DZX2YDPT.mjs → token-goat-chunk-OYIYKDDT.mjs} +2 -2
  96. package/dist/{token-goat-chunk-QCLDAQTS.mjs → token-goat-chunk-P6HQSWQ3.mjs} +50 -53
  97. package/dist/token-goat-chunk-P6VGNTQT.mjs +71 -0
  98. package/dist/{token-goat-chunk-7BXSNBY5.mjs → token-goat-chunk-PFWIMH2E.mjs} +23 -15
  99. package/dist/token-goat-chunk-PJZXIS3G.mjs +39 -0
  100. package/dist/token-goat-chunk-PUO5INXP.mjs +606 -0
  101. package/dist/{token-goat-chunk-GFBSN7BD.mjs → token-goat-chunk-PX5PQWTY.mjs} +22 -250
  102. package/dist/token-goat-chunk-Q5QDBC6O.mjs +111 -0
  103. package/dist/token-goat-chunk-QFNQXSDT.mjs +40 -0
  104. package/dist/{token-goat-chunk-FBNQNSJK.mjs → token-goat-chunk-QH7YVYOY.mjs} +2198 -2782
  105. package/dist/{token-goat-chunk-64FBPDTK.mjs → token-goat-chunk-QLMUHEPB.mjs} +12 -9
  106. package/dist/{token-goat-chunk-RZRTDST7.mjs → token-goat-chunk-QQOJIHL3.mjs} +37 -11
  107. package/dist/{token-goat-chunk-XKI4SEMX.mjs → token-goat-chunk-QQTWJY2O.mjs} +19 -0
  108. package/dist/{token-goat-chunk-U4N3BN2W.mjs → token-goat-chunk-QYHO5CPH.mjs} +3 -2
  109. package/dist/token-goat-chunk-RELAVWAD.mjs +27 -0
  110. package/dist/{token-goat-chunk-ETBHVDB6.mjs → token-goat-chunk-RSLPOBKQ.mjs} +22 -11
  111. package/dist/token-goat-chunk-SAMFDIS2.mjs +712 -0
  112. package/dist/token-goat-chunk-SDELXLDM.mjs +48 -0
  113. package/dist/{token-goat-chunk-4JJS54TR.mjs → token-goat-chunk-SOAFZNNZ.mjs} +161 -38
  114. package/dist/{token-goat-chunk-664RTTUV.mjs → token-goat-chunk-SRTHT7KV.mjs} +21 -16
  115. package/dist/{token-goat-chunk-4FVIAHSI.mjs → token-goat-chunk-T5P5ACNQ.mjs} +7 -6
  116. package/dist/token-goat-chunk-T5YGG4V3.mjs +45 -0
  117. package/dist/token-goat-chunk-TAUZ4OFS.mjs +110 -0
  118. package/dist/{token-goat-chunk-COTXZHTS.mjs → token-goat-chunk-TM6MC754.mjs} +4 -3
  119. package/dist/token-goat-chunk-TWUKBOMP.mjs +72 -0
  120. package/dist/{token-goat-chunk-3CHUNJ2O.mjs → token-goat-chunk-U2KSB4SG.mjs} +8 -5
  121. package/dist/{token-goat-chunk-3Z5S4KGM.mjs → token-goat-chunk-U4WHMG6Y.mjs} +29 -49
  122. package/dist/{token-goat-chunk-PY533T7F.mjs → token-goat-chunk-UGJHGR5A.mjs} +21 -15
  123. package/dist/{token-goat-chunk-CYCEYAEO.mjs → token-goat-chunk-UOUDVA5U.mjs} +1 -1
  124. package/dist/{token-goat-chunk-JDHE26RP.mjs → token-goat-chunk-URRJ33GR.mjs} +16 -5
  125. package/dist/{token-goat-chunk-56EIMS3E.mjs → token-goat-chunk-UZOROKIS.mjs} +23 -17
  126. package/dist/{token-goat-chunk-CZ3LUXYZ.mjs → token-goat-chunk-VIHGGGEI.mjs} +427 -308
  127. package/dist/token-goat-chunk-VTJLAA7P.mjs +21 -0
  128. package/dist/token-goat-chunk-VWDXLT4F.mjs +678 -0
  129. package/dist/{token-goat-chunk-YARZFCZS.mjs → token-goat-chunk-VWZA2H4P.mjs} +62 -53
  130. package/dist/{token-goat-chunk-SQSSNQPE.mjs → token-goat-chunk-VXEXMJDL.mjs} +3979 -4745
  131. package/dist/token-goat-chunk-WBA5SKT4.mjs +547 -0
  132. package/dist/{token-goat-chunk-SJHWVNDQ.mjs → token-goat-chunk-WDH44VAU.mjs} +7 -4
  133. package/dist/token-goat-chunk-X2SUP3EI.mjs +107 -0
  134. package/dist/token-goat-chunk-X3BELZSJ.mjs +125 -0
  135. package/dist/{token-goat-chunk-FZ3NEW5O.mjs → token-goat-chunk-XLRBNZCC.mjs} +13 -8
  136. package/dist/{token-goat-chunk-Z44YO3QZ.mjs → token-goat-chunk-XRKUX6CM.mjs} +1 -1
  137. package/dist/token-goat-chunk-XX6O25RN.mjs +82 -0
  138. package/dist/token-goat-chunk-XZSUHBVS.mjs +65 -0
  139. package/dist/{token-goat-chunk-WY3L4DVT.mjs → token-goat-chunk-Y2ZTQOCL.mjs} +13 -8
  140. package/dist/{token-goat-chunk-UQ5UK2T7.mjs → token-goat-chunk-YB4VMGK2.mjs} +1 -1
  141. package/dist/token-goat-chunk-YBIIY3HR.mjs +51 -0
  142. package/dist/{token-goat-chunk-ZQSJMO2R.mjs → token-goat-chunk-YHVDKQBR.mjs} +105 -105
  143. package/dist/{token-goat-chunk-H2K3QP6H.mjs → token-goat-chunk-YJB5XLWI.mjs} +8 -6
  144. package/dist/{token-goat-chunk-ZCDTCVIS.mjs → token-goat-chunk-YKB6AQG3.mjs} +5 -2
  145. package/dist/token-goat-chunk-YMTG2YA5.mjs +35 -0
  146. package/dist/token-goat-chunk-YPBZYQRV.mjs +40 -0
  147. package/dist/{token-goat-chunk-HOJLCGDP.mjs → token-goat-chunk-YY6AVUFL.mjs} +2033 -2251
  148. package/dist/token-goat-chunk-Z7N5OMMP.mjs +98 -0
  149. package/dist/token-goat-chunk-ZNMNUPAZ.mjs +938 -0
  150. package/dist/token-goat-hook-client.cjs +1 -1
  151. package/dist/token-goat-hook-client.mjs +3 -3
  152. package/dist/token-goat-hook.mjs +67 -38
  153. package/dist/token-goat.core.mjs +4 -4
  154. package/docs/C4_RUNTIME_ARCHITECTURE.md +1 -1
  155. package/docs/cli.md +40 -21
  156. package/docs/install.md +19 -9
  157. package/docs/security.md +5 -3
  158. package/package.json +2 -1
  159. package/dist/token-goat-chunk-5KDMCMF2.mjs +0 -362
  160. package/dist/token-goat-chunk-6QMAS7AB.mjs +0 -42
  161. package/dist/token-goat-chunk-7F2UBPD3.mjs +0 -397
  162. package/dist/token-goat-chunk-ARDNEC2U.mjs +0 -248
  163. package/dist/token-goat-chunk-ATCPY7EQ.mjs +0 -134
  164. package/dist/token-goat-chunk-EFHMMIGP.mjs +0 -68
  165. package/dist/token-goat-chunk-IVALLT3S.mjs +0 -48
  166. package/dist/token-goat-chunk-JDU3EXSU.mjs +0 -65
  167. package/dist/token-goat-chunk-MKPF4CL5.mjs +0 -37
  168. package/dist/token-goat-chunk-RC35RBUL.mjs +0 -312
  169. package/dist/token-goat-chunk-USILZ3T3.mjs +0 -53
  170. package/dist/token-goat-chunk-VL3YIFHZ.mjs +0 -2975
  171. package/dist/token-goat-chunk-XU4P6Z24.mjs +0 -133
  172. package/dist/token-goat-chunk-Y776AENC.mjs +0 -1597
@@ -10,22 +10,25 @@ import {
10
10
  querySheet,
11
11
  rangeSheet,
12
12
  xlsxColumns
13
- } from "./token-goat-chunk-RZRTDST7.mjs";
14
- import "./token-goat-chunk-N2NMER56.mjs";
13
+ } from "./token-goat-chunk-QQOJIHL3.mjs";
14
+ import "./token-goat-chunk-CJLS3CDL.mjs";
15
15
  import "./token-goat-chunk-3BTK54F3.mjs";
16
- import "./token-goat-chunk-4FVIAHSI.mjs";
17
- import "./token-goat-chunk-7IN2MKDS.mjs";
18
- import "./token-goat-chunk-U4N3BN2W.mjs";
16
+ import "./token-goat-chunk-T5P5ACNQ.mjs";
17
+ import "./token-goat-chunk-7EZTZOMC.mjs";
18
+ import "./token-goat-chunk-QYHO5CPH.mjs";
19
+ import "./token-goat-chunk-4GBVPH3D.mjs";
19
20
  import "./token-goat-chunk-YZAAZU2S.mjs";
20
21
  import "./token-goat-chunk-IVE6U7KV.mjs";
21
- import "./token-goat-chunk-IVKIZWAB.mjs";
22
- import "./token-goat-chunk-XTQAOTSO.mjs";
22
+ import "./token-goat-chunk-2M7E4PF7.mjs";
23
+ import "./token-goat-chunk-E45INMY3.mjs";
24
+ import "./token-goat-chunk-EDBDRVH5.mjs";
23
25
  import "./token-goat-chunk-AH6QILZM.mjs";
24
26
  import "./token-goat-chunk-Y4AFKTHK.mjs";
25
- import "./token-goat-chunk-GOLEOXZP.mjs";
27
+ import "./token-goat-chunk-HU4TORC5.mjs";
28
+ import "./token-goat-chunk-GGGG7RWB.mjs";
26
29
  import "./token-goat-chunk-AM5V6GSX.mjs";
27
30
  import "./token-goat-chunk-FNFBKLRD.mjs";
28
- import "./token-goat-chunk-VES7EL7O.mjs";
31
+ import "./token-goat-chunk-CO3UYX6G.mjs";
29
32
  import "./token-goat-chunk-A37V4PBF.mjs";
30
33
  export {
31
34
  XlsxScanTooLargeError,
@@ -3,13 +3,13 @@ const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  queryCsv,
5
5
  quoteCsvCell
6
- } from "./token-goat-chunk-N2NMER56.mjs";
6
+ } from "./token-goat-chunk-CJLS3CDL.mjs";
7
7
  import {
8
8
  redactSecrets
9
- } from "./token-goat-chunk-4FVIAHSI.mjs";
9
+ } from "./token-goat-chunk-T5P5ACNQ.mjs";
10
10
  import {
11
11
  loadConfig
12
- } from "./token-goat-chunk-7IN2MKDS.mjs";
12
+ } from "./token-goat-chunk-7EZTZOMC.mjs";
13
13
  import {
14
14
  NotAnOfficeDocumentError,
15
15
  assertOoxmlWithinDeadline,
@@ -18,10 +18,16 @@ import {
18
18
  ooxmlWorkDeadline,
19
19
  parseOoxmlPart,
20
20
  readOoxmlZip
21
- } from "./token-goat-chunk-IVKIZWAB.mjs";
21
+ } from "./token-goat-chunk-2M7E4PF7.mjs";
22
22
  import {
23
23
  DocumentRefusedError
24
24
  } from "./token-goat-chunk-Y4AFKTHK.mjs";
25
+ import {
26
+ countNoun
27
+ } from "./token-goat-chunk-HU4TORC5.mjs";
28
+ import {
29
+ echoedValue
30
+ } from "./token-goat-chunk-GGGG7RWB.mjs";
25
31
  import {
26
32
  displaySafeText
27
33
  } from "./token-goat-chunk-FNFBKLRD.mjs";
@@ -320,7 +326,7 @@ function assertCellCount(cells, extent, hint) {
320
326
  function assertScannableExtent(ws) {
321
327
  assertCellCount(
322
328
  (ws.rowCount || 0) * (ws.columnCount || 0),
323
- `sheet "${ws.name}" declares a used range of ${ws.rowCount} rows x ${ws.columnCount} cols`,
329
+ `sheet ${echoedValue(ws.name)} declares a used range of ${ws.rowCount} rows x ${ws.columnCount} cols`,
324
330
  "read a bounded range with xlsx-range --range"
325
331
  );
326
332
  }
@@ -391,6 +397,7 @@ function cellFormula(cell) {
391
397
  }
392
398
  return void 0;
393
399
  }
400
+ var EMPTY_SHEET_NOTE = "(nothing to show: the sheet is empty)";
394
401
  function usedRange(ws) {
395
402
  assertScannableExtent(ws);
396
403
  let maxCol = 0;
@@ -459,13 +466,14 @@ function headSheetFromWorksheet(ws, rows, columns) {
459
466
  const lines = [header.map(quoteCsvCell).join(",")];
460
467
  for (const r of dataRows) lines.push(r.map(quoteCsvCell).join(","));
461
468
  if (rowCount - 1 > dataRows.length) {
462
- lines.push(`...(${rowCount - 1 - dataRows.length} more rows elided; use --rows to see more, or xlsx-query for filtering)`);
469
+ lines.push(`...(${countNoun(rowCount - 1 - dataRows.length, "more row")} elided; use --rows to see more, or xlsx-query for filtering)`);
463
470
  }
464
471
  return lines.join("\n");
465
472
  }
466
473
  async function headSheet(filePath, sheetName, rows = 20, columns) {
467
474
  const wb = await loadWorkbook(filePath);
468
475
  const ws = requireSheet(wb, sheetName);
476
+ if ((ws.columnCount || 0) === 0) return EMPTY_SHEET_NOTE;
469
477
  return headSheetFromWorksheet(ws, rows, columns);
470
478
  }
471
479
  async function allSheetsHeadText(filePath, rows, deadline = ooxmlWorkDeadline()) {
@@ -478,6 +486,18 @@ ${headSheetFromWorksheet(ws, rows)}`);
478
486
  }
479
487
  return sheetTexts.join("\n\n");
480
488
  }
489
+ function pastUsedRangeNote(range, usedRows, usedCols) {
490
+ if (usedRows === 0 || usedCols === 0) return EMPTY_SHEET_NOTE;
491
+ const usedRef = `A1:${encodeCell({ r: usedRows, c: usedCols })}`;
492
+ if (range.s.r > usedRows || range.s.c > usedCols) {
493
+ return `(nothing to show: ${encodeCell(range.s)}:${encodeCell(range.e)} is past the sheet's used range ${usedRef})`;
494
+ }
495
+ const span = (noun, from, to) => from === to ? `${noun} ${from}` : `${noun}s ${from}-${to}`;
496
+ const parts = [];
497
+ if (range.e.r > usedRows) parts.push(span("row", String(usedRows + 1), String(range.e.r)));
498
+ if (range.e.c > usedCols) parts.push(span("column", indexToColLetters(usedCols + 1), indexToColLetters(range.e.c)));
499
+ return parts.length > 0 ? `(not shown: ${parts.join(" and ")}, past the sheet's used range ${usedRef})` : void 0;
500
+ }
481
501
  async function rangeSheet(filePath, sheetName, rangeSpec, showFormulas) {
482
502
  const wb = await loadWorkbook(filePath);
483
503
  const ws = requireSheet(wb, sheetName);
@@ -485,10 +505,14 @@ async function rangeSheet(filePath, sheetName, rangeSpec, showFormulas) {
485
505
  const rangeRows = range.e.r - range.s.r + 1;
486
506
  const rangeCols = range.e.c - range.s.c + 1;
487
507
  assertCellCount(rangeRows * rangeCols, `range ${rangeSpec} covers ${rangeRows} rows x ${rangeCols} cols`, "ask for a smaller --range");
508
+ const usedRows = ws.rowCount || 0;
509
+ const usedCols = ws.columnCount || 0;
510
+ const lastRow = range.s.c > usedCols ? 0 : Math.min(range.e.r, usedRows);
511
+ const lastCol = Math.min(range.e.c, usedCols);
488
512
  const rowsOut = [];
489
- for (let r = range.s.r; r <= range.e.r; r++) {
513
+ for (let r = range.s.r; r <= lastRow; r++) {
490
514
  const rowOut = [];
491
- for (let c = range.s.c; c <= range.e.c; c++) {
515
+ for (let c = range.s.c; c <= lastCol; c++) {
492
516
  const addr = encodeCell({ r, c });
493
517
  const cell = ws.getCell(addr);
494
518
  if (showFormulas && cellFormula(cell) !== void 0) {
@@ -500,11 +524,13 @@ async function rangeSheet(filePath, sheetName, rangeSpec, showFormulas) {
500
524
  rowsOut.push(rowOut);
501
525
  }
502
526
  const colLabels = rowsOut[0]?.map((_, i) => indexToColLetters(range.s.c + i)) ?? [];
503
- return { header: colLabels, rows: rowsOut };
527
+ const note = pastUsedRangeNote(range, usedRows, usedCols);
528
+ return { header: colLabels, rows: rowsOut, ...note !== void 0 ? { note } : {} };
504
529
  }
505
530
  function formatXlsxRange(result) {
506
- const lines = [result.header.map(quoteCsvCell).join(",")];
531
+ const lines = result.rows.length > 0 ? [result.header.map(quoteCsvCell).join(",")] : [];
507
532
  for (const r of result.rows) lines.push(r.map(quoteCsvCell).join(","));
533
+ if (result.note !== void 0) lines.push(result.note);
508
534
  return lines.join("\n");
509
535
  }
510
536
  async function sheetToCsv(ws) {
@@ -569,7 +595,7 @@ async function xlsxColumns(filePath, sheetName, sampleLimit = 100) {
569
595
  };
570
596
  }
571
597
  function formatXlsxColumns(result, config = loadConfig()) {
572
- if (result.columns.length === 0) return `Sheet "${displaySafeText(result.sheetName)}" is empty`;
598
+ if (result.columns.length === 0) return `Sheet ${echoedValue(result.sheetName)} is empty`;
573
599
  const clip = (v) => {
574
600
  const safe = redactSecrets(v, config).text;
575
601
  return safe.length > 30 ? safe.slice(0, 27) + "..." : safe;
@@ -1,9 +1,26 @@
1
1
  import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
+ import {
4
+ colorStdout,
5
+ stripAnsiEscapes
6
+ } from "./token-goat-chunk-HAVAOB3S.mjs";
7
+ import {
8
+ ensureNewline
9
+ } from "./token-goat-chunk-HU4TORC5.mjs";
3
10
  import {
4
11
  init_define_import_meta_env
5
12
  } from "./token-goat-chunk-A37V4PBF.mjs";
6
13
 
14
+ // src/emit.ts
15
+ init_define_import_meta_env();
16
+ function emit(text) {
17
+ const payload = colorStdout() ? text : stripAnsiEscapes(text);
18
+ process.stdout.write(ensureNewline(payload));
19
+ }
20
+ function emitErr(text) {
21
+ process.stderr.write(ensureNewline(text));
22
+ }
23
+
7
24
  // src/jsonc_text.ts
8
25
  init_define_import_meta_env();
9
26
  import { createRequire } from "node:module";
@@ -60,6 +77,8 @@ function parseJsonOrJsonc(raw, opts = {}) {
60
77
  }
61
78
 
62
79
  export {
80
+ emit,
81
+ emitErr,
63
82
  jsonc,
64
83
  stripBom,
65
84
  parseJsonOrJsonc
@@ -5,7 +5,7 @@ import {
5
5
  } from "./token-goat-chunk-YZAAZU2S.mjs";
6
6
  import {
7
7
  ENV_KEYS
8
- } from "./token-goat-chunk-VES7EL7O.mjs";
8
+ } from "./token-goat-chunk-CO3UYX6G.mjs";
9
9
  import {
10
10
  init_define_import_meta_env
11
11
  } from "./token-goat-chunk-A37V4PBF.mjs";
@@ -51,7 +51,8 @@ function detectHarness() {
51
51
  if (env["CODEX_SESSION_ID"] !== void 0 || env["CODEX_SESSION"]) {
52
52
  return "codex";
53
53
  }
54
- if (env["OPENCODE_SESSION_ID"] !== void 0 || env["OPENCODE_SESSION"]) {
54
+ const opencodePid = env["OPENCODE_PID"];
55
+ if (env["OPENCODE_SESSION_ID"] !== void 0 || env["OPENCODE_SESSION"] || opencodePid !== void 0 && (opencodePid === String(process.pid) || opencodePid === String(process.ppid))) {
55
56
  return "opencode";
56
57
  }
57
58
  if (env["GROK_SESSION_ID"] !== void 0) {
@@ -0,0 +1,27 @@
1
+ import { createRequire as __cjsRequire } from 'node:module';
2
+ const require = __cjsRequire(import.meta.url);
3
+ import {
4
+ capJsonRows,
5
+ estimateTokens,
6
+ estimateTokensFromLength,
7
+ isCappedOutput,
8
+ sliceToEstimatedTokens,
9
+ trimToBudget
10
+ } from "./token-goat-chunk-BFCWY73P.mjs";
11
+ import "./token-goat-chunk-KGEFFSHD.mjs";
12
+ import "./token-goat-chunk-XX6O25RN.mjs";
13
+ import "./token-goat-chunk-HAVAOB3S.mjs";
14
+ import "./token-goat-chunk-HU4TORC5.mjs";
15
+ import "./token-goat-chunk-GGGG7RWB.mjs";
16
+ import "./token-goat-chunk-AM5V6GSX.mjs";
17
+ import "./token-goat-chunk-FNFBKLRD.mjs";
18
+ import "./token-goat-chunk-CO3UYX6G.mjs";
19
+ import "./token-goat-chunk-A37V4PBF.mjs";
20
+ export {
21
+ capJsonRows,
22
+ estimateTokens,
23
+ estimateTokensFromLength,
24
+ isCappedOutput,
25
+ sliceToEstimatedTokens,
26
+ trimToBudget
27
+ };
@@ -9,7 +9,8 @@ import {
9
9
 
10
10
  // src/bridges_status.ts
11
11
  init_define_import_meta_env();
12
- var NO_SERVER_HANDLER_REASON = "token-goat has no registered server-side handler for this event (zero registerHook('notification'|'stop', ...) call sites in src/) -- wiring it client-side would currently be a no-op";
12
+ var NO_SERVER_HANDLER_REASON = "token-goat has no registered server-side handler for this event (zero registerHook('notification', ...) call sites in src/) -- wiring it client-side would currently be a no-op";
13
+ var NO_STOP_WIRING_REASON = "the stop handler (src/hooks_stop.ts) exists, but this bridge does not install a stop hook and its harness has not been checked for one that accepts a non-blocking message";
13
14
  var NO_POST_COMPACT_EVENT_REASON = "post_compact is a Claude Code event (hook_event_name PostCompact, carrying compact_summary); no equivalent has been confirmed for this harness, so it is left unwired rather than guessed at";
14
15
  var NO_SEPARATE_FAILURE_EVENT_REASON = "post_tool_use_failure exists because Copilot CLI (postToolUseFailure) and Claude Code (PostToolUseFailure) route a failed tool result to a separate event instead of their post-tool one. No separate failure event is wired for this harness, so a failed tool call either arrives on post_tool_use like any other result or is not seen; which of the two has not been checked here";
15
16
  var COPILOT_NO_POST_COMPACT_REASON = "Copilot CLI has no post-compaction hook: its HookType enum (schemas/api.schema.json, 1.0.79 and 1.0.80) declares preCompact and no postCompact, and both preCompact call sites in app.js await the hook and never assign its result. Whether the summary is reachable another way is open. app.js does emit session.compaction_complete carrying summaryContent, and the session event writer subscribes to '*' -- but emit() vs emitEphemeral() does NOT gate that writer: dispatchEventHandlers runs outside the ephemeral branch in emitInternal, on('*') early-returns past every filter, and the writer's callback applies no filter of its own before handing the JSON to native recordEventJson. The durable-vs-ephemeral decision is in Rust (api_session_event_writer.rs) and was not readable. Nor is the event uniformly summary-bearing: two of the four emit sites are the branches taken when no summary exists, summaryContent is optional in the schema, and the relay session class emits the same event via emitEphemeral. A manual /compact on 1.0.88 (tg-captures C7 and C7d) fired preCompact, and a marker returned from it reached neither the wire requests nor the model. token-goat therefore queues the session manifest at preCompact and delivers it as the next userPromptSubmitted's additionalContext, which reached the model in 5 of 5 runs on 1.0.88 (tg-captures C3)";
@@ -31,9 +32,9 @@ var BRIDGE_CAPABILITY_MATRIX = [
31
32
  sourceFile: "src/install.ts (HOOK_EVENT_MAP)",
32
33
  verification: "dogfooded",
33
34
  verificationNote: "The harness this repo is developed and released under; CLAUDE.md requires every CLI/hook change be run against the built binary here before it ships.",
34
- implemented: /* @__PURE__ */ new Set(["pre_tool_use", "post_tool_use", "post_tool_use_failure", "pre_compact", "post_compact", "user_prompt_submit", "subagent_stop", "session_start"]),
35
+ implemented: /* @__PURE__ */ new Set(["pre_tool_use", "post_tool_use", "post_tool_use_failure", "pre_compact", "post_compact", "user_prompt_submit", "stop", "subagent_stop", "session_start"]),
35
36
  reasons: [
36
- { events: ["notification", "stop"], reason: NO_SERVER_HANDLER_REASON },
37
+ { events: ["notification"], reason: NO_SERVER_HANDLER_REASON },
37
38
  { events: ["subagent_start"], reason: NO_SUBAGENT_START_REASON }
38
39
  ]
39
40
  },
@@ -43,10 +44,10 @@ var BRIDGE_CAPABILITY_MATRIX = [
43
44
  sourceFile: "src/bridges/codex_install.ts (CODEX_HOOK_EVENTS, CODEX_GLOBAL_HOOK_EVENTS)",
44
45
  verification: "dogfooded",
45
46
  verificationNote: `codex-cli 0.155.0, 2026-09-22: observed running the installed config.toml hooks and delivering real payloads to the shim -- PreToolUse/PostToolUse with tool_name "Bash" and tool_input.command, and PreCompact with trigger "auto" from a forced auto-compaction. A pre-tool deny was honored (the model dropped Get-Content and ran token-goat outline instead) and post-tool additionalContext reached the model; the pre-compact response did not, which is why codex is in PRE_COMPACT_CONTEXT_DROPPED. Two conditions gate the tool events and both fail silently. config.toml must carry the matching [hooks.state] trusted_hash the installer writes, and the matcher must name the tool as it appears on the hook wire -- "Bash" for shell execution, since Codex normalizes its own exec tool into Claude Code's vocabulary before matching, while apply_patch stays native. A matcher naming the internal spelling produced a run with eight pre_compact rows and no pre_tool_use or post_tool_use row at all, and that also stranded every queued compaction manifest. Verified end to end after the fix: a forced auto-compaction run recorded eight compactions and twelve manifest deliveries in its own rollout transcript.`,
46
- implemented: /* @__PURE__ */ new Set(["pre_tool_use", "post_tool_use", "pre_compact", "user_prompt_submit", "subagent_stop"]),
47
+ implemented: /* @__PURE__ */ new Set(["pre_tool_use", "post_tool_use", "pre_compact", "user_prompt_submit", "stop", "subagent_stop"]),
47
48
  reasons: [
48
49
  { events: ["post_tool_use_failure"], reason: NO_SEPARATE_FAILURE_EVENT_REASON },
49
- { events: ["notification", "stop"], reason: NO_SERVER_HANDLER_REASON },
50
+ { events: ["notification"], reason: NO_SERVER_HANDLER_REASON },
50
51
  { events: ["subagent_start"], reason: NO_SUBAGENT_START_REASON },
51
52
  {
52
53
  events: ["post_compact", "session_start"],
@@ -64,7 +65,8 @@ var BRIDGE_CAPABILITY_MATRIX = [
64
65
  reasons: [
65
66
  { events: ["post_tool_use_failure"], reason: NO_SEPARATE_FAILURE_EVENT_REASON },
66
67
  { events: ["post_compact"], reason: NO_POST_COMPACT_EVENT_REASON },
67
- { events: ["notification", "stop"], reason: NO_SERVER_HANDLER_REASON },
68
+ { events: ["notification"], reason: NO_SERVER_HANDLER_REASON },
69
+ { events: ["stop"], reason: NO_STOP_WIRING_REASON },
68
70
  { events: ["subagent_start"], reason: NO_SUBAGENT_START_REASON },
69
71
  {
70
72
  events: ["session_start"],
@@ -84,7 +86,6 @@ var BRIDGE_CAPABILITY_MATRIX = [
84
86
  "pre_tool_use",
85
87
  "post_tool_use",
86
88
  "pre_compact",
87
- "stop",
88
89
  "subagent_stop",
89
90
  "subagent_start",
90
91
  "user_prompt_submit",
@@ -92,6 +93,10 @@ var BRIDGE_CAPABILITY_MATRIX = [
92
93
  ]),
93
94
  reasons: [
94
95
  { events: ["post_compact"], reason: COPILOT_NO_POST_COMPACT_REASON },
96
+ {
97
+ events: ["stop"],
98
+ reason: "Copilot CLI runs the agentStop entry of its hooks file, but agentStop and subagentStop read only a {decision, reason} answer (copilot_cli.ts), so the unverified-work advisory has no channel and the handler passes there (STOP_CONTEXT_DROPPED)"
99
+ },
95
100
  {
96
101
  events: ["notification"],
97
102
  reason: "Copilot CLI has a real 'notification' hook event, but copilot_cli.ts's COPILOT_TO_TG_EVENT deliberately leaves it (and sessionEnd/errorOccurred/permissionRequest) unimplemented rather than guessed at"
@@ -128,7 +133,7 @@ var BRIDGE_CAPABILITY_MATRIX = [
128
133
  events: ["notification"],
129
134
  reason: "Only five Qwen Code events have a token-goat handler; every other real event (Notification, SessionEnd, PostToolUseFailure, StopFailure, SubagentStart, PermissionRequest, TodoCreated, TodoCompleted) is left unimplemented rather than guessed at (qwen_install.ts)"
130
135
  },
131
- { events: ["stop"], reason: NO_SERVER_HANDLER_REASON },
136
+ { events: ["stop"], reason: NO_STOP_WIRING_REASON },
132
137
  { events: ["subagent_start"], reason: NO_SUBAGENT_START_REASON },
133
138
  {
134
139
  events: ["session_start"],
@@ -149,7 +154,11 @@ var BRIDGE_CAPABILITY_MATRIX = [
149
154
  reason: "VS Code reads the shared Copilot hooks file but maps only sessionStart, sessionEnd, userPromptSubmitted, preToolUse, postToolUse, agentStop, subagentStop and errorOccurred out of it, so the file's preCompact and postToolUseFailure entries never fire there. Re-read in the 1.138.0 bundle, where the github-copilot branch of that table still lists exactly those eight: the compaction manifest is unavailable on this harness rather than merely unwired, and unlike Copilot CLI and Codex there is no queueing fallback, because the trigger itself never arrives"
150
155
  },
151
156
  { events: ["post_compact"], reason: NO_POST_COMPACT_EVENT_REASON },
152
- { events: ["notification", "stop"], reason: NO_SERVER_HANDLER_REASON }
157
+ { events: ["notification"], reason: NO_SERVER_HANDLER_REASON },
158
+ {
159
+ events: ["stop"],
160
+ reason: "VS Code runs the agentStop entry of the shared hooks file, but its Stop hook reads only a block decision (hookSpecificOutput.decision and reason, executeStopHook in extensions/copilot/dist/extension.js, VS Code 1.140.0) and the unverified-work advisory never blocks, so the handler passes there (STOP_CONTEXT_DROPPED)"
161
+ }
153
162
  ]
154
163
  },
155
164
  {
@@ -176,7 +185,8 @@ var BRIDGE_CAPABILITY_MATRIX = [
176
185
  reasons: [
177
186
  { events: ["post_tool_use_failure"], reason: NO_SEPARATE_FAILURE_EVENT_REASON },
178
187
  { events: ["post_compact"], reason: NO_POST_COMPACT_EVENT_REASON },
179
- { events: ["notification", "stop"], reason: NO_SERVER_HANDLER_REASON },
188
+ { events: ["notification"], reason: NO_SERVER_HANDLER_REASON },
189
+ { events: ["stop"], reason: NO_STOP_WIRING_REASON },
180
190
  { events: ["subagent_start"], reason: NO_SUBAGENT_START_REASON }
181
191
  ]
182
192
  },
@@ -190,7 +200,8 @@ var BRIDGE_CAPABILITY_MATRIX = [
190
200
  reasons: [
191
201
  { events: ["post_tool_use_failure"], reason: NO_SEPARATE_FAILURE_EVENT_REASON },
192
202
  { events: ["post_compact"], reason: NO_POST_COMPACT_EVENT_REASON },
193
- { events: ["notification", "stop"], reason: NO_SERVER_HANDLER_REASON },
203
+ { events: ["notification"], reason: NO_SERVER_HANDLER_REASON },
204
+ { events: ["stop"], reason: NO_STOP_WIRING_REASON },
194
205
  { events: ["subagent_start"], reason: NO_SUBAGENT_START_REASON },
195
206
  {
196
207
  events: ["pre_compact", "session_start", "subagent_stop"],