@wirecat/zoom-cli 0.71.0 → 0.72.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 (156) hide show
  1. package/dist/answers.d.ts +56 -0
  2. package/dist/answers.d.ts.map +1 -1
  3. package/dist/bin/zm.js +2 -2
  4. package/dist/bundle/{all-profiles-O4YNVPZX.js → all-profiles-XFIPF4GF.js} +12 -12
  5. package/dist/bundle/answer-policy-AT6CDEE5.js +110 -0
  6. package/dist/bundle/{anthropic-7GGRX3RX.js → anthropic-SSUBR3BC.js} +18 -11
  7. package/dist/bundle/{app-server-CPMKM3HI.js → app-server-7DJHHF2F.js} +68 -56
  8. package/dist/bundle/{bun-POHZKEPV.js → bun-6HBYWQIX.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-PGYMBPEL.js → bun-sqlite-4L3Q55NB.js} +10 -6
  10. package/dist/bundle/{chunk-Q2SUFGSH.js → chunk-23J2ANZ7.js} +2 -2
  11. package/dist/bundle/{chunk-FSHCAWZS.js → chunk-24OFZNRC.js} +13119 -10386
  12. package/dist/bundle/{chunk-LE7MDAQG.js → chunk-2MIBRVSV.js} +2 -2
  13. package/dist/bundle/{chunk-DIQLXAAZ.js → chunk-37NF5CBJ.js} +4 -4
  14. package/dist/bundle/chunk-3KRTEX5M.js +53 -0
  15. package/dist/bundle/{chunk-IED3NS7G.js → chunk-4SY67IUA.js} +30 -30
  16. package/dist/bundle/{chunk-CKPCVEXU.js → chunk-4XQWF3U2.js} +6 -6
  17. package/dist/bundle/{chunk-CT4WVR4N.js → chunk-4YIGXTBP.js} +3 -3
  18. package/dist/bundle/{chunk-YPO2U2YB.js → chunk-5AELTC52.js} +388 -143
  19. package/dist/bundle/{chunk-USQ23X5V.js → chunk-5MGICK47.js} +750 -734
  20. package/dist/bundle/{chunk-DK6ICIGL.js → chunk-5X4IY5JH.js} +2025 -1302
  21. package/dist/bundle/{chunk-EOSVN2ER.js → chunk-63QXCE5Z.js} +242 -242
  22. package/dist/bundle/{chunk-OE7EIP5L.js → chunk-6DCLZLGX.js} +1 -1
  23. package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
  24. package/dist/bundle/{chunk-X3ZDN3U7.js → chunk-7IFO43Q5.js} +2 -2
  25. package/dist/bundle/{chunk-YD2RYVMK.js → chunk-7JYMGXLI.js} +41 -39
  26. package/dist/bundle/{chunk-DSVZEXYJ.js → chunk-7OD3522V.js} +3541 -3346
  27. package/dist/bundle/{chunk-2FV5JUQU.js → chunk-7S4D5SM2.js} +41 -35
  28. package/dist/bundle/{chunk-VRH7VRTK.js → chunk-7SUWPMZG.js} +10 -15
  29. package/dist/bundle/{chunk-4QPQ7MDA.js → chunk-ADKMBXY4.js} +1 -1
  30. package/dist/bundle/{chunk-MRI6QMZ3.js → chunk-B3SILJBU.js} +18 -18
  31. package/dist/bundle/{chunk-7ROXXRGG.js → chunk-CANRIRNZ.js} +6678 -5185
  32. package/dist/bundle/{chunk-DRBQDCDU.js → chunk-CW46FWKW.js} +38 -123
  33. package/dist/bundle/{chunk-GXF5HFFP.js → chunk-D24OQAHM.js} +4 -4
  34. package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-D5EUMWD5.js} +3 -3
  35. package/dist/bundle/{chunk-QVSLSWAL.js → chunk-DEPXZJ2V.js} +21 -150
  36. package/dist/bundle/{chunk-TM4JSVGQ.js → chunk-DOCVEKP2.js} +39 -44
  37. package/dist/bundle/{chunk-BBTQIVFP.js → chunk-EFF2XBHP.js} +2 -2
  38. package/dist/bundle/{chunk-XRFHQGOD.js → chunk-EG25AY4L.js} +1 -1
  39. package/dist/bundle/{chunk-FEM2JQN2.js → chunk-ELJUBPY4.js} +1 -1
  40. package/dist/bundle/{chunk-2U6SER67.js → chunk-ERJYJ36F.js} +2 -2
  41. package/dist/bundle/chunk-FSCPQQS5.js +244 -0
  42. package/dist/bundle/{chunk-P3XC6EDU.js → chunk-H53WFZBN.js} +11 -130
  43. package/dist/bundle/{chunk-RN4EHCC5.js → chunk-I7CUMZD6.js} +3 -3
  44. package/dist/bundle/{chunk-ALIT5QFT.js → chunk-IACWKZWS.js} +1 -1
  45. package/dist/bundle/{chunk-MW4EGDDV.js → chunk-IFBIXU6C.js} +2 -2
  46. package/dist/bundle/{chunk-5K7OGPGA.js → chunk-IU4DUUB3.js} +7 -7
  47. package/dist/bundle/{chunk-INVTDIF6.js → chunk-IXO4SCKE.js} +1 -1
  48. package/dist/bundle/{chunk-OHWMIUCT.js → chunk-JAEPK457.js} +244 -245
  49. package/dist/bundle/{chunk-HB6XJQ3Y.js → chunk-JFPUYQSP.js} +5 -5
  50. package/dist/bundle/{chunk-IAV5BG3I.js → chunk-JG4MNYG2.js} +1 -1
  51. package/dist/bundle/{chunk-ZBFL5JPT.js → chunk-JRCH4YZP.js} +16 -10
  52. package/dist/bundle/{chunk-M76MXMLY.js → chunk-JZ4XNNL7.js} +1 -1
  53. package/dist/bundle/chunk-K6HR6HCO.js +32 -0
  54. package/dist/bundle/{chunk-DHWBSXG3.js → chunk-KFZL67JP.js} +323 -55
  55. package/dist/bundle/{chunk-X4GWR6GO.js → chunk-KPIQXFNB.js} +375 -10
  56. package/dist/bundle/{chunk-OWEBWDHV.js → chunk-KWURWGGB.js} +80 -5
  57. package/dist/bundle/{chunk-Q5PI72CR.js → chunk-LA6QUVGQ.js} +3 -2
  58. package/dist/bundle/{chunk-5J4AMBMM.js → chunk-LLUNHAZ7.js} +4 -4
  59. package/dist/bundle/{chunk-2RUAMDVV.js → chunk-LTWJM3ED.js} +17 -17
  60. package/dist/bundle/{chunk-2U27KIKU.js → chunk-M3DMXDX6.js} +6 -6
  61. package/dist/bundle/{chunk-VW6BF6M7.js → chunk-MCPOZNWG.js} +1 -1
  62. package/dist/bundle/{chunk-CRFOGYDG.js → chunk-MSQHSW4C.js} +2 -2
  63. package/dist/bundle/chunk-N4QNYWWG.js +71 -0
  64. package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
  65. package/dist/bundle/{chunk-2KESWII5.js → chunk-OHCLQJOV.js} +3 -3
  66. package/dist/bundle/{chunk-4QUFFB2U.js → chunk-OP5PGE2N.js} +4 -4
  67. package/dist/bundle/{chunk-Q3XLZIY3.js → chunk-OY6N2ABP.js} +29 -23
  68. package/dist/bundle/chunk-PJWSGXOB.js +185 -0
  69. package/dist/bundle/{chunk-633QXP57.js → chunk-QA6KIL7Q.js} +10 -8
  70. package/dist/bundle/{chunk-N2FNMION.js → chunk-QQUY4MZY.js} +1 -1
  71. package/dist/bundle/{chunk-X277FBTF.js → chunk-QW7YTRV2.js} +3 -3
  72. package/dist/bundle/chunk-RJTGENHZ.js +109 -0
  73. package/dist/bundle/{chunk-ULDXZ6LH.js → chunk-RLCVPECY.js} +63 -63
  74. package/dist/bundle/{chunk-BGTEVIW4.js → chunk-RN5SU2RN.js} +6 -6
  75. package/dist/bundle/{chunk-P3ASN72F.js → chunk-RX5CJ55S.js} +1 -1
  76. package/dist/bundle/{chunk-7QC4M4HS.js → chunk-RZUJMAMK.js} +4 -4
  77. package/dist/bundle/{chunk-OORMSM6O.js → chunk-S7SXSHRC.js} +21 -21
  78. package/dist/bundle/{chunk-GGS6D4W4.js → chunk-SXZGCD6E.js} +3 -3
  79. package/dist/bundle/{chunk-64ZHF6PJ.js → chunk-T27IMG6X.js} +3 -1
  80. package/dist/bundle/{chunk-VJXHIUFP.js → chunk-TF2WKPNW.js} +15 -15
  81. package/dist/bundle/{chunk-QTHIU7CO.js → chunk-U32VL3MA.js} +1 -1
  82. package/dist/bundle/{chunk-RQG5VOGH.js → chunk-U3NJBGLA.js} +3 -3
  83. package/dist/bundle/{chunk-WOIHSQAL.js → chunk-UVZLK3M4.js} +33 -9
  84. package/dist/bundle/{chunk-XI3VIQKW.js → chunk-VIV64MQM.js} +560 -537
  85. package/dist/bundle/{chunk-CFQF6IGY.js → chunk-W3YTVEWV.js} +69 -6
  86. package/dist/bundle/{chunk-54YDWBYG.js → chunk-WLVG4RBZ.js} +1 -1
  87. package/dist/bundle/{chunk-77TCCHMP.js → chunk-WOAYHCM2.js} +1 -1
  88. package/dist/bundle/{chunk-5LJTU4LY.js → chunk-WXTYYWZI.js} +13 -13
  89. package/dist/bundle/{chunk-MEED7YFG.js → chunk-WZGKHTA4.js} +2 -2
  90. package/dist/bundle/{chunk-I4DFFR7F.js → chunk-X2MP634F.js} +14 -5
  91. package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-XPWZSW6Y.js} +61 -21
  92. package/dist/bundle/{chunk-SELXER2Q.js → chunk-YVVJ6Y5C.js} +7 -7
  93. package/dist/bundle/{chunk-4LAQDZXU.js → chunk-ZHA56THL.js} +790 -70
  94. package/dist/bundle/{chunk-ZVI6TFQR.js → chunk-ZVFYGTGJ.js} +17 -17
  95. package/dist/bundle/{chunk-GL3MYFMX.js → chunk-ZW5KHKMA.js} +5 -5
  96. package/dist/bundle/{cli-KHMEUXNG.js → cli-IYYI7GAM.js} +158 -96
  97. package/dist/bundle/command-contract-TX7NSUBM.js +42 -0
  98. package/dist/bundle/command-server-entry-FXX4LJWF.js +171 -0
  99. package/dist/bundle/config-YKNM33J7.js +96 -0
  100. package/dist/bundle/{decode-7RP4HSVE.js → decode-SRGOOGBW.js} +6 -6
  101. package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-OUHRPFUL.js} +11 -11
  102. package/dist/bundle/{dist-BFT2SUBV.js → dist-UZLNLAIO.js} +52 -31
  103. package/dist/bundle/{echarts-T2BSQ2YV.js → echarts-7CM2MCMW.js} +2 -2
  104. package/dist/bundle/{embed-BAS6YPDT.js → embed-VEE56BOB.js} +7 -7
  105. package/dist/bundle/{embedder-5XD5FCAO.js → embedder-SZFYR543.js} +10 -10
  106. package/dist/bundle/{failure-R2OIHCE5.js → failure-MZBNM7M5.js} +3 -3
  107. package/dist/bundle/first-run-KWC7RKF2.js +29 -0
  108. package/dist/bundle/first-screen-DWKMNSEI.js +40 -0
  109. package/dist/bundle/{folders-ZXTOFY4T.js → folders-UQXRSDJJ.js} +5 -5
  110. package/dist/bundle/{instructions-XZPROPKY.js → instructions-R7OHVAWH.js} +1 -1
  111. package/dist/bundle/{main-TZXKGL3L.js → main-EFUN2O3K.js} +21 -20
  112. package/dist/bundle/{mcp-M4QN2E7R.js → mcp-7KQUJNFN.js} +2 -2
  113. package/dist/bundle/{meetings-JB2ISPND.js → meetings-5I2BDNTA.js} +7 -7
  114. package/dist/bundle/{node-A3B3MJWX.js → node-3N2JGZ7V.js} +2 -2
  115. package/dist/bundle/{node-sqlite-QVWDLGDX.js → node-sqlite-2UVEE2WM.js} +11 -7
  116. package/dist/bundle/{oauth-YA6IYV4O.js → oauth-AYGD7UU3.js} +8 -8
  117. package/dist/bundle/{open-SY7TXJBS.js → open-3GUVDLGD.js} +6 -6
  118. package/dist/bundle/openai-NHCDLWWY.js +28 -0
  119. package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-72JFXVHQ.js} +6 -6
  120. package/dist/bundle/{process-6HNBTJIY.js → process-YAHHUFR5.js} +1 -1
  121. package/dist/bundle/{program-77BUCJ4H.js → program-OSZROCTK.js} +97 -91
  122. package/dist/bundle/{prompt-YDG73YDS.js → prompt-HMCW4XQJ.js} +6 -6
  123. package/dist/bundle/{recognize-ECXDGTB7.js → recognize-VF5CA7EM.js} +5 -5
  124. package/dist/bundle/{remote-K4JHGBVJ.js → remote-5C6VTPR2.js} +10 -8
  125. package/dist/bundle/{rerank-IU2YYD4T.js → rerank-ER7NEDOI.js} +8 -8
  126. package/dist/bundle/run-log-JKTLKXSK.js +124 -0
  127. package/dist/bundle/{serve-3XWIF3HI.js → serve-QJWXJOM7.js} +10 -10
  128. package/dist/bundle/{server-56VYOHWP.js → server-KCIK3Y2P.js} +50 -48
  129. package/dist/bundle/server-LLGFDLLJ.js +75 -0
  130. package/dist/bundle/{services-X7IPEGQ5.js → services-LQMYJQG3.js} +62 -45
  131. package/dist/bundle/{speech-E2OBQWYA.js → speech-74GJQNQH.js} +20 -17
  132. package/dist/bundle/{state-4GMJYK4H.js → state-4XDGCHDF.js} +7 -7
  133. package/dist/bundle/{store-LA4TV4DM.js → store-5Y5HK2L2.js} +22 -19
  134. package/dist/bundle/{store-KPI7GB5Y.js → store-Y56AHJ2Y.js} +42 -27
  135. package/dist/bundle/store-connection-4WI32AYU.js +89 -0
  136. package/dist/bundle/store-maintenance-command-PCXO5AH4.js +65 -0
  137. package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-E5CR6HSR.js} +7 -7
  138. package/dist/bundle/{tokens-BE6CJMR5.js → tokens-E2QNVC4F.js} +7 -7
  139. package/dist/bundle/zm.js +34 -10
  140. package/dist/bundle/{zoom-app-QEJBTIJ4.js → zoom-app-NVL7HEAX.js} +8 -8
  141. package/dist/version.d.ts +1 -1
  142. package/dist/version.js +1 -1
  143. package/package.json +3 -3
  144. package/dist/bundle/answer-policy-PPSPMCLH.js +0 -104
  145. package/dist/bundle/chunk-KMV7GZB6.js +0 -35
  146. package/dist/bundle/chunk-UG447QY2.js +0 -27
  147. package/dist/bundle/command-contract-4K6XXZYE.js +0 -41
  148. package/dist/bundle/config-EEDB632I.js +0 -90
  149. package/dist/bundle/first-run-23WWZ2PW.js +0 -28
  150. package/dist/bundle/first-screen-6HFUYVFR.js +0 -39
  151. package/dist/bundle/openai-2AU24NRN.js +0 -25
  152. package/dist/bundle/run-log-LFEXNZ74.js +0 -118
  153. package/dist/bundle/server-YSTMUZ22.js +0 -72
  154. package/dist/bundle/store-connection-AZTIF6IH.js +0 -83
  155. package/dist/bundle/store-maintenance-command-LR572PS4.js +0 -61
  156. /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-YVNHQFLC.js} +0 -0
@@ -19,205 +19,16 @@ import {
19
19
  reference,
20
20
  string,
21
21
  variant
22
- } from "./chunk-WOIHSQAL.js";
22
+ } from "./chunk-UVZLK3M4.js";
23
23
  import {
24
24
  CliError,
25
25
  isCliError
26
- } from "./chunk-FEM2JQN2.js";
26
+ } from "./chunk-ELJUBPY4.js";
27
27
  import {
28
28
  __name
29
29
  } from "./chunk-ZVVMGPBJ.js";
30
30
 
31
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
32
- var QUERY_LIMITS = {
33
- bytes: 8192,
34
- depth: 32,
35
- nodes: 256
36
- };
37
- var spanSchema = object({ start: number(), end: number() });
38
- var predicateSchema = object({
39
- kind: literal("predicate"),
40
- field: string(),
41
- operator: picklist(["term", "phrase", "wildcard", "regex", "range"]),
42
- value: string(),
43
- upper: optional(string()),
44
- lower_inclusive: optional(boolean()),
45
- upper_inclusive: optional(boolean()),
46
- span: spanSchema,
47
- implicit: optional(literal(true)),
48
- slop: optional(pipe(number(), integer(), minValue(0)))
49
- });
50
- var queryNodeSchema = variant("kind", [
51
- predicateSchema,
52
- object({
53
- kind: literal("boolean"),
54
- clauses: array(object({ occur: picklist(["must", "should", "must_not"]), node: lazy(() => queryNodeSchema) })),
55
- span: spanSchema
56
- })
57
- ]);
58
- var queryAstSchema = object({
59
- version: literal(1),
60
- language: literal("lucene-v1"),
61
- root: queryNodeSchema
62
- });
63
- function queryError(reason, span, alternative, context = {}, details = {}) {
64
- throw new CliError("validation_error", `${context.command ?? "query"}: ${reason} at position ${span.start + 1}${alternative ? ` \u2014 ${alternative}` : ""}`, {
65
- reason,
66
- span,
67
- ...alternative ? { alternative } : {},
68
- ...context.guide ? { guide: context.guide } : {},
69
- ...details
70
- });
71
- }
72
- __name(queryError, "queryError");
73
- var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
74
-
75
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
76
- var timezoneOf = /* @__PURE__ */ __name((given) => {
77
- const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
78
- try {
79
- new Intl.DateTimeFormat("en", { timeZone: zone }).format(0);
80
- } catch {
81
- queryError("query.invalid-timezone", { start: 0, end: 0 }, "use an IANA timezone such as Europe/Madrid");
82
- }
83
- return zone;
84
- }, "timezoneOf");
85
- var calendar = /* @__PURE__ */ __name((value, span) => {
86
- if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
87
- queryError("query.invalid-date", span, "use an ISO date or a quoted timestamp with offset");
88
- const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
89
- const date = /* @__PURE__ */ new Date(0);
90
- date.setUTCFullYear(year, month - 1, day);
91
- date.setUTCHours(0, 0, 0, 0);
92
- if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day)
93
- queryError("query.invalid-date", span);
94
- return date;
95
- }, "calendar");
96
- var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
97
- const date = calendar(value, span);
98
- if (next)
99
- date.setUTCDate(date.getUTCDate() + 1);
100
- const wanted = date.getUTCFullYear() * 1e4 + (date.getUTCMonth() + 1) * 100 + date.getUTCDate();
101
- const formatter = new Intl.DateTimeFormat("en-CA", {
102
- timeZone: zone,
103
- year: "numeric",
104
- month: "2-digit",
105
- day: "2-digit",
106
- era: "short"
107
- });
108
- const dayAt = /* @__PURE__ */ __name((time) => {
109
- const parts = formatter.formatToParts(time);
110
- const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
111
- const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
112
- return year * 1e4 + value2("month") * 100 + value2("day");
113
- }, "dayAt");
114
- let lo = date.getTime() - 2 * 864e5, hi = date.getTime() + 2 * 864e5;
115
- while (lo < hi) {
116
- const mid = Math.floor((lo + hi) / 2);
117
- if (dayAt(mid) < wanted)
118
- lo = mid + 1;
119
- else
120
- hi = mid;
121
- }
122
- if (dayAt(lo) !== wanted)
123
- queryError("query.invalid-date", span, "this calendar day does not exist in the selected timezone");
124
- return lo;
125
- }, "dayBoundary");
126
- var WALL = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/u;
127
- var wallTime = /* @__PURE__ */ __name((value, zone, span) => {
128
- const [, year, month, day, hour, minute, second = "0", fraction = "0"] = WALL.exec(value) ?? [];
129
- if (year === void 0)
130
- queryError("query.invalid-date", span, "use YYYY-MM-DDTHH:mm, with optional seconds");
131
- const wanted = Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second), Number(fraction.padEnd(3, "0")));
132
- const check = new Date(wanted);
133
- if (check.getUTCDate() !== Number(day) || check.getUTCHours() !== Number(hour) || check.getUTCMinutes() !== Number(minute) || check.getUTCSeconds() !== Number(second))
134
- queryError("query.invalid-date", span);
135
- const formatter = new Intl.DateTimeFormat("en-CA", {
136
- timeZone: zone,
137
- year: "numeric",
138
- month: "2-digit",
139
- day: "2-digit",
140
- hour: "2-digit",
141
- minute: "2-digit",
142
- second: "2-digit",
143
- hourCycle: "h23"
144
- });
145
- const shown = /* @__PURE__ */ __name((instant) => {
146
- const parts = Object.fromEntries(formatter.formatToParts(instant).map((part) => [part.type, Number(part.value)]));
147
- return Date.UTC(parts.year ?? 0, (parts.month ?? 1) - 1, parts.day, parts.hour, parts.minute, parts.second) + (instant % 1e3 + 1e3) % 1e3;
148
- }, "shown");
149
- const found = /* @__PURE__ */ new Set();
150
- for (const probe of [wanted - 864e5, wanted, wanted + 864e5]) {
151
- const candidate = wanted - (shown(probe) - probe);
152
- if (shown(candidate) === wanted)
153
- found.add(candidate);
154
- }
155
- if (found.size !== 1)
156
- queryError("query.invalid-date", span, "this local time is skipped or repeated by daylight saving; add an offset");
157
- return [...found][0];
158
- }, "wallTime");
159
- var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/iu;
160
- var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {}) => {
161
- if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
162
- return dayBoundary(value, zone, end, span) - (end ? 1 : 0);
163
- if (!ZONED.test(value))
164
- return wallTime(value, zone, span);
165
- const time = Date.parse(value);
166
- if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time))
167
- queryError("query.invalid-date", span);
168
- calendar(value.slice(0, 10), span);
169
- return time;
170
- }, "zonedMoment");
171
- var AGO = /^(\d+)(m|h|d)$/u;
172
- var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
173
- var dayOf = /* @__PURE__ */ __name((word, zone, now, span) => {
174
- const today = new Intl.DateTimeFormat("en-CA", {
175
- timeZone: zone,
176
- year: "numeric",
177
- month: "2-digit",
178
- day: "2-digit"
179
- }).format(now);
180
- if (word === "today")
181
- return today;
182
- const date = calendar(today, span);
183
- date.setUTCDate(date.getUTCDate() - 1);
184
- return date.toISOString().slice(0, 10);
185
- }, "dayOf");
186
- var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, now = Date.now()) => {
187
- if (value === "*")
188
- return { inclusive };
189
- const word = value.toLowerCase();
190
- if (word === "today" || word === "yesterday")
191
- return dateEndpoint(dayOf(word, zone, now, span), zone, side, inclusive, span);
192
- const [, amount, unit] = AGO.exec(word) ?? [];
193
- if (amount && unit)
194
- return { time: now - Number(amount) * (AGO_MS[unit] ?? 0), inclusive };
195
- if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
196
- return {
197
- time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
198
- inclusive: side === "lower"
199
- };
200
- if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/u.test(value))
201
- queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
202
- calendar(value.slice(0, 10), span);
203
- const time = Date.parse(value);
204
- if (!Number.isFinite(time) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
205
- queryError("query.invalid-date", span);
206
- return { time, inclusive };
207
- }, "dateEndpoint");
208
- var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclusive, zone, span, now = Date.now()) => {
209
- const since = lower === upper && AGO.test(lower.toLowerCase());
210
- const lo = dateEndpoint(lower, zone, "lower", lowerInclusive, span, now);
211
- const hi = dateEndpoint(since ? "*" : upper, zone, "upper", upperInclusive, span, now);
212
- return {
213
- ...lo.time === void 0 ? {} : { lower: lo.time },
214
- ...hi.time === void 0 ? {} : { upper: hi.time },
215
- lower_inclusive: lo.inclusive,
216
- upper_inclusive: hi.inclusive
217
- };
218
- }, "dateRange");
219
-
220
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
31
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
221
32
  var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
222
33
  var OPERATORS_BY_TYPE = {
223
34
  kw: ["term", "phrase", "wildcard"],
@@ -296,44 +107,51 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
296
107
  return [...own, ...relations, ...states];
297
108
  }, "queryFieldsOf");
298
109
 
299
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
300
- var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
301
- var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
302
- var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
303
- var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
304
- "field:value",
305
- ...has(shown, "phrase") ? ['"a phrase"'] : [],
306
- ...has(shown, "wildcard") ? ["word*"] : [],
307
- ...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
308
- ...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
309
- ].join(" \xB7 "), "syntaxOf");
310
- var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
311
- var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
312
- const shown = shownOf(registry);
313
- const negatable = leftOut(shown);
314
- const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
315
- const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
316
- return [
317
- "Fields:",
318
- ...rows.map(([name = "", kind = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
319
- ...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
320
- ...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
321
- `Syntax: ${syntaxOf(shown, registry.backend)}`,
322
- ...guide ? [`Guide: ${guide}`] : []
323
- ].join("\n");
324
- }, "fieldsHelp");
325
- var queryDescription = /* @__PURE__ */ __name((registry) => {
326
- const shown = shownOf(registry);
327
- if (shown.length === 0)
328
- return "field:value terms; this list filters by none yet, so any term is refused";
329
- const negatable = leftOut(shown);
330
- const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
331
- const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
332
- const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
333
- return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
334
- }, "queryDescription");
110
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
111
+ var QUERY_LIMITS = {
112
+ bytes: 8192,
113
+ depth: 32,
114
+ nodes: 256
115
+ };
116
+ var spanSchema = object({ start: number(), end: number() });
117
+ var predicateSchema = object({
118
+ kind: literal("predicate"),
119
+ field: string(),
120
+ operator: picklist(["term", "phrase", "wildcard", "regex", "range"]),
121
+ value: string(),
122
+ upper: optional(string()),
123
+ lower_inclusive: optional(boolean()),
124
+ upper_inclusive: optional(boolean()),
125
+ span: spanSchema,
126
+ implicit: optional(literal(true)),
127
+ slop: optional(pipe(number(), integer(), minValue(0)))
128
+ });
129
+ var queryNodeSchema = variant("kind", [
130
+ predicateSchema,
131
+ object({
132
+ kind: literal("boolean"),
133
+ clauses: array(object({ occur: picklist(["must", "should", "must_not"]), node: lazy(() => queryNodeSchema) })),
134
+ span: spanSchema
135
+ })
136
+ ]);
137
+ var queryAstSchema = object({
138
+ version: literal(1),
139
+ language: literal("lucene-v1"),
140
+ root: queryNodeSchema
141
+ });
142
+ function queryError(reason, span, alternative, context = {}, details = {}) {
143
+ throw new CliError("validation_error", `${context.command ?? "query"}: ${reason} at position ${span.start + 1}${alternative ? ` \u2014 ${alternative}` : ""}`, {
144
+ reason,
145
+ span,
146
+ ...alternative ? { alternative } : {},
147
+ ...context.guide ? { guide: context.guide } : {},
148
+ ...details
149
+ });
150
+ }
151
+ __name(queryError, "queryError");
152
+ var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
335
153
 
336
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
154
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
337
155
  var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
338
156
  var reserved = /* @__PURE__ */ new Set([
339
157
  "+",
@@ -642,7 +460,152 @@ var implicitTextTerms = /* @__PURE__ */ __name((text) => {
642
460
  return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
643
461
  }, "implicitTextTerms");
644
462
 
645
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
463
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
464
+ var timezoneOf = /* @__PURE__ */ __name((given) => {
465
+ const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
466
+ try {
467
+ new Intl.DateTimeFormat("en", { timeZone: zone }).format(0);
468
+ } catch {
469
+ queryError("query.invalid-timezone", { start: 0, end: 0 }, "use an IANA timezone such as Europe/Madrid");
470
+ }
471
+ return zone;
472
+ }, "timezoneOf");
473
+ var calendar = /* @__PURE__ */ __name((value, span) => {
474
+ if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
475
+ queryError("query.invalid-date", span, "use an ISO date or a quoted timestamp with offset");
476
+ const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
477
+ const date = /* @__PURE__ */ new Date(0);
478
+ date.setUTCFullYear(year, month - 1, day);
479
+ date.setUTCHours(0, 0, 0, 0);
480
+ if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day)
481
+ queryError("query.invalid-date", span);
482
+ return date;
483
+ }, "calendar");
484
+ var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
485
+ const date = calendar(value, span);
486
+ if (next)
487
+ date.setUTCDate(date.getUTCDate() + 1);
488
+ const wanted = date.getUTCFullYear() * 1e4 + (date.getUTCMonth() + 1) * 100 + date.getUTCDate();
489
+ const formatter = new Intl.DateTimeFormat("en-CA", {
490
+ timeZone: zone,
491
+ year: "numeric",
492
+ month: "2-digit",
493
+ day: "2-digit",
494
+ era: "short"
495
+ });
496
+ const dayAt = /* @__PURE__ */ __name((time) => {
497
+ const parts = formatter.formatToParts(time);
498
+ const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
499
+ const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
500
+ return year * 1e4 + value2("month") * 100 + value2("day");
501
+ }, "dayAt");
502
+ let lo = date.getTime() - 2 * 864e5, hi = date.getTime() + 2 * 864e5;
503
+ while (lo < hi) {
504
+ const mid = Math.floor((lo + hi) / 2);
505
+ if (dayAt(mid) < wanted)
506
+ lo = mid + 1;
507
+ else
508
+ hi = mid;
509
+ }
510
+ if (dayAt(lo) !== wanted)
511
+ queryError("query.invalid-date", span, "this calendar day does not exist in the selected timezone");
512
+ return lo;
513
+ }, "dayBoundary");
514
+ var WALL = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/u;
515
+ var wallTime = /* @__PURE__ */ __name((value, zone, span) => {
516
+ const [, year, month, day, hour, minute, second = "0", fraction = "0"] = WALL.exec(value) ?? [];
517
+ if (year === void 0)
518
+ queryError("query.invalid-date", span, "use YYYY-MM-DDTHH:mm, with optional seconds");
519
+ const wanted = Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second), Number(fraction.padEnd(3, "0")));
520
+ const check = new Date(wanted);
521
+ if (check.getUTCDate() !== Number(day) || check.getUTCHours() !== Number(hour) || check.getUTCMinutes() !== Number(minute) || check.getUTCSeconds() !== Number(second))
522
+ queryError("query.invalid-date", span);
523
+ const formatter = new Intl.DateTimeFormat("en-CA", {
524
+ timeZone: zone,
525
+ year: "numeric",
526
+ month: "2-digit",
527
+ day: "2-digit",
528
+ hour: "2-digit",
529
+ minute: "2-digit",
530
+ second: "2-digit",
531
+ hourCycle: "h23"
532
+ });
533
+ const shown = /* @__PURE__ */ __name((instant) => {
534
+ const parts = Object.fromEntries(formatter.formatToParts(instant).map((part) => [part.type, Number(part.value)]));
535
+ return Date.UTC(parts.year ?? 0, (parts.month ?? 1) - 1, parts.day, parts.hour, parts.minute, parts.second) + (instant % 1e3 + 1e3) % 1e3;
536
+ }, "shown");
537
+ const found = /* @__PURE__ */ new Set();
538
+ for (const probe of [wanted - 864e5, wanted, wanted + 864e5]) {
539
+ const candidate = wanted - (shown(probe) - probe);
540
+ if (shown(candidate) === wanted)
541
+ found.add(candidate);
542
+ }
543
+ if (found.size !== 1)
544
+ queryError("query.invalid-date", span, "this local time is skipped or repeated by daylight saving; add an offset");
545
+ return [...found][0];
546
+ }, "wallTime");
547
+ var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/iu;
548
+ var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {}) => {
549
+ if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
550
+ return dayBoundary(value, zone, end, span) - (end ? 1 : 0);
551
+ if (!ZONED.test(value))
552
+ return wallTime(value, zone, span);
553
+ const time = Date.parse(value);
554
+ if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time))
555
+ queryError("query.invalid-date", span);
556
+ calendar(value.slice(0, 10), span);
557
+ return time;
558
+ }, "zonedMoment");
559
+ var AGO = /^(\d+)(m|h|d)$/u;
560
+ var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
561
+ var dayOf = /* @__PURE__ */ __name((word, zone, now, span) => {
562
+ const today = new Intl.DateTimeFormat("en-CA", {
563
+ timeZone: zone,
564
+ year: "numeric",
565
+ month: "2-digit",
566
+ day: "2-digit"
567
+ }).format(now);
568
+ if (word === "today")
569
+ return today;
570
+ const date = calendar(today, span);
571
+ date.setUTCDate(date.getUTCDate() - 1);
572
+ return date.toISOString().slice(0, 10);
573
+ }, "dayOf");
574
+ var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, now = Date.now()) => {
575
+ if (value === "*")
576
+ return { inclusive };
577
+ const word = value.toLowerCase();
578
+ if (word === "today" || word === "yesterday")
579
+ return dateEndpoint(dayOf(word, zone, now, span), zone, side, inclusive, span);
580
+ const [, amount, unit] = AGO.exec(word) ?? [];
581
+ if (amount && unit)
582
+ return { time: now - Number(amount) * (AGO_MS[unit] ?? 0), inclusive };
583
+ if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
584
+ return {
585
+ time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
586
+ inclusive: side === "lower"
587
+ };
588
+ if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/u.test(value))
589
+ queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
590
+ calendar(value.slice(0, 10), span);
591
+ const time = Date.parse(value);
592
+ if (!Number.isFinite(time) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
593
+ queryError("query.invalid-date", span);
594
+ return { time, inclusive };
595
+ }, "dateEndpoint");
596
+ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclusive, zone, span, now = Date.now()) => {
597
+ const since = lower === upper && AGO.test(lower.toLowerCase());
598
+ const lo = dateEndpoint(lower, zone, "lower", lowerInclusive, span, now);
599
+ const hi = dateEndpoint(since ? "*" : upper, zone, "upper", upperInclusive, span, now);
600
+ return {
601
+ ...lo.time === void 0 ? {} : { lower: lo.time },
602
+ ...hi.time === void 0 ? {} : { upper: hi.time },
603
+ lower_inclusive: lo.inclusive,
604
+ upper_inclusive: hi.inclusive
605
+ };
606
+ }, "dateRange");
607
+
608
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
646
609
  var inContext = /* @__PURE__ */ __name((context, run) => {
647
610
  try {
648
611
  run();
@@ -717,7 +680,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
717
680
  }, "validateQuery");
718
681
  var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
719
682
 
720
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
683
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
721
684
  var describeQuery = /* @__PURE__ */ __name((registry) => ({
722
685
  entity: registry.entity,
723
686
  backend: registry.backend,
@@ -788,7 +751,44 @@ var QUERY_REASONS = defineReasons([
788
751
  details: [...SPAN, ...details]
789
752
  })));
790
753
 
791
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
754
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
755
+ var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
756
+ var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
757
+ var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
758
+ var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
759
+ "field:value",
760
+ ...has(shown, "phrase") ? ['"a phrase"'] : [],
761
+ ...has(shown, "wildcard") ? ["word*"] : [],
762
+ ...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
763
+ ...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
764
+ ].join(" \xB7 "), "syntaxOf");
765
+ var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
766
+ var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
767
+ const shown = shownOf(registry);
768
+ const negatable = leftOut(shown);
769
+ const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
770
+ const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
771
+ return [
772
+ "Fields:",
773
+ ...rows.map(([name = "", kind = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
774
+ ...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
775
+ ...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
776
+ `Syntax: ${syntaxOf(shown, registry.backend)}`,
777
+ ...guide ? [`Guide: ${guide}`] : []
778
+ ].join("\n");
779
+ }, "fieldsHelp");
780
+ var queryDescription = /* @__PURE__ */ __name((registry) => {
781
+ const shown = shownOf(registry);
782
+ if (shown.length === 0)
783
+ return "field:value terms; this list filters by none yet, so any term is refused";
784
+ const negatable = leftOut(shown);
785
+ const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
786
+ const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
787
+ const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
788
+ return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
789
+ }, "queryDescription");
790
+
791
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
792
792
  var wordsOf = /* @__PURE__ */ __name((text) => text.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
793
793
  var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
794
794
  var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
@@ -844,27 +844,27 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
844
844
  var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
845
845
 
846
846
  export {
847
+ FIELD_TYPES,
848
+ OPERATORS_BY_TYPE,
849
+ QUERY_BACKENDS,
850
+ queryFieldsOf,
847
851
  QUERY_LIMITS,
848
852
  queryAstSchema,
849
853
  queryError,
850
854
  walkQuery,
855
+ parseLucene,
856
+ implicitTextTerms,
851
857
  timezoneOf,
852
858
  dayBoundary,
853
859
  wallTime,
854
860
  zonedMoment,
855
861
  dateRange,
856
- evaluate,
857
- FIELD_TYPES,
858
- OPERATORS_BY_TYPE,
859
- QUERY_BACKENDS,
860
- queryFieldsOf,
861
- fieldsHelp,
862
- queryDescription,
863
- parseLucene,
864
- implicitTextTerms,
865
862
  validateQuery,
866
863
  fieldsNamed,
867
864
  describeQuery,
868
865
  defineQuery,
869
- QUERY_REASONS
866
+ QUERY_REASONS,
867
+ evaluate,
868
+ fieldsHelp,
869
+ queryDescription
870
870
  };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
8
8
  var CONTROL = (
9
9
  // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
10
10
  /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
@@ -0,0 +1,16 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ __name
5
+ } from "./chunk-ZVVMGPBJ.js";
6
+
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/store/normalize.js
8
+ var NORMALIZER_VERSION = 1;
9
+ var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
10
+ var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
11
+
12
+ export {
13
+ NORMALIZER_VERSION,
14
+ fold,
15
+ normalize
16
+ };
@@ -7,12 +7,12 @@ import {
7
7
  import {
8
8
  singleLine,
9
9
  visibleControls
10
- } from "./chunk-OE7EIP5L.js";
10
+ } from "./chunk-6DCLZLGX.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/render/messages.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/render/messages.js
16
16
  import { styleText } from "node:util";
17
17
  var TIME_WIDTH = 8;
18
18
  var INDENT = " ".repeat(TIME_WIDTH + 2);