@wirecat/drive-cli 0.63.0 → 0.64.0

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 (145) hide show
  1. package/README.md +2 -1
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bundle/{all-profiles-GZJS3UKC.js → all-profiles-BPPT2AK5.js} +13 -13
  4. package/dist/bundle/{anthropic-RGV3WXX5.js → anthropic-JW6GOJUD.js} +13 -11
  5. package/dist/bundle/{app-server-AA2PJ7PV.js → app-server-KAQIOJMZ.js} +53 -53
  6. package/dist/bundle/{bun-OXZYIA3R.js → bun-UT7GNTPV.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-D45NSDM3.js → bun-sqlite-2OIVV3LS.js} +8 -8
  8. package/dist/bundle/{chunk-EOOGWUTP.js → chunk-2FEZ24DK.js} +10 -10
  9. package/dist/bundle/{chunk-TWUH22Z5.js → chunk-2W464HAE.js} +4 -4
  10. package/dist/bundle/{chunk-YIP7ELON.js → chunk-34BIDKF4.js} +275 -419
  11. package/dist/bundle/{chunk-2NIC72HH.js → chunk-36GPBPWM.js} +1 -1
  12. package/dist/bundle/{chunk-44SBK6KB.js → chunk-3J5KAFNA.js} +1601 -877
  13. package/dist/bundle/{chunk-ZM5J6ZMB.js → chunk-3NULZGQU.js} +2 -2
  14. package/dist/bundle/{chunk-DJHLVUL6.js → chunk-46CD64J2.js} +152 -36
  15. package/dist/bundle/{chunk-2TFXK3R4.js → chunk-4CNTID2X.js} +4 -4
  16. package/dist/bundle/{chunk-WYGWWHZP.js → chunk-4YRENUB5.js} +2 -2
  17. package/dist/bundle/{chunk-L37LMMRJ.js → chunk-5HSRQ53R.js} +2 -2
  18. package/dist/bundle/{chunk-XR6ESRU6.js → chunk-5OFA5EXE.js} +2 -2
  19. package/dist/bundle/{chunk-3QINVLZI.js → chunk-5ZBR55US.js} +1 -1
  20. package/dist/bundle/{chunk-LMAVCYLQ.js → chunk-66AF4FBW.js} +4 -4
  21. package/dist/bundle/{chunk-Y6GNA7HE.js → chunk-6B37XO6B.js} +23 -5
  22. package/dist/bundle/{chunk-ZMOUUOT2.js → chunk-6G53ZFUT.js} +1 -1
  23. package/dist/bundle/{chunk-2TDUGC5D.js → chunk-AHB4OJCI.js} +1885 -565
  24. package/dist/bundle/{chunk-E4SDKMBJ.js → chunk-B67BLRAI.js} +3 -3
  25. package/dist/bundle/{chunk-YGU6ULU5.js → chunk-B7XBIOMR.js} +12 -12
  26. package/dist/bundle/{chunk-FEZF3TII.js → chunk-BDYWZ7JE.js} +50 -6
  27. package/dist/bundle/{chunk-BKYMKVHT.js → chunk-BEUAICUD.js} +2 -2
  28. package/dist/bundle/{chunk-ABYGSJZ4.js → chunk-BEZJA44H.js} +7 -7
  29. package/dist/bundle/{chunk-TF23BZW5.js → chunk-BZ2ZKILM.js} +3 -3
  30. package/dist/bundle/{chunk-FUITWY7O.js → chunk-C7WBNOYW.js} +1 -1
  31. package/dist/bundle/{chunk-V3NVXIQR.js → chunk-CPMRM3GQ.js} +231 -191
  32. package/dist/bundle/{chunk-AEX37ETW.js → chunk-DD7EFG6B.js} +2 -2
  33. package/dist/bundle/{chunk-PDCCYHCH.js → chunk-E2LBCCTG.js} +5 -5
  34. package/dist/bundle/{chunk-O2XOX4HB.js → chunk-EC2XGDKJ.js} +50 -34
  35. package/dist/bundle/{chunk-4OSSOWDM.js → chunk-EJ4PNHPP.js} +1 -1
  36. package/dist/bundle/{chunk-4S4JMW6I.js → chunk-EQEGJVO2.js} +1 -1
  37. package/dist/bundle/{chunk-XNVFKMVR.js → chunk-EWGVDFPT.js} +957 -533
  38. package/dist/bundle/{chunk-CE2TJBLP.js → chunk-EZ6O3ST3.js} +3 -3
  39. package/dist/bundle/{chunk-FRIJUILO.js → chunk-F2VDAG32.js} +3 -3
  40. package/dist/bundle/{chunk-HZZCEQTH.js → chunk-G3NULXOM.js} +4 -4
  41. package/dist/bundle/{chunk-OD4U7GUY.js → chunk-G4KEKKDE.js} +20 -20
  42. package/dist/bundle/{chunk-OTROVC4E.js → chunk-GSMYXGFR.js} +1 -1
  43. package/dist/bundle/{chunk-4CIZWCXV.js → chunk-GW3U6OLD.js} +1 -1
  44. package/dist/bundle/{chunk-6EY46GAN.js → chunk-HW4UPST2.js} +2 -2
  45. package/dist/bundle/{chunk-2HF2MRXI.js → chunk-IDAK4DDK.js} +1 -1
  46. package/dist/bundle/{chunk-27YUUGXQ.js → chunk-IK6KH3RE.js} +1 -1
  47. package/dist/bundle/{chunk-DJ3SDJZY.js → chunk-IX7NQJLY.js} +8 -8
  48. package/dist/bundle/{chunk-534OBX5Y.js → chunk-J62DI53V.js} +1 -1
  49. package/dist/bundle/{chunk-PO5RQQIG.js → chunk-JRXFW7HE.js} +5 -5
  50. package/dist/bundle/{chunk-XIUDS3OK.js → chunk-K6BSB53R.js} +1 -1
  51. package/dist/bundle/{chunk-ND6LLYGF.js → chunk-KE4XPPRQ.js} +27 -27
  52. package/dist/bundle/{chunk-UQLWMGSD.js → chunk-KG2XKEHL.js} +5 -5
  53. package/dist/bundle/{chunk-MOTRI3SY.js → chunk-KIN6PDFE.js} +24 -2
  54. package/dist/bundle/{chunk-VAUMOZU5.js → chunk-KVW4XNKB.js} +16 -16
  55. package/dist/bundle/{chunk-33MGFUED.js → chunk-LOMW6F2E.js} +194 -229
  56. package/dist/bundle/{chunk-5PPL7JDM.js → chunk-M73NNJ3X.js} +2 -2
  57. package/dist/bundle/{chunk-QCKZ3GAA.js → chunk-N622LRPM.js} +4 -4
  58. package/dist/bundle/{chunk-3BZRKLJ6.js → chunk-O2QO5UZC.js} +13 -13
  59. package/dist/bundle/{chunk-SXM6MHRR.js → chunk-OEVHZOHC.js} +12 -12
  60. package/dist/bundle/{chunk-6MQSQ4LX.js → chunk-OH3K2E7X.js} +402 -184
  61. package/dist/bundle/{chunk-J24ZFCWM.js → chunk-P7DEGRZA.js} +21 -21
  62. package/dist/bundle/{chunk-YUWPNG7B.js → chunk-PBMSBCVB.js} +1 -1
  63. package/dist/bundle/{chunk-S4RXABDR.js → chunk-QEAD2LF4.js} +3 -3
  64. package/dist/bundle/{chunk-OXY6SSZG.js → chunk-QXCKJUZY.js} +33 -18
  65. package/dist/bundle/{chunk-LZEOQW7S.js → chunk-SIOIMO62.js} +36 -36
  66. package/dist/bundle/{chunk-RKELRWH7.js → chunk-TNV2FXVK.js} +5 -5
  67. package/dist/bundle/{chunk-UPOSDTPT.js → chunk-UD55VB2N.js} +3 -3
  68. package/dist/bundle/{chunk-6KQJSFYF.js → chunk-UIEA6FIV.js} +22 -22
  69. package/dist/bundle/{chunk-XDC3TWTL.js → chunk-UJR272CP.js} +28 -28
  70. package/dist/bundle/{chunk-3HK5WMI5.js → chunk-USLZE36C.js} +6 -6
  71. package/dist/bundle/{chunk-ZOJU7ZFI.js → chunk-VIJ6ACYB.js} +8 -8
  72. package/dist/bundle/{chunk-VKPCONDQ.js → chunk-VPLFD5RJ.js} +4 -4
  73. package/dist/bundle/{chunk-VJEOGKAN.js → chunk-VT2UFYPJ.js} +7 -7
  74. package/dist/bundle/{chunk-Q5DJTRKV.js → chunk-WWCYTMAV.js} +2 -2
  75. package/dist/bundle/{chunk-7EMQ26BA.js → chunk-XPXKD63J.js} +13 -13
  76. package/dist/bundle/{chunk-J4DIHPZ6.js → chunk-ZF6GUZCE.js} +1 -1
  77. package/dist/bundle/{chunk-Z42YYLTS.js → chunk-ZRZ4HTCK.js} +52 -34
  78. package/dist/bundle/{chunk-NEFSGCVA.js → chunk-ZSZJLJIA.js} +10 -10
  79. package/dist/bundle/command-contract-H5OYJOPF.js +38 -0
  80. package/dist/bundle/{decode-G5YEIPNC.js → decode-HTOQ6S3V.js} +8 -8
  81. package/dist/bundle/{dispatch-GEFIXA6X.js → dispatch-SH5SP6LA.js} +11 -11
  82. package/dist/bundle/drive.js +11 -11
  83. package/dist/bundle/{echarts-W2CWHNXR.js → echarts-KFHB6SLX.js} +2 -2
  84. package/dist/bundle/{embed-OBFFPVF4.js → embed-YATFB2PN.js} +9 -9
  85. package/dist/bundle/{embedder-NGCBQHIG.js → embedder-MQPDFGTJ.js} +12 -12
  86. package/dist/bundle/entry-YZBB647C.js +22 -0
  87. package/dist/bundle/{failure-GV77W3CD.js → failure-4FQL4XJI.js} +4 -4
  88. package/dist/bundle/first-run-5JT3UQZB.js +30 -0
  89. package/dist/bundle/first-screen-BEMDEWO7.js +36 -0
  90. package/dist/bundle/{google-CIWUVJ5C.js → google-DVADVICN.js} +13 -13
  91. package/dist/bundle/{google-api-Z3NSTBBR.js → google-api-QMFGCXBM.js} +55 -56
  92. package/dist/bundle/grants-WKB2E4TA.js +103 -0
  93. package/dist/bundle/{identity-OM6GFZ7T.js → identity-FYVDK4M2.js} +6 -6
  94. package/dist/bundle/{instructions-YQBQSYSS.js → instructions-D3GF3B7M.js} +1 -1
  95. package/dist/bundle/{login-7RYSDVN3.js → login-COFZ2IWP.js} +61 -62
  96. package/dist/bundle/{mcp-GWDA3HOA.js → mcp-RKJG22KM.js} +2 -2
  97. package/dist/bundle/{node-IVU33RL7.js → node-OFICOKX3.js} +2 -2
  98. package/dist/bundle/{node-sqlite-SIH5BEW2.js → node-sqlite-DNBTDOXD.js} +9 -9
  99. package/dist/bundle/oauth-PDQHWFBF.js +22 -0
  100. package/dist/bundle/{open-IAO2SNII.js → open-PTPR2YWX.js} +8 -8
  101. package/dist/bundle/{openai-SGOUBHXP.js → openai-2KV5LUW4.js} +17 -17
  102. package/dist/bundle/{process-BPBMV3AT.js → process-EAW6NST2.js} +1 -1
  103. package/dist/bundle/{program-MYKKJ4F6.js → program-6UV5Q5YN.js} +306 -276
  104. package/dist/bundle/prompt-634TPMJK.js +19 -0
  105. package/dist/bundle/{reasons-57J2D77K.js → reasons-DDWCEYSQ.js} +5 -5
  106. package/dist/bundle/{recognize-A5C5RPB3.js → recognize-SJO6QUDW.js} +7 -7
  107. package/dist/bundle/{remote-VWYFLRGO.js → remote-6JXZITKF.js} +10 -10
  108. package/dist/bundle/{rerank-4NGQWREA.js → rerank-MD5VOPQ6.js} +10 -10
  109. package/dist/bundle/{serve-Y6LQTFH5.js → serve-LZTROA2M.js} +12 -12
  110. package/dist/bundle/server-GT7X666D.js +69 -0
  111. package/dist/bundle/{server-6AUHIIUA.js → server-NSA3UAFY.js} +43 -43
  112. package/dist/bundle/{services-2W4J7EMW.js → services-F5A6XQCV.js} +63 -33
  113. package/dist/bundle/{sqlite-runtime-P6BBDX2H.js → sqlite-runtime-7YF6REKS.js} +9 -9
  114. package/dist/bundle/{start-AFFA3LKM.js → start-MUFLE6FA.js} +30 -8
  115. package/dist/bundle/{state-PXKKXR3R.js → state-UC54F3YZ.js} +9 -9
  116. package/dist/bundle/{store-IVV2BAGZ.js → store-F5FJGWMR.js} +28 -20
  117. package/dist/bundle/{store-CN6JEUC4.js → store-J53YNAH6.js} +35 -18
  118. package/dist/bundle/store-maintenance-command-GJVXLBAB.js +58 -0
  119. package/dist/bundle/tokens-H2EJKGA5.js +101 -0
  120. package/dist/commands/account.d.ts +4 -0
  121. package/dist/commands/account.d.ts.map +1 -0
  122. package/dist/commands/account.js +33 -0
  123. package/dist/commands/account.js.map +1 -0
  124. package/dist/profile-lock.d.ts +1 -0
  125. package/dist/profile-lock.d.ts.map +1 -1
  126. package/dist/profile-lock.js +1 -0
  127. package/dist/profile-lock.js.map +1 -1
  128. package/dist/program.d.ts.map +1 -1
  129. package/dist/program.js +2 -0
  130. package/dist/program.js.map +1 -1
  131. package/dist/version.d.ts +1 -1
  132. package/dist/version.js +1 -1
  133. package/package.json +3 -3
  134. package/dist/bundle/chunk-Z5KC7XBR.js +0 -33
  135. package/dist/bundle/command-contract-BRW3AP44.js +0 -38
  136. package/dist/bundle/entry-ET6HGM7A.js +0 -22
  137. package/dist/bundle/first-run-JG52UZVO.js +0 -30
  138. package/dist/bundle/first-screen-CIL3GFAA.js +0 -36
  139. package/dist/bundle/grants-3S4RL3WB.js +0 -104
  140. package/dist/bundle/oauth-PT4JEHLL.js +0 -22
  141. package/dist/bundle/prompt-3ZM64DCB.js +0 -17
  142. package/dist/bundle/server-PFHI35HA.js +0 -69
  143. package/dist/bundle/store-maintenance-command-MSY2QNEH.js +0 -59
  144. package/dist/bundle/tokens-P4LPNUFW.js +0 -102
  145. /package/dist/bundle/{chunk-ZQ3GWKDQ.js → chunk-SW6C6WH5.js} +0 -0
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answerOf,
5
5
  messengerContext
6
- } from "./chunk-XDC3TWTL.js";
6
+ } from "./chunk-UJR272CP.js";
7
7
  import {
8
8
  chatEventAnswer,
9
9
  memberAnswer,
@@ -12,7 +12,7 @@ import {
12
12
  serveRelay,
13
13
  typedQuery,
14
14
  withQuery
15
- } from "./chunk-J24ZFCWM.js";
15
+ } from "./chunk-P7DEGRZA.js";
16
16
  import {
17
17
  stringWidth,
18
18
  wrapAnsi
@@ -25,13 +25,11 @@ import {
25
25
  REMOTE_WRITE,
26
26
  annotate,
27
27
  destroysNothing,
28
- endpoint,
29
28
  environmentOf,
30
29
  itemOf,
31
30
  jsonlRecords,
32
31
  lineOf,
33
32
  listOf,
34
- modelTarget,
35
33
  nextStep,
36
34
  outputFor,
37
35
  recalledAccount,
@@ -40,29 +38,25 @@ import {
40
38
  snakeKeys,
41
39
  storeTable,
42
40
  withoutProviderRefs
43
- } from "./chunk-33MGFUED.js";
44
- import {
45
- envName
46
- } from "./chunk-ZM5J6ZMB.js";
41
+ } from "./chunk-LOMW6F2E.js";
47
42
  import {
48
43
  holdLock,
49
44
  lockPath,
50
45
  releaseLock,
51
46
  servingProfiles,
52
47
  takeLock
53
- } from "./chunk-FRIJUILO.js";
48
+ } from "./chunk-F2VDAG32.js";
54
49
  import {
55
50
  holdersOf
56
- } from "./chunk-534OBX5Y.js";
57
- import {
58
- checkedOptions,
59
- range
60
- } from "./chunk-Z5KC7XBR.js";
51
+ } from "./chunk-J62DI53V.js";
61
52
  import {
62
53
  FETCHING,
63
54
  RULES_VERSION,
64
55
  applyTaskRulesOnArrival,
65
56
  capability,
57
+ embeddingKeys,
58
+ endpointKeyName,
59
+ modelGateway,
66
60
  newSendId,
67
61
  onlineDeps,
68
62
  openRequestTask,
@@ -70,28 +64,24 @@ import {
70
64
  senderIsMe,
71
65
  servicesFor,
72
66
  syncsOneChat
73
- } from "./chunk-44SBK6KB.js";
67
+ } from "./chunk-3J5KAFNA.js";
74
68
  import {
75
69
  withTimeLimit
76
- } from "./chunk-ND6LLYGF.js";
70
+ } from "./chunk-KE4XPPRQ.js";
77
71
  import {
78
72
  codeOf,
79
73
  currentRun,
80
74
  levelFor,
75
+ modelTarget,
81
76
  parseDuration
82
- } from "./chunk-6MQSQ4LX.js";
83
- import {
84
- messagesFor,
85
- systemFor,
86
- validateImages
87
- } from "./chunk-MOTRI3SY.js";
77
+ } from "./chunk-OH3K2E7X.js";
88
78
  import {
89
79
  QUICK_HEALTH_CHECKS,
90
80
  explainDamage,
91
81
  fts5Tables,
92
82
  invalidJson,
93
83
  storeHealth
94
- } from "./chunk-VAUMOZU5.js";
84
+ } from "./chunk-KVW4XNKB.js";
95
85
  import {
96
86
  CORPORA,
97
87
  MIGRATIONS,
@@ -127,48 +117,44 @@ import {
127
117
  storeClients,
128
118
  storeContents,
129
119
  vectorIndexCounts
130
- } from "./chunk-XNVFKMVR.js";
120
+ } from "./chunk-EWGVDFPT.js";
131
121
  import {
132
122
  readDamageMark,
133
123
  readHealthMark,
134
124
  recordDeepCheck
135
- } from "./chunk-V3NVXIQR.js";
125
+ } from "./chunk-CPMRM3GQ.js";
136
126
  import {
137
127
  queryFieldsOf
138
- } from "./chunk-EOOGWUTP.js";
128
+ } from "./chunk-2FEZ24DK.js";
139
129
  import {
140
130
  failureKey,
141
131
  isStoreDamage
142
- } from "./chunk-E4SDKMBJ.js";
132
+ } from "./chunk-B67BLRAI.js";
143
133
  import {
144
134
  storePath
145
- } from "./chunk-AEX37ETW.js";
135
+ } from "./chunk-DD7EFG6B.js";
146
136
  import {
147
137
  openCache
148
- } from "./chunk-3HK5WMI5.js";
138
+ } from "./chunk-USLZE36C.js";
149
139
  import {
150
140
  readSecret
151
- } from "./chunk-Y6GNA7HE.js";
141
+ } from "./chunk-6B37XO6B.js";
152
142
  import {
153
- Credentials,
154
- pathsAreOverridden,
155
143
  resolvePaths,
156
144
  writeSecurely
157
- } from "./chunk-OD4U7GUY.js";
145
+ } from "./chunk-G4KEKKDE.js";
158
146
  import {
159
147
  singleLine,
160
148
  visibleControls
161
- } from "./chunk-2HF2MRXI.js";
149
+ } from "./chunk-IDAK4DDK.js";
162
150
  import {
163
151
  array,
164
152
  boolean,
165
153
  check,
166
154
  forward,
167
155
  getDotPath,
168
- integer,
169
156
  minLength,
170
157
  nullable,
171
- number,
172
158
  object,
173
159
  optional,
174
160
  parse,
@@ -180,12 +166,11 @@ import {
180
166
  strictObject,
181
167
  string,
182
168
  transform,
183
- trim,
184
- union
185
- } from "./chunk-FEZF3TII.js";
169
+ trim
170
+ } from "./chunk-BDYWZ7JE.js";
186
171
  import {
187
172
  CliError
188
- } from "./chunk-4OSSOWDM.js";
173
+ } from "./chunk-EJ4PNHPP.js";
189
174
  import {
190
175
  __commonJS,
191
176
  __name,
@@ -363,14 +348,14 @@ var require_liquid_node = __commonJS({
363
348
  return value !== null && (type === "object" || type === "function");
364
349
  }
365
350
  __name(isObject, "isObject");
366
- function range2(start, stop, step = 1) {
351
+ function range(start, stop, step = 1) {
367
352
  const arr = [];
368
353
  for (let i = start; i < stop; i += step) {
369
354
  arr.push(i);
370
355
  }
371
356
  return arr;
372
357
  }
373
- __name(range2, "range");
358
+ __name(range, "range");
374
359
  function padStart(str, length, ch = " ") {
375
360
  return pad(str, length, ch, (str2, ch2) => ch2 + str2);
376
361
  }
@@ -564,7 +549,7 @@ var require_liquid_node = __commonJS({
564
549
  const lines = token.input.split("\n");
565
550
  const begin = Math.max(line - 2, 1);
566
551
  const end = Math.min(line + 3, lines.length);
567
- const context = range2(begin, end + 1).map((lineNumber) => {
552
+ const context = range(begin, end + 1).map((lineNumber) => {
568
553
  const rowIndicator = lineNumber === line ? ">> " : " ";
569
554
  const num = padStart(String(lineNumber), String(end).length);
570
555
  let text = `${rowIndicator}${num}| `;
@@ -1142,8 +1127,8 @@ var require_liquid_node = __commonJS({
1142
1127
  valid() {
1143
1128
  return !isNaN(this.getTime());
1144
1129
  }
1145
- format(options2) {
1146
- return this.DateTimeFormat && this.DateTimeFormat(this.locale, options2).format(this.displayDate);
1130
+ format(options) {
1131
+ return this.DateTimeFormat && this.DateTimeFormat(this.locale, options).format(this.displayDate);
1147
1132
  }
1148
1133
  /**
1149
1134
  * Create a Date object fixed to it's declared Timezone. Both
@@ -1227,11 +1212,11 @@ var require_liquid_node = __commonJS({
1227
1212
  static {
1228
1213
  __name(this, "TagToken");
1229
1214
  }
1230
- constructor(input, begin, end, options2, file2) {
1231
- const { trimTagLeft, trimTagRight, tagDelimiterLeft, tagDelimiterRight } = options2;
1215
+ constructor(input, begin, end, options, file2) {
1216
+ const { trimTagLeft, trimTagRight, tagDelimiterLeft, tagDelimiterRight } = options;
1232
1217
  const [valueBegin, valueEnd] = [begin + tagDelimiterLeft.length, end - tagDelimiterRight.length];
1233
1218
  super(exports.TokenKind.Tag, [valueBegin, valueEnd], input, begin, end, trimTagLeft, trimTagRight, file2);
1234
- this.tokenizer = new Tokenizer(input, options2.operators, file2, this.contentRange, options2.groupedExpressions);
1219
+ this.tokenizer = new Tokenizer(input, options.operators, file2, this.contentRange, options.groupedExpressions);
1235
1220
  this.name = this.tokenizer.readTagName();
1236
1221
  this.tokenizer.assert(this.name, `illegal tag syntax, tag name expected`);
1237
1222
  this.tokenizer.skipBlank();
@@ -1242,8 +1227,8 @@ var require_liquid_node = __commonJS({
1242
1227
  static {
1243
1228
  __name(this, "OutputToken");
1244
1229
  }
1245
- constructor(input, begin, end, options2, file2) {
1246
- const { trimOutputLeft, trimOutputRight, outputDelimiterLeft, outputDelimiterRight } = options2;
1230
+ constructor(input, begin, end, options, file2) {
1231
+ const { trimOutputLeft, trimOutputRight, outputDelimiterLeft, outputDelimiterRight } = options;
1247
1232
  const valueRange = [begin + outputDelimiterLeft.length, end - outputDelimiterRight.length];
1248
1233
  super(exports.TokenKind.Output, valueRange, input, begin, end, trimOutputLeft, trimOutputRight, file2);
1249
1234
  }
@@ -1462,9 +1447,9 @@ var require_liquid_node = __commonJS({
1462
1447
  static {
1463
1448
  __name(this, "LiquidTagToken");
1464
1449
  }
1465
- constructor(input, begin, end, options2, file2) {
1450
+ constructor(input, begin, end, options, file2) {
1466
1451
  super(exports.TokenKind.Tag, [begin, end], input, begin, end, false, false, file2);
1467
- this.tokenizer = new Tokenizer(input, options2.operators, file2, this.contentRange, options2.groupedExpressions);
1452
+ this.tokenizer = new Tokenizer(input, options.operators, file2, this.contentRange, options.groupedExpressions);
1468
1453
  this.name = this.tokenizer.readTagName();
1469
1454
  this.tokenizer.assert(this.name, "illegal liquid tag syntax");
1470
1455
  this.tokenizer.skipBlank();
@@ -1538,11 +1523,11 @@ var require_liquid_node = __commonJS({
1538
1523
  static {
1539
1524
  __name(this, "Filter");
1540
1525
  }
1541
- constructor(token, options2, liquid) {
1526
+ constructor(token, options, liquid) {
1542
1527
  this.token = token;
1543
1528
  this.name = token.name;
1544
- this.handler = isFunction(options2) ? options2 : isFunction(options2?.handler) ? options2.handler : identify;
1545
- this.raw = !isFunction(options2) && !!options2?.raw;
1529
+ this.handler = isFunction(options) ? options : isFunction(options?.handler) ? options.handler : identify;
1530
+ this.raw = !isFunction(options) && !!options?.raw;
1546
1531
  this.args = token.args;
1547
1532
  this.liquid = liquid;
1548
1533
  }
@@ -1645,7 +1630,7 @@ var require_liquid_node = __commonJS({
1645
1630
  const low = yield evalTokenValue(token.lhs, ctx);
1646
1631
  const high = yield evalTokenValue(token.rhs, ctx);
1647
1632
  ctx.memoryLimit.use(high - low + 1);
1648
- return range2(+low, +high + 1);
1633
+ return range(+low, +high + 1);
1649
1634
  }
1650
1635
  __name(evalRangeToken, "evalRangeToken");
1651
1636
  function* toPostfix(tokens) {
@@ -2126,41 +2111,41 @@ var require_liquid_node = __commonJS({
2126
2111
  parseLimit: Infinity,
2127
2112
  renderLimit: Infinity
2128
2113
  };
2129
- function normalize(options2) {
2130
- if (options2.hasOwnProperty("root")) {
2131
- if (!options2.hasOwnProperty("partials"))
2132
- options2.partials = options2.root;
2133
- if (!options2.hasOwnProperty("layouts"))
2134
- options2.layouts = options2.root;
2135
- }
2136
- if (options2.hasOwnProperty("cache")) {
2114
+ function normalize(options) {
2115
+ if (options.hasOwnProperty("root")) {
2116
+ if (!options.hasOwnProperty("partials"))
2117
+ options.partials = options.root;
2118
+ if (!options.hasOwnProperty("layouts"))
2119
+ options.layouts = options.root;
2120
+ }
2121
+ if (options.hasOwnProperty("cache")) {
2137
2122
  let cache;
2138
- if (typeof options2.cache === "number")
2139
- cache = options2.cache > 0 ? new LRU(options2.cache) : void 0;
2140
- else if (typeof options2.cache === "object")
2141
- cache = options2.cache;
2123
+ if (typeof options.cache === "number")
2124
+ cache = options.cache > 0 ? new LRU(options.cache) : void 0;
2125
+ else if (typeof options.cache === "object")
2126
+ cache = options.cache;
2142
2127
  else
2143
- cache = options2.cache ? new LRU(1024) : void 0;
2144
- options2.cache = cache;
2128
+ cache = options.cache ? new LRU(1024) : void 0;
2129
+ options.cache = cache;
2145
2130
  }
2146
- options2 = { ...defaultOptions, ...options2.jekyllInclude ? { dynamicPartials: false } : {}, ...options2 };
2147
- if ((!options2.fs.dirname || !options2.fs.sep) && options2.relativeReference) {
2131
+ options = { ...defaultOptions, ...options.jekyllInclude ? { dynamicPartials: false } : {}, ...options };
2132
+ if ((!options.fs.dirname || !options.fs.sep) && options.relativeReference) {
2148
2133
  console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning");
2149
- options2.relativeReference = false;
2134
+ options.relativeReference = false;
2150
2135
  }
2151
- options2.root = normalizeDirectoryList(options2.root);
2152
- options2.partials = normalizeDirectoryList(options2.partials);
2153
- options2.layouts = normalizeDirectoryList(options2.layouts);
2154
- options2.outputEscape = options2.outputEscape && getOutputEscapeFunction(options2.outputEscape);
2155
- if (!options2.locale) {
2156
- options2.locale = getDateTimeFormat()?.().resolvedOptions().locale ?? "en-US";
2136
+ options.root = normalizeDirectoryList(options.root);
2137
+ options.partials = normalizeDirectoryList(options.partials);
2138
+ options.layouts = normalizeDirectoryList(options.layouts);
2139
+ options.outputEscape = options.outputEscape && getOutputEscapeFunction(options.outputEscape);
2140
+ if (!options.locale) {
2141
+ options.locale = getDateTimeFormat()?.().resolvedOptions().locale ?? "en-US";
2157
2142
  }
2158
- if (options2.templates) {
2159
- options2.fs = new MapFS(options2.templates);
2160
- options2.relativeReference = true;
2161
- options2.root = options2.partials = options2.layouts = ".";
2143
+ if (options.templates) {
2144
+ options.fs = new MapFS(options.templates);
2145
+ options.relativeReference = true;
2146
+ options.root = options.partials = options.layouts = ".";
2162
2147
  }
2163
- return options2;
2148
+ return options;
2164
2149
  }
2165
2150
  __name(normalize, "normalize");
2166
2151
  function getOutputEscapeFunction(nameOrFunction) {
@@ -2181,14 +2166,14 @@ var require_liquid_node = __commonJS({
2181
2166
  return list;
2182
2167
  }
2183
2168
  __name(normalizeDirectoryList, "normalizeDirectoryList");
2184
- function whiteSpaceCtrl(tokens, options2) {
2169
+ function whiteSpaceCtrl(tokens, options) {
2185
2170
  let inRaw = false;
2186
2171
  for (let i = 0; i < tokens.length; i++) {
2187
2172
  const token = tokens[i];
2188
2173
  if (!isDelimitedToken(token))
2189
2174
  continue;
2190
2175
  if (!inRaw && token.trimLeft) {
2191
- trimLeft(tokens[i - 1], options2.greedy);
2176
+ trimLeft(tokens[i - 1], options.greedy);
2192
2177
  }
2193
2178
  if (isTagToken(token)) {
2194
2179
  if (token.name === "raw")
@@ -2197,7 +2182,7 @@ var require_liquid_node = __commonJS({
2197
2182
  inRaw = false;
2198
2183
  }
2199
2184
  if (!inRaw && token.trimRight) {
2200
- trimRight(tokens[i + 1], options2.greedy);
2185
+ trimRight(tokens[i + 1], options.greedy);
2201
2186
  }
2202
2187
  }
2203
2188
  }
@@ -2224,12 +2209,12 @@ var require_liquid_node = __commonJS({
2224
2209
  static {
2225
2210
  __name(this, "Tokenizer");
2226
2211
  }
2227
- constructor(input, operators = defaultOptions.operators, file2, range3, groupedExpressions = false) {
2212
+ constructor(input, operators = defaultOptions.operators, file2, range2, groupedExpressions = false) {
2228
2213
  this.input = input;
2229
2214
  this.file = file2;
2230
2215
  this.rawBeginAt = -1;
2231
- this.p = range3 ? range3[0] : 0;
2232
- this.N = range3 ? range3[1] : input.length;
2216
+ this.p = range2 ? range2[0] : 0;
2217
+ this.N = range2 ? range2[1] : input.length;
2233
2218
  this.opTrie = createTrie(operators);
2234
2219
  this.literalTrie = createTrie(literalValues);
2235
2220
  this.groupedExpressions = groupedExpressions;
@@ -2329,23 +2314,23 @@ var require_liquid_node = __commonJS({
2329
2314
  const value = this.readValue();
2330
2315
  return [key.getText(), value];
2331
2316
  }
2332
- readTopLevelTokens(options2 = defaultOptions) {
2317
+ readTopLevelTokens(options = defaultOptions) {
2333
2318
  const tokens = [];
2334
2319
  while (this.p < this.N) {
2335
- const token = this.readTopLevelToken(options2);
2320
+ const token = this.readTopLevelToken(options);
2336
2321
  tokens.push(token);
2337
2322
  }
2338
- whiteSpaceCtrl(tokens, options2);
2323
+ whiteSpaceCtrl(tokens, options);
2339
2324
  return tokens;
2340
2325
  }
2341
- readTopLevelToken(options2) {
2342
- const { tagDelimiterLeft, outputDelimiterLeft } = options2;
2326
+ readTopLevelToken(options) {
2327
+ const { tagDelimiterLeft, outputDelimiterLeft } = options;
2343
2328
  if (this.rawBeginAt > -1)
2344
- return this.readEndrawOrRawContent(options2);
2329
+ return this.readEndrawOrRawContent(options);
2345
2330
  if (this.match(tagDelimiterLeft))
2346
- return this.readTagToken(options2);
2331
+ return this.readTagToken(options);
2347
2332
  if (this.match(outputDelimiterLeft))
2348
- return this.readOutputToken(options2);
2333
+ return this.readOutputToken(options);
2349
2334
  return this.readHTMLToken([tagDelimiterLeft, outputDelimiterLeft]);
2350
2335
  }
2351
2336
  readHTMLToken(stopStrings) {
@@ -2357,13 +2342,13 @@ var require_liquid_node = __commonJS({
2357
2342
  }
2358
2343
  return new HTMLToken(this.input, begin, this.p, this.file);
2359
2344
  }
2360
- readTagToken(options2) {
2345
+ readTagToken(options) {
2361
2346
  const { file: file2, input } = this;
2362
2347
  const begin = this.p;
2363
- if (this.readToDelimiter(options2.tagDelimiterRight) === -1) {
2348
+ if (this.readToDelimiter(options.tagDelimiterRight) === -1) {
2364
2349
  throw this.error(`tag ${this.snapshot(begin)} not closed`, begin);
2365
2350
  }
2366
- const token = new TagToken(input, begin, this.p, options2, file2);
2351
+ const token = new TagToken(input, begin, this.p, options, file2);
2367
2352
  if (token.name === "raw")
2368
2353
  this.rawBeginAt = begin;
2369
2354
  return token;
@@ -2381,17 +2366,17 @@ var require_liquid_node = __commonJS({
2381
2366
  }
2382
2367
  return -1;
2383
2368
  }
2384
- readOutputToken(options2 = defaultOptions) {
2369
+ readOutputToken(options = defaultOptions) {
2385
2370
  const { file: file2, input } = this;
2386
- const { outputDelimiterRight } = options2;
2371
+ const { outputDelimiterRight } = options;
2387
2372
  const begin = this.p;
2388
2373
  if (this.readToDelimiter(outputDelimiterRight, true) === -1) {
2389
2374
  throw this.error(`output ${this.snapshot(begin)} not closed`, begin);
2390
2375
  }
2391
- return new OutputToken(input, begin, this.p, options2, file2);
2376
+ return new OutputToken(input, begin, this.p, options, file2);
2392
2377
  }
2393
- readEndrawOrRawContent(options2) {
2394
- const { tagDelimiterLeft, tagDelimiterRight } = options2;
2378
+ readEndrawOrRawContent(options) {
2379
+ const { tagDelimiterLeft, tagDelimiterRight } = options;
2395
2380
  const begin = this.p;
2396
2381
  let leftPos = this.readTo(tagDelimiterLeft) - tagDelimiterLeft.length;
2397
2382
  while (this.p < this.N) {
@@ -2404,7 +2389,7 @@ var require_liquid_node = __commonJS({
2404
2389
  const end = this.p;
2405
2390
  if (begin === leftPos) {
2406
2391
  this.rawBeginAt = -1;
2407
- return new TagToken(this.input, begin, end, options2, this.file);
2392
+ return new TagToken(this.input, begin, end, options, this.file);
2408
2393
  } else {
2409
2394
  this.p = leftPos;
2410
2395
  return new HTMLToken(this.input, begin, leftPos, this.file);
@@ -2417,22 +2402,22 @@ var require_liquid_node = __commonJS({
2417
2402
  }
2418
2403
  throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, begin);
2419
2404
  }
2420
- readLiquidTagTokens(options2 = defaultOptions) {
2405
+ readLiquidTagTokens(options = defaultOptions) {
2421
2406
  const tokens = [];
2422
2407
  while (this.p < this.N) {
2423
- const token = this.readLiquidTagToken(options2);
2408
+ const token = this.readLiquidTagToken(options);
2424
2409
  token && tokens.push(token);
2425
2410
  }
2426
2411
  return tokens;
2427
2412
  }
2428
- readLiquidTagToken(options2) {
2413
+ readLiquidTagToken(options) {
2429
2414
  this.skipBlank();
2430
2415
  if (this.end())
2431
2416
  return;
2432
2417
  const begin = this.p;
2433
2418
  this.readToDelimiter("\n");
2434
2419
  const end = this.p;
2435
- return new LiquidTagToken(this.input, begin, end, options2, this.file);
2420
+ return new LiquidTagToken(this.input, begin, end, options, this.file);
2436
2421
  }
2437
2422
  error(msg, pos = this.p) {
2438
2423
  return new TokenizationError(msg, new IdentifierToken(this.input, pos, this.N, this.file));
@@ -2644,12 +2629,12 @@ var require_liquid_node = __commonJS({
2644
2629
  }
2645
2630
  return new QuotedToken(this.input, begin, this.p, this.file);
2646
2631
  }
2647
- *readFileNameTemplate(options2) {
2648
- const { outputDelimiterLeft } = options2;
2632
+ *readFileNameTemplate(options) {
2633
+ const { outputDelimiterLeft } = options;
2649
2634
  const htmlStopStrings = [",", " ", "\r", "\n", " ", outputDelimiterLeft];
2650
2635
  const htmlStopStringSet = new Set(htmlStopStrings);
2651
2636
  while (this.p < this.N && !htmlStopStringSet.has(this.peek())) {
2652
- yield this.match(outputDelimiterLeft) ? this.readOutputToken(options2) : this.readHTMLToken(htmlStopStrings);
2637
+ yield this.match(outputDelimiterLeft) ? this.readOutputToken(options) : this.readHTMLToken(htmlStopStrings);
2653
2638
  }
2654
2639
  }
2655
2640
  match(word) {
@@ -2724,7 +2709,7 @@ var require_liquid_node = __commonJS({
2724
2709
  this.token = token;
2725
2710
  }
2726
2711
  };
2727
- var Tag2 = class extends TemplateImpl {
2712
+ var Tag3 = class extends TemplateImpl {
2728
2713
  static {
2729
2714
  __name(this, "Tag");
2730
2715
  }
@@ -2754,17 +2739,17 @@ var require_liquid_node = __commonJS({
2754
2739
  return hash2;
2755
2740
  }
2756
2741
  };
2757
- function createTagClass(options2) {
2758
- return class extends Tag2 {
2742
+ function createTagClass(options) {
2743
+ return class extends Tag3 {
2759
2744
  constructor(token, tokens, liquid) {
2760
2745
  super(token, tokens, liquid);
2761
- if (isFunction(options2.parse)) {
2762
- options2.parse.call(this, token, tokens);
2746
+ if (isFunction(options.parse)) {
2747
+ options.parse.call(this, token, tokens);
2763
2748
  }
2764
2749
  }
2765
2750
  *render(ctx, emitter) {
2766
2751
  const hash2 = yield new Hash(this.token.args, ctx.opts.keyValueSeparator).render(ctx);
2767
- return yield options2.render.call(this, ctx, emitter, hash2);
2752
+ return yield options.render.call(this, ctx, emitter, hash2);
2768
2753
  }
2769
2754
  };
2770
2755
  }
@@ -2981,13 +2966,13 @@ var require_liquid_node = __commonJS({
2981
2966
  };
2982
2967
  }
2983
2968
  __name(_analyze, "_analyze");
2984
- function analyze(template2, options2 = {}) {
2985
- const opts = { ...defaultStaticAnalysisOptions, ...options2 };
2969
+ function analyze(template2, options = {}) {
2970
+ const opts = { ...defaultStaticAnalysisOptions, ...options };
2986
2971
  return toPromise(_analyze(template2, opts.partials, false));
2987
2972
  }
2988
2973
  __name(analyze, "analyze");
2989
- function analyzeSync(template2, options2 = {}) {
2990
- const opts = { ...defaultStaticAnalysisOptions, ...options2 };
2974
+ function analyzeSync(template2, options = {}) {
2975
+ const opts = { ...defaultStaticAnalysisOptions, ...options };
2991
2976
  return toValueSync(_analyze(template2, opts.partials, true));
2992
2977
  }
2993
2978
  __name(analyzeSync, "analyzeSync");
@@ -3163,17 +3148,17 @@ var require_liquid_node = __commonJS({
3163
3148
  static {
3164
3149
  __name(this, "Loader");
3165
3150
  }
3166
- constructor(options2) {
3167
- this.options = options2;
3168
- if (options2.relativeReference) {
3169
- const sep = options2.fs.sep;
3151
+ constructor(options) {
3152
+ this.options = options;
3153
+ if (options.relativeReference) {
3154
+ const sep = options.fs.sep;
3170
3155
  assert(sep, "`fs.sep` is required for relative reference");
3171
3156
  const prefixes = ["." + sep, ".." + sep, "./", "../"];
3172
3157
  this.shouldLoadRelative = (referencedFile) => prefixes.some((prefix) => referencedFile.startsWith(prefix));
3173
3158
  } else {
3174
3159
  this.shouldLoadRelative = (_referencedFile) => false;
3175
3160
  }
3176
- const fs2 = options2.fs;
3161
+ const fs2 = options.fs;
3177
3162
  this.contains = toLiquidAsync(fs2.contains?.bind(fs2) || (async () => true), fs2.containsSync?.bind(fs2) || (() => true));
3178
3163
  this.exists = toLiquidAsync(fs2.exists?.bind(fs2) || (async () => false), fs2.existsSync?.bind(fs2));
3179
3164
  }
@@ -4323,7 +4308,7 @@ var require_liquid_node = __commonJS({
4323
4308
  ...cryptoFilters,
4324
4309
  ...misc
4325
4310
  };
4326
- var AssignTag = class extends Tag2 {
4311
+ var AssignTag = class extends Tag3 {
4327
4312
  static {
4328
4313
  __name(this, "AssignTag");
4329
4314
  }
@@ -4348,7 +4333,7 @@ var require_liquid_node = __commonJS({
4348
4333
  }
4349
4334
  };
4350
4335
  var MODIFIERS = ["offset", "limit", "reversed"];
4351
- var ForTag = class extends Tag2 {
4336
+ var ForTag = class extends Tag3 {
4352
4337
  static {
4353
4338
  __name(this, "ForTag");
4354
4339
  }
@@ -4441,7 +4426,7 @@ var require_liquid_node = __commonJS({
4441
4426
  return arr.slice(0, count3);
4442
4427
  }
4443
4428
  __name(limit2, "limit");
4444
- var CaptureTag = class extends Tag2 {
4429
+ var CaptureTag = class extends Tag3 {
4445
4430
  static {
4446
4431
  __name(this, "CaptureTag");
4447
4432
  }
@@ -4479,7 +4464,7 @@ var require_liquid_node = __commonJS({
4479
4464
  yield this.identifier;
4480
4465
  }
4481
4466
  };
4482
- var CaseTag = class extends Tag2 {
4467
+ var CaseTag = class extends Tag3 {
4483
4468
  static {
4484
4469
  __name(this, "CaseTag");
4485
4470
  }
@@ -4552,7 +4537,7 @@ var require_liquid_node = __commonJS({
4552
4537
  return templates;
4553
4538
  }
4554
4539
  };
4555
- var CommentTag = class extends Tag2 {
4540
+ var CommentTag = class extends Tag3 {
4556
4541
  static {
4557
4542
  __name(this, "CommentTag");
4558
4543
  }
@@ -4568,7 +4553,7 @@ var require_liquid_node = __commonJS({
4568
4553
  render() {
4569
4554
  }
4570
4555
  };
4571
- var RenderTag = class extends Tag2 {
4556
+ var RenderTag = class extends Tag3 {
4572
4557
  static {
4573
4558
  __name(this, "RenderTag");
4574
4559
  }
@@ -4715,7 +4700,7 @@ var require_liquid_node = __commonJS({
4715
4700
  return yield evalToken(file2, ctx);
4716
4701
  }
4717
4702
  __name(renderFilePath, "renderFilePath");
4718
- var IncludeTag = class extends Tag2 {
4703
+ var IncludeTag = class extends Tag3 {
4719
4704
  static {
4720
4705
  __name(this, "IncludeTag");
4721
4706
  }
@@ -4783,7 +4768,7 @@ var require_liquid_node = __commonJS({
4783
4768
  }
4784
4769
  }
4785
4770
  };
4786
- var DecrementTag = class extends Tag2 {
4771
+ var DecrementTag = class extends Tag3 {
4787
4772
  static {
4788
4773
  __name(this, "DecrementTag");
4789
4774
  }
@@ -4803,7 +4788,7 @@ var require_liquid_node = __commonJS({
4803
4788
  yield this.identifier;
4804
4789
  }
4805
4790
  };
4806
- var CycleTag = class extends Tag2 {
4791
+ var CycleTag = class extends Tag3 {
4807
4792
  static {
4808
4793
  __name(this, "CycleTag");
4809
4794
  }
@@ -4847,7 +4832,7 @@ var require_liquid_node = __commonJS({
4847
4832
  }
4848
4833
  }
4849
4834
  };
4850
- var IfTag = class extends Tag2 {
4835
+ var IfTag = class extends Tag3 {
4851
4836
  static {
4852
4837
  __name(this, "IfTag");
4853
4838
  }
@@ -4897,7 +4882,7 @@ var require_liquid_node = __commonJS({
4897
4882
  return this.branches.map((b) => b.value);
4898
4883
  }
4899
4884
  };
4900
- var IncrementTag = class extends Tag2 {
4885
+ var IncrementTag = class extends Tag3 {
4901
4886
  static {
4902
4887
  __name(this, "IncrementTag");
4903
4888
  }
@@ -4919,7 +4904,7 @@ var require_liquid_node = __commonJS({
4919
4904
  yield this.identifier;
4920
4905
  }
4921
4906
  };
4922
- var LayoutTag = class extends Tag2 {
4907
+ var LayoutTag = class extends Tag3 {
4923
4908
  static {
4924
4909
  __name(this, "LayoutTag");
4925
4910
  }
@@ -4974,7 +4959,7 @@ var require_liquid_node = __commonJS({
4974
4959
  }
4975
4960
  }
4976
4961
  };
4977
- var BlockTag = class extends Tag2 {
4962
+ var BlockTag = class extends Tag3 {
4978
4963
  static {
4979
4964
  __name(this, "BlockTag");
4980
4965
  }
@@ -5023,7 +5008,7 @@ var require_liquid_node = __commonJS({
5023
5008
  return ["block"];
5024
5009
  }
5025
5010
  };
5026
- var RawTag = class extends Tag2 {
5011
+ var RawTag = class extends Tag3 {
5027
5012
  static {
5028
5013
  __name(this, "RawTag");
5029
5014
  }
@@ -5067,7 +5052,7 @@ var require_liquid_node = __commonJS({
5067
5052
  return this.col() === this.cols;
5068
5053
  }
5069
5054
  };
5070
- var TablerowTag = class extends Tag2 {
5055
+ var TablerowTag = class extends Tag3 {
5071
5056
  static {
5072
5057
  __name(this, "TablerowTag");
5073
5058
  }
@@ -5131,7 +5116,7 @@ var require_liquid_node = __commonJS({
5131
5116
  return [this.variable, "tablerowloop"];
5132
5117
  }
5133
5118
  };
5134
- var UnlessTag = class extends Tag2 {
5119
+ var UnlessTag = class extends Tag3 {
5135
5120
  static {
5136
5121
  __name(this, "UnlessTag");
5137
5122
  }
@@ -5190,7 +5175,7 @@ var require_liquid_node = __commonJS({
5190
5175
  return this.branches.map((b) => b.value);
5191
5176
  }
5192
5177
  };
5193
- var BreakTag = class extends Tag2 {
5178
+ var BreakTag = class extends Tag3 {
5194
5179
  static {
5195
5180
  __name(this, "BreakTag");
5196
5181
  }
@@ -5198,7 +5183,7 @@ var require_liquid_node = __commonJS({
5198
5183
  ctx.breakCalled = true;
5199
5184
  }
5200
5185
  };
5201
- var ContinueTag = class extends Tag2 {
5186
+ var ContinueTag = class extends Tag3 {
5202
5187
  static {
5203
5188
  __name(this, "ContinueTag");
5204
5189
  }
@@ -5206,7 +5191,7 @@ var require_liquid_node = __commonJS({
5206
5191
  ctx.continueCalled = true;
5207
5192
  }
5208
5193
  };
5209
- var EchoTag = class extends Tag2 {
5194
+ var EchoTag = class extends Tag3 {
5210
5195
  static {
5211
5196
  __name(this, "EchoTag");
5212
5197
  }
@@ -5229,7 +5214,7 @@ var require_liquid_node = __commonJS({
5229
5214
  }
5230
5215
  }
5231
5216
  };
5232
- var LiquidTag = class extends Tag2 {
5217
+ var LiquidTag = class extends Tag3 {
5233
5218
  static {
5234
5219
  __name(this, "LiquidTag");
5235
5220
  }
@@ -5245,7 +5230,7 @@ var require_liquid_node = __commonJS({
5245
5230
  return this.templates;
5246
5231
  }
5247
5232
  };
5248
- var InlineCommentTag = class extends Tag2 {
5233
+ var InlineCommentTag = class extends Tag3 {
5249
5234
  static {
5250
5235
  __name(this, "InlineCommentTag");
5251
5236
  }
@@ -5388,76 +5373,76 @@ var require_liquid_node = __commonJS({
5388
5373
  self.renderFile(filePath, ctx).then((html) => callback(null, html), callback);
5389
5374
  };
5390
5375
  }
5391
- async analyze(template2, options2 = {}) {
5392
- return analyze(template2, options2);
5376
+ async analyze(template2, options = {}) {
5377
+ return analyze(template2, options);
5393
5378
  }
5394
- analyzeSync(template2, options2 = {}) {
5395
- return analyzeSync(template2, options2);
5379
+ analyzeSync(template2, options = {}) {
5380
+ return analyzeSync(template2, options);
5396
5381
  }
5397
- async parseAndAnalyze(html, filename, options2 = {}) {
5398
- return analyze(this.parse(html, filename), options2);
5382
+ async parseAndAnalyze(html, filename, options = {}) {
5383
+ return analyze(this.parse(html, filename), options);
5399
5384
  }
5400
- parseAndAnalyzeSync(html, filename, options2 = {}) {
5401
- return analyzeSync(this.parse(html, filename), options2);
5385
+ parseAndAnalyzeSync(html, filename, options = {}) {
5386
+ return analyzeSync(this.parse(html, filename), options);
5402
5387
  }
5403
5388
  /** Return an array of all variables without their properties. */
5404
- async variables(template2, options2 = {}) {
5405
- const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options2);
5389
+ async variables(template2, options = {}) {
5390
+ const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
5406
5391
  return Object.keys(analysis.variables);
5407
5392
  }
5408
5393
  /** Return an array of all variables without their properties. */
5409
- variablesSync(template2, options2 = {}) {
5410
- const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options2);
5394
+ variablesSync(template2, options = {}) {
5395
+ const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
5411
5396
  return Object.keys(analysis.variables);
5412
5397
  }
5413
5398
  /** Return an array of all variables including their properties/paths. */
5414
- async fullVariables(template2, options2 = {}) {
5415
- const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options2);
5399
+ async fullVariables(template2, options = {}) {
5400
+ const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
5416
5401
  return Array.from(new Set(Object.values(analysis.variables).flatMap((a) => a.map((v) => String(v)))));
5417
5402
  }
5418
5403
  /** Return an array of all variables including their properties/paths. */
5419
- fullVariablesSync(template2, options2 = {}) {
5420
- const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options2);
5404
+ fullVariablesSync(template2, options = {}) {
5405
+ const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
5421
5406
  return Array.from(new Set(Object.values(analysis.variables).flatMap((a) => a.map((v) => String(v)))));
5422
5407
  }
5423
5408
  /** Return an array of all variables, each as an array of properties/segments. */
5424
- async variableSegments(template2, options2 = {}) {
5425
- const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options2);
5409
+ async variableSegments(template2, options = {}) {
5410
+ const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
5426
5411
  return Array.from(strictUniq(Object.values(analysis.variables).flatMap((a) => a.map((v) => v.toArray()))));
5427
5412
  }
5428
5413
  /** Return an array of all variables, each as an array of properties/segments. */
5429
- variableSegmentsSync(template2, options2 = {}) {
5430
- const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options2);
5414
+ variableSegmentsSync(template2, options = {}) {
5415
+ const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
5431
5416
  return Array.from(strictUniq(Object.values(analysis.variables).flatMap((a) => a.map((v) => v.toArray()))));
5432
5417
  }
5433
5418
  /** Return an array of all expected context variables without their properties. */
5434
- async globalVariables(template2, options2 = {}) {
5435
- const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options2);
5419
+ async globalVariables(template2, options = {}) {
5420
+ const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
5436
5421
  return Object.keys(analysis.globals);
5437
5422
  }
5438
5423
  /** Return an array of all expected context variables without their properties. */
5439
- globalVariablesSync(template2, options2 = {}) {
5440
- const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options2);
5424
+ globalVariablesSync(template2, options = {}) {
5425
+ const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
5441
5426
  return Object.keys(analysis.globals);
5442
5427
  }
5443
5428
  /** Return an array of all expected context variables including their properties/paths. */
5444
- async globalFullVariables(template2, options2 = {}) {
5445
- const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options2);
5429
+ async globalFullVariables(template2, options = {}) {
5430
+ const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
5446
5431
  return Array.from(new Set(Object.values(analysis.globals).flatMap((a) => a.map((v) => String(v)))));
5447
5432
  }
5448
5433
  /** Return an array of all expected context variables including their properties/paths. */
5449
- globalFullVariablesSync(template2, options2 = {}) {
5450
- const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options2);
5434
+ globalFullVariablesSync(template2, options = {}) {
5435
+ const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
5451
5436
  return Array.from(new Set(Object.values(analysis.globals).flatMap((a) => a.map((v) => String(v)))));
5452
5437
  }
5453
5438
  /** Return an array of all expected context variables, each as an array of properties/segments. */
5454
- async globalVariableSegments(template2, options2 = {}) {
5455
- const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options2);
5439
+ async globalVariableSegments(template2, options = {}) {
5440
+ const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
5456
5441
  return Array.from(strictUniq(Object.values(analysis.globals).flatMap((a) => a.map((v) => v.toArray()))));
5457
5442
  }
5458
5443
  /** Return an array of all expected context variables, each as an array of properties/segments. */
5459
- globalVariableSegmentsSync(template2, options2 = {}) {
5460
- const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options2);
5444
+ globalVariableSegmentsSync(template2, options = {}) {
5445
+ const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
5461
5446
  return Array.from(strictUniq(Object.values(analysis.globals).flatMap((a) => a.map((v) => v.toArray()))));
5462
5447
  }
5463
5448
  };
@@ -5495,7 +5480,7 @@ var require_liquid_node = __commonJS({
5495
5480
  exports.RenderError = RenderError;
5496
5481
  exports.RenderTag = RenderTag;
5497
5482
  exports.TablerowTag = TablerowTag;
5498
- exports.Tag = Tag2;
5483
+ exports.Tag = Tag3;
5499
5484
  exports.TagToken = TagToken;
5500
5485
  exports.Token = Token;
5501
5486
  exports.TokenizationError = TokenizationError;
@@ -5525,11 +5510,11 @@ var require_liquid_node = __commonJS({
5525
5510
  }
5526
5511
  });
5527
5512
 
5528
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5513
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5529
5514
  import { chmodSync, constants, copyFileSync, existsSync as existsSync9, mkdirSync, realpathSync as realpathSync2, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
5530
5515
  import { dirname as dirname2, resolve } from "node:path";
5531
5516
 
5532
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sealed.js
5517
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/sealed.js
5533
5518
  import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
5534
5519
  import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
5535
5520
  import { Transform } from "node:stream";
@@ -5636,7 +5621,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
5636
5621
  renameSync(pending, to);
5637
5622
  }, "unsealFile");
5638
5623
 
5639
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5624
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5640
5625
  var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
5641
5626
  var fileSchemaOf = /* @__PURE__ */ __name((database) => {
5642
5627
  const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
@@ -5660,7 +5645,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
5660
5645
  };
5661
5646
  }, "compatibilityOf");
5662
5647
 
5663
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/repair.js
5648
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/store/repair.js
5664
5649
  import { createHash as createHash2 } from "node:crypto";
5665
5650
  var COPY_MARK = "__repair_";
5666
5651
  var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
@@ -5914,13 +5899,13 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
5914
5899
  return found;
5915
5900
  }, "deleteCopy");
5916
5901
 
5917
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5902
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5918
5903
  import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
5919
5904
 
5920
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5905
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5921
5906
  import { existsSync as existsSync3 } from "node:fs";
5922
5907
 
5923
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/recover.js
5908
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/store/recover.js
5924
5909
  import { execFileSync, spawn } from "node:child_process";
5925
5910
  import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
5926
5911
  import { basename, dirname, join } from "node:path";
@@ -6252,7 +6237,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6252
6237
  let kept;
6253
6238
  let dangling;
6254
6239
  let json;
6255
- let fetch2;
6240
+ let fetch;
6256
6241
  let schema;
6257
6242
  try {
6258
6243
  kept = tableRows(opened.database);
@@ -6262,7 +6247,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6262
6247
  rebuilt = rebuildDerived(opened.database, { now, note });
6263
6248
  note("looking for rows that point at rows that were lost");
6264
6249
  dangling = danglingRows(opened.database);
6265
- fetch2 = mailToFetch(opened.database);
6250
+ fetch = mailToFetch(opened.database);
6266
6251
  schema = fileSchemaOf(opened.database).version;
6267
6252
  opened.database.exec("PRAGMA wal_checkpoint(TRUNCATE)");
6268
6253
  } catch (error) {
@@ -6301,7 +6286,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6301
6286
  lost,
6302
6287
  dangling,
6303
6288
  invalidJson: json,
6304
- mailToFetch: fetch2,
6289
+ mailToFetch: fetch,
6305
6290
  rebuilt,
6306
6291
  copyErrors,
6307
6292
  health,
@@ -6317,7 +6302,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6317
6302
  }
6318
6303
  }, "recoverLocked");
6319
6304
 
6320
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6305
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6321
6306
  var COUNTED = [
6322
6307
  "accounts",
6323
6308
  "chats",
@@ -6450,7 +6435,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
6450
6435
  return recover;
6451
6436
  }, "storeRecoverCommand");
6452
6437
 
6453
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6438
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6454
6439
  var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
6455
6440
  var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
6456
6441
  var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
@@ -6496,7 +6481,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
6496
6481
  renderAnswer(this, outputFor(this), itemOf(answer));
6497
6482
  }), "storeInfoCommand");
6498
6483
 
6499
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6484
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6500
6485
  var ENCRYPT_OPTION = [
6501
6486
  "--encrypt",
6502
6487
  "compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
@@ -6515,7 +6500,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
6515
6500
  return password;
6516
6501
  }, "passwordOf");
6517
6502
 
6518
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/replies/rules.js
6503
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/rules.js
6519
6504
  import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
6520
6505
  import { join as join2 } from "node:path";
6521
6506
  var REPLY_ACTIONS = ["reply", "task"];
@@ -6686,7 +6671,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
6686
6671
  }, "problem");
6687
6672
  var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
6688
6673
 
6689
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/replies/state.js
6674
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/state.js
6690
6675
  import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
6691
6676
  import { join as join3 } from "node:path";
6692
6677
  var ANSWERED_KEPT = 1e3;
@@ -6739,7 +6724,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
6739
6724
  }, "recordReply");
6740
6725
  var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
6741
6726
 
6742
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/replies/decide.js
6727
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/decide.js
6743
6728
  var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
6744
6729
  var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
6745
6730
  const { message, chat, owner, sender } = incoming;
@@ -6845,8 +6830,37 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
6845
6830
  return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
6846
6831
  }, "filled");
6847
6832
 
6848
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/replies/template.js
6833
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/template.js
6834
+ var import_liquidjs2 = __toESM(require_liquid_node(), 1);
6835
+
6836
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/render/liquid.js
6849
6837
  var import_liquidjs = __toESM(require_liquid_node(), 1);
6838
+ var safeLiquid = /* @__PURE__ */ __name((limits) => {
6839
+ const engine = new import_liquidjs.Liquid({
6840
+ ownPropertyOnly: true,
6841
+ strictVariables: true,
6842
+ strictFilters: true,
6843
+ lenientIf: false,
6844
+ parseLimit: limits.parse,
6845
+ renderLimit: limits.milliseconds,
6846
+ memoryLimit: limits.memory,
6847
+ preserveTimezones: true
6848
+ });
6849
+ for (const name of ["include", "render", "layout"]) {
6850
+ engine.registerTag(name, class extends import_liquidjs.Tag {
6851
+ constructor(token, tokens, liquid) {
6852
+ super(token, tokens, liquid);
6853
+ throw new Error("templates cannot read files");
6854
+ }
6855
+ render() {
6856
+ return "";
6857
+ }
6858
+ });
6859
+ }
6860
+ return engine;
6861
+ }, "safeLiquid");
6862
+
6863
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/template.js
6850
6864
  var TEMPLATE_LIMITS = {
6851
6865
  parse: 32768,
6852
6866
  renders: 2e3,
@@ -6900,28 +6914,8 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
6900
6914
  hourCycle: "h23"
6901
6915
  }).formatToParts(input.now).map(({ type, value }) => [type, value]));
6902
6916
  const localTime = `${parts2.year}-${parts2.month}-${parts2.day}T${parts2.hour}:${parts2.minute}:${parts2.second}${parts2.timeZoneName?.replace("GMT", "") || "+00:00"}`;
6903
- const engine = new import_liquidjs.Liquid({
6904
- ownPropertyOnly: true,
6905
- strictVariables: true,
6906
- strictFilters: true,
6907
- lenientIf: false,
6908
- parseLimit: limits.parse,
6909
- renderLimit: limits.milliseconds,
6910
- memoryLimit: limits.memory,
6911
- preserveTimezones: true
6912
- });
6913
- for (const name2 of ["include", "render", "layout"]) {
6914
- engine.registerTag(name2, class extends import_liquidjs.Tag {
6915
- constructor(token, tokens, liquid) {
6916
- super(token, tokens, liquid);
6917
- throw new Error("reply templates cannot read files");
6918
- }
6919
- render() {
6920
- return "";
6921
- }
6922
- });
6923
- }
6924
- engine.registerTag("ai", class extends import_liquidjs.Tag {
6917
+ const engine = safeLiquid({ parse: limits.parse, memory: limits.memory, milliseconds: limits.milliseconds });
6918
+ engine.registerTag("ai", class extends import_liquidjs2.Tag {
6925
6919
  body = [];
6926
6920
  fallback = null;
6927
6921
  constructor(token, tokens, liquid, parser) {
@@ -6982,7 +6976,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
6982
6976
  });
6983
6977
  const templates = engine.parse(source);
6984
6978
  const name = input.senderName?.trim() ?? "";
6985
- const context = new import_liquidjs.Context({
6979
+ const context = new import_liquidjs2.Context({
6986
6980
  sender: { firstName: name.split(/\s+/)[0] ?? "", name },
6987
6981
  chat: { title: input.chat.title ?? "", kind: input.chat.kind },
6988
6982
  now: localTime
@@ -7005,7 +6999,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
7005
6999
  }
7006
7000
  }, "renderReplyTemplate");
7007
7001
 
7008
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7002
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7009
7003
  var DRY_RUN_DAYS = 7;
7010
7004
  var PAGE = 500;
7011
7005
  var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
@@ -7119,143 +7113,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
7119
7113
  }
7120
7114
  }, "storedSince");
7121
7115
 
7122
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
7123
- var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
7124
- const host = new URL(baseUrl).host;
7125
- return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
7126
- }, "endpointKeyName");
7127
- var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) => {
7128
- const where = { appName: app.appName, prefix: app.envPrefix, env };
7129
- const credentials = /* @__PURE__ */ __name((provider) => new Credentials({
7130
- configDir: resolvePaths(where).config,
7131
- service: app.appName,
7132
- ...["openai", "anthropic"].includes(provider) ? { envVar: envName(app, `${provider.toUpperCase()}_API_KEY`) } : {},
7133
- isolated: pathsAreOverridden(where),
7134
- env,
7135
- ...keyring ? { keyring } : {},
7136
- warn: /* @__PURE__ */ __name((message) => process.stderr.write(`${message}
7137
- `), "warn")
7138
- }), "credentials");
7139
- const account = /* @__PURE__ */ __name((provider) => `embeddings:${provider}`, "account");
7140
- return {
7141
- read: /* @__PURE__ */ __name((provider) => {
7142
- const stored = credentials(provider).read(account(provider));
7143
- if (stored)
7144
- return { key: stored.secret, source: stored.source };
7145
- const shared = ["openai", "anthropic"].includes(provider) ? env[`${provider.toUpperCase()}_API_KEY`]?.trim() : void 0;
7146
- return shared ? { key: shared, source: "env" } : void 0;
7147
- }, "read"),
7148
- write: /* @__PURE__ */ __name((provider, key) => credentials(provider).write(account(provider), key, { signIn: true }), "write"),
7149
- remove: /* @__PURE__ */ __name((provider) => credentials(provider).remove(account(provider)), "remove")
7150
- };
7151
- }, "embeddingKeys");
7152
-
7153
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/models/openai.js
7154
- var options = strictObject({
7155
- temperature: range(0, 2),
7156
- top_p: range(0, 1),
7157
- presence_penalty: range(-2, 2),
7158
- frequency_penalty: range(-2, 2),
7159
- seed: optional(pipe(number(), integer())),
7160
- stop: optional(union([string(), array(string())])),
7161
- response_format: optional(strictObject({ type: picklist(["text", "json_object"]) }))
7162
- });
7163
- var openai = {
7164
- images: true,
7165
- baseUrl: "https://api.openai.com/v1",
7166
- validate: /* @__PURE__ */ __name((given) => checkedOptions("openai", options, given), "validate"),
7167
- complete: /* @__PURE__ */ __name((target, request, checked, apiKey, fetcher) => withTimeLimit(12e4, async (deadline) => {
7168
- const response = await fetcher(`${target.baseUrl.replace(/\/+$/, "")}/chat/completions`, {
7169
- method: "POST",
7170
- headers: { "Content-Type": "application/json", ...apiKey ? { Authorization: `Bearer ${apiKey}` } : {} },
7171
- body: JSON.stringify({
7172
- ...checked,
7173
- model: target.model,
7174
- messages: [
7175
- { role: "system", content: systemFor(request) },
7176
- ...messagesFor(request),
7177
- ...request.images === void 0 ? [] : [
7178
- {
7179
- role: "user",
7180
- content: request.images.map((image) => ({
7181
- type: "image_url",
7182
- image_url: { url: `data:${image.mimeType};base64,${image.data}`, detail: "high" }
7183
- }))
7184
- }
7185
- ]
7186
- ],
7187
- ...new URL(target.baseUrl).hostname === "api.openai.com" ? { max_completion_tokens: request.maxTokens } : { max_tokens: request.maxTokens }
7188
- }),
7189
- signal: deadline,
7190
- redirect: "error"
7191
- });
7192
- if (!response.ok)
7193
- throw new Error("provider rejected request");
7194
- const body = await response.json();
7195
- const choice = body.choices?.[0];
7196
- if (choice?.finish_reason !== "stop" || typeof choice.message?.content !== "string" || !Number.isInteger(body.usage?.total_tokens) || (body.usage?.total_tokens ?? 0) < 1)
7197
- throw new Error("incomplete response");
7198
- return { text: choice.message.content, tokens: body.usage?.total_tokens };
7199
- }), "complete")
7200
- };
7201
-
7202
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/models/index.js
7203
- var modelGateway = /* @__PURE__ */ __name((deps) => ({
7204
- complete: /* @__PURE__ */ __name(async (request) => {
7205
- if (deps.signal?.aborted)
7206
- throw new CliError("cancelled", "model request cancelled");
7207
- const target = deps.resolve(request.purpose);
7208
- if (!target || target.provider === "off")
7209
- throw new CliError("configuration_error", `models.${request.purpose}.provider is not configured; no model was called`);
7210
- if (!request.purpose || !Number.isSafeInteger(request.maxTokens) || request.maxTokens < 1 || typeof request.prompt !== "string")
7211
- throw new CliError("validation_error", "a model request needs a purpose, prompt and positive whole maxTokens");
7212
- validateImages(request.images);
7213
- let adapter = deps.adapters?.[target.provider];
7214
- if (!adapter && target.provider === "openai")
7215
- adapter = openai;
7216
- if (!adapter && target.provider === "anthropic")
7217
- adapter = (await import("./anthropic-RGV3WXX5.js")).anthropic;
7218
- if (!adapter)
7219
- throw new CliError("validation_error", `no model adapter for ${target.provider}`);
7220
- if (request.images !== void 0 && adapter.images !== true)
7221
- throw new CliError("validation_error", "the model adapter does not support image inputs");
7222
- const options2 = adapter.validate(request.options ?? {});
7223
- const baseUrl = target.baseUrl ?? adapter.baseUrl;
7224
- if (!target.model.trim() || !endpoint(baseUrl))
7225
- throw new CliError("validation_error", "a model target needs a model and an HTTP/S endpoint without credentials, query or fragment");
7226
- if (!await deps.consent(request, { ...target, baseUrl }))
7227
- throw new CliError("permission_error", `model consent for ${request.purpose} is missing; no data was sent`);
7228
- const apiKey = await deps.key?.(target.provider, target);
7229
- if (deps.signal?.aborted)
7230
- throw new CliError("cancelled", "model request cancelled");
7231
- const fetcher = deps.fetch ?? fetch;
7232
- let limited = false;
7233
- const cancellable = /* @__PURE__ */ __name(async (input, init) => {
7234
- const signal = init?.signal ?? (input instanceof Request ? input.signal : void 0);
7235
- const response = await fetcher(input, {
7236
- ...init,
7237
- signal: deps.signal ? AbortSignal.any([deps.signal, ...signal ? [signal] : []]) : signal
7238
- });
7239
- if (response.status === 429)
7240
- limited = true;
7241
- return response;
7242
- }, "cancellable");
7243
- try {
7244
- const answer = await adapter.complete({ ...target, baseUrl }, request, options2, apiKey, cancellable);
7245
- if (deps.signal?.aborted)
7246
- throw new Error("cancelled");
7247
- if (typeof answer.text !== "string" || !Number.isSafeInteger(answer.tokens) || answer.tokens < 1)
7248
- throw new Error("incomplete");
7249
- return { ...answer, provider: target.provider, model: target.model };
7250
- } catch {
7251
- if (limited)
7252
- throw new CliError("rate_limited", `${request.purpose} provider rate limit reached; no result was stored`);
7253
- throw new CliError("invalid_response", `${request.purpose} provider failed or returned an incomplete response; no result was stored`);
7254
- }
7255
- }, "complete")
7256
- }), "modelGateway");
7257
-
7258
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/replies/consents.js
7116
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/consents.js
7259
7117
  import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
7260
7118
  import { join as join4 } from "node:path";
7261
7119
  var shape = strictObject({
@@ -7280,21 +7138,21 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
7280
7138
  return consent.provider === provider && !consent.deniedChats.includes(chat);
7281
7139
  }, "mayModelReply");
7282
7140
 
7283
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7284
- var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options2 = {
7141
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7142
+ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
7285
7143
  ai: true
7286
7144
  }) => async (rule2, message, chat, now) => {
7287
7145
  let called;
7288
7146
  const gateway = modelGateway({
7289
- signal: options2.signal,
7147
+ signal: options.signal,
7290
7148
  resolve: /* @__PURE__ */ __name((purpose) => {
7291
7149
  called = modelTarget(settings(), purpose);
7292
7150
  return called;
7293
7151
  }, "resolve"),
7294
7152
  consent: /* @__PURE__ */ __name((_request, target) => mayModelReply(replyConsentPathFor(app, profile, env), replyModelIdentity(target.provider, target.baseUrl ?? ""), message.chatId), "consent"),
7295
- key: /* @__PURE__ */ __name((provider, target) => embeddingKeys(app, env, options2.keyring).read(target.baseUrl === void 0 ? provider : endpointKeyName(target.baseUrl))?.key, "key")
7153
+ key: /* @__PURE__ */ __name((provider, target) => embeddingKeys(app, env, options.keyring).read(target.baseUrl === void 0 ? provider : endpointKeyName(target.baseUrl))?.key, "key")
7296
7154
  });
7297
- if (options2.signal?.aborted)
7155
+ if (options.signal?.aborted)
7298
7156
  throw new CliError("cancelled", "reply rendering cancelled");
7299
7157
  const result2 = await renderReplyTemplate(rule2.reply, {
7300
7158
  senderName: message.senderName,
@@ -7302,8 +7160,8 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
7302
7160
  now,
7303
7161
  timezone: rule2.when.hours?.timezone,
7304
7162
  data: message.text,
7305
- allowAI: options2.ai === true,
7306
- preview: options2.preview === true,
7163
+ allowAI: options.ai === true,
7164
+ preview: options.preview === true,
7307
7165
  complete: /* @__PURE__ */ __name(async (prompt, data) => {
7308
7166
  const result3 = await gateway.complete({
7309
7167
  purpose: "replies",
@@ -7312,7 +7170,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
7312
7170
  data,
7313
7171
  maxTokens: 512
7314
7172
  });
7315
- if (options2.signal?.aborted)
7173
+ if (options.signal?.aborted)
7316
7174
  throw new CliError("cancelled", "reply rendering cancelled");
7317
7175
  const current = modelTarget(settings(), "replies");
7318
7176
  const baseUrl = called?.baseUrl ?? (called?.provider === "anthropic" ? "https://api.anthropic.com" : "https://api.openai.com/v1");
@@ -7327,7 +7185,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
7327
7185
  return result2;
7328
7186
  }, "replyRenderer");
7329
7187
 
7330
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/replies/serve.js
7188
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/replies/serve.js
7331
7189
  var NOT_ALLOWED = "replies.send is not allow";
7332
7190
  var NO_RULES = "no rules";
7333
7191
  var ONLY_TASK = "opened a task, sent nothing";
@@ -7420,12 +7278,12 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
7420
7278
  return { skip: why };
7421
7279
  }, "replyTo");
7422
7280
 
7423
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7281
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7424
7282
  var START_SYNC_DELAY_MS = 3e4;
7425
7283
  var START_SYNC_BUDGET_MS = 5 * 6e4;
7426
7284
  var START_SYNC_WINDOW_MS = 7 * 864e5;
7427
7285
  var START_SYNC_PER_CHAT = 500;
7428
- var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch: fetch2, note, warn, delayMs = START_SYNC_DELAY_MS, budgetMs = START_SYNC_BUDGET_MS, windowMs = START_SYNC_WINDOW_MS, now = Date.now }) => {
7286
+ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn, delayMs = START_SYNC_DELAY_MS, budgetMs = START_SYNC_BUDGET_MS, windowMs = START_SYNC_WINDOW_MS, now = Date.now }) => {
7429
7287
  const controller = new AbortController();
7430
7288
  let timer;
7431
7289
  let pass = Promise.resolve();
@@ -7453,7 +7311,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch: fetch2, note
7453
7311
  if (stop.aborted)
7454
7312
  break;
7455
7313
  try {
7456
- summary.fetched += (await fetch2(chat.id, Math.max(held ?? anywhere, floor), stop)).fetched;
7314
+ summary.fetched += (await fetch(chat.id, Math.max(held ?? anywhere, floor), stop)).fetched;
7457
7315
  summary.chats += 1;
7458
7316
  } catch (error) {
7459
7317
  if (stop.aborted)
@@ -7497,10 +7355,10 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch: fetch2, note
7497
7355
  };
7498
7356
  }, "startSync");
7499
7357
 
7500
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7358
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7501
7359
  var FIRST_FETCH_MS = 6e4;
7502
7360
  var DAY_MS = 864e5;
7503
- var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
7361
+ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
7504
7362
  let timer;
7505
7363
  let round = Promise.resolve();
7506
7364
  let stopped = false;
@@ -7513,7 +7371,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, fi
7513
7371
  if (lastCount?.day === today)
7514
7372
  continue;
7515
7373
  try {
7516
- await fetch2(store, account, chatId);
7374
+ await fetch(store, account, chatId);
7517
7375
  done.fetched += 1;
7518
7376
  } catch (error) {
7519
7377
  done.failed += 1;
@@ -7551,7 +7409,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, fi
7551
7409
  };
7552
7410
  }, "memberFetches");
7553
7411
 
7554
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7412
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7555
7413
  var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
7556
7414
  var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
7557
7415
  if (context.format === "pretty") {
@@ -7584,7 +7442,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
7584
7442
  return context;
7585
7443
  }, "recordDiagnostics");
7586
7444
 
7587
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7445
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7588
7446
  var STEMS_EVERY_MS = 3e4;
7589
7447
  var STEMS_SLICE_MS = 2e3;
7590
7448
  var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
@@ -7624,17 +7482,17 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
7624
7482
  };
7625
7483
  }, "stemFills");
7626
7484
 
7627
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/render/messages.js
7485
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/render/messages.js
7628
7486
  import { styleText } from "node:util";
7629
7487
  var TIME_WIDTH = 8;
7630
7488
  var INDENT = " ".repeat(TIME_WIDTH + 2);
7631
7489
  var MIN_WIDTH = 40;
7632
7490
  var SENDER_COLOURS = ["green", "yellow", "magenta", "blue", "red"];
7633
- var renderMessages = /* @__PURE__ */ __name((messages, options2 = {}) => {
7491
+ var renderMessages = /* @__PURE__ */ __name((messages, options = {}) => {
7634
7492
  if (messages.length === 0)
7635
7493
  return "(nothing)";
7636
- const day = dayFormatter(options2);
7637
- const paint = painter(options2);
7494
+ const day = dayFormatter(options);
7495
+ const paint = painter(options);
7638
7496
  let previous;
7639
7497
  const blocks = [];
7640
7498
  for (const message of messages) {
@@ -7642,40 +7500,40 @@ var renderMessages = /* @__PURE__ */ __name((messages, options2 = {}) => {
7642
7500
  if (date !== previous)
7643
7501
  blocks.push(paint("dim", `\u2500\u2500 ${date} \u2500\u2500`));
7644
7502
  previous = date;
7645
- blocks.push(renderMessage(message, options2));
7503
+ blocks.push(renderMessage(message, options));
7646
7504
  }
7647
7505
  return blocks.join("\n\n");
7648
7506
  }, "renderMessages");
7649
- var renderMessage = /* @__PURE__ */ __name((message, options2 = {}) => {
7650
- const paint = painter(options2);
7651
- const width = Math.max(MIN_WIDTH, options2.width ?? 80);
7507
+ var renderMessage = /* @__PURE__ */ __name((message, options = {}) => {
7508
+ const paint = painter(options);
7509
+ const width = Math.max(MIN_WIDTH, options.width ?? 80);
7652
7510
  const room = width - INDENT.length;
7653
- const time = timeFormatter(options2);
7654
- const verbosity = options2.verbosity ?? 0;
7511
+ const time = timeFormatter(options);
7512
+ const verbosity = options.verbosity ?? 0;
7655
7513
  const chat = "chatTitle" in message ? paint("dim", ` \xB7 ${singleLine(message.chatTitle ?? message.chatId)}`) : "";
7656
7514
  const mark = "anchor" in message && message.anchor ? paint("bold", " \u25C0") : "";
7657
- const lines = [`${paint("dim", time(message.timestamp))} ${senderOf(message, options2)}${chat}${mark}`];
7515
+ const lines = [`${paint("dim", time(message.timestamp))} ${senderOf(message, options)}${chat}${mark}`];
7658
7516
  const body = /* @__PURE__ */ __name((text) => wrapAnsi(visibleControls(text), room, { hard: true }).split("\n"), "body");
7659
7517
  const email = message.email;
7660
7518
  if (email)
7661
7519
  lines.push(paint("dim", mailLine(email)));
7662
7520
  if (message.replyTo)
7663
- lines.push(paint("dim", preview("\u21B3", message.replyTo, room, options2)));
7521
+ lines.push(paint("dim", preview("\u21B3", message.replyTo, room, options)));
7664
7522
  if (message.forwardedFrom) {
7665
- lines.push(paint("dim", `\u21AA ${nameOf(message.forwardedFrom, options2)}`));
7523
+ lines.push(paint("dim", `\u21AA ${nameOf(message.forwardedFrom, options)}`));
7666
7524
  if (message.forwardedFrom.text)
7667
7525
  for (const line of body(message.forwardedFrom.text))
7668
7526
  lines.push(line);
7669
- lines.push(...attachmentLines(message.forwardedFrom.attachments, paint, options2));
7527
+ lines.push(...attachmentLines(message.forwardedFrom.attachments, paint, options));
7670
7528
  }
7671
7529
  if (message.text)
7672
7530
  for (const line of body(message.text))
7673
7531
  lines.push(line);
7674
- lines.push(...attachmentLines(message.attachments, paint, options2));
7532
+ lines.push(...attachmentLines(message.attachments, paint, options));
7675
7533
  if (message.reactions && message.reactions.total > 0)
7676
7534
  lines.push(paint("dim", reactionLine(message.reactions)));
7677
7535
  if (message.editedAt)
7678
- lines.push(paint("dim", `edited ${editedAt(message, options2)}`));
7536
+ lines.push(paint("dim", `edited ${editedAt(message, options)}`));
7679
7537
  if (verbosity >= 1) {
7680
7538
  const fields = [
7681
7539
  ["message", message.id],
@@ -7687,7 +7545,7 @@ var renderMessage = /* @__PURE__ */ __name((message, options2 = {}) => {
7687
7545
  ...message.attachments.map((a) => ["link", a.url])
7688
7546
  ];
7689
7547
  if (verbosity >= 2) {
7690
- fields.push(["provider", options2.provider], ["profile", options2.profile], ["sent", message.timestamp], ["edited", message.editedAt], ["outgoing", message.outgoing === null ? "unknown" : String(message.outgoing)], ...message.attachments.map((a) => ["attachment", JSON.stringify(a)]), ["metadata", message.providerMetadata && JSON.stringify(message.providerMetadata)]);
7548
+ fields.push(["provider", options.provider], ["profile", options.profile], ["sent", message.timestamp], ["edited", message.editedAt], ["outgoing", message.outgoing === null ? "unknown" : String(message.outgoing)], ...message.attachments.map((a) => ["attachment", JSON.stringify(a)]), ["metadata", message.providerMetadata && JSON.stringify(message.providerMetadata)]);
7691
7549
  }
7692
7550
  const shown = fields.filter((field) => typeof field[1] === "string");
7693
7551
  const label = Math.max(...shown.map(([key]) => key.length));
@@ -7700,36 +7558,36 @@ var mailLine = /* @__PURE__ */ __name(({ to, cc, labels }) => {
7700
7558
  return [to.length ? `to ${names(to)}` : "", cc.length ? `cc ${names(cc)}` : "", labels.join(", ")].filter(Boolean).join(" \xB7 ");
7701
7559
  }, "mailLine");
7702
7560
  var painter = /* @__PURE__ */ __name(({ color = false }) => (style, text) => color ? styleText(style, text, { validateStream: false }) : text, "painter");
7703
- var senderOf = /* @__PURE__ */ __name((message, options2) => {
7704
- const paint = painter(options2);
7561
+ var senderOf = /* @__PURE__ */ __name((message, options) => {
7562
+ const paint = painter(options);
7705
7563
  if (message.outgoing === true)
7706
- return paint(["bold", "cyan"], you(options2));
7707
- const name = nameOf(message, options2);
7708
- if (!options2.senderColors)
7564
+ return paint(["bold", "cyan"], you(options));
7565
+ const name = nameOf(message, options);
7566
+ if (!options.senderColors)
7709
7567
  return paint("bold", name);
7710
7568
  const colour = SENDER_COLOURS[hash(message.senderId ?? name) % SENDER_COLOURS.length] ?? "green";
7711
7569
  return paint(["bold", colour], name);
7712
7570
  }, "senderOf");
7713
- var nameOf = /* @__PURE__ */ __name(({ senderName, senderId, outgoing }, options2) => outgoing === true ? you(options2) : singleLine(senderName ?? senderId ?? "unknown"), "nameOf");
7571
+ var nameOf = /* @__PURE__ */ __name(({ senderName, senderId, outgoing }, options) => outgoing === true ? you(options) : singleLine(senderName ?? senderId ?? "unknown"), "nameOf");
7714
7572
  var DEFAULT_LOCALE = "ru-RU";
7715
7573
  var you = /* @__PURE__ */ __name(({ locale = DEFAULT_LOCALE }) => locale.startsWith("ru") ? "\u0432\u044B" : "you", "you");
7716
7574
  var hash = /* @__PURE__ */ __name((value) => [...value].reduce((sum, char) => sum * 31 + char.charCodeAt(0) >>> 0, 7), "hash");
7717
- var preview = /* @__PURE__ */ __name((mark, quoted, room, options2) => {
7575
+ var preview = /* @__PURE__ */ __name((mark, quoted, room, options) => {
7718
7576
  const text = singleLine(quoted.text.split("\n")[0] ?? "") || (quoted.attachments[0] ? `\u{1F4CE} ${quoted.attachments[0].kind}` : "");
7719
- const line = text ? `${mark} ${nameOf(quoted, options2)}: ${text}` : `${mark} message ${quoted.id}`;
7577
+ const line = text ? `${mark} ${nameOf(quoted, options)}: ${text}` : `${mark} message ${quoted.id}`;
7720
7578
  if (stringWidth(line) <= room)
7721
7579
  return line;
7722
7580
  return `${wrapAnsi(line, room - 1, { hard: true }).split("\n")[0]}\u2026`;
7723
7581
  }, "preview");
7724
- var attachmentLines = /* @__PURE__ */ __name((attachments, paint, options2) => {
7582
+ var attachmentLines = /* @__PURE__ */ __name((attachments, paint, options) => {
7725
7583
  const link = /* @__PURE__ */ __name((label, raw) => {
7726
7584
  if (raw === void 0)
7727
7585
  return label;
7728
7586
  const url = singleLine(raw);
7729
- return options2.color ? `\x1B]8;;${url}\x07${label}\x1B]8;;\x07` : `${label} ${url}`;
7587
+ return options.color ? `\x1B]8;;${url}\x07${label}\x1B]8;;\x07` : `${label} ${url}`;
7730
7588
  }, "link");
7731
- let number2 = 0;
7732
- const keyboard = attachments.flatMap((attachment) => attachment.buttons ?? []).map((row) => paint("dim", row.map((button) => link(`[${++number2} ${singleLine(button.text)}]`, button.url)).join(" ")));
7589
+ let number = 0;
7590
+ const keyboard = attachments.flatMap((attachment) => attachment.buttons ?? []).map((row) => paint("dim", row.map((button) => link(`[${++number} ${singleLine(button.text)}]`, button.url)).join(" ")));
7733
7591
  const polls = attachments.flatMap((attachment) => attachment.poll ? pollLines(attachment.poll) : []);
7734
7592
  const cards = attachments.flatMap(({ contact }) => contact ? [
7735
7593
  paint("dim", `\u{1F464} ${[contact.name, contact.phone].flatMap((part) => part ? [singleLine(part)] : []).join(" \xB7 ")}`)
@@ -7793,14 +7651,14 @@ var reactionLine = /* @__PURE__ */ __name(({ counts, mine }) => {
7793
7651
  const shown = counts.map(({ reaction, count: count3 }) => `${singleLine(reaction)} ${count3}`).join(" ");
7794
7652
  return mine ? `${shown} (you: ${singleLine(mine)})` : shown;
7795
7653
  }, "reactionLine");
7796
- var editedAt = /* @__PURE__ */ __name((message, options2) => {
7654
+ var editedAt = /* @__PURE__ */ __name((message, options) => {
7797
7655
  const edited = message.editedAt ?? message.timestamp;
7798
- const time = timeFormatter(options2)(edited);
7799
- const day = dayFormatter(options2);
7656
+ const time = timeFormatter(options)(edited);
7657
+ const day = dayFormatter(options);
7800
7658
  return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
7801
7659
  }, "editedAt");
7802
7660
 
7803
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
7661
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
7804
7662
  var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
7805
7663
  var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
7806
7664
  kind: attachment.kind,
@@ -7895,7 +7753,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
7895
7753
  locale: messenger.app.locale
7896
7754
  }), "viewOf");
7897
7755
 
7898
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
7756
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
7899
7757
  var observed = /* @__PURE__ */ __name((value) => ({
7900
7758
  value: value.value,
7901
7759
  observed_at: value.observedAt,
@@ -7962,7 +7820,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
7962
7820
  }
7963
7821
  }, "watchEventItem");
7964
7822
 
7965
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
7823
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
7966
7824
  var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
7967
7825
  output: { entity: "watch_item" },
7968
7826
  effects: REMOTE_READ,
@@ -8117,7 +7975,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
8117
7975
  }
8118
7976
  }, "describe");
8119
7977
 
8120
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
7978
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8121
7979
  var serveCommand = /* @__PURE__ */ __name((messenger) => {
8122
7980
  const command = annotate(new Command("serve"), {
8123
7981
  output: { entity: "serve_summary" },
@@ -8381,7 +8239,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
8381
8239
  };
8382
8240
  }, "tasking");
8383
8241
 
8384
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8242
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8385
8243
  import { existsSync as existsSync8 } from "node:fs";
8386
8244
  var PATH = "store tables list";
8387
8245
  var STORE_TABLES_QUERY = {
@@ -8424,7 +8282,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((messenger) => {
8424
8282
  return tables;
8425
8283
  }, "storeTablesCommand");
8426
8284
 
8427
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8285
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8428
8286
  var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
8429
8287
  var WORD_INDEX = "message_words";
8430
8288
  var schemaOf = /* @__PURE__ */ __name((database) => {
@@ -9109,11 +8967,9 @@ export {
9109
8967
  readRepliesState,
9110
8968
  writeRepliesState,
9111
8969
  paused,
8970
+ safeLiquid,
9112
8971
  DRY_RUN_DAYS,
9113
8972
  dryRun,
9114
- endpointKeyName,
9115
- embeddingKeys,
9116
- modelGateway,
9117
8973
  replyConsentPathFor,
9118
8974
  readReplyConsent,
9119
8975
  writeReplyConsent,