@wirecat/cli-memo 0.131.47 → 0.131.49

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 (163) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/memo.js +2 -2
  3. package/dist/bundle/{all-profiles-75EGCXK3.js → all-profiles-3HADTQZA.js} +9 -9
  4. package/dist/bundle/{anthropic-PTAYBCPR.js → anthropic-RI4DWC3G.js} +6 -6
  5. package/dist/bundle/{app-server-YSUBXGGB.js → app-server-6EKWAYJI.js} +42 -42
  6. package/dist/bundle/auto-NKUBNWLS.js +86 -0
  7. package/dist/bundle/{bun-3AIG5ML4.js → bun-HUHQD76Z.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-5FCGI6EO.js → bun-sqlite-RPSKGB4O.js} +5 -5
  9. package/dist/bundle/{chunk-3HPFTKDH.js → chunk-2HPYP3ZT.js} +4 -4
  10. package/dist/bundle/{chunk-KLBZJZD2.js → chunk-2OIGV355.js} +216 -143
  11. package/dist/bundle/{chunk-R44PUK7G.js → chunk-355PHJYX.js} +1 -1
  12. package/dist/bundle/{chunk-F4HMPMET.js → chunk-3BG5VYMV.js} +10 -10
  13. package/dist/bundle/{chunk-5N6HWFXN.js → chunk-4VQPPX47.js} +350 -295
  14. package/dist/bundle/{chunk-PGVADNDD.js → chunk-57LMWEDK.js} +3 -3
  15. package/dist/bundle/{chunk-ELKK5M66.js → chunk-5JVA43HX.js} +6 -6
  16. package/dist/bundle/{chunk-U35N3EC7.js → chunk-5RVL7GYA.js} +2 -2
  17. package/dist/bundle/{chunk-BNIWLVWG.js → chunk-6N6BVPVX.js} +18 -4
  18. package/dist/bundle/{chunk-JY34MQW4.js → chunk-7RNHFNHX.js} +4 -4
  19. package/dist/bundle/{chunk-HCZV537M.js → chunk-AKD62EUH.js} +2 -2
  20. package/dist/bundle/{chunk-RZ54DSVU.js → chunk-BXTDAGM4.js} +2 -2
  21. package/dist/bundle/{chunk-V3B5COFP.js → chunk-BYVASZVV.js} +5 -5
  22. package/dist/bundle/{chunk-DS4DOK75.js → chunk-D5KGXYG6.js} +33 -25
  23. package/dist/bundle/{chunk-4LWX2WOB.js → chunk-DJRBSOWH.js} +4 -4
  24. package/dist/bundle/{chunk-W2JVP7GK.js → chunk-DVA6MQWK.js} +1 -1
  25. package/dist/bundle/{chunk-SN63VOE6.js → chunk-EBNNONF5.js} +8 -8
  26. package/dist/bundle/{chunk-XRRPQCTS.js → chunk-EJDV5IIF.js} +1 -1
  27. package/dist/bundle/{chunk-ZKH6LC5P.js → chunk-FOM7WE2C.js} +9 -9
  28. package/dist/bundle/{chunk-GA3KFYEZ.js → chunk-GAKZOX2S.js} +20 -11
  29. package/dist/bundle/{chunk-IPMBB6W5.js → chunk-GIDZGGAD.js} +4 -4
  30. package/dist/bundle/{chunk-6TKWJKPS.js → chunk-GV6XJMUW.js} +12 -12
  31. package/dist/bundle/{chunk-EFQCDCLY.js → chunk-HCMXUHHF.js} +99 -74
  32. package/dist/bundle/{chunk-U75ANK5K.js → chunk-HXOAPH47.js} +1 -1
  33. package/dist/bundle/{chunk-J324GKJM.js → chunk-IXXBPSXO.js} +2 -2
  34. package/dist/bundle/{chunk-UFVGAFID.js → chunk-KVOHC4ZM.js} +22 -14
  35. package/dist/bundle/{chunk-N63KZFH4.js → chunk-LUPJB7ZD.js} +9 -9
  36. package/dist/bundle/{chunk-IPLPMD6H.js → chunk-LZWXGO3G.js} +2 -2
  37. package/dist/bundle/{chunk-6QNPOBR5.js → chunk-N6IHOYMT.js} +198 -81
  38. package/dist/bundle/{chunk-32QM6X5H.js → chunk-ND6D4A6H.js} +3 -3
  39. package/dist/bundle/{chunk-MCMEBL3C.js → chunk-NJDGZRF5.js} +31 -15
  40. package/dist/bundle/{chunk-25RDNYKZ.js → chunk-NTQUBSIJ.js} +6 -6
  41. package/dist/bundle/{chunk-I2RDACUF.js → chunk-O3KOW7RG.js} +8 -8
  42. package/dist/bundle/{chunk-2R2Z2VWL.js → chunk-O3ZOYXH3.js} +20 -20
  43. package/dist/bundle/{chunk-W3T45MMN.js → chunk-OQTBCPSG.js} +8 -8
  44. package/dist/bundle/{chunk-SYTYLLYO.js → chunk-OT23U5LT.js} +2 -2
  45. package/dist/bundle/{chunk-OSCRP52P.js → chunk-P2LMXIHL.js} +675 -400
  46. package/dist/bundle/{chunk-ZLIARJU4.js → chunk-P2TISY3R.js} +1 -1
  47. package/dist/bundle/{chunk-CID4MNRQ.js → chunk-P3ASN72F.js} +1 -1
  48. package/dist/bundle/{chunk-YMK35KVV.js → chunk-PEYCLVIO.js} +2 -2
  49. package/dist/bundle/{chunk-UE4GMPBY.js → chunk-PUTGTW6W.js} +1 -1
  50. package/dist/bundle/{chunk-G3YSCD77.js → chunk-PYRHU35W.js} +173 -156
  51. package/dist/bundle/{chunk-DDADFHR7.js → chunk-QCPUC3HW.js} +13 -13
  52. package/dist/bundle/{chunk-N5QQFDNV.js → chunk-QCRJNWJZ.js} +3 -3
  53. package/dist/bundle/{chunk-HVTW2M6T.js → chunk-QNM36ARO.js} +8 -2
  54. package/dist/bundle/{chunk-Y5CAKD4X.js → chunk-QOGYHU3Q.js} +4 -4
  55. package/dist/bundle/{chunk-MMJDQQFX.js → chunk-RKFKRCOH.js} +310 -279
  56. package/dist/bundle/{chunk-DMTLG2GD.js → chunk-RYMYE5PF.js} +8 -8
  57. package/dist/bundle/{chunk-MSBRZ5QD.js → chunk-S7F4ZDFU.js} +3 -3
  58. package/dist/bundle/{chunk-G4W42RGE.js → chunk-SSPSNSC5.js} +1 -1
  59. package/dist/bundle/{chunk-ILK5BCBB.js → chunk-TSUNLSIN.js} +2 -2
  60. package/dist/bundle/{chunk-6IVHND3S.js → chunk-UAR6UMFL.js} +5 -5
  61. package/dist/bundle/{chunk-HYEYRFWX.js → chunk-UDJTRFRV.js} +1 -1
  62. package/dist/bundle/{chunk-FSAMZHIM.js → chunk-UG4BO256.js} +6 -6
  63. package/dist/bundle/{chunk-LE7NROV6.js → chunk-UJLYVXP6.js} +34 -34
  64. package/dist/bundle/{chunk-EVZI54B5.js → chunk-V2DMJ6ES.js} +6 -6
  65. package/dist/bundle/{chunk-LER7G4XY.js → chunk-VW6BF6M7.js} +1 -1
  66. package/dist/bundle/{chunk-V6OYLCCM.js → chunk-W6JQNNJ5.js} +3 -3
  67. package/dist/bundle/{chunk-DWBTCOF2.js → chunk-WNW6VW27.js} +7 -7
  68. package/dist/bundle/{chunk-KWM7HLAI.js → chunk-XH6K2B5L.js} +4 -4
  69. package/dist/bundle/{chunk-GOFPCOEI.js → chunk-XXGBXCBQ.js} +11 -11
  70. package/dist/bundle/{chunk-GQLSVXS2.js → chunk-XZZFHQGM.js} +22 -22
  71. package/dist/bundle/{chunk-CODD5SXC.js → chunk-Y6VH7IRN.js} +29 -29
  72. package/dist/bundle/{chunk-Y4ZXDJQF.js → chunk-ZA7FKGB7.js} +2 -2
  73. package/dist/bundle/command-contract-MRLLZQ4M.js +32 -0
  74. package/dist/bundle/{decode-F2A2BLIA.js → decode-IYWZ3X7X.js} +5 -5
  75. package/dist/bundle/{dispatch-MLRETSNQ.js → dispatch-HCRXCPCF.js} +8 -8
  76. package/dist/bundle/{echarts-JL55HJCM.js → echarts-5LLJ6JXC.js} +2 -2
  77. package/dist/bundle/{embed-74KVORNN.js → embed-EGY2R4FN.js} +6 -6
  78. package/dist/bundle/{embedder-GACNPCZN.js → embedder-K2BGPWNX.js} +9 -9
  79. package/dist/bundle/{entry-7FI2H4RQ.js → entry-NMAZNDNU.js} +7 -7
  80. package/dist/bundle/{failure-UJBGB2GP.js → failure-G4DCTWFD.js} +2 -2
  81. package/dist/bundle/failure-SACX3WGX.js +66 -0
  82. package/dist/bundle/{first-run-D4VBIJ7H.js → first-run-QDCSWX3N.js} +11 -11
  83. package/dist/bundle/first-screen-YABO6OZ7.js +30 -0
  84. package/dist/bundle/{instructions-QNPIVGKX.js → instructions-P72XX4AK.js} +1 -1
  85. package/dist/bundle/{mcp-YMXA6IH6.js → mcp-M4QN2E7R.js} +2 -2
  86. package/dist/bundle/mcp-QRZ2HSON.js +90 -0
  87. package/dist/bundle/memo.js +16 -16
  88. package/dist/bundle/{node-SPFML2D5.js → node-ZB4RNICS.js} +2 -2
  89. package/dist/bundle/{node-sqlite-T3KILRCP.js → node-sqlite-7XJ4J4E5.js} +6 -6
  90. package/dist/bundle/{oauth-ZOGSHZF3.js → oauth-FMH3JIPT.js} +7 -7
  91. package/dist/bundle/{open-XXFVCGCA.js → open-PRCTOHHL.js} +5 -5
  92. package/dist/bundle/{openai-JRHZLFKD.js → openai-VW4W6SIO.js} +10 -10
  93. package/dist/bundle/{process-OGYYVVLG.js → process-XNN4WG6N.js} +1 -1
  94. package/dist/bundle/{program-EFCQACPD.js → program-OSHEAD76.js} +161 -89
  95. package/dist/bundle/{prompt-53D5WVD3.js → prompt-RT55UZGB.js} +5 -5
  96. package/dist/bundle/{recognize-7GYZKJCD.js → recognize-AQ2UXUC2.js} +4 -4
  97. package/dist/bundle/{remote-V5GUFZCG.js → remote-T3P5OWRR.js} +7 -7
  98. package/dist/bundle/{rerank-FUNVBYFI.js → rerank-743T3675.js} +7 -7
  99. package/dist/bundle/{serve-ZLUYFAXC.js → serve-BSKOU4FJ.js} +9 -9
  100. package/dist/bundle/{server-HJRMD3XD.js → server-7GH6JLM3.js} +57 -57
  101. package/dist/bundle/server-VMWVYGK7.js +48 -0
  102. package/dist/bundle/server-ZFHSK6TT.js +61 -0
  103. package/dist/bundle/{state-4P7H6KBM.js → state-MDMI3I2Z.js} +6 -6
  104. package/dist/bundle/{store-NILJK24C.js → store-I3DIZALN.js} +13 -13
  105. package/dist/bundle/store-maintenance-command-HZPQPOK7.js +48 -0
  106. package/dist/bundle/update-Y3UQ5DQJ.js +69 -0
  107. package/dist/doctor/command.d.ts +2 -0
  108. package/dist/doctor/command.d.ts.map +1 -1
  109. package/dist/examples.d.ts.map +1 -1
  110. package/dist/examples.js +1 -0
  111. package/dist/examples.js.map +1 -1
  112. package/dist/memories/memory.d.ts.map +1 -1
  113. package/dist/memories/memory.js +3 -1
  114. package/dist/memories/memory.js.map +1 -1
  115. package/dist/notes/folders-command.d.ts.map +1 -1
  116. package/dist/notes/folders-command.js +51 -1
  117. package/dist/notes/folders-command.js.map +1 -1
  118. package/dist/notes/folders.d.ts +1 -0
  119. package/dist/notes/folders.d.ts.map +1 -1
  120. package/dist/notes/folders.js +1 -0
  121. package/dist/notes/folders.js.map +1 -1
  122. package/dist/notes/import.d.ts +3 -1
  123. package/dist/notes/import.d.ts.map +1 -1
  124. package/dist/notes/import.js +8 -3
  125. package/dist/notes/import.js.map +1 -1
  126. package/dist/notes/state.d.ts +2 -0
  127. package/dist/notes/state.d.ts.map +1 -1
  128. package/dist/notes/state.js +3 -1
  129. package/dist/notes/state.js.map +1 -1
  130. package/dist/progress.d.ts +12 -0
  131. package/dist/progress.d.ts.map +1 -0
  132. package/dist/progress.js +19 -0
  133. package/dist/progress.js.map +1 -0
  134. package/dist/reasons.d.ts.map +1 -1
  135. package/dist/reasons.js +6 -0
  136. package/dist/reasons.js.map +1 -1
  137. package/dist/run/auto.d.ts +3 -0
  138. package/dist/run/auto.d.ts.map +1 -1
  139. package/dist/run/auto.js +16 -4
  140. package/dist/run/auto.js.map +1 -1
  141. package/dist/run/import.d.ts.map +1 -1
  142. package/dist/run/import.js +7 -1
  143. package/dist/run/import.js.map +1 -1
  144. package/dist/search/answers.d.ts.map +1 -1
  145. package/dist/search/answers.js +7 -2
  146. package/dist/search/answers.js.map +1 -1
  147. package/dist/search/search.d.ts.map +1 -1
  148. package/dist/search/search.js +4 -3
  149. package/dist/search/search.js.map +1 -1
  150. package/dist/version.d.ts +1 -1
  151. package/dist/version.js +1 -1
  152. package/package.json +4 -4
  153. package/dist/bundle/auto-GB35FRTV.js +0 -86
  154. package/dist/bundle/command-contract-YYILWWYQ.js +0 -32
  155. package/dist/bundle/failure-AHPPXHAW.js +0 -66
  156. package/dist/bundle/first-screen-D7Q2U7VP.js +0 -30
  157. package/dist/bundle/mcp-AFXHH33V.js +0 -90
  158. package/dist/bundle/server-4OJC7ZWM.js +0 -61
  159. package/dist/bundle/server-CGUUZBLB.js +0 -48
  160. package/dist/bundle/store-maintenance-command-VP7CIBSS.js +0 -48
  161. package/dist/bundle/update-NPK4DT2E.js +0 -69
  162. /package/dist/bundle/{chunk-AT5Y62SD.js → chunk-CDFNOKPG.js} +0 -0
  163. /package/dist/bundle/{chunk-JPGEFBRW.js → chunk-VOXIGICJ.js} +0 -0
@@ -9,6 +9,7 @@ import {
9
9
  INVOICE_STATUSES,
10
10
  LINK_KINDS,
11
11
  LINK_ORIGINS,
12
+ MEETING_FIELD_NAMES,
12
13
  MEETING_FINDINGS_KIND,
13
14
  MEMORY_KINDS,
14
15
  MEMORY_SCOPES,
@@ -68,6 +69,7 @@ import {
68
69
  orderTitle,
69
70
  organization,
70
71
  parseDecimal,
72
+ parseLucene,
71
73
  parseMeetingQuery,
72
74
  parseMeetingReference,
73
75
  paymentEntryTitle,
@@ -100,11 +102,11 @@ import {
100
102
  validateQuery,
101
103
  walkQuery,
102
104
  zonedMoment
103
- } from "./chunk-EFQCDCLY.js";
105
+ } from "./chunk-HCMXUHHF.js";
104
106
  import {
105
107
  holdsCredential,
106
108
  secretNamed
107
- } from "./chunk-XRRPQCTS.js";
109
+ } from "./chunk-EJDV5IIF.js";
108
110
  import {
109
111
  DEFAULT_STEMMERS,
110
112
  DEFAULT_STEMMERS_VERSION,
@@ -117,27 +119,27 @@ import {
117
119
  fold,
118
120
  normalize,
119
121
  parseStemmers
120
- } from "./chunk-DMTLG2GD.js";
122
+ } from "./chunk-RYMYE5PF.js";
121
123
  import {
122
124
  DEFAULT_TASK_CATEGORIES,
123
125
  sharedConfigPath,
124
126
  storedTaskCategories,
125
127
  taskCategoriesReader
126
- } from "./chunk-EVZI54B5.js";
128
+ } from "./chunk-V2DMJ6ES.js";
127
129
  import {
128
130
  refuseOwnerStoreInTests,
129
131
  storePath
130
- } from "./chunk-IPLPMD6H.js";
132
+ } from "./chunk-LZWXGO3G.js";
131
133
  import {
132
134
  quietSqliteWarning,
133
135
  storeCapable
134
- } from "./chunk-25RDNYKZ.js";
136
+ } from "./chunk-NTQUBSIJ.js";
135
137
  import {
136
138
  PRAGMAS,
137
139
  TIME_LIMIT_FUNCTION,
138
140
  TimeLimitReached,
139
141
  isQueryOnly
140
- } from "./chunk-UE4GMPBY.js";
142
+ } from "./chunk-PUTGTW6W.js";
141
143
  import {
142
144
  array,
143
145
  boolean,
@@ -154,7 +156,7 @@ import {
154
156
  safeParse,
155
157
  strictObject,
156
158
  string
157
- } from "./chunk-SN63VOE6.js";
159
+ } from "./chunk-EBNNONF5.js";
158
160
  import {
159
161
  resolveFrom
160
162
  } from "./chunk-Y5E2WNWB.js";
@@ -162,7 +164,7 @@ import {
162
164
  CliError,
163
165
  isCliError,
164
166
  singleLine
165
- } from "./chunk-RZ54DSVU.js";
167
+ } from "./chunk-BXTDAGM4.js";
166
168
  import {
167
169
  SQLiteTable,
168
170
  TableAliasProxyHandler,
@@ -187,7 +189,7 @@ import {
187
189
  sql,
188
190
  sqliteTable,
189
191
  text
190
- } from "./chunk-ZLIARJU4.js";
192
+ } from "./chunk-P2TISY3R.js";
191
193
  import {
192
194
  __commonJS,
193
195
  __name,
@@ -9931,7 +9933,7 @@ var require_cjs = __commonJS({
9931
9933
  }
9932
9934
  });
9933
9935
 
9934
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/account-store.js
9936
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/account-store.js
9935
9937
  var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
9936
9938
  const methods = whole;
9937
9939
  return Object.fromEntries(Object.keys(keyed).map((name) => [
@@ -10059,7 +10061,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
10059
10061
  };
10060
10062
  }, "bindAccount");
10061
10063
 
10062
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/locator.js
10064
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/locator.js
10063
10065
  var SCHEME = "msg:";
10064
10066
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
10065
10067
  var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
@@ -10073,7 +10075,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
10073
10075
  return { provider, account, chat: chat2, message: message2 };
10074
10076
  }, "parseLocator");
10075
10077
 
10076
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/references.js
10078
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/references.js
10077
10079
  var SIMPLE_REFERENCES = [
10078
10080
  "note",
10079
10081
  "document",
@@ -10224,7 +10226,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
10224
10226
  return match !== null && byPrefix.has(match[1]);
10225
10227
  }, "looksLikeReference");
10226
10228
 
10227
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/providers.js
10229
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/providers.js
10228
10230
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
10229
10231
  var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
10230
10232
  var PROVIDERS = [
@@ -10340,7 +10342,7 @@ var providerNamed = /* @__PURE__ */ __name((word2) => {
10340
10342
  var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
10341
10343
  var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
10342
10344
 
10343
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/query.js
10345
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/query.js
10344
10346
  var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
10345
10347
  var inSource = /* @__PURE__ */ __name((source2, provider) => source2 === "all" || source2 === "bots" && isBotProvider(provider) || source2 === "personal" && !isBotProvider(provider) || source2 === provider || providerNamed(source2)?.name === provider || isKind(source2) && kindOf(provider) === source2, "inSource");
10346
10348
  var fail = /* @__PURE__ */ __name((message2) => {
@@ -10363,7 +10365,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
10363
10365
  return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
10364
10366
  }, "sourceOf");
10365
10367
 
10366
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/account-list.js
10368
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/account-list.js
10367
10369
  var ACCOUNT_GROUPS = "accountGroups";
10368
10370
  var ACCOUNT_GROUPS_SETTING = "account_groups";
10369
10371
  var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
@@ -10551,7 +10553,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
10551
10553
  return { accounts: [...chosen.values()], skipped };
10552
10554
  }, "fitting");
10553
10555
 
10554
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
10556
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
10555
10557
  var IndexBuilderOn = class {
10556
10558
  static {
10557
10559
  __name(this, "IndexBuilderOn");
@@ -10746,7 +10748,7 @@ function alias(table, alias2) {
10746
10748
  }
10747
10749
  __name(alias, "alias");
10748
10750
 
10749
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
10751
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
10750
10752
  var ENTITY_TABLES = {
10751
10753
  account: "accounts",
10752
10754
  attachment: "attachments",
@@ -10792,7 +10794,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
10792
10794
  return { table, pointer, type, count, known: known2 };
10793
10795
  }).filter(({ count }) => count > 0)), "orphanPointers");
10794
10796
 
10795
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
10797
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
10796
10798
  var canonicalTags = sqliteTable("canonical_tags", {
10797
10799
  id: integer("id").primaryKey(),
10798
10800
  name: text("name").notNull().unique(),
@@ -10801,7 +10803,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
10801
10803
  updatedAt: integer("updated_at").notNull()
10802
10804
  });
10803
10805
 
10804
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
10806
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
10805
10807
  var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
10806
10808
  sourceKey: text("source_key").notNull(),
10807
10809
  collection: text("collection").notNull(),
@@ -10811,13 +10813,33 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
10811
10813
  createdAt: integer("created_at").notNull()
10812
10814
  }, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
10813
10815
 
10814
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
10816
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
10815
10817
  var documentIndexPending = sqliteTable("document_index_pending", {
10816
10818
  id: integer("id").notNull(),
10817
10819
  indexableType: text("indexable_type").notNull()
10818
10820
  }, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
10819
10821
 
10820
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
10822
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
10823
+ var decisionRequests = sqliteTable("decision_requests", {
10824
+ id: integer("id").primaryKey(),
10825
+ tokenDigest: text("token_digest").notNull().unique(),
10826
+ proposalId: text("proposal_id").notNull(),
10827
+ action: text("action").notNull(),
10828
+ batchDigest: text("batch_digest").notNull(),
10829
+ channel: text("channel").notNull(),
10830
+ botProfile: text("bot_profile").notNull(),
10831
+ chatId: text("chat_id").notNull(),
10832
+ messageId: text("message_id").notNull(),
10833
+ ownerUserId: text("owner_user_id").notNull(),
10834
+ createdAt: integer("created_at").notNull(),
10835
+ expiresAt: integer("expires_at").notNull(),
10836
+ usedAt: integer("used_at"),
10837
+ cancelledAt: integer("cancelled_at")
10838
+ }, (table) => [
10839
+ index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
10840
+ ]);
10841
+
10842
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
10821
10843
  var tagRedirects = sqliteTable("tag_redirects", {
10822
10844
  sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
10823
10845
  survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
@@ -10843,7 +10865,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
10843
10865
  index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
10844
10866
  ]);
10845
10867
 
10846
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
10868
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
10847
10869
  var accounts = sqliteTable("accounts", {
10848
10870
  id: integer("id").primaryKey(),
10849
10871
  provider: text("provider").notNull(),
@@ -12629,7 +12651,7 @@ var storeSettings = sqliteTable("store_settings", {
12629
12651
  at: integer("at").notNull()
12630
12652
  });
12631
12653
 
12632
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
12654
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
12633
12655
  var ARMS = [
12634
12656
  [
12635
12657
  "message",
@@ -12756,7 +12778,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
12756
12778
  return recomputed;
12757
12779
  }, "drainInvolvementQueue");
12758
12780
 
12759
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/mentions.js
12781
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/mentions.js
12760
12782
  import { domainToUnicode } from "node:url";
12761
12783
 
12762
12784
  // node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
@@ -22778,7 +22800,7 @@ var oa = /* @__PURE__ */ __name((e) => {
22778
22800
  }, "oa");
22779
22801
  var na = { parse: O, get: aa, isValid: oa };
22780
22802
 
22781
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
22803
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
22782
22804
  var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
22783
22805
  var ID = /^[\w-]{10,}$/;
22784
22806
  var trimUrl = /* @__PURE__ */ __name((url) => {
@@ -22819,7 +22841,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
22819
22841
  return { url, documentId: googleDocumentId(url) };
22820
22842
  }), "googleDocumentLinks");
22821
22843
 
22822
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
22844
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
22823
22845
  var PHONE_PLANS = [
22824
22846
  {
22825
22847
  country: "us",
@@ -23199,7 +23221,7 @@ var PHONE_PLANS = [
23199
23221
  }
23200
23222
  ];
23201
23223
 
23202
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/phones.js
23224
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/phones.js
23203
23225
  var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
23204
23226
  var DEFAULT_PHONE_COUNTRIES = ["ru"];
23205
23227
  var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
@@ -23240,7 +23262,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
23240
23262
  return void 0;
23241
23263
  }, "nationalPhone");
23242
23264
 
23243
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/places.js
23265
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/places.js
23244
23266
  var BEFORE = [
23245
23267
  [/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
23246
23268
  [/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
@@ -23500,7 +23522,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
23500
23522
  return found2.sort((a, b) => a.start - b.start);
23501
23523
  }, "findPlaces");
23502
23524
 
23503
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/mentions.js
23525
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/mentions.js
23504
23526
  var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
23505
23527
  var MENTION_VERSIONS = {
23506
23528
  phone: 1,
@@ -23690,7 +23712,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
23690
23712
  };
23691
23713
  }, "typedPhone");
23692
23714
 
23693
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/first-names.js
23715
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/first-names.js
23694
23716
  var RUSSIAN = "\u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440 \u0410\u043B\u0435\u043A\u0441\u0435\u0439 \u0410\u043D\u0430\u0442\u043E\u043B\u0438\u0439 \u0410\u043D\u0434\u0440\u0435\u0439 \u0410\u043D\u0442\u043E\u043D \u0410\u0440\u043A\u0430\u0434\u0438\u0439 \u0410\u0440\u0441\u0435\u043D\u0438\u0439 \u0410\u0440\u0442\u0451\u043C \u0410\u0440\u0442\u0435\u043C \u0410\u0440\u0442\u0443\u0440 \u0411\u043E\u0440\u0438\u0441 \u0412\u0430\u0434\u0438\u043C \u0412\u0430\u043B\u0435\u043D\u0442\u0438\u043D \u0412\u0430\u043B\u0435\u0440\u0438\u0439 \u0412\u0430\u0441\u0438\u043B\u0438\u0439 \u0412\u0438\u043A\u0442\u043E\u0440 \u0412\u0438\u0442\u0430\u043B\u0438\u0439 \u0412\u043B\u0430\u0434\u0438\u043C\u0438\u0440 \u0412\u043B\u0430\u0434\u0438\u0441\u043B\u0430\u0432 \u0412\u0441\u0435\u0432\u043E\u043B\u043E\u0434 \u0412\u044F\u0447\u0435\u0441\u043B\u0430\u0432 \u0413\u0435\u043D\u043D\u0430\u0434\u0438\u0439 \u0413\u0435\u043E\u0440\u0433\u0438\u0439 \u0413\u043B\u0435\u0431 \u0413\u0440\u0438\u0433\u043E\u0440\u0438\u0439 \u0414\u0430\u043D\u0438\u0438\u043B \u0414\u0430\u043D\u0438\u043B\u0430 \u0414\u0435\u043D\u0438\u0441 \u0414\u043C\u0438\u0442\u0440\u0438\u0439 \u0415\u0432\u0433\u0435\u043D\u0438\u0439 \u0415\u0433\u043E\u0440 \u0418\u0432\u0430\u043D \u0418\u0433\u043E\u0440\u044C \u0418\u043B\u044C\u044F \u041A\u0438\u0440\u0438\u043B\u043B \u041A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0438\u043D \u041B\u0435\u043E\u043D\u0438\u0434 \u041C\u0430\u043A\u0441\u0438\u043C \u041C\u0430\u0440\u0430\u0442 \u041C\u0430\u0442\u0432\u0435\u0439 \u041C\u0438\u0445\u0430\u0438\u043B \u041D\u0438\u043A\u0438\u0442\u0430 \u041D\u0438\u043A\u043E\u043B\u0430\u0439 \u041E\u043B\u0435\u0433 \u041F\u0430\u0432\u0435\u043B \u041F\u0451\u0442\u0440 \u041F\u0435\u0442\u0440 \u0420\u043E\u0434\u0438\u043E\u043D \u0420\u043E\u0441\u0442\u0438\u0441\u043B\u0430\u0432 \u0420\u0443\u0441\u043B\u0430\u043D \u0420\u0443\u0441\u0442\u0430\u043C \u0421\u0435\u043C\u0451\u043D \u0421\u0435\u043C\u0435\u043D \u0421\u0435\u0440\u0433\u0435\u0439 \u0421\u0442\u0430\u043D\u0438\u0441\u043B\u0430\u0432 \u0421\u0442\u0435\u043F\u0430\u043D \u0422\u0438\u043C\u043E\u0444\u0435\u0439 \u0422\u0438\u043C\u0443\u0440 \u0424\u0451\u0434\u043E\u0440 \u0424\u0435\u0434\u043E\u0440 \u0424\u0438\u043B\u0438\u043F\u043F \u042D\u0434\u0443\u0430\u0440\u0434 \u042E\u0440\u0438\u0439 \u042F\u0440\u043E\u0441\u043B\u0430\u0432 \u042F\u043A\u043E\u0432 \u042D\u043B\u044C\u0434\u0430\u0440 \u0414\u0430\u0432\u0438\u0434 \u0417\u0430\u0445\u0430\u0440 \u0421\u0430\u0432\u0435\u043B\u0438\u0439 \u041C\u0438\u0440\u043E\u043D \u041F\u043B\u0430\u0442\u043E\u043D \u0414\u0435\u043C\u0438\u0434 \u0410\u0440\u0441\u0435\u043D \u041D\u0443\u0440\u043B\u0430\u043D \u0410\u043D\u0437\u043E\u0440 \u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440\u0430 \u0410\u043B\u0438\u043D\u0430 \u0410\u043B\u0438\u0441\u0430 \u0410\u043B\u043B\u0430 \u0410\u043D\u0430\u0441\u0442\u0430\u0441\u0438\u044F \u0410\u043D\u0433\u0435\u043B\u0438\u043D\u0430 \u0410\u043D\u043D\u0430 \u0410\u043D\u0442\u043E\u043D\u0438\u043D\u0430 \u0412\u0430\u043B\u0435\u043D\u0442\u0438\u043D\u0430 \u0412\u0430\u043B\u0435\u0440\u0438\u044F \u0412\u0430\u0440\u0432\u0430\u0440\u0430 \u0412\u0435\u0440\u043E\u043D\u0438\u043A\u0430 \u0412\u0438\u043A\u0442\u043E\u0440\u0438\u044F \u0413\u0430\u043B\u0438\u043D\u0430 \u0414\u0430\u0440\u044C\u044F \u0414\u0438\u0430\u043D\u0430 \u0415\u0432\u0433\u0435\u043D\u0438\u044F \u0415\u043A\u0430\u0442\u0435\u0440\u0438\u043D\u0430 \u0415\u043B\u0435\u043D\u0430 \u0415\u043B\u0438\u0437\u0430\u0432\u0435\u0442\u0430 \u0416\u0430\u043D\u043D\u0430 \u0417\u0438\u043D\u0430\u0438\u0434\u0430 \u041A\u0430\u0440\u0438\u043D\u0430 \u041A\u0438\u0440\u0430 \u041A\u043B\u0430\u0432\u0434\u0438\u044F \u041A\u0440\u0438\u0441\u0442\u0438\u043D\u0430 \u041A\u0441\u0435\u043D\u0438\u044F \u041B\u0430\u0440\u0438\u0441\u0430 \u041B\u0438\u0434\u0438\u044F \u041B\u044E\u0434\u043C\u0438\u043B\u0430 \u041C\u0430\u0440\u0433\u0430\u0440\u0438\u0442\u0430 \u041C\u0430\u0440\u0438\u043D\u0430 \u041C\u0430\u0440\u0438\u044F \u041C\u0438\u043B\u0430\u043D\u0430 \u041D\u0430\u0442\u0430\u043B\u044C\u044F \u041D\u0430\u0442\u0430\u043B\u0438\u044F \u041D\u0438\u043D\u0430 \u041E\u043A\u0441\u0430\u043D\u0430 \u041E\u043B\u0435\u0441\u044F \u041E\u043B\u044C\u0433\u0430 \u041F\u043E\u043B\u0438\u043D\u0430 \u0420\u0430\u0438\u0441\u0430 \u0421\u0432\u0435\u0442\u043B\u0430\u043D\u0430 \u0421\u043E\u0444\u0438\u044F \u0421\u043E\u0444\u044C\u044F \u0422\u0430\u0438\u0441\u0438\u044F \u0422\u0430\u043C\u0430\u0440\u0430 \u0422\u0430\u0442\u044C\u044F\u043D\u0430 \u0423\u043B\u044C\u044F\u043D\u0430 \u042E\u043B\u0438\u044F \u042D\u043B\u044C\u0432\u0438\u0440\u0430 \u0420\u0435\u0433\u0438\u043D\u0430 \u0421\u043D\u0435\u0436\u0430\u043D\u0430 \u0410\u043B\u0451\u043D\u0430 \u0410\u043B\u0435\u043D\u0430 \u0412\u0430\u0441\u0438\u043B\u0438\u0441\u0430 \u0410\u0440\u0438\u043D\u0430 \u0415\u0441\u0435\u043D\u0438\u044F \u042D\u0432\u0435\u043B\u0438\u043D\u0430 \u0421\u0430\u0448\u0430 \u0416\u0435\u043D\u044F \u0412\u0430\u043B\u044F \u0414\u0438\u043C\u0430 \u041C\u0438\u0448\u0430 \u041A\u043E\u043B\u044F \u041F\u0435\u0442\u044F \u0412\u0430\u0441\u044F \u0421\u0435\u0440\u0451\u0436\u0430 \u0421\u0435\u0440\u0435\u0436\u0430 \u041F\u0430\u0448\u0430 \u041B\u0451\u0448\u0430 \u041B\u0435\u0448\u0430 \u0412\u0438\u0442\u044F \u041A\u043E\u0441\u0442\u044F \u0412\u043E\u0432\u0430 \u0412\u043E\u043B\u043E\u0434\u044F \u0412\u0430\u043D\u044F \u0413\u043E\u0448\u0430 \u0413\u0440\u0438\u0448\u0430 \u0422\u043E\u043B\u044F \u0411\u043E\u0440\u044F \u0421\u0442\u0430\u0441 \u0422\u0451\u043C\u0430 \u0422\u0430\u043D\u044F \u041A\u0430\u0442\u044F \u041B\u0435\u043D\u0430 \u041D\u0430\u0442\u0430\u0448\u0430 \u0421\u0432\u0435\u0442\u0430 \u042E\u043B\u044F \u041D\u0430\u0441\u0442\u044F \u0414\u0430\u0448\u0430 \u041C\u0430\u0448\u0430 \u041B\u044E\u0434\u0430 \u0413\u0430\u043B\u044F \u0412\u0438\u043A\u0430 \u041A\u0441\u044E\u0448\u0430 \u041B\u0438\u0437\u0430 \u0421\u043E\u043D\u044F \u041D\u0430\u0434\u044F \u041B\u0435\u0440\u0430 \u0410\u043B\u0451\u0448\u0430 \u0410\u043B\u0435\u0448\u0430 \u041C\u0438\u0442\u044F \u0421\u0435\u043D\u044F \u0424\u0435\u0434\u044F \u0416\u0435\u043D\u0435\u0447\u043A\u0430 \u041E\u043B\u0435\u043D\u044C\u043A\u0430 \u0422\u0430\u043D\u0435\u0447\u043A\u0430";
23695
23717
  var EUROPEAN = "James John Robert Michael William David Richard Joseph Thomas Charles Christopher Daniel Matthew Anthony Donald Steven Paul Andrew Joshua Kenneth Kevin Brian George Timothy Ronald Edward Jason Jeffrey Ryan Jacob Gary Nicholas Eric Jonathan Stephen Larry Justin Scott Brandon Benjamin Samuel Gregory Alexander Patrick Raymond Dennis Jerry Tyler Aaron Nathan Henry Peter Zachary Douglas Harold Kyle Noah Ethan Oliver Harry Lucas Liam Mary Patricia Jennifer Linda Elizabeth Barbara Susan Jessica Sarah Karen Lisa Nancy Betty Margaret Sandra Ashley Kimberly Emily Donna Michelle Carol Amanda Dorothy Melissa Deborah Stephanie Rebecca Sharon Laura Cynthia Kathleen Angela Shirley Anna Brenda Pamela Emma Nicole Helen Samantha Katherine Christine Rachel Carolyn Janet Catherine Maria Heather Diane Ruth Julie Olivia Joyce Kelly Lauren Christina Joan Evelyn Judith Megan Andrea Cheryl Hannah Jacqueline Martha Teresa Sara Madison Frances Kathryn Janice Abigail Alice Julia Judy Sophia Denise Doris Marilyn Danielle Beverly Isabella Theresa Diana Natalie Charlotte Marie Kayla Alexis Javier Carlos Antonio Manuel Francisco Juan Pedro Alejandro Miguel Rafael Pablo Sergio Fernando Jorge Luis Alberto \xC1lvaro Diego Adri\xE1n Rub\xE9n Iv\xE1n \xD3scar Andr\xE9s Ra\xFAl Enrique Vicente Joaqu\xEDn Ignacio Gonzalo Marcos V\xEDctor Jaime Alfonso Guillermo Tom\xE1s Emilio Gabriel Nicol\xE1s Mart\xEDn Jordi Josep Xavier Luc\xEDa Carmen Isabel Cristina Marta Elena Raquel Silvia Beatriz Paula Nuria N\xFAria Sonia Alicia Irene Montserrat Inmaculada Noelia Lorena Sof\xEDa Valeria Claudia Natalia Sandra Ver\xF3nica Esther Yolanda Vanesa Laia Klaus J\xFCrgen Wolfgang Stefan Andreas Matthias Markus Tobias Florian Lukas Jonas Maximilian Sebastian Dirk Sabine Ursula Petra Monika Katrin Anja Pierre Michel Philippe Alain Fran\xE7ois Christophe Laurent Olivier Julien Mathieu S\xE9bastien Guillaume Antoine Camille Nathalie Isabelle Sylvie Sophie C\xE9line Aur\xE9lie Chlo\xE9 Manon Giuseppe Giovanni Marco Luca Francesco Alessandro Matteo Lorenzo Stefano Paolo Roberto Davide Simone Federico Giulia Francesca Chiara Valentina Alessia Martina Elisa Jo\xE3o Pedro Tiago Beatriz In\xEAs Mariana Piotr Krzysztof Tomasz Marcin Agnieszka Katarzyna Ma\u0142gorzata Magdalena";
23696
23718
  var WORDS = "\u0412\u0435\u0440\u0430 \u041D\u0430\u0434\u0435\u0436\u0434\u0430 \u041B\u044E\u0431\u043E\u0432\u044C \u0421\u043B\u0430\u0432\u0430 \u0420\u043E\u043C\u0430\u043D \u0420\u043E\u0437\u0430 \u041C\u0430\u0439\u044F \u041B\u0438\u043B\u0438\u044F \u0417\u043B\u0430\u0442\u0430 \u041C\u0438\u043B\u0430 \u041D\u0438\u043A\u0430 \u041B\u0435\u0432 \u0413\u043B\u043E\u0440\u0438\u044F Will Mark Rose Grace Hope Faith Bill Frank Jack June April Summer Amber Ruby Lily Daisy Victoria Virginia Georgia Florence Sydney Chelsea Jordan Austin Dallas Mercedes Dolores Rosa Pilar Marina Esperanza Gloria Amparo Consuelo Roc\xEDo Salvador Santiago Jes\xFAs \xC1ngeles Hugo Ram\xF3n Christian Felix F\xE9lix Mario Martin Victor Pierre Paz Merc\xE8 Estrella Aurora Concepci\xF3n Remedios Soledad Milagros Angel \xC1ngel Dawn Joy Holly Ivy Iris Violet Pearl";
@@ -23698,7 +23720,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
23698
23720
  var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
23699
23721
  var NAME_WORDS = WORDS.split(" ");
23700
23722
 
23701
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/person-names.js
23723
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/person-names.js
23702
23724
  var LATIN_TO_CYRILLIC = {
23703
23725
  shch: "\u0449",
23704
23726
  sch: "\u0449",
@@ -23906,7 +23928,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
23906
23928
  return found2;
23907
23929
  }, "findUnknownNames");
23908
23930
 
23909
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/attachments.js
23931
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/attachments.js
23910
23932
  var NOT_FILES = /* @__PURE__ */ new Set([
23911
23933
  "webpage",
23912
23934
  "share",
@@ -23946,7 +23968,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
23946
23968
  });
23947
23969
  }, "matchDownloads");
23948
23970
 
23949
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
23971
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
23950
23972
  var QUERY_VERSION = 1;
23951
23973
  var QUERY_LIMITS2 = {
23952
23974
  ...QUERY_LIMITS,
@@ -23982,7 +24004,7 @@ function exhausted(budget) {
23982
24004
  }
23983
24005
  __name(exhausted, "exhausted");
23984
24006
 
23985
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
24007
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
23986
24008
  var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
23987
24009
  var literal2 = /* @__PURE__ */ __name((c) => ({
23988
24010
  kind: "char",
@@ -24283,7 +24305,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
24283
24305
  const chars = [...pattern.normalize("NFC")];
24284
24306
  let out = "";
24285
24307
  let at = 0;
24286
- const literal4 = /* @__PURE__ */ __name((c) => {
24308
+ const literal5 = /* @__PURE__ */ __name((c) => {
24287
24309
  if (!/[\p{L}\p{N}\p{M}]/u.test(c))
24288
24310
  return c;
24289
24311
  const folded5 = fold(c);
@@ -24362,7 +24384,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
24362
24384
  if (next === void 0)
24363
24385
  out += c;
24364
24386
  else
24365
- out += (next.codePointAt(0) ?? 0) < 128 ? `${c}${next}` : literal4(next);
24387
+ out += (next.codePointAt(0) ?? 0) < 128 ? `${c}${next}` : literal5(next);
24366
24388
  } else if (c === '"') {
24367
24389
  const end = chars.indexOf('"', at);
24368
24390
  if (end < 0) {
@@ -24377,12 +24399,12 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
24377
24399
  } else if (c === "[")
24378
24400
  characterClass();
24379
24401
  else
24380
- out += literal4(c);
24402
+ out += literal5(c);
24381
24403
  }
24382
24404
  return out;
24383
24405
  }, "foldRegex");
24384
24406
 
24385
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
24407
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
24386
24408
  var PRESET_VERSION = 1;
24387
24409
  var PRESETS = {
24388
24410
  password: {
@@ -24436,7 +24458,7 @@ var PRESETS = {
24436
24458
  }
24437
24459
  };
24438
24460
 
24439
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
24461
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
24440
24462
  var FIELD_VERSION = 2;
24441
24463
  var UNITS = {
24442
24464
  "": 1,
@@ -24897,12 +24919,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
24897
24919
  return validateFields(parsed3.output);
24898
24920
  }, "validateAst");
24899
24921
 
24900
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
24922
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
24901
24923
  var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
24902
24924
  var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
24903
24925
  var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
24904
24926
 
24905
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
24927
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
24906
24928
  var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
24907
24929
  var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
24908
24930
  var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
@@ -24926,7 +24948,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
24926
24948
  };
24927
24949
  }, "linkMatch");
24928
24950
 
24929
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
24951
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
24930
24952
  var SETTING = "phoneCountries";
24931
24953
  var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
24932
24954
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
@@ -24957,7 +24979,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
24957
24979
  return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
24958
24980
  }, "valueMatch");
24959
24981
 
24960
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
24982
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
24961
24983
  var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
24962
24984
  if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
24963
24985
  throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
@@ -24985,7 +25007,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
24985
25007
  return 2 * intersection2 / (aa2.size + bb.size);
24986
25008
  }, "vocabularySimilarity");
24987
25009
 
24988
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
25010
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
24989
25011
  import { createHash } from "node:crypto";
24990
25012
  var folded2 = /* @__PURE__ */ __name((name) => {
24991
25013
  try {
@@ -25051,7 +25073,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
25051
25073
  });
25052
25074
  }, "guardTagCreation");
25053
25075
 
25054
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
25076
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
25055
25077
  var invalid2 = /* @__PURE__ */ __name((message2) => {
25056
25078
  throw new CliError("validation_error", message2);
25057
25079
  }, "invalid");
@@ -25128,7 +25150,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
25128
25150
  };
25129
25151
  }, "createTagRedirectIndex");
25130
25152
 
25131
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
25153
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
25132
25154
  var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
25133
25155
  const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
25134
25156
  if (!row2)
@@ -25156,7 +25178,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
25156
25178
  return snapshot2;
25157
25179
  }, "tagRedirectSnapshot");
25158
25180
 
25159
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
25181
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
25160
25182
  import { createHash as createHash2 } from "node:crypto";
25161
25183
  var TASK_KEY_PREFIXES = {
25162
25184
  question: "Q",
@@ -25184,7 +25206,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
25184
25206
  return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
25185
25207
  }, "taskAccountOf");
25186
25208
 
25187
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
25209
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
25188
25210
  var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
25189
25211
  var REFERABLE = {
25190
25212
  note: { tombstone: true },
@@ -25352,7 +25374,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
25352
25374
  return row2 ? String(row2.id ?? row2.key) : void 0;
25353
25375
  }, "taskIdOf");
25354
25376
 
25355
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
25377
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
25356
25378
  var toMs = /* @__PURE__ */ __name((iso14) => {
25357
25379
  if (iso14 === null || iso14 === void 0)
25358
25380
  return null;
@@ -25366,7 +25388,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
25366
25388
  var DELIVERY = { delivered: 1, read: 2 };
25367
25389
  var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
25368
25390
 
25369
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
25391
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
25370
25392
  var TAG_KINDS = ["tag", "topic"];
25371
25393
  var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
25372
25394
  var TAG_TYPE = {
@@ -25569,7 +25591,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
25569
25591
  return result;
25570
25592
  }, "tagsOf");
25571
25593
 
25572
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
25594
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
25573
25595
  var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
25574
25596
  var SPEECH = speech("att");
25575
25597
  var mentionText = /* @__PURE__ */ __name((alias2) => `CASE WHEN coalesce(json_extract(${alias2}.contact, '$.phone'), '') <> '' THEN 'phone: ' || json_extract(${alias2}.contact, '$.phone') ELSE ${alias2}.text END`, "mentionText");
@@ -25933,7 +25955,7 @@ var FIELD_COMPILERS = {
25933
25955
  subject
25934
25956
  };
25935
25957
 
25936
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
25958
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
25937
25959
  var placeOf = /* @__PURE__ */ __name((database) => {
25938
25960
  const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
25939
25961
  const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
@@ -25949,7 +25971,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
25949
25971
  };
25950
25972
  }, "placeOf");
25951
25973
 
25952
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
25974
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
25953
25975
  var DRAIN_ON_WRITE = 500;
25954
25976
  var METHOD = "rules";
25955
25977
  var telegramLink = /* @__PURE__ */ __name((database) => {
@@ -26101,18 +26123,18 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
26101
26123
  if (queued.length === 0)
26102
26124
  return 0;
26103
26125
  const write2 = writer(database, now2, void 0);
26104
- const read2 = Object.fromEntries(SOURCE_TYPES.map((type) => [type, database.prepare(SOURCES[type].one)]));
26126
+ const read3 = Object.fromEntries(SOURCE_TYPES.map((type) => [type, database.prepare(SOURCES[type].one)]));
26105
26127
  const dequeue = database.prepare("DELETE FROM mention_pending WHERE source_type = ? AND source_id = ?");
26106
26128
  for (const { type, pk } of queued) {
26107
26129
  const known2 = SOURCE_TYPES.find((one2) => one2 === type);
26108
26130
  if (known2)
26109
- write2(known2, pk, sourceOf2(read2[known2]?.get(pk)));
26131
+ write2(known2, pk, sourceOf2(read3[known2]?.get(pk)));
26110
26132
  dequeue.run(type, pk);
26111
26133
  }
26112
26134
  return queued.length;
26113
26135
  }, "drainMentions");
26114
26136
 
26115
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
26137
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
26116
26138
  var indexRow = /* @__PURE__ */ __name((database, name) => {
26117
26139
  const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
26118
26140
  if (!exists2)
@@ -26120,7 +26142,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
26120
26142
  return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
26121
26143
  }, "indexRow");
26122
26144
 
26123
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
26145
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
26124
26146
  var INDEX = "message_stems";
26125
26147
  var SETTING2 = "searchStemmers";
26126
26148
  var DRAIN_ON_WRITE2 = 500;
@@ -26193,7 +26215,7 @@ var claim = /* @__PURE__ */ __name((database, identity) => {
26193
26215
  return built === identity;
26194
26216
  }, "claim");
26195
26217
  var stemWriter = /* @__PURE__ */ __name((database, stemmer) => {
26196
- const read2 = database.prepare(`SELECT id AS pk, text, 'c' || chat_id || coalesce(' s' || sender_identity_id, '') AS scope
26218
+ const read3 = database.prepare(`SELECT id AS pk, text, 'c' || chat_id || coalesce(' s' || sender_identity_id, '') AS scope
26197
26219
  FROM messages WHERE id > ? AND id <= ?`);
26198
26220
  const one2 = database.prepare("SELECT text, 'c' || chat_id || coalesce(' s' || sender_identity_id, '') AS scope FROM messages WHERE id = ?");
26199
26221
  const write2 = database.prepare("INSERT OR REPLACE INTO message_stems (rowid, stems, scope) VALUES (?, ?, ?)");
@@ -26208,7 +26230,7 @@ var stemWriter = /* @__PURE__ */ __name((database, stemmer) => {
26208
26230
  }, "restem");
26209
26231
  return {
26210
26232
  range: /* @__PURE__ */ __name((from2, to) => {
26211
- const rows = read2.all(from2, to);
26233
+ const rows = read3.all(from2, to);
26212
26234
  for (const row2 of rows)
26213
26235
  restem(Number(row2.pk), row2);
26214
26236
  return rows.length;
@@ -26242,7 +26264,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
26242
26264
  };
26243
26265
  }, "stemmerCache");
26244
26266
 
26245
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
26267
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
26246
26268
  var SQLITE_BUSY = 5;
26247
26269
  var pause = new Int32Array(new SharedArrayBuffer(4));
26248
26270
  var isBusy = /* @__PURE__ */ __name((error) => {
@@ -26337,7 +26359,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
26337
26359
  }
26338
26360
  }, "read");
26339
26361
 
26340
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
26362
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
26341
26363
  var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
26342
26364
  coalesce(CASE k.chunkable_type
26343
26365
  WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
@@ -26479,7 +26501,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
26479
26501
  }, "dropUnusedVectors");
26480
26502
  var dropAllUnusedVectors = /* @__PURE__ */ __name((database) => database.prepare("DELETE FROM embeddings WHERE NOT EXISTS (SELECT 1 FROM chunks k WHERE k.content_hash = embeddings.content_hash) RETURNING 1").all().length, "dropAllUnusedVectors");
26481
26503
 
26482
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
26504
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
26483
26505
  var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null) => Number(orm.insert(accounts).values({ provider, externalId: account, name, scope: scope3 ?? "personal", createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
26484
26506
  target: [accounts.provider, accounts.externalId],
26485
26507
  set: {
@@ -26589,7 +26611,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
26589
26611
  AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
26590
26612
  }, "dropOrphanPeople");
26591
26613
 
26592
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
26614
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
26593
26615
  var FOLDED = [
26594
26616
  { table: "tasks", column: "title" },
26595
26617
  { table: "tasks", column: "close_reason" },
@@ -26626,7 +26648,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
26626
26648
  return filled2;
26627
26649
  }, "fillFolded");
26628
26650
 
26629
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
26651
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
26630
26652
  var HISTORY_KEY = "$history";
26631
26653
  var objectOf = /* @__PURE__ */ __name((text6) => {
26632
26654
  if (typeof text6 !== "string")
@@ -26702,7 +26724,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
26702
26724
  return rest;
26703
26725
  }, "withoutHistory");
26704
26726
 
26705
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
26727
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
26706
26728
  import { createHash as createHash3 } from "node:crypto";
26707
26729
  var CHUNK_CHARS = 1200;
26708
26730
  var CHUNK_OVERLAP = 150;
@@ -26807,7 +26829,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
26807
26829
  return chunks2;
26808
26830
  }, "cutChunks");
26809
26831
 
26810
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/task-signature.js
26832
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/task-signature.js
26811
26833
  var DAY = 864e5;
26812
26834
  var CURRENCY = [
26813
26835
  [/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
@@ -26933,7 +26955,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
26933
26955
  return best?.day ?? null;
26934
26956
  }, "dueDayOf");
26935
26957
 
26936
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
26958
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
26937
26959
  var DAY2 = 864e5;
26938
26960
  var STOP_WORDS = new Set([
26939
26961
  // Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
@@ -27088,7 +27110,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
27088
27110
  ...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
27089
27111
  })).sort((a, b) => b.score - a.score), "rankCandidates");
27090
27112
 
27091
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
27113
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
27092
27114
  var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
27093
27115
  r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
27094
27116
  JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
@@ -27359,7 +27381,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
27359
27381
  };
27360
27382
  }, "readiness");
27361
27383
 
27362
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
27384
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
27363
27385
  var DOCUMENT_PICTURE = "document_picture";
27364
27386
  var SCAN_PAGE2 = 5e3;
27365
27387
  var idOf = /* @__PURE__ */ __name((ref3) => {
@@ -27422,10 +27444,10 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
27422
27444
  }, "nearestPictures")
27423
27445
  }), "documentPicturesOver");
27424
27446
 
27425
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
27447
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
27426
27448
  var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
27427
- const literal4 = escaped2 ?? plain2 ?? "";
27428
- return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
27449
+ const literal5 = escaped2 ?? plain2 ?? "";
27450
+ return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
27429
27451
  }).join(""), "glob");
27430
27452
  var like = /* @__PURE__ */ __name((value) => value.toLowerCase().replace(/[\\%_]/gu, "\\$&").replaceAll("*", "%").replaceAll("?", "_"), "like");
27431
27453
  var leaf = /* @__PURE__ */ __name((node, columns, options) => {
@@ -27487,7 +27509,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
27487
27509
  var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
27488
27510
  var bound2 = /* @__PURE__ */ __name(({ sql: text6, params }) => sql.join(text6.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
27489
27511
 
27490
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
27512
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
27491
27513
  var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
27492
27514
  var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
27493
27515
  var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
@@ -27577,7 +27599,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
27577
27599
  });
27578
27600
  }, "linkMeeting");
27579
27601
 
27580
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
27602
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
27581
27603
  var EVENT_TEXT = "trim(coalesce(e.description, '') || ' ' || coalesce(e.location, '') || ' ' || coalesce((SELECT group_concat(p.name, ' ') FROM calendar_entries ce JOIN calendar_entry_participants p ON p.entry_id = ce.id WHERE ce.event_id = e.id AND ce.deleted_at IS NULL AND p.resource = 0 AND p.name IS NOT NULL), ''))";
27582
27604
  var UNSEARCHED_EVENT_TYPES = [
27583
27605
  "working-location",
@@ -27714,7 +27736,7 @@ var storedSections = /* @__PURE__ */ __name((metadata3) => {
27714
27736
  }
27715
27737
  }, "storedSections");
27716
27738
  var writer2 = /* @__PURE__ */ __name((database, corpus, stemmer) => {
27717
- const read2 = database.prepare(corpus.read);
27739
+ const read3 = database.prepare(corpus.read);
27718
27740
  const oldHashes = database.prepare("SELECT content_hash AS hash FROM chunks WHERE chunkable_type = ? AND chunkable_id = ?");
27719
27741
  const statements = {
27720
27742
  dropWords: database.prepare(`DELETE FROM ${corpus.type}_words WHERE rowid = ?`),
@@ -27728,7 +27750,7 @@ var writer2 = /* @__PURE__ */ __name((database, corpus, stemmer) => {
27728
27750
  dequeue: database.prepare(`DELETE FROM ${corpus.type}_index_pending WHERE indexable_type = ? AND id = ?`)
27729
27751
  };
27730
27752
  return (id2) => {
27731
- const row2 = read2.get(id2);
27753
+ const row2 = read3.get(id2);
27732
27754
  const before2 = oldHashes.all(corpus.type, id2).map((hash2) => String(hash2.hash));
27733
27755
  statements.dropWords.run(id2);
27734
27756
  statements.dropStems.run(id2);
@@ -27809,7 +27831,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
27809
27831
  return true;
27810
27832
  }, "resetNoteIndex");
27811
27833
 
27812
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
27834
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
27813
27835
  var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
27814
27836
  var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
27815
27837
  for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
@@ -27828,7 +27850,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
27828
27850
  }
27829
27851
  }, "resolvePersonLinks");
27830
27852
 
27831
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
27853
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
27832
27854
  var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
27833
27855
  var prepare = /* @__PURE__ */ __name((orm) => ({
27834
27856
  find: orm.select({
@@ -28053,7 +28075,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
28053
28075
  }, "meetingIdentityPk");
28054
28076
  var phoneOf = /* @__PURE__ */ __name(({ orm }, provider, nativeId) => orm.select({ phone: identities.phone }).from(identities).where(and(eq(identities.provider, provider), eq(identities.externalId, nativeId))).get()?.phone ?? null, "phoneOf");
28055
28077
 
28056
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
28078
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
28057
28079
  var chatOf = /* @__PURE__ */ __name(({ orm }, accountKey, chatKey) => orm.select({ id: chats.externalId }).from(chats).where(and(eq(chats.id, chatKey), eq(chats.accountId, accountKey))).get()?.id, "chatOf");
28058
28080
  var findChatPk = /* @__PURE__ */ __name(({ orm }, accountKey, chatId) => orm.select({ pk: chats.id }).from(chats).where(and(eq(chats.accountId, accountKey), eq(chats.externalId, chatId))).get()?.pk, "findChatPk");
28059
28081
  var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
@@ -28333,7 +28355,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
28333
28355
  }
28334
28356
  }, "replaceAutoTags");
28335
28357
 
28336
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/counters.js
28358
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/counters.js
28337
28359
  var COUNTER_FIELDS = ["views", "reactions", "comments"];
28338
28360
  var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
28339
28361
  var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
@@ -28352,7 +28374,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
28352
28374
  return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
28353
28375
  }, "counterFreshness");
28354
28376
 
28355
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/context/evidence.js
28377
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/context/evidence.js
28356
28378
  import { createHash as createHash4 } from "node:crypto";
28357
28379
  var CONTEXT_MAX_READ_BYTES = 262144;
28358
28380
  var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
@@ -28450,7 +28472,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
28450
28472
  return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
28451
28473
  }, "contextEvidenceRequest");
28452
28474
 
28453
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
28475
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
28454
28476
  var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
28455
28477
  var ACTIVITY = `
28456
28478
  SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
@@ -28580,7 +28602,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
28580
28602
  threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
28581
28603
  }), "mailActivity");
28582
28604
 
28583
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
28605
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
28584
28606
  var GREETING = new RegExp("^(hi|hello|hey|dear|greetings|good (morning|afternoon|evening)|\u043F\u0440\u0438\u0432\u0435\u0442|\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439(\u0442\u0435)?|\u0434\u043E\u0431\u0440(\u044B\u0439|\u043E\u0435|\u043E\u0433\u043E) (\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440|\u0443\u0442\u0440\u043E|\u0443\u0442\u0440\u0430|\u0434\u043D\u044F)|hola|buen(os|as) (d\xEDas|dias|tardes|noches)|estimad[oa]s?|querid[oa]s?)(?![\\p{L}\\p{N}])([\\s,]+\\p{L}[\\p{L}.'\u2019-]*){0,3}\\s*[,!.:]?$", "iu");
28585
28607
  var SIGN_OFF = /^(best|best regards|best wishes|kind regards|warm regards|regards|thanks|thanks again|thanks a lot|thank you|many thanks|cheers|sincerely|yours|yours truly|yours sincerely|br|с уважением|спасибо|заранее спасибо|всего доброго|всего хорошего|un saludo|saludos|saludos cordiales|atentamente|gracias|muchas gracias)[\s,.!]*$/iu;
28586
28608
  var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
@@ -28653,8 +28675,8 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
28653
28675
  const lines = body2.replace(/\r\n?/g, "\n").split("\n");
28654
28676
  const held = earlier.map(flat);
28655
28677
  const drop = /* @__PURE__ */ new Set();
28656
- for (const { start, end, quoted: quoted3 } of quoteBlocks(lines))
28657
- if (alreadyHeld(quoted3, held))
28678
+ for (const { start, end, quoted: quoted4 } of quoteBlocks(lines))
28679
+ if (alreadyHeld(quoted4, held))
28658
28680
  for (let i = start; i < end; i++)
28659
28681
  drop.add(i);
28660
28682
  const kept = trimEdges(lines.filter((_, i) => !drop.has(i)));
@@ -28721,7 +28743,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
28721
28743
  return text6 || body2.trim();
28722
28744
  }, "mailOwnText");
28723
28745
 
28724
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
28746
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
28725
28747
  var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
28726
28748
  var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
28727
28749
  k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
@@ -28831,7 +28853,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
28831
28853
  return emails3 + threads;
28832
28854
  }, "drainEmailIndex");
28833
28855
 
28834
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
28856
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
28835
28857
  var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
28836
28858
  SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
28837
28859
  var folderEmails = /* @__PURE__ */ __name((database, accountId, folder, uidvalidity) => database.prepare(`SELECT l.uid, e.external_id, coalesce(e.received_at, e.sent_at) AS at, e.read, e.flagged,
@@ -28929,7 +28951,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
28929
28951
  var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
28930
28952
  SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
28931
28953
 
28932
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
28954
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
28933
28955
  var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
28934
28956
  emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
28935
28957
  last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
@@ -28946,8 +28968,8 @@ var setEmailFlags = /* @__PURE__ */ __name((database, accountId, flags, now2) =>
28946
28968
  WHERE account_id = ? AND external_id = ?
28947
28969
  AND ((? IS NOT NULL AND read IS NOT ?) OR (? IS NOT NULL AND flagged IS NOT ?))`);
28948
28970
  let changed = 0;
28949
- for (const [externalId, { read: read2, flagged }] of flags) {
28950
- const readValue = flag(read2), flaggedValue = flag(flagged);
28971
+ for (const [externalId, { read: read3, flagged }] of flags) {
28972
+ const readValue = flag(read3), flaggedValue = flag(flagged);
28951
28973
  changed += update2.run(readValue, readValue, flaggedValue, flaggedValue, now2, accountId, externalId, readValue, readValue, flaggedValue, flaggedValue).changes;
28952
28974
  }
28953
28975
  return changed;
@@ -28979,7 +29001,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
28979
29001
  return threads.length;
28980
29002
  }, "markEmailsRestored");
28981
29003
 
28982
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
29004
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
28983
29005
  var MAIL_PIECE_ROWS = `SELECT p.id, p.content_hash AS hash, p.type, p.owner, p.position, p.email_id AS email, v.vector
28984
29006
  FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
28985
29007
  WHERE p.account_id = ?
@@ -29039,7 +29061,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
29039
29061
  }, "indexedMailPieces");
29040
29062
  var nearestMailPieces = /* @__PURE__ */ __name((database, model, query, filter, depth) => (filter.threadExternalId === void 0 ? indexedMailPieces(database, model, query, filter, depth) : void 0) ?? scannedMailPieces(database, model, query, filter), "nearestMailPieces");
29041
29063
 
29042
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
29064
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
29043
29065
  var sorted = /* @__PURE__ */ __name((value) => Array.isArray(value) ? value.map(sorted) : value !== null && typeof value === "object" ? Object.fromEntries(Object.keys(value).sort().map((key2) => [key2, sorted(value[key2])])) : value, "sorted");
29044
29066
  var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
29045
29067
  var ruleOf = /* @__PURE__ */ __name((row2) => ({
@@ -29106,7 +29128,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
29106
29128
  }
29107
29129
  }), "mailRulesOver");
29108
29130
 
29109
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
29131
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
29110
29132
  var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
29111
29133
  database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
29112
29134
  VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
@@ -29114,7 +29136,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
29114
29136
  reason = excluded.reason, updated_at = excluded.updated_at WHERE link_reviews.status = 'open'`).run(linkable.type, linkable.id, entity, JSON.stringify([...candidates].sort((a, b) => a - b)), reason, now2, now2);
29115
29137
  }, "reviewLink");
29116
29138
 
29117
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
29139
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
29118
29140
  function checkMeetingCancelled(signal) {
29119
29141
  if (!signal?.aborted)
29120
29142
  return;
@@ -29125,7 +29147,7 @@ function checkMeetingCancelled(signal) {
29125
29147
  }
29126
29148
  __name(checkMeetingCancelled, "checkMeetingCancelled");
29127
29149
 
29128
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
29150
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
29129
29151
  var meetingOf = /* @__PURE__ */ __name((row2) => ({
29130
29152
  id: Number(row2.id),
29131
29153
  accountId: Number(row2.account_id),
@@ -29175,7 +29197,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
29175
29197
  createdAt: Number(row2.created_at)
29176
29198
  }), "transcriptRowOf");
29177
29199
 
29178
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
29200
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
29179
29201
  var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
29180
29202
  var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
29181
29203
  var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
@@ -29342,7 +29364,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
29342
29364
  }
29343
29365
  }), "meetingReadsOver");
29344
29366
 
29345
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
29367
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
29346
29368
  var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
29347
29369
  const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
29348
29370
  const params = [input.accountId];
@@ -29385,7 +29407,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
29385
29407
  return { clauses, params };
29386
29408
  }, "meetingSelectionSql");
29387
29409
 
29388
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
29410
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
29389
29411
  var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
29390
29412
  async meetingChatLines(input) {
29391
29413
  checkMeetingCancelled(input.signal);
@@ -29413,7 +29435,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
29413
29435
  }
29414
29436
  }), "meetingChatLinesOver");
29415
29437
 
29416
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
29438
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
29417
29439
  var MESSAGE_FIELDS = {
29418
29440
  pk: messages.id,
29419
29441
  nativeId: messages.externalId,
@@ -29584,7 +29606,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
29584
29606
  storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
29585
29607
  }), "chatActivity");
29586
29608
 
29587
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
29609
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
29588
29610
  var HIT_FIELDS = {
29589
29611
  ...MESSAGE_FIELDS,
29590
29612
  chatTitle: sql`${chats.title}`.as("chat_title"),
@@ -29683,7 +29705,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
29683
29705
  };
29684
29706
  }, "directReplies");
29685
29707
 
29686
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
29708
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
29687
29709
  var identityRow = /* @__PURE__ */ __name(({ orm }, { provider, id: id2 }) => orm.select({ pk: identities.id, personPk: identityLinks.personId }).from(identities).innerJoin(identityLinks, eq(identityLinks.identityId, identities.id)).where(and(eq(identities.provider, provider), eq(identities.externalId, id2))).get(), "identityRow");
29688
29710
  var required = /* @__PURE__ */ __name((context, ref3) => {
29689
29711
  const found2 = identityRow(context, ref3);
@@ -29814,7 +29836,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
29814
29836
  }, "mentioning");
29815
29837
  var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
29816
29838
 
29817
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
29839
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
29818
29840
  var missing2 = /* @__PURE__ */ __name(() => {
29819
29841
  throw new CliError("not_found", "Meeting, participant or selected target not found");
29820
29842
  }, "missing");
@@ -29936,7 +29958,7 @@ function meetingContextLinksOver(context) {
29936
29958
  }
29937
29959
  __name(meetingContextLinksOver, "meetingContextLinksOver");
29938
29960
 
29939
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
29961
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
29940
29962
  var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
29941
29963
  var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
29942
29964
  var summaryOf = /* @__PURE__ */ __name((row2) => ({
@@ -29965,7 +29987,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
29965
29987
  return row2 ? summaryText(summaryOf(row2)) : null;
29966
29988
  }, "indexedText");
29967
29989
 
29968
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
29990
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
29969
29991
  var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
29970
29992
  var meetingCurrentIndexRows = `
29971
29993
  SELECT 'meeting_transcript_row' AS indexable_type,r.id,r.id*4+1 AS rid,1 AS live,coalesce(length(CAST(r.text AS BLOB)),0) AS bytes FROM meeting_transcript_rows r JOIN meeting_transcripts t ON t.id=r.meeting_transcript_id JOIN meetings m ON m.id=t.meeting_id WHERE m.account_id=? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL
@@ -29996,7 +30018,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
29996
30018
  }, "invalidateMeetingStems");
29997
30019
  var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
29998
30020
 
29999
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
30021
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
30000
30022
  function meetingHitIndexOver({ database, now: now2 }) {
30001
30023
  return {
30002
30024
  async indexSearch(original) {
@@ -30064,10 +30086,115 @@ function meetingHitIndexOver({ database, now: now2 }) {
30064
30086
  }
30065
30087
  __name(meetingHitIndexOver, "meetingHitIndexOver");
30066
30088
 
30067
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30089
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30068
30090
  import { createHash as createHash5 } from "node:crypto";
30069
30091
 
30070
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/trigrams.js
30092
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
30093
+ var REPAIRED = /* @__PURE__ */ new Set([
30094
+ "query.invalid-syntax",
30095
+ "query.unclosed-literal",
30096
+ "query.unsupported-operator",
30097
+ "query.invalid-escape"
30098
+ ]);
30099
+ var SEARCH_FIELDS = /* @__PURE__ */ new Set([...QUERY_FIELDS.map(({ name }) => name), "after", "before"]);
30100
+ var FIELD_PREFIX = /^[+-]?([\p{L}\p{N}_.]+)(?:[:=]|[<>]=?)/u;
30101
+ var space = /* @__PURE__ */ __name((c) => c !== void 0 && /[ \t\n\r\u3000]/u.test(c), "space");
30102
+ var quoted2 = /* @__PURE__ */ __name((text6) => {
30103
+ let out = "";
30104
+ for (let at = 0; at < text6.length; at++) {
30105
+ const c = text6[at];
30106
+ if (c === "\\" && at + 1 < text6.length && (text6[at + 1] !== "u" || /^u[0-9a-fA-F]{4}/u.test(text6.slice(at + 1)))) {
30107
+ out += c + text6[at + 1];
30108
+ at++;
30109
+ } else
30110
+ out += c === '"' || c === "\\" ? `\\${c}` : c;
30111
+ }
30112
+ return `"${out}"`;
30113
+ }, "quoted");
30114
+ var literal4 = /* @__PURE__ */ __name((word2, keepParens, fields4) => {
30115
+ const prefix = FIELD_PREFIX.exec(word2);
30116
+ const field4 = prefix && fields4.has(prefix[1] ?? "") ? prefix[0] : "";
30117
+ const rest = word2.slice(field4.length);
30118
+ const opening = keepParens ? /^[(+-]*/u.exec(rest)?.[0] ?? "" : "";
30119
+ const closing = keepParens ? /\)*$/u.exec(rest.slice(opening.length))?.[0] ?? "" : "";
30120
+ const body2 = rest.slice(opening.length, rest.length - closing.length);
30121
+ if (!body2)
30122
+ return keepParens ? literal4(word2, false, fields4) : `${field4}${quoted2(rest)}`;
30123
+ return `${field4}${opening}${quoted2(body2)}${closing}`;
30124
+ }, "literal");
30125
+ var wordAround = /* @__PURE__ */ __name((text6, at) => {
30126
+ let start = at;
30127
+ while (start > 0 && !space(text6[start - 1]))
30128
+ start--;
30129
+ let end = at;
30130
+ while (end < text6.length && !space(text6[end]))
30131
+ end++;
30132
+ return { start, end };
30133
+ }, "wordAround");
30134
+ var everyWordLiteral = /* @__PURE__ */ __name((text6, fields4) => text6.replace(/[^ \t\n\r\u3000]+/gu, (word2) => literal4(word2, false, fields4)), "everyWordLiteral");
30135
+ var read2 = /* @__PURE__ */ __name((text6, fields4) => {
30136
+ try {
30137
+ const leaves = walkQuery(parseLucene(text6, MESSAGE_PARSING).root);
30138
+ const unknown2 = leaves.find(({ field: field4 }) => !fields4.has(field4));
30139
+ if (unknown2)
30140
+ return { at: text6.lastIndexOf(unknown2.field, unknown2.span.start) };
30141
+ const questions = leaves.flatMap(({ implicit, operator, value, span }) => {
30142
+ const mark = /^[^*?]*[^*?\\]\?+$/u.test(value) && implicit && operator === "wildcard" ? /\?+$/u.exec(value) : null;
30143
+ return mark ? [span.end - mark[0].length] : [];
30144
+ });
30145
+ if (questions.length)
30146
+ return { questions };
30147
+ const wordless = leaves.filter(({ implicit, operator, value }) => implicit && (operator === "term" || operator === "phrase") && !/[\p{L}\p{N}]/u.test(value));
30148
+ const words3 = wordless.length < leaves.length;
30149
+ return { wordless: words3 ? wordless : [], words: words3 };
30150
+ } catch (error) {
30151
+ const details2 = isCliError(error) ? error.details : void 0;
30152
+ if (!details2?.span || !REPAIRED.has(details2.reason ?? ""))
30153
+ throw error;
30154
+ if (/^~\d/u.test(text6.slice(details2.span.start)))
30155
+ throw error;
30156
+ return { at: details2.span.start };
30157
+ }
30158
+ }, "read");
30159
+ var without = /* @__PURE__ */ __name((text6, leaves) => [...leaves].sort((a, b) => b.span.start - a.span.start).reduce((left, { span }) => left.slice(0, span.start) + left.slice(span.end), text6).trim(), "without");
30160
+ var plainQuery = /* @__PURE__ */ __name((text6, fields4 = SEARCH_FIELDS) => {
30161
+ let current = text6;
30162
+ let whole = false;
30163
+ for (let tries = 0; tries <= 64; tries++) {
30164
+ let reading;
30165
+ try {
30166
+ reading = read2(current, fields4);
30167
+ } catch {
30168
+ return text6;
30169
+ }
30170
+ if ("questions" in reading) {
30171
+ current = reading.questions.sort((a, b) => b - a).reduce((left, at) => left.slice(0, at) + left.slice(at).replace(/^\?+/u, (marks) => "\\?".repeat(marks.length)), current);
30172
+ continue;
30173
+ }
30174
+ if ("wordless" in reading) {
30175
+ if (!reading.words && current !== text6)
30176
+ return text6;
30177
+ if (!reading.wordless.length)
30178
+ return current;
30179
+ current = without(current, reading.wordless);
30180
+ continue;
30181
+ }
30182
+ const word2 = reading.at < 0 || reading.at >= current.length ? void 0 : wordAround(current, reading.at);
30183
+ const paren = "()".includes(current[reading.at] ?? "");
30184
+ const repaired = word2 ? current.slice(0, word2.start) + literal4(current.slice(word2.start, word2.end), !paren, fields4) + current.slice(word2.end) : current;
30185
+ if (repaired !== current) {
30186
+ current = repaired;
30187
+ continue;
30188
+ }
30189
+ if (whole)
30190
+ return text6;
30191
+ whole = true;
30192
+ current = everyWordLiteral(text6, fields4);
30193
+ }
30194
+ return text6;
30195
+ }, "plainQuery");
30196
+
30197
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/trigrams.js
30071
30198
  var trigrams = /* @__PURE__ */ __name((term) => {
30072
30199
  const padded = ` ${term} `;
30073
30200
  const pieces = /* @__PURE__ */ new Set();
@@ -30076,7 +30203,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
30076
30203
  return [...pieces];
30077
30204
  }, "trigrams");
30078
30205
 
30079
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/correct.js
30206
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/correct.js
30080
30207
  var SHORTEST_CORRECTION = 3;
30081
30208
  var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
30082
30209
  var editDistance = /* @__PURE__ */ __name((a, b, max) => {
@@ -30123,7 +30250,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
30123
30250
  return corrections;
30124
30251
  }, "correctWords");
30125
30252
 
30126
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/garbled.js
30253
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/garbled.js
30127
30254
  var SHORTEST_GARBLED = 4;
30128
30255
  var MOST_WIDENED = 64;
30129
30256
  var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
@@ -30144,14 +30271,14 @@ var garbledDistance = /* @__PURE__ */ __name((probe, word2, stems) => {
30144
30271
  return null;
30145
30272
  if (isNumberWord(probe.literal) || isNumberWord(word2))
30146
30273
  return null;
30147
- const literal4 = plain(probe.literal);
30274
+ const literal5 = plain(probe.literal);
30148
30275
  const stored3 = plain(word2);
30149
30276
  let best = null;
30150
30277
  for (const queryStem of probe.stems.map(plain))
30151
30278
  for (const wordStem of stems.map(plain)) {
30152
30279
  if (Math.min(queryStem.length, wordStem.length) < 3)
30153
30280
  continue;
30154
- if (wordStem.startsWith(queryStem) && literal4.startsWith(wordStem) || queryStem.startsWith(wordStem) && stored3.startsWith(queryStem))
30281
+ if (wordStem.startsWith(queryStem) && literal5.startsWith(wordStem) || queryStem.startsWith(wordStem) && stored3.startsWith(queryStem))
30155
30282
  return 0;
30156
30283
  if (queryStem.length < SHORTEST_GARBLED)
30157
30284
  continue;
@@ -30161,7 +30288,7 @@ var garbledDistance = /* @__PURE__ */ __name((probe, word2, stems) => {
30161
30288
  if (distance2 <= 1)
30162
30289
  best = distance2;
30163
30290
  }
30164
- if (best === null && stored3.length >= SHORTEST_GARBLED && literal4.startsWith(stored3))
30291
+ if (best === null && stored3.length >= SHORTEST_GARBLED && literal5.startsWith(stored3))
30165
30292
  return 1;
30166
30293
  return best;
30167
30294
  }, "garbledDistance");
@@ -30215,7 +30342,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
30215
30342
  return found2.map((words3) => words3.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
30216
30343
  }, "widenWords");
30217
30344
 
30218
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
30345
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
30219
30346
  import { readFileSync } from "node:fs";
30220
30347
  var loaded;
30221
30348
  var dictionary = /* @__PURE__ */ __name(() => {
@@ -30274,7 +30401,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
30274
30401
  return false;
30275
30402
  }, "knownRussianWord");
30276
30403
 
30277
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
30404
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
30278
30405
  var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
30279
30406
  var MOST_WORDS = 128;
30280
30407
  var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
@@ -30352,11 +30479,11 @@ var resolveMeetingQuery = /* @__PURE__ */ __name((database, accountId, ast, stat
30352
30479
  const all2 = [];
30353
30480
  const wordsOf3 = /* @__PURE__ */ __name((value, exact) => {
30354
30481
  const words3 = (value.match(WORD3) ?? []).filter((raw) => normalize(raw)).map((raw) => {
30355
- const literal4 = normalize(raw);
30482
+ const literal5 = normalize(raw);
30356
30483
  return {
30357
30484
  raw,
30358
- literal: literal4,
30359
- whole: exact || isNumberWord(literal4),
30485
+ literal: literal5,
30486
+ whole: exact || isNumberWord(literal5),
30360
30487
  stems: state.stemmer && raw.length <= 1024 && !exact ? [...new Set(state.stemmer.explain(raw).map((word2) => word2.stem))] : [],
30361
30488
  widened: []
30362
30489
  };
@@ -30501,7 +30628,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
30501
30628
  return check3(tree);
30502
30629
  }, "matchMeetingText");
30503
30630
 
30504
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30631
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30505
30632
  var fail3 = /* @__PURE__ */ __name((message2) => {
30506
30633
  throw new CliError("validation_error", message2);
30507
30634
  }, "fail");
@@ -30570,7 +30697,7 @@ function meetingHitSearchOver({ database }) {
30570
30697
  fail3("Meeting search byte limit must be from 1 through 67108864");
30571
30698
  if (typeof rawQuery === "string" && Buffer.byteLength(rawQuery) > 65536)
30572
30699
  fail3("Meeting search query must be a bounded string");
30573
- const ast = typeof rawQuery === "string" ? parseMeetingQuery(rawQuery) : rawQuery;
30700
+ const ast = typeof rawQuery === "string" ? parseMeetingQuery(plainQuery(rawQuery, MEETING_FIELD_NAMES)) : rawQuery;
30574
30701
  return read(database, () => {
30575
30702
  checkMeetingCancelled(input.signal);
30576
30703
  const state = meetingStemState(database, input.accountId);
@@ -30683,7 +30810,7 @@ function meetingHitSearchOver({ database }) {
30683
30810
  }
30684
30811
  __name(meetingHitSearchOver, "meetingHitSearchOver");
30685
30812
 
30686
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
30813
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
30687
30814
  var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
30688
30815
  async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
30689
30816
  positiveReadInteger(accountId, "accountId");
@@ -30715,7 +30842,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
30715
30842
  }
30716
30843
  }), "meetingLanguagesOver");
30717
30844
 
30718
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
30845
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
30719
30846
  import { createHash as createHash6 } from "node:crypto";
30720
30847
  var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
30721
30848
  if (value === void 0)
@@ -30749,7 +30876,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
30749
30876
  FROM meeting_participants p JOIN meetings m ON m.id = p.meeting_id
30750
30877
  WHERE m.account_id = ? AND m.deleted_at IS NULL AND p.id > ? AND p.id <= ?
30751
30878
  ORDER BY p.id LIMIT ?`).all(limits.accountId, previous?.after ?? 0, until, limits.scanLimit + 1);
30752
- const read2 = database.prepare("SELECT id, meeting_id, identity_id, display_name, email FROM meeting_participants WHERE id = ?");
30879
+ const read3 = database.prepare("SELECT id, meeting_id, identity_id, display_name, email FROM meeting_participants WHERE id = ?");
30753
30880
  const result = {
30754
30881
  schema_version: 1,
30755
30882
  kind: "meeting_participants",
@@ -30776,7 +30903,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
30776
30903
  }
30777
30904
  if (result.coverage.truncated_by)
30778
30905
  break;
30779
- const found2 = read2.get(Number(row2.id));
30906
+ const found2 = read3.get(Number(row2.id));
30780
30907
  if (!found2)
30781
30908
  throw new CliError("invalid_response", "participant observation disappeared within its snapshot");
30782
30909
  const name = found2.display_name === null ? null : String(found2.display_name);
@@ -30805,7 +30932,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
30805
30932
  }
30806
30933
  }), "meetingParticipantSearchOver");
30807
30934
 
30808
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
30935
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
30809
30936
  var preparationQueries = {
30810
30937
  participants: {
30811
30938
  fields: "p.id, p.identity_id, p.display_name, l.person_id",
@@ -30855,7 +30982,7 @@ var preparationQueries = {
30855
30982
  }
30856
30983
  };
30857
30984
 
30858
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
30985
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
30859
30986
  var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
30860
30987
  async preparationContext(original) {
30861
30988
  const input = validateMeetingPreparationContext(original);
@@ -30876,7 +31003,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
30876
31003
  throw new CliError("validation_error", "Preparation context exceeds the stored text byte budget");
30877
31004
  }
30878
31005
  signal?.throwIfAborted();
30879
- const read2 = /* @__PURE__ */ __name((key2) => {
31006
+ const read3 = /* @__PURE__ */ __name((key2) => {
30880
31007
  const query = preparationQueries[key2];
30881
31008
  const rows = database.prepare(`SELECT ${query.fields} ${query.from}`).all(...params(key2));
30882
31009
  return {
@@ -30885,10 +31012,10 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
30885
31012
  };
30886
31013
  }, "read");
30887
31014
  const result = {
30888
- participants: read2("participants"),
30889
- projects: read2("projects"),
30890
- facts: read2("facts"),
30891
- tasks: read2("tasks")
31015
+ participants: read3("participants"),
31016
+ projects: read3("projects"),
31017
+ facts: read3("facts"),
31018
+ tasks: read3("tasks")
30892
31019
  };
30893
31020
  signal?.throwIfAborted();
30894
31021
  return result;
@@ -30896,7 +31023,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
30896
31023
  }
30897
31024
  }), "meetingPreparationContextOver");
30898
31025
 
30899
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
31026
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
30900
31027
  var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
30901
31028
  SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
30902
31029
  WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
@@ -30910,7 +31037,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
30910
31037
  JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
30911
31038
  )`, "preparationSubjects");
30912
31039
 
30913
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
31040
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
30914
31041
  var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
30915
31042
  async preparationKnowledge(original) {
30916
31043
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -30955,7 +31082,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
30955
31082
  }
30956
31083
  }), "meetingPreparationKnowledgeOver");
30957
31084
 
30958
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
31085
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
30959
31086
  var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
30960
31087
  async preparationNotes(original) {
30961
31088
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -31008,7 +31135,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
31008
31135
  }
31009
31136
  }), "meetingPreparationNotesOver");
31010
31137
 
31011
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
31138
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
31012
31139
  var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
31013
31140
  async relatedHistory(original) {
31014
31141
  const input = validateMeetingRelatedHistory(original);
@@ -31079,7 +31206,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
31079
31206
  }
31080
31207
  }), "meetingRelatedHistoryOver");
31081
31208
 
31082
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
31209
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
31083
31210
  var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
31084
31211
  var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
31085
31212
  var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
@@ -31160,7 +31287,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
31160
31287
  }
31161
31288
  }), "meetingReviewOver");
31162
31289
 
31163
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
31290
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
31164
31291
  var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
31165
31292
  var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
31166
31293
  if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
@@ -31214,7 +31341,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
31214
31341
  }
31215
31342
  }), "meetingSeriesHistoryOver");
31216
31343
 
31217
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
31344
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
31218
31345
  var MOST_ROWS = 5e5;
31219
31346
  var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
31220
31347
  EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
@@ -31283,7 +31410,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
31283
31410
  }
31284
31411
  }), "meetingStatsOver");
31285
31412
 
31286
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
31413
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
31287
31414
  var CURSOR_KEY = "meetings";
31288
31415
  var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
31289
31416
  id: Number(row2.id),
@@ -31852,7 +31979,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
31852
31979
  };
31853
31980
  }, "meetingStoreOver");
31854
31981
 
31855
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
31982
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
31856
31983
  var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
31857
31984
  const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
31858
31985
  return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
@@ -31878,7 +32005,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
31878
32005
  orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
31879
32006
  }, "release");
31880
32007
 
31881
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
32008
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
31882
32009
  var THREAD_COLUMNS = {
31883
32010
  subject: {
31884
32011
  where: /* @__PURE__ */ __name(({ value }) => ({
@@ -31895,7 +32022,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
31895
32022
  AND (${filter.where?.sql ?? "1"}) ORDER BY coalesce(last_email_at, 0) DESC, id DESC LIMIT ? OFFSET ?`).all(filter.accountId ?? null, filter.accountId ?? null, filter.includeDeleted ? 1 : 0, ...filter.where?.params ?? [], limit, offset);
31896
32023
  }, "threadRows");
31897
32024
 
31898
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
32025
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
31899
32026
  var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
31900
32027
  id: `email:${place.emailId}`,
31901
32028
  chatId: place.threadExternalId,
@@ -32206,11 +32333,11 @@ var mailFieldsOf = /* @__PURE__ */ __name((database, email, thread, key2) => {
32206
32333
  };
32207
32334
  }, "mailFieldsOf");
32208
32335
  var emailHitsByPk = /* @__PURE__ */ __name((database, pks) => {
32209
- const read2 = database.prepare(`SELECT e.*, t.external_id AS thread, t.subject AS thread_subject, a.provider, a.external_id AS account
32336
+ const read3 = database.prepare(`SELECT e.*, t.external_id AS thread, t.subject AS thread_subject, a.provider, a.external_id AS account
32210
32337
  FROM emails e JOIN email_threads t ON t.id = e.email_thread_id JOIN accounts a ON a.id = e.account_id
32211
32338
  WHERE e.id = ?`);
32212
32339
  return pks.flatMap((pk) => {
32213
- const row2 = read2.get(pk);
32340
+ const row2 = read3.get(pk);
32214
32341
  if (!row2)
32215
32342
  return [];
32216
32343
  const thread = String(row2.thread);
@@ -32433,7 +32560,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
32433
32560
  }
32434
32561
  }), "mailStoreOver");
32435
32562
 
32436
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/dictionary.js
32563
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/dictionary.js
32437
32564
  import { readFileSync as readFileSync2 } from "node:fs";
32438
32565
  var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
32439
32566
  var folded4 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
@@ -32523,7 +32650,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
32523
32650
  }, "knownWord");
32524
32651
  var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
32525
32652
 
32526
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
32653
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
32527
32654
  var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
32528
32655
  var readsTranscripts = /* @__PURE__ */ __name((node) => (node.operator === "term" || node.operator === "phrase") && /[\p{L}\p{N}]/u.test(normalize(node.value)) && (node.field === "transcript" || node.implicit === true && (node.field === "text" || node.field === "exact")), "readsTranscripts");
32529
32656
  var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
@@ -32609,7 +32736,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
32609
32736
  return found2;
32610
32737
  }, "spokenTranscripts");
32611
32738
 
32612
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
32739
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
32613
32740
  var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
32614
32741
  const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
32615
32742
  if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
@@ -32656,7 +32783,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
32656
32783
  });
32657
32784
  }, "placeHits");
32658
32785
 
32659
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
32786
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
32660
32787
  var GROUPS = {
32661
32788
  chat: {
32662
32789
  key: "m.chat_id",
@@ -32678,7 +32805,7 @@ var GROUPS = {
32678
32805
  }
32679
32806
  };
32680
32807
 
32681
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
32808
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
32682
32809
  var MESSAGES2 = {
32683
32810
  rows: "messages",
32684
32811
  threads: "chats",
@@ -33161,7 +33288,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
33161
33288
  };
33162
33289
  }, "runCompiled");
33163
33290
 
33164
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
33291
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
33165
33292
  function invalidMetadata() {
33166
33293
  throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
33167
33294
  }
@@ -33263,7 +33390,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
33263
33390
  };
33264
33391
  }), "counterTargets");
33265
33392
 
33266
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
33393
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
33267
33394
  var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
33268
33395
  var fileAttachments = /* @__PURE__ */ __name(({ database }, accountKey, { chatKey, messageId, beforePk, limit }) => database.prepare(`SELECT att.id AS pk, c.external_id AS chat_id, m.external_id AS message_id, att.position, att.kind, att.name, att.mime,
33269
33396
  att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
@@ -33382,7 +33509,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
33382
33509
  }));
33383
33510
  }, "attachmentViews");
33384
33511
 
33385
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
33512
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
33386
33513
  var transcript = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
33387
33514
  var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
33388
33515
  const { orm, database, now: now2 } = context;
@@ -33420,7 +33547,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
33420
33547
  keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
33421
33548
  }, "intoVoiceAttachment");
33422
33549
 
33423
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
33550
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
33424
33551
  var FIELDS = [
33425
33552
  "threadExternalId",
33426
33553
  "senderIdentityId",
@@ -33737,7 +33864,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
33737
33864
  reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
33738
33865
  }, "writeDerivedReactions");
33739
33866
 
33740
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/keys.js
33867
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/keys.js
33741
33868
  var keysOver = /* @__PURE__ */ __name((context) => {
33742
33869
  const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
33743
33870
  const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
@@ -33758,7 +33885,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
33758
33885
  };
33759
33886
  }, "keysOver");
33760
33887
 
33761
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
33888
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
33762
33889
  var accountGroupsOf = /* @__PURE__ */ __name((database) => {
33763
33890
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
33764
33891
  if (!row2)
@@ -33793,7 +33920,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
33793
33920
  database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
33794
33921
  }, "saveProfile");
33795
33922
 
33796
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
33923
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
33797
33924
  var BOT_KINDS = ["agent", "rule", "script", "integration"];
33798
33925
  var ownerPerson = /* @__PURE__ */ __name((database) => {
33799
33926
  const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
@@ -33850,7 +33977,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
33850
33977
  return { sql: bot("pb.name = ?"), params: [by.bot] };
33851
33978
  }, "proposedBySql");
33852
33979
 
33853
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
33980
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
33854
33981
  var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
33855
33982
  const owner = ownerPerson(context.database).id;
33856
33983
  const strays = context.database.prepare("SELECT DISTINCT l.person_id AS person FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN accounts a ON a.provider = i.provider AND a.external_id = i.external_id WHERE l.person_id <> ?").all(owner);
@@ -33871,7 +33998,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
33871
33998
  return personOf(context, ref3);
33872
33999
  }, "linkToOwner");
33873
34000
 
33874
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
34001
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
33875
34002
  var PROVIDERS_SETTING = "providers";
33876
34003
  var storedProvidersOf = /* @__PURE__ */ __name((database) => {
33877
34004
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
@@ -33906,7 +34033,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
33906
34033
  });
33907
34034
  }, "registerProvider");
33908
34035
 
33909
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
34036
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
33910
34037
  var DAY3 = 864e5;
33911
34038
  var RECENTLY_CLOSED_MS = 14 * DAY3;
33912
34039
  var TEXT_LIMIT = 20;
@@ -34105,7 +34232,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
34105
34232
  };
34106
34233
  }, "taskSimilarityOver");
34107
34234
 
34108
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
34235
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
34109
34236
  var SETTING3 = "taskCategories";
34110
34237
  var savedTaskCategories = /* @__PURE__ */ __name((database) => {
34111
34238
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
@@ -34124,7 +34251,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
34124
34251
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(SETTING3, JSON.stringify(categories), now2);
34125
34252
  }, "saveTaskCategories");
34126
34253
 
34127
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
34254
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
34128
34255
  var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
34129
34256
  var ALLOWED = "taskAgentClose";
34130
34257
  var MIN = "taskAgentCloseMin";
@@ -34180,10 +34307,10 @@ var SUGGESTION_COLUMNS = [
34180
34307
  ];
34181
34308
  var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
34182
34309
 
34183
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
34310
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
34184
34311
  var MAIL_FINDINGS_KIND = "mail_findings";
34185
34312
 
34186
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/decisions.js
34313
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/decisions.js
34187
34314
  var TASK_CLOSE_KIND = "task_close";
34188
34315
  var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
34189
34316
  var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
@@ -34231,7 +34358,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
34231
34358
  }, "assertMayDecide");
34232
34359
  var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
34233
34360
 
34234
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/deals.js
34361
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/deals.js
34235
34362
  var DEAL_KINDS = ["deal", "lead"];
34236
34363
  var DEAL_STATUSES = ["open", "won", "lost"];
34237
34364
  var STAGE_OUTCOMES = DEAL_STATUSES;
@@ -34241,7 +34368,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
34241
34368
  return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
34242
34369
  }, "dealLine");
34243
34370
 
34244
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
34371
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
34245
34372
  var PROFILE_PLACEHOLDER = "<profile>";
34246
34373
  var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
34247
34374
  var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
@@ -34297,7 +34424,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
34297
34424
  return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
34298
34425
  }, "refLabel");
34299
34426
 
34300
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
34427
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
34301
34428
  var EXCERPT_CHARS = 280;
34302
34429
  var TITLE_CHARS = 120;
34303
34430
  var MEMORY_TITLE_CHARS = 80;
@@ -34668,20 +34795,20 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
34668
34795
  return reads;
34669
34796
  }, "refReadsOf");
34670
34797
  var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
34671
- var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
34798
+ var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read3]) => [text6, summaryOf2(read3, options.excerpt === true)])), "refSummariesOf");
34672
34799
 
34673
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
34674
- var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
34800
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
34801
+ var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
34675
34802
  ref: ref3,
34676
- kind: read2.kind,
34677
- title: read2.kind === "message" ? read2.in : read2.title,
34678
- sender: read2.sender,
34679
- at: read2.at,
34680
- excerpt: read2.excerpt,
34681
- tool: read2.provider,
34682
- missing: read2.state !== "available"
34803
+ kind: read3.kind,
34804
+ title: read3.kind === "message" ? read3.in : read3.title,
34805
+ sender: read3.sender,
34806
+ at: read3.at,
34807
+ excerpt: read3.excerpt,
34808
+ tool: read3.provider,
34809
+ missing: read3.state !== "available"
34683
34810
  }), "sourceOf");
34684
- var sourcesOfReferences = /* @__PURE__ */ __name((database, references) => [...refReadsOf(database, references, { excerpt: true })].map(([ref3, read2]) => sourceOf3(read2, ref3)), "sourcesOfReferences");
34811
+ var sourcesOfReferences = /* @__PURE__ */ __name((database, references) => [...refReadsOf(database, references, { excerpt: true })].map(([ref3, read3]) => sourceOf3(read3, ref3)), "sourcesOfReferences");
34685
34812
  var GONE_KIND = { meeting_transcript: "meeting", meeting_transcript_row: "meeting" };
34686
34813
  var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
34687
34814
  const cited = database.prepare(`SELECT to_type, to_id FROM links WHERE from_type = ? AND from_id = ? AND kind = ${linkKind("evidence")} AND to_id IS NOT NULL ORDER BY id`).all(from2.type, from2.id).map((link3) => {
@@ -34690,9 +34817,9 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
34690
34817
  });
34691
34818
  const reads = refReadsOf(database, cited.flatMap(({ ref: ref3 }) => ref3 ?? []), { excerpt: true });
34692
34819
  return cited.map(({ type, ref: ref3 }) => {
34693
- const read2 = ref3 === void 0 ? void 0 : reads.get(ref3);
34694
- if (ref3 !== void 0 && read2 !== void 0)
34695
- return sourceOf3(read2, ref3);
34820
+ const read3 = ref3 === void 0 ? void 0 : reads.get(ref3);
34821
+ if (ref3 !== void 0 && read3 !== void 0)
34822
+ return sourceOf3(read3, ref3);
34696
34823
  return {
34697
34824
  ref: null,
34698
34825
  kind: GONE_KIND[type] ?? type,
@@ -34706,7 +34833,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
34706
34833
  });
34707
34834
  }, "evidenceSourcesOf");
34708
34835
 
34709
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/limits.js
34836
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/limits.js
34710
34837
  var MAX_FILE_BYTES = 50 * 1024 * 1024;
34711
34838
  var MAX_TEXT_CHARS = 2e6;
34712
34839
  var ATTACHMENT_LIMIT_ENV = [
@@ -34732,7 +34859,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
34732
34859
  return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
34733
34860
  }, "pdfPreviewLimits");
34734
34861
 
34735
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/ulid.js
34862
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/ulid.js
34736
34863
  import { randomBytes } from "node:crypto";
34737
34864
  var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
34738
34865
  var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
@@ -34745,7 +34872,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
34745
34872
  return time3 + random;
34746
34873
  }, "ulid");
34747
34874
 
34748
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
34875
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
34749
34876
  var FOLDED_FIELDS = ["title", "site", "language", "author"];
34750
34877
  var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
34751
34878
  if (!meta && !sections?.length)
@@ -34766,7 +34893,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
34766
34893
  return typeof language === "string" && language !== "" ? language : null;
34767
34894
  }, "languageOf");
34768
34895
 
34769
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
34896
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
34770
34897
  var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
34771
34898
  var objectOf2 = /* @__PURE__ */ __name((value) => {
34772
34899
  if (isObject(value))
@@ -35009,7 +35136,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
35009
35136
  };
35010
35137
  }, "filesStoreOver");
35011
35138
 
35012
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
35139
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
35013
35140
  var IMPORTED_DOCUMENT_QUERY = defineQuery({
35014
35141
  entity: "document",
35015
35142
  backend: "sql",
@@ -35055,7 +35182,28 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
35055
35182
  return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
35056
35183
  }, "importedDocumentWhere");
35057
35184
 
35058
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
35185
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
35186
+ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
35187
+ const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
35188
+ const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
35189
+ const dateFile = database.prepare("UPDATE files SET external_updated_at = ? WHERE id = ? AND external_updated_at IS NOT ?");
35190
+ const dateDocument = database.prepare("UPDATE documents SET external_updated_at = ? WHERE id = ? AND account_id = ? AND external_id = ? AND external_updated_at IS NOT ?");
35191
+ let changed = 0;
35192
+ for (const { path, modifiedAt } of dates) {
35193
+ const time3 = Date.parse(modifiedAt);
35194
+ if (!Number.isFinite(time3))
35195
+ throw new CliError("validation_error", `${modifiedAt} is not a time`);
35196
+ const place = fileAt.get(folder, path);
35197
+ const id2 = place?.document_id ?? legacy.get(folder, path)?.id;
35198
+ const file = place ? dateFile.run(time3, Number(place.id), time3).changes : 0;
35199
+ const document = id2 == null ? 0 : dateDocument.run(time3, Number(id2), folder, path, time3).changes;
35200
+ if (file + document > 0)
35201
+ changed++;
35202
+ }
35203
+ return changed;
35204
+ }, "dateFileNotes");
35205
+
35206
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
35059
35207
  var NOTE_FORMATS = ["obsidian", "markdown"];
35060
35208
  var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
35061
35209
  var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
@@ -35083,6 +35231,7 @@ var documentOf = /* @__PURE__ */ __name((row2) => ({
35083
35231
  contentHash: row2.content_hash == null ? null : String(row2.content_hash),
35084
35232
  revision: Number(row2.revision),
35085
35233
  exportPath: row2.export_path == null ? null : String(row2.export_path),
35234
+ modifiedAt: optionalIso(row2.external_updated_at),
35086
35235
  createdAt: iso2(row2.created_at),
35087
35236
  updatedAt: iso2(row2.updated_at),
35088
35237
  deletedAt: optionalIso(row2.deleted_at)
@@ -35099,6 +35248,7 @@ var noteOf = /* @__PURE__ */ __name((row2) => ({
35099
35248
  contentHash: null,
35100
35249
  revision: Number(row2.revision),
35101
35250
  exportPath: null,
35251
+ modifiedAt: null,
35102
35252
  createdAt: iso2(row2.created_at),
35103
35253
  updatedAt: iso2(row2.updated_at),
35104
35254
  deletedAt: optionalIso(row2.deleted_at)
@@ -35414,6 +35564,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
35414
35564
  });
35415
35565
  return noteAt(id2, folder, target);
35416
35566
  }), "renameFileNote"),
35567
+ dateFileNotes: /* @__PURE__ */ __name(async (folderId, dates) => write(database, () => dateFileNotes(database, Number(folderRow(folderId).id), dates)), "dateFileNotes"),
35417
35568
  deleteFileNotes: /* @__PURE__ */ __name(async (folderId, paths) => write(database, () => {
35418
35569
  const folder = Number(folderRow(folderId).id);
35419
35570
  let deleted = 0;
@@ -35471,7 +35622,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
35471
35622
  const aboutId = about?.id ?? null;
35472
35623
  const files2 = options.source === "internal" ? [] : database.prepare(
35473
35624
  // In a folder, a document is wherever one of its live files is, under that file's path.
35474
- (folder === null ? "SELECT d.* FROM documents d WHERE d.deleted_at IS NULL AND ? IS NULL AND ? IS NULL " : "SELECT d.*, f.account_id AS account_id, CASE WHEN a.provider IN ('local', 'obsidian') THEN f.external_id ELSE d.external_id END AS external_id FROM files f JOIN documents d ON d.id = f.document_id JOIN accounts a ON a.id = f.account_id WHERE f.deleted_at IS NULL AND d.deleted_at IS NULL AND f.account_id = ? AND ? IS NOT NULL ") + `AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1 AND (? IS NULL OR EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'document' AND l.from_id = d.id AND l.kind = ${linkKind("about")} AND l.to_type = ? AND l.to_id = ?)) ${documentText ? `AND ${documentText.sql} ` : ""}ORDER BY d.created_at DESC, d.id DESC LIMIT ?`
35625
+ (folder === null ? "SELECT d.* FROM documents d WHERE d.deleted_at IS NULL AND ? IS NULL AND ? IS NULL " : "SELECT d.*, f.account_id AS account_id, CASE WHEN a.provider IN ('local', 'obsidian') THEN f.external_id ELSE d.external_id END AS external_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM files f JOIN documents d ON d.id = f.document_id JOIN accounts a ON a.id = f.account_id WHERE f.deleted_at IS NULL AND d.deleted_at IS NULL AND f.account_id = ? AND ? IS NOT NULL ") + `AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1 AND (? IS NULL OR EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'document' AND l.from_id = d.id AND l.kind = ${linkKind("about")} AND l.to_type = ? AND l.to_id = ?)) ${documentText ? `AND ${documentText.sql} ` : ""}ORDER BY d.created_at DESC, d.id DESC LIMIT ?`
35475
35626
  ).all(folder, folder, aboutType, aboutType, aboutId, ...documentText?.params ?? [], limit + offset + 1).map(documentOf);
35476
35627
  const written2 = options.source === "file" || folder !== null ? [] : database.prepare(`SELECT n.* FROM notes n WHERE n.deleted_at IS NULL AND (? IS NULL OR (n.notable_type = ? AND n.notable_id = ?) OR EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'note' AND l.from_id = n.id AND l.kind = ${linkKind("about")} AND l.to_type = ? AND l.to_id = ?)) ${noteText2 ? `AND ${noteText2.sql} ` : ""}ORDER BY n.created_at DESC, n.id DESC LIMIT ?`).all(aboutType, aboutType, aboutId, aboutType, aboutId, ...noteText2?.params ?? [], limit + offset + 1).map(noteOf);
35477
35628
  const all2 = [...files2, ...written2].sort((a, b) => b.createdAt.localeCompare(a.createdAt) || b.ref.localeCompare(a.ref));
@@ -35581,7 +35732,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
35581
35732
  };
35582
35733
  }, "notesStoreOver");
35583
35734
 
35584
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
35735
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
35585
35736
  var NAMED = "SELECT m.*, b.name AS author_name, b.kind AS author_kind FROM memories m LEFT JOIN bots b ON m.author_type = 'bot' AND b.id = m.author_id";
35586
35737
  var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
35587
35738
  var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -35621,8 +35772,8 @@ var subjectOf = /* @__PURE__ */ __name((database, row2) => {
35621
35772
  if (row2.subject_type == null)
35622
35773
  return { subject: null, subjectName: null, subjectIsOwner: false };
35623
35774
  const thing = storedThing(row2.subject_type, row2.subject_id);
35624
- const read2 = SUBJECT_NAMES[thing.type];
35625
- const named3 = read2 === void 0 ? void 0 : database.prepare(read2).get(thing.id);
35775
+ const read3 = SUBJECT_NAMES[thing.type];
35776
+ const named3 = read3 === void 0 ? void 0 : database.prepare(read3).get(thing.id);
35626
35777
  return {
35627
35778
  subject: referenceOfThing(database, thing) ?? null,
35628
35779
  subjectName: named3?.name == null ? null : String(named3.name),
@@ -35803,7 +35954,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
35803
35954
  };
35804
35955
  }, "memoriesStoreOver");
35805
35956
 
35806
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
35957
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
35807
35958
  var DEFAULT_FIRST_PASS_PER_CHAT = 0;
35808
35959
  var KEY = "taskFirstPassPerChat";
35809
35960
  var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
@@ -35823,7 +35974,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
35823
35974
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY, String(value), now2);
35824
35975
  }, "saveFirstPassPerChat");
35825
35976
 
35826
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/external-links.js
35977
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/external-links.js
35827
35978
  var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
35828
35979
  var EXTERNAL_ID_CHARS = 200;
35829
35980
  var SOURCE_URL_CHARS = 2e3;
@@ -35850,7 +36001,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
35850
36001
  return text6;
35851
36002
  }, "sourceUrlOf");
35852
36003
 
35853
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
36004
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
35854
36005
  var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
35855
36006
  var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
35856
36007
  name,
@@ -35895,8 +36046,8 @@ var wordsMatch = /* @__PURE__ */ __name((node) => {
35895
36046
  const words3 = taskWordsOf(node.value.replaceAll("*", " ")).split(/\s+/).filter((word2) => /[\p{L}\p{N}]/u.test(word2));
35896
36047
  if (words3.length === 0)
35897
36048
  return void 0;
35898
- const quoted3 = /* @__PURE__ */ __name((text6) => `"${text6.replaceAll('"', '""')}"`, "quoted");
35899
- return `normalized_text : (${node.operator === "phrase" ? quoted3(words3.join(" ")) : words3.map((word2) => `${quoted3(word2)}*`).join(" AND ")})`;
36049
+ const quoted4 = /* @__PURE__ */ __name((text6) => `"${text6.replaceAll('"', '""')}"`, "quoted");
36050
+ return `normalized_text : (${node.operator === "phrase" ? quoted4(words3.join(" ")) : words3.map((word2) => `${quoted4(word2)}*`).join(" AND ")})`;
35900
36051
  }, "wordsMatch");
35901
36052
  var projectWhere = /* @__PURE__ */ __name((node) => {
35902
36053
  if (node.operator === "wildcard" && node.value === "*")
@@ -36073,7 +36224,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
36073
36224
  return root === void 0 ? void 0 : { ...query, root };
36074
36225
  }, "withoutField");
36075
36226
 
36076
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
36227
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
36077
36228
  var authorNamed = /* @__PURE__ */ __name((database, row2) => {
36078
36229
  if (row2.author_type == null)
36079
36230
  return null;
@@ -36101,7 +36252,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
36101
36252
  return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
36102
36253
  }, "addComment");
36103
36254
 
36104
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
36255
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
36105
36256
  var TASK_RELATION_KINDS = [
36106
36257
  "blocked-by",
36107
36258
  "follow-up-of",
@@ -36231,7 +36382,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
36231
36382
  };
36232
36383
  }, "taskRelationsStoreOver");
36233
36384
 
36234
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
36385
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
36235
36386
  var TASK_ROLES = ["assignee", "reviewer", "watcher"];
36236
36387
  var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
36237
36388
  var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
@@ -36688,9 +36839,9 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
36688
36839
  boardCounts: /* @__PURE__ */ __name(async (query, { zone } = {}) => {
36689
36840
  drainCorpus(database, CORPORA.task, stemmerFor2);
36690
36841
  const at = now2();
36691
- const without = /* @__PURE__ */ __name((name) => boardWhere(withoutField(query, name), zone, at), "without");
36842
+ const without2 = /* @__PURE__ */ __name((name) => boardWhere(withoutField(query, name), zone, at), "without");
36692
36843
  const grouped = /* @__PURE__ */ __name((name, select3, from2, group) => {
36693
- const where = without(name);
36844
+ const where = without2(name);
36694
36845
  return database.prepare(`SELECT ${select3}, count(*) AS n FROM tasks t ${from2} WHERE ${where.sql} GROUP BY ${group}`).all(...where.params);
36695
36846
  }, "grouped");
36696
36847
  const project2 = grouped("project", "p.id, p.key, p.name", "JOIN projects p ON p.id = t.project_id", "p.id").map((row2) => ({
@@ -36760,7 +36911,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
36760
36911
  };
36761
36912
  }, "workTasksOver");
36762
36913
 
36763
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
36914
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
36764
36915
  var taskCloseOver = /* @__PURE__ */ __name((context) => {
36765
36916
  const { database, now: now2 } = context;
36766
36917
  const liveRow = /* @__PURE__ */ __name((id2) => {
@@ -36809,7 +36960,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
36809
36960
  };
36810
36961
  }, "taskCloseOver");
36811
36962
 
36812
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
36963
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
36813
36964
  var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
36814
36965
  const { database, now: now2 } = context;
36815
36966
  const required3 = /* @__PURE__ */ __name((id2) => {
@@ -37027,7 +37178,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
37027
37178
  };
37028
37179
  }, "taskPairsOver");
37029
37180
 
37030
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
37181
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
37031
37182
  var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
37032
37183
  var TASK_STATS_SQL = {
37033
37184
  rows: /* @__PURE__ */ __name((board, filter) => `SELECT t.source_group, t.source_kind, t.project_id, t.status, t.created_at, t.closed_at FROM tasks t WHERE ${board ? BOARD_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
@@ -37066,7 +37217,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
37066
37217
  }, "statNames")
37067
37218
  }), "taskStatsOver");
37068
37219
 
37069
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
37220
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
37070
37221
  var COLUMNS3 = "t.id AS row_id, t.package_id, t.source_locator, t.source_kind, t.source_group, t.type, t.status, t.close_reason, t.source, t.created_at, t.due_at, t.closed_at, t.closed_by_type, t.closed_by_id, t.key, t.category, t.claimed_by, t.claimed_until, p.name AS account";
37071
37222
  var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
37072
37223
  const key2 = inboxKey(account);
@@ -37273,7 +37424,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
37273
37424
  throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
37274
37425
  }, "oneOf");
37275
37426
 
37276
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/accounts.js
37427
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/accounts.js
37277
37428
  var accountAccountsOver = /* @__PURE__ */ __name((context) => {
37278
37429
  const { database } = context;
37279
37430
  const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
@@ -37318,7 +37469,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
37318
37469
  };
37319
37470
  }, "accountsStoreOver");
37320
37471
 
37321
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
37472
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
37322
37473
  var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
37323
37474
  var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
37324
37475
  const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
@@ -37342,7 +37493,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
37342
37493
  })), "keepDownloads");
37343
37494
  var keepProviderRefs = /* @__PURE__ */ __name((context, chatKey, messageId, files2) => updatePlaced(context, chatKey, messageId, files2.filter((file) => Object.keys(file.providerRef).length > 0), (file) => refColumn(file.providerRef)), "keepProviderRefs");
37344
37495
 
37345
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/attachments.js
37496
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/attachments.js
37346
37497
  var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
37347
37498
  const { database } = context;
37348
37499
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -37399,7 +37550,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
37399
37550
  }, "keepAttachmentText")
37400
37551
  }), "attachmentsStoreOver");
37401
37552
 
37402
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
37553
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
37403
37554
  var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
37404
37555
  var pointerMover = /* @__PURE__ */ __name((context, type) => {
37405
37556
  const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
@@ -37579,7 +37730,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
37579
37730
  return done;
37580
37731
  }, "rekeyChats");
37581
37732
 
37582
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
37733
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
37583
37734
  var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
37584
37735
  var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
37585
37736
  var CHAT_LIST_KEY = "chat_list_complete";
@@ -37637,7 +37788,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
37637
37788
  return { ...coverage, oldestMessageAt: toIso(oldest) };
37638
37789
  }, "chatCoverage");
37639
37790
 
37640
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/chats.js
37791
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/chats.js
37641
37792
  var chatsStoreOver = /* @__PURE__ */ __name((context) => {
37642
37793
  const { database } = context;
37643
37794
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
@@ -37772,7 +37923,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
37772
37923
  };
37773
37924
  }, "chatsStoreOver");
37774
37925
 
37775
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
37926
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
37776
37927
  import { createHash as createHash7 } from "node:crypto";
37777
37928
  var BATCH_CONTEXT = 50;
37778
37929
  var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
@@ -37910,7 +38061,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
37910
38061
  var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
37911
38062
  ${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
37912
38063
 
37913
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
38064
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
37914
38065
  import { setTimeout } from "node:timers/promises";
37915
38066
  var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
37916
38067
  var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
@@ -38222,7 +38373,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
38222
38373
  AND NOT EXISTS (SELECT 1 FROM messages d
38223
38374
  WHERE d.id IN (l.message_id, l.parent_id) AND d.deleted_at > l.created_at)`).map(({ id: id2, parent: parent2 }) => [id2, parent2])), "agentAnswers");
38224
38375
 
38225
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/conversations.js
38376
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/conversations.js
38226
38377
  var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
38227
38378
  const { database } = context;
38228
38379
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -38329,7 +38480,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
38329
38480
  };
38330
38481
  }, "conversationsStoreOver");
38331
38482
 
38332
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/counters.js
38483
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/counters.js
38333
38484
  var LIVE_MESSAGE = "SELECT m.id AS pk FROM messages m JOIN chats c ON c.id=m.chat_id JOIN accounts ac ON ac.id=m.account_id WHERE ac.provider=? AND ac.external_id=? AND c.external_id=? AND m.external_id=? AND m.deleted_at IS NULL";
38334
38485
  var accountCountersOver = /* @__PURE__ */ __name((context) => {
38335
38486
  const { database } = context;
@@ -38354,7 +38505,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38354
38505
  counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
38355
38506
  }), "countersStoreOver");
38356
38507
 
38357
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
38508
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
38358
38509
  var MENTION_STATUSES = ["found", "linked", "dismissed"];
38359
38510
  var MENTION_QUERY = defineQuery({
38360
38511
  entity: "mention",
@@ -38388,7 +38539,7 @@ var REBUILD_BATCH = 1e3;
38388
38539
  var REBUILT_AT = "mentionsRebuiltAt";
38389
38540
  var rebuildMentions = /* @__PURE__ */ __name((database, { now: now2, kinds: kinds2, onBatch }) => {
38390
38541
  const total = SOURCE_TYPES.reduce((sum, type) => sum + Number(database.prepare(SOURCES[type].count).get()?.n), 0);
38391
- const read2 = { message: 0, attachment: 0, document: 0, note: 0, email: 0 };
38542
+ const read3 = { message: 0, attachment: 0, document: 0, note: 0, email: 0 };
38392
38543
  let mentions3 = 0;
38393
38544
  for (const type of SOURCE_TYPES) {
38394
38545
  const batch = database.prepare(SOURCES[type].page);
@@ -38406,20 +38557,20 @@ var rebuildMentions = /* @__PURE__ */ __name((database, { now: now2, kinds: kind
38406
38557
  dequeue.run(type, Number(row2.id));
38407
38558
  }
38408
38559
  });
38409
- read2[type] += rows.length;
38560
+ read3[type] += rows.length;
38410
38561
  after2 = Number(rows.at(-1)?.id);
38411
- onBatch?.(Object.values(read2).reduce((sum, one2) => sum + one2, 0), total);
38562
+ onBatch?.(Object.values(read3).reduce((sum, one2) => sum + one2, 0), total);
38412
38563
  }
38413
38564
  }
38414
38565
  if (!kinds2) {
38415
38566
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(REBUILT_AT, JSON.stringify(new Date(now2).toISOString()), now2);
38416
38567
  }
38417
38568
  return {
38418
- messages: read2.message,
38419
- attachments: read2.attachment,
38420
- documents: read2.document,
38421
- notes: read2.note,
38422
- emails: read2.email,
38569
+ messages: read3.message,
38570
+ attachments: read3.attachment,
38571
+ documents: read3.document,
38572
+ notes: read3.note,
38573
+ emails: read3.email,
38423
38574
  mentions: mentions3
38424
38575
  };
38425
38576
  }, "rebuildMentions");
@@ -38570,7 +38721,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
38570
38721
  return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
38571
38722
  }, "listPlaces");
38572
38723
 
38573
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/mentions.js
38724
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/mentions.js
38574
38725
  var accountMentionsOver = /* @__PURE__ */ __name((context) => {
38575
38726
  const { database } = context;
38576
38727
  const { findAccountPk: findAccountPk2 } = keysOver(context);
@@ -38605,10 +38756,10 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38605
38756
  places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
38606
38757
  }), "mentionsStoreOver");
38607
38758
 
38608
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
38759
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
38609
38760
  var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
38610
- const read2 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
38611
- const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
38761
+ const read3 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
38762
+ const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
38612
38763
  const linked = database.prepare(`SELECT json_extract(d.front_matter, '$.fileId') AS file_id, d.title FROM links l JOIN documents d ON d.id = l.to_id AND d.deleted_at IS NULL WHERE l.from_type = 'message' AND l.from_id = ? AND l.to_type = 'document' AND l.kind = ${linkKind("links-to")}`);
38613
38764
  return rows.map((row2) => ({
38614
38765
  messageId: String(row2.external_id),
@@ -38620,7 +38771,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
38620
38771
  }));
38621
38772
  }, "documentLinkMessages");
38622
38773
 
38623
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
38774
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
38624
38775
  var stemmerFor = stemmerCache();
38625
38776
  var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
38626
38777
  if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
@@ -38664,7 +38815,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
38664
38815
  });
38665
38816
  }, "laterSharingRare");
38666
38817
 
38667
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/messages.js
38818
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/messages.js
38668
38819
  var accountMessagesOver = /* @__PURE__ */ __name((context) => {
38669
38820
  const { database } = context;
38670
38821
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
@@ -38799,7 +38950,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38799
38950
  laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
38800
38951
  }), "messagesStoreOver");
38801
38952
 
38802
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
38953
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
38803
38954
  var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
38804
38955
  var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
38805
38956
  var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
@@ -38856,7 +39007,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
38856
39007
  });
38857
39008
  }, "personPreparation");
38858
39009
 
38859
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
39010
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
38860
39011
  var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
38861
39012
  const id2 = Number(uid);
38862
39013
  if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
@@ -38864,7 +39015,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
38864
39015
  return Boolean(database.prepare("SELECT 1 FROM persons p JOIN identity_links l ON l.person_id=p.id JOIN account_identities a ON a.identity_id=l.identity_id WHERE p.id=? AND a.account_id IN (SELECT value FROM json_each(?)) LIMIT 1").get(id2, JSON.stringify(accountIds)));
38865
39016
  }, "personSeenInAccounts");
38866
39017
 
38867
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
39018
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
38868
39019
  var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
38869
39020
  const row2 = database.prepare("SELECT a.id AS account_id, i.id AS identity_id FROM accounts a JOIN account_identities ai ON ai.account_id=a.id JOIN identities i ON i.id=ai.identity_id WHERE a.provider=? AND a.external_id=? AND i.provider=? AND i.external_id=?").get(key2.provider, key2.account, key2.provider, personId);
38870
39021
  if (!row2)
@@ -38930,7 +39081,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
38930
39081
  return { id: id2, personId, removed: true };
38931
39082
  }, "removeNote");
38932
39083
 
38933
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/people.js
39084
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/people.js
38934
39085
  var accountPeopleOver = /* @__PURE__ */ __name((context) => {
38935
39086
  const { database } = context;
38936
39087
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
@@ -39015,13 +39166,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
39015
39166
  };
39016
39167
  }, "peopleStoreOver");
39017
39168
 
39018
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
39169
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
39019
39170
  import { createHash as createHash9 } from "node:crypto";
39020
39171
 
39021
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
39172
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
39022
39173
  import { createHash as createHash8 } from "node:crypto";
39023
39174
 
39024
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
39175
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
39025
39176
  var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
39026
39177
  var AUTHOR_MEASURES = [
39027
39178
  "messages",
@@ -39161,7 +39312,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
39161
39312
  var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
39162
39313
  var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
39163
39314
 
39164
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
39315
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
39165
39316
  var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
39166
39317
  var exhausted2 = /* @__PURE__ */ __name((budget) => {
39167
39318
  throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
@@ -39383,7 +39534,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
39383
39534
  };
39384
39535
  }, "rankReplyGraph");
39385
39536
 
39386
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
39537
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
39387
39538
  var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
39388
39539
  var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
39389
39540
  var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
@@ -39557,7 +39708,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
39557
39708
  return { items, evidence, summary, graph: graph.quality };
39558
39709
  }, "calculateAdminStatistics");
39559
39710
 
39560
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
39711
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
39561
39712
  var rankingContextRange = /* @__PURE__ */ __name((root) => {
39562
39713
  const dates = [];
39563
39714
  const visit = /* @__PURE__ */ __name((node, required3) => {
@@ -39579,7 +39730,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
39579
39730
  return dates[0].node.resolution.date;
39580
39731
  }, "rankingContextRange");
39581
39732
 
39582
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
39733
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
39583
39734
  var reactionCounts = /* @__PURE__ */ __name((stored3) => {
39584
39735
  let counts;
39585
39736
  try {
@@ -39874,7 +40025,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
39874
40025
  });
39875
40026
  }, "rankQuery");
39876
40027
 
39877
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
40028
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
39878
40029
  function fail4(message2, reason = "query.too-large") {
39879
40030
  throw new CliError("validation_error", message2, { reason, complete: false });
39880
40031
  }
@@ -40051,7 +40202,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
40051
40202
  return result;
40052
40203
  }), "adminStatisticsQuery");
40053
40204
 
40054
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
40205
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
40055
40206
  var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
40056
40207
  if (!execution.accounts.length)
40057
40208
  return { conversations: [], chats: [] };
@@ -40069,7 +40220,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
40069
40220
  return { conversations: conversations2, chats: chats2 };
40070
40221
  }, "conversationEligibility");
40071
40222
 
40072
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
40223
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
40073
40224
  import { createHash as createHash10 } from "node:crypto";
40074
40225
  var EVIDENCE_BYTES = 64 * 1024;
40075
40226
  var FINGERPRINT_BYTES = 8 * 1024 * 1024;
@@ -40219,7 +40370,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
40219
40370
  return result;
40220
40371
  }, "rankingEvidence");
40221
40372
 
40222
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
40373
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
40223
40374
  var FAR = Number.MAX_SAFE_INTEGER;
40224
40375
  var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
40225
40376
  const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
@@ -40313,7 +40464,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
40313
40464
  });
40314
40465
  }, "waitingChats");
40315
40466
 
40316
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/queries.js
40467
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/queries.js
40317
40468
  var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
40318
40469
  const mailIndexed = /* @__PURE__ */ __name((execution) => {
40319
40470
  if (execution.corpus === "mail")
@@ -40334,7 +40485,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
40334
40485
  };
40335
40486
  }, "queriesStoreOver");
40336
40487
 
40337
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
40488
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
40338
40489
  var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
40339
40490
  const { database, now: now2 } = context;
40340
40491
  const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
@@ -40373,10 +40524,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
40373
40524
  }));
40374
40525
  }, "chatEventsOf");
40375
40526
 
40376
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40527
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40377
40528
  import { createHash as createHash11 } from "node:crypto";
40378
40529
 
40379
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/calendar.js
40530
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/calendar.js
40380
40531
  var calendarKey = /* @__PURE__ */ __name((zone, by) => {
40381
40532
  const format = new Intl.DateTimeFormat("en-CA", {
40382
40533
  timeZone: zone,
@@ -40396,7 +40547,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
40396
40547
  return date3.toISOString().slice(0, 10);
40397
40548
  }, "weekKey");
40398
40549
 
40399
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/retention.js
40550
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/retention.js
40400
40551
  var RETENTION_TOLERANCE = 864e5;
40401
40552
  var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
40402
40553
  const { since, until, cutoff, checkpoints, within, limit, by } = options;
@@ -40450,7 +40601,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
40450
40601
  return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
40451
40602
  }, "retentionCohorts");
40452
40603
 
40453
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40604
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40454
40605
  var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
40455
40606
  var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
40456
40607
  validateRetentionOptions(options);
@@ -40496,14 +40647,14 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
40496
40647
  lagMilliseconds: null,
40497
40648
  complete: null
40498
40649
  };
40499
- const read2 = observationStatement.get(pk, chatPk, target, Math.min(target + RETENTION_TOLERANCE, options.cutoff));
40650
+ const read3 = observationStatement.get(pk, chatPk, target, Math.min(target + RETENTION_TOLERANCE, options.cutoff));
40500
40651
  return {
40501
40652
  checkpoint,
40502
40653
  targetAt: iso6(target),
40503
- state: !read2 ? "unknown" : Number(read2.present) === 1 ? "present" : Number(read2.complete) === 1 ? "absent" : "unknown",
40504
- observedAt: read2 ? iso6(Number(read2.observed_at)) : null,
40505
- lagMilliseconds: read2 ? Number(read2.observed_at) - target : null,
40506
- complete: read2 ? Number(read2.complete) === 1 : null
40654
+ state: !read3 ? "unknown" : Number(read3.present) === 1 ? "present" : Number(read3.complete) === 1 ? "absent" : "unknown",
40655
+ observedAt: read3 ? iso6(Number(read3.observed_at)) : null,
40656
+ lagMilliseconds: read3 ? Number(read3.observed_at) - target : null,
40657
+ complete: read3 ? Number(read3.complete) === 1 : null
40507
40658
  };
40508
40659
  }),
40509
40660
  activity: {
@@ -40581,7 +40732,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
40581
40732
  };
40582
40733
  }, "retentionQuery");
40583
40734
 
40584
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
40735
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
40585
40736
  var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
40586
40737
  var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
40587
40738
  ...isBot === void 0 ? {} : { bot: isBot },
@@ -40712,7 +40863,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
40712
40863
  lastCount: memberCountsOf(context, pk).at(-1) ?? null
40713
40864
  })), "trackedChats");
40714
40865
 
40715
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/roster.js
40866
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/roster.js
40716
40867
  var rosterStoreOver = /* @__PURE__ */ __name((context) => {
40717
40868
  const { database } = context;
40718
40869
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
@@ -40722,11 +40873,11 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
40722
40873
  const chatKey = chatKeyOf(key2, chatId);
40723
40874
  return chatKey === void 0 ? [] : members(context, chatKey);
40724
40875
  }, "members"),
40725
- saveRoster: /* @__PURE__ */ __name(async (key2, chatId, read2) => {
40876
+ saveRoster: /* @__PURE__ */ __name(async (key2, chatId, read3) => {
40726
40877
  let change = { joined: [], gone: [], changed: [] };
40727
40878
  write(database, () => {
40728
40879
  const accountKey = accountPk2(key2);
40729
- change = saveRoster(context, accountKey, key2.provider, chatPkFor2(accountKey, chatId), read2);
40880
+ change = saveRoster(context, accountKey, key2.provider, chatPkFor2(accountKey, chatId), read3);
40730
40881
  });
40731
40882
  return change;
40732
40883
  }, "saveRoster"),
@@ -40768,7 +40919,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
40768
40919
  };
40769
40920
  }, "rosterStoreOver");
40770
40921
 
40771
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
40922
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
40772
40923
  var pendingNormalization = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL").get()?.n), "pendingNormalization");
40773
40924
  var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
40774
40925
  const next = database.prepare(`SELECT id AS pk, text FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL AND id > ? ORDER BY id LIMIT ?`);
@@ -40792,7 +40943,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
40792
40943
  }
40793
40944
  }, "backfillNormalized");
40794
40945
 
40795
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
40946
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
40796
40947
  var INDEX2 = "message_words";
40797
40948
  var searchIndexState2 = /* @__PURE__ */ __name((database) => {
40798
40949
  const row2 = indexRow(database, INDEX2);
@@ -40919,7 +41070,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
40919
41070
  });
40920
41071
  }, "resetSearchIndex");
40921
41072
 
40922
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
41073
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
40923
41074
  var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
40924
41075
  const filled2 = { stemmed: 0, drained: 0 };
40925
41076
  const before2 = stemsState(database);
@@ -41014,7 +41165,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
41014
41165
  return resetStems(database, { now: now2 });
41015
41166
  }, "followDefaultStemmers");
41016
41167
 
41017
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
41168
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
41018
41169
  var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
41019
41170
  var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
41020
41171
  const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
@@ -41036,7 +41187,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
41036
41187
  });
41037
41188
  }, "termCandidates");
41038
41189
 
41039
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/search-index.js
41190
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/search-index.js
41040
41191
  var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
41041
41192
  const { database } = context;
41042
41193
  const stemmerFor2 = stemmerCache();
@@ -41060,7 +41211,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
41060
41211
  };
41061
41212
  }, "searchIndexStoreOver");
41062
41213
 
41063
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
41214
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
41064
41215
  var HISTORY_KEPT = 1e3;
41065
41216
  var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
41066
41217
  var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
@@ -41129,7 +41280,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
41129
41280
  return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
41130
41281
  }, "clearHistory");
41131
41282
 
41132
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/searches.js
41283
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/searches.js
41133
41284
  var searchesStoreOver = /* @__PURE__ */ __name((context) => {
41134
41285
  const { database } = context;
41135
41286
  return {
@@ -41153,7 +41304,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
41153
41304
  };
41154
41305
  }, "searchesStoreOver");
41155
41306
 
41156
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
41307
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
41157
41308
  var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
41158
41309
  var ACTION_OUTCOMES = ["ok", "refused", "failed"];
41159
41310
  var CODE = /^[a-z][a-z0-9_]{0,63}$/;
@@ -41196,7 +41347,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
41196
41347
  };
41197
41348
  }, "agentActionsStoreOver");
41198
41349
 
41199
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
41350
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
41200
41351
  var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
41201
41352
  }) => {
41202
41353
  const { database, now: now2 } = context;
@@ -41255,7 +41406,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
41255
41406
  };
41256
41407
  }, "botUpdateStoreOver");
41257
41408
 
41258
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
41409
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
41259
41410
  var DAY4 = 864e5;
41260
41411
  var accountsOf = /* @__PURE__ */ __name((filter) => {
41261
41412
  if (filter.accountIds !== void 0 && filter.accountId !== void 0)
@@ -41364,7 +41515,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
41364
41515
  return database.prepare(`SELECT e.* FROM events e WHERE ${clauses.join(" AND ")} ORDER BY ${filter.newest ? "e.starts_at DESC, e.id DESC" : "e.starts_at, e.id"} LIMIT ? OFFSET ?`).all(...params, limit, offset).map(eventOf);
41365
41516
  }, "listEvents");
41366
41517
 
41367
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
41518
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
41368
41519
  var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
41369
41520
  var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
41370
41521
  const unseenBefore = unreferenced(database, "identities");
@@ -41419,7 +41570,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
41419
41570
  return { entries: entryIds.length, events: goneEvents.length };
41420
41571
  }, "forgetCalendarRows");
41421
41572
 
41422
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
41573
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
41423
41574
  var calendarOf = /* @__PURE__ */ __name((row2) => ({
41424
41575
  id: Number(row2.id),
41425
41576
  accountId: Number(row2.account_id),
@@ -42006,7 +42157,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
42006
42157
  };
42007
42158
  }, "eventStoreOver");
42008
42159
 
42009
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
42160
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
42010
42161
  var CATALOG_QUERY = defineQuery({
42011
42162
  entity: "document",
42012
42163
  backend: "sql",
@@ -42248,7 +42399,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
42248
42399
  };
42249
42400
  }, "catalogStoreOver");
42250
42401
 
42251
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
42402
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
42252
42403
  var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
42253
42404
  var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
42254
42405
  CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
@@ -42261,7 +42412,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
42261
42412
  THEN 'source-modified' ELSE 'stored-update' END`;
42262
42413
  var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
42263
42414
 
42264
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
42415
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
42265
42416
  var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
42266
42417
  const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
42267
42418
  signal?.throwIfAborted();
@@ -42360,7 +42511,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
42360
42511
  });
42361
42512
  }, "readMeetingContextEvidence");
42362
42513
 
42363
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
42514
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
42364
42515
  var corpora = {
42365
42516
  message: {
42366
42517
  table: "messages",
@@ -42599,7 +42750,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
42599
42750
  }
42600
42751
  }), "contextRecordsOver");
42601
42752
 
42602
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/records.js
42753
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/records.js
42603
42754
  import { createHash as createHash12 } from "node:crypto";
42604
42755
  var RECORDS_SCHEMA_VERSION = 1;
42605
42756
  var RECORD_OPERATIONS = ["upsert", "delete"];
@@ -42831,7 +42982,7 @@ var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
42831
42982
  return isObject2(header) ? { ...header, records: records2 } : header;
42832
42983
  }, "envelopeOfJsonl");
42833
42984
 
42834
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
42985
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
42835
42986
  var TABLES = { deal: "deals", lead: "leads" };
42836
42987
  var SOURCE = "crm";
42837
42988
  var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${key2.account}/${type}/${externalId}`, "crmIdentityId");
@@ -43106,7 +43257,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
43106
43257
  };
43107
43258
  }, "crmCopiesOver");
43108
43259
 
43109
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
43260
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
43110
43261
  var refuse = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
43111
43262
  throw new CliError(code, message2, { reason });
43112
43263
  }, "refuse");
@@ -43567,7 +43718,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
43567
43718
  };
43568
43719
  }, "financeStoreOver");
43569
43720
 
43570
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
43721
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
43571
43722
  var TABLES2 = { deal: "deals", lead: "leads" };
43572
43723
  var itemsSql = /* @__PURE__ */ __name((kind4) => `SELECT d.*, s.name AS stage_name, s.pipeline_id, p.name AS pipeline_name, b.name AS author_name, b.kind AS author_kind, a.provider AS account_provider, a.external_id AS account_external_id FROM ${TABLES2[kind4]} d JOIN pipeline_stages s ON s.id = d.stage_id JOIN pipelines p ON p.id = s.pipeline_id LEFT JOIN bots b ON d.author_type = 'bot' AND b.id = d.author_id LEFT JOIN accounts a ON a.id = d.account_id`, "itemsSql");
43573
43724
  var MAX_STAGES = 30;
@@ -43649,7 +43800,7 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
43649
43800
  return refuse(`${reference2} is not a deal or a lead`, "deal.ref");
43650
43801
  return { kind: thing.type, row: database.prepare(`${itemsSql(thing.type)} WHERE d.id = ?`).get(thing.id) };
43651
43802
  }, "rowOf");
43652
- const read2 = /* @__PURE__ */ __name((reference2) => {
43803
+ const read3 = /* @__PURE__ */ __name((reference2) => {
43653
43804
  const { kind: kind4, row: row2 } = rowOf2(reference2);
43654
43805
  return itemOf(kind4)(row2);
43655
43806
  }, "read");
@@ -43837,9 +43988,9 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
43837
43988
  linkEvidence(context, { type: kind4, id: made }, evidence, owner ? "owner" : "agent");
43838
43989
  return made;
43839
43990
  });
43840
- return read2(`${kind4}:${id2}`);
43991
+ return read3(`${kind4}:${id2}`);
43841
43992
  }, "add"),
43842
- get: /* @__PURE__ */ __name((reference2) => read2(reference2), "get"),
43993
+ get: /* @__PURE__ */ __name((reference2) => read3(reference2), "get"),
43843
43994
  list: /* @__PURE__ */ __name((filter = {}) => {
43844
43995
  const kind4 = kindOf4(filter.kind);
43845
43996
  const project2 = filter.project === void 0 ? null : projectId(database, filter.project);
@@ -43855,17 +44006,17 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
43855
44006
  const limit = Math.min(Math.max(filter.limit ?? 100, 1), 500);
43856
44007
  return database.prepare(`${itemsSql(kind4)} WHERE d.deleted_at IS NULL AND (? IS NULL OR d.status = ?) AND (? IS NULL OR d.project_id = ?) AND (? IS NULL OR s.name_folded = ?) AND (? IS NULL OR p.id = ?) AND (? IS NULL OR d.organization_id = ?) AND (? = 0 OR d.account_id IS NULL) AND (? IS NULL OR (a.provider = ? AND a.external_id = ?)) AND ${by.sql} ORDER BY d.created_at DESC, d.id DESC LIMIT ? OFFSET ?`).all(status, status, project2, project2, stage, stage, pipeline, pipeline, organization2?.id ?? null, organization2?.id ?? null, own, provider, provider, account, ...by.params, limit, Math.max(0, Math.trunc(filter.offset ?? 0))).map(itemOf(kind4));
43857
44008
  }, "list"),
43858
- find: /* @__PURE__ */ __name(({ words: words3, anyWord, accounts: accounts2, limit }) => {
44009
+ find: /* @__PURE__ */ __name(({ words: words3, anyWord, accounts: accounts2, kinds: kinds2 = DEAL_KINDS, limit }) => {
43859
44010
  const wanted = [...new Set(words3.map((word2) => fold(word2).trim()).filter(Boolean))];
43860
44011
  if (!wanted.length)
43861
44012
  return [];
43862
44013
  const most2 = Math.min(Math.max(limit ?? 100, 1), 500);
43863
44014
  const within = accounts2?.map(({ provider, account }) => `${provider}\0${account}`);
43864
- const found2 = DEAL_KINDS.flatMap((kind4) => database.prepare(`SELECT d.id, d.title, d.updated_at, a.provider, a.external_id AS account FROM ${TABLES2[kind4]} d LEFT JOIN accounts a ON a.id = d.account_id WHERE d.deleted_at IS NULL`).all().filter((row2) => within === void 0 || within.includes(`${row2.provider}\0${row2.account}`)).map((row2) => {
44015
+ const found2 = kinds2.flatMap((kind4) => database.prepare(`SELECT d.id, d.title, d.updated_at, a.provider, a.external_id AS account FROM ${TABLES2[kind4]} d LEFT JOIN accounts a ON a.id = d.account_id WHERE d.deleted_at IS NULL`).all().filter((row2) => within === void 0 || within.includes(`${row2.provider}\0${row2.account}`)).map((row2) => {
43865
44016
  const title = fold(String(row2.title));
43866
44017
  return { kind: kind4, row: row2, score: wanted.filter((word2) => title.includes(word2)).length };
43867
44018
  }).filter(({ score }) => anyWord ? score > 0 : score === wanted.length));
43868
- return found2.sort((a, b) => b.score - a.score || Number(b.row.updated_at) - Number(a.row.updated_at) || Number(b.row.id) - Number(a.row.id)).slice(0, most2).map(({ kind: kind4, row: row2 }) => read2(`${kind4}:${row2.id}`));
44019
+ return found2.sort((a, b) => b.score - a.score || Number(b.row.updated_at) - Number(a.row.updated_at) || Number(b.row.id) - Number(a.row.id)).slice(0, most2).map(({ kind: kind4, row: row2 }) => read3(`${kind4}:${row2.id}`));
43869
44020
  }, "find"),
43870
44021
  move: /* @__PURE__ */ __name((reference2, { stage, by }) => {
43871
44022
  authorActor(context, by);
@@ -43873,7 +44024,7 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
43873
44024
  notDeleted(row2, kind4, "moves");
43874
44025
  const next = stageRow(text3(stage, "a stage's name", 80) ?? "", kind4, Number(row2.pipeline_id));
43875
44026
  write(database, () => setStage(kind4, Number(row2.id), next, next.outcome, today()));
43876
- return read2(`${kind4}:${row2.id}`);
44027
+ return read3(`${kind4}:${row2.id}`);
43877
44028
  }, "move"),
43878
44029
  close: /* @__PURE__ */ __name((reference2, { status, date: date3, reason, by }) => {
43879
44030
  authorActor(context, by);
@@ -43888,7 +44039,7 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
43888
44039
  if (why !== null)
43889
44040
  database.prepare(`UPDATE ${TABLES2[kind4]} SET metadata = json_set(coalesce(metadata, '{}'), '$.closed_reason', ?) WHERE id = ?`).run(why, Number(row2.id));
43890
44041
  });
43891
- return read2(`${kind4}:${row2.id}`);
44042
+ return read3(`${kind4}:${row2.id}`);
43892
44043
  }, "close")
43893
44044
  };
43894
44045
  }, "dealOperationsOver");
@@ -43907,7 +44058,112 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
43907
44058
  };
43908
44059
  }, "dealsStoreOver");
43909
44060
 
43910
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
44061
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
44062
+ import { createHash as createHash13, randomBytes as randomBytes2 } from "node:crypto";
44063
+
44064
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
44065
+ var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
44066
+ var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
44067
+ var TOKEN2 = /^[A-Za-z0-9_-]{21}[AQgw]$/;
44068
+ var isDecisionToken = /* @__PURE__ */ __name((value) => typeof value === "string" && TOKEN2.test(value), "isDecisionToken");
44069
+
44070
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
44071
+ var digestOf = /* @__PURE__ */ __name((token) => createHash13("sha256").update(token).digest("hex"), "digestOf");
44072
+ var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
44073
+ var requestOf = /* @__PURE__ */ __name((row2) => ({
44074
+ proposalId: row2.proposal_id,
44075
+ action: row2.action,
44076
+ batchDigest: row2.batch_digest,
44077
+ channel: row2.channel,
44078
+ botProfile: row2.bot_profile,
44079
+ chatId: row2.chat_id,
44080
+ messageId: row2.message_id,
44081
+ ownerUserId: row2.owner_user_id,
44082
+ createdAt: row2.created_at,
44083
+ expiresAt: row2.expires_at
44084
+ }), "requestOf");
44085
+ var PRUNE_AFTER_MS = 30 * 24 * 60 * 60 * 1e3;
44086
+ var SAME_MESSAGE = "channel=? AND bot_profile=? AND chat_id=? AND message_id=?";
44087
+ var OPEN2 = "used_at IS NULL AND cancelled_at IS NULL";
44088
+ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
44089
+ const refusal2 = /* @__PURE__ */ __name((row2, at) => {
44090
+ if (!row2)
44091
+ return "decision.token-unknown";
44092
+ if (row2.used_at !== null)
44093
+ return "decision.token-used";
44094
+ if (row2.cancelled_at !== null)
44095
+ return "decision.token-cancelled";
44096
+ if (row2.expires_at <= at)
44097
+ return "decision.token-expired";
44098
+ return void 0;
44099
+ }, "refusal");
44100
+ return {
44101
+ create: /* @__PURE__ */ __name((input) => {
44102
+ const { actions, ...fields4 } = input;
44103
+ const text6 = [
44104
+ fields4.proposalId,
44105
+ fields4.batchDigest,
44106
+ fields4.channel,
44107
+ fields4.botProfile,
44108
+ fields4.chatId,
44109
+ fields4.messageId,
44110
+ fields4.ownerUserId
44111
+ ];
44112
+ if (text6.some((value) => typeof value !== "string" || value === ""))
44113
+ throw new CliError("validation_error", "a decision request needs its batch, message and owner", {
44114
+ reason: "decision.request-invalid"
44115
+ });
44116
+ if (actions.length === 0 || new Set(actions).size !== actions.length || actions.some((action) => !DECISION_ACTIONS.includes(action)))
44117
+ throw new CliError("validation_error", "a decision request needs distinct, known actions", {
44118
+ reason: "decision.request-invalid"
44119
+ });
44120
+ const at = now2();
44121
+ return write(database, () => actions.map((action) => {
44122
+ const token = newToken();
44123
+ database.prepare(`INSERT INTO decision_requests (token_digest, proposal_id, action, batch_digest, channel, bot_profile,
44124
+ chat_id, message_id, owner_user_id, created_at, expires_at) VALUES (?,?,?,?,?,?,?,?,?,?,?)`).run(digestOf(token), fields4.proposalId, action, fields4.batchDigest, fields4.channel, fields4.botProfile, fields4.chatId, fields4.messageId, fields4.ownerUserId, at, at + DECISION_TTL_MS);
44125
+ return { action, token };
44126
+ }));
44127
+ }, "create"),
44128
+ take: /* @__PURE__ */ __name((token, expect) => {
44129
+ if (!isDecisionToken(token))
44130
+ return { ok: false, reason: "decision.token-unknown" };
44131
+ const digest = digestOf(token);
44132
+ return write(database, () => {
44133
+ const at = now2();
44134
+ const row2 = database.prepare("SELECT * FROM decision_requests WHERE token_digest=?").get(digest);
44135
+ if (!row2)
44136
+ return { ok: false, reason: "decision.token-unknown" };
44137
+ if (expect.botProfile !== row2.bot_profile || expect.chatId !== row2.chat_id || expect.messageId !== row2.message_id || expect.ownerUserId !== row2.owner_user_id)
44138
+ return { ok: false, reason: "decision.token-mismatch" };
44139
+ const reason = refusal2(row2, at);
44140
+ if (reason)
44141
+ return { ok: false, reason };
44142
+ database.prepare("UPDATE decision_requests SET used_at=? WHERE id=?").run(at, row2.id);
44143
+ const { changes } = database.prepare(`UPDATE decision_requests SET cancelled_at=? WHERE ${SAME_MESSAGE} AND id<>? AND ${OPEN2}`).run(at, row2.channel, row2.bot_profile, row2.chat_id, row2.message_id, row2.id);
44144
+ return { ok: true, request: requestOf(row2), cancelled: Number(changes) };
44145
+ });
44146
+ }, "take"),
44147
+ cancelOpen: /* @__PURE__ */ __name((scope3 = {}) => {
44148
+ const filters = [];
44149
+ const values = [];
44150
+ if (scope3.channel !== void 0) {
44151
+ filters.push("channel=?");
44152
+ values.push(scope3.channel);
44153
+ }
44154
+ if (scope3.botProfile !== void 0) {
44155
+ filters.push("bot_profile=?");
44156
+ values.push(scope3.botProfile);
44157
+ }
44158
+ const where = [OPEN2, ...filters].join(" AND ");
44159
+ return write(database, () => Number(database.prepare(`UPDATE decision_requests SET cancelled_at=? WHERE ${where}`).run(now2(), ...values).changes));
44160
+ }, "cancelOpen"),
44161
+ prune: /* @__PURE__ */ __name((at = now2()) => write(database, () => Number(database.prepare(`DELETE FROM decision_requests WHERE expires_at < ?1 OR used_at < ?1 OR cancelled_at < ?1`).run(at - PRUNE_AFTER_MS).changes)), "prune"),
44162
+ open: /* @__PURE__ */ __name((message2) => database.prepare(`SELECT * FROM decision_requests WHERE ${SAME_MESSAGE} AND ${OPEN2} AND expires_at>? ORDER BY id`).all(message2.channel, message2.botProfile, message2.chatId, message2.messageId, now2()).map(requestOf), "open")
44163
+ };
44164
+ }, "decisionRequestStoreOver");
44165
+
44166
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
43911
44167
  var NOTE_FIELDS = [
43912
44168
  "text",
43913
44169
  "exact",
@@ -43923,7 +44179,7 @@ var NOTE_FIELDS = [
43923
44179
  "keyword",
43924
44180
  "source"
43925
44181
  ];
43926
- var quoted2 = /* @__PURE__ */ __name((value) => `"${value.replaceAll('"', '""')}"`, "quoted");
44182
+ var quoted3 = /* @__PURE__ */ __name((value) => `"${value.replaceAll('"', '""')}"`, "quoted");
43927
44183
  var bound4 = /* @__PURE__ */ __name((sql2, ...params) => ({ sql: sql2, params, exact: true }), "bound");
43928
44184
  var combine2 = /* @__PURE__ */ __name((parts2, operator) => ({
43929
44185
  sql: parts2.length ? `(${parts2.map(({ sql: sql2 }) => sql2).join(` ${operator} `)})` : operator === "AND" ? "1" : "0",
@@ -43968,13 +44224,13 @@ var matchedRows = /* @__PURE__ */ __name((context, query) => {
43968
44224
  var searchNotes = /* @__PURE__ */ __name((context, query) => {
43969
44225
  const offset = query.offset ?? 0;
43970
44226
  const rows = matchedRows(context, query);
43971
- const read2 = {
44227
+ const read3 = {
43972
44228
  document: context.database.prepare("SELECT * FROM documents WHERE id = ?"),
43973
44229
  note: context.database.prepare("SELECT * FROM notes WHERE id = ?")
43974
44230
  };
43975
44231
  return {
43976
44232
  items: rows.slice(offset, offset + query.limit).map((row2) => {
43977
- const found2 = read2[row2.type === "document" ? "document" : "note"].get(row2.id);
44233
+ const found2 = read3[row2.type === "document" ? "document" : "note"].get(row2.id);
43978
44234
  const note2 = row2.type === "document" ? documentOf(found2) : noteOf(found2);
43979
44235
  return {
43980
44236
  ref: note2.ref,
@@ -44028,9 +44284,9 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
44028
44284
  const stems = query.stemmer.phrases(value);
44029
44285
  return {
44030
44286
  sql: `n.id IN (SELECT rowid FROM ${corpus.words} WHERE ${corpus.words} MATCH ?)${stems ? ` OR n.id IN (SELECT rowid FROM ${corpus.stems} WHERE ${corpus.stems} MATCH ?)` : ""}`,
44031
- params: [`normalized_text : (${quoted2(text6)})`, ...stems ? [`stems : (${stems})`] : []],
44287
+ params: [`normalized_text : (${quoted3(text6)})`, ...stems ? [`stems : (${stems})`] : []],
44032
44288
  exact: true,
44033
- fts: quoted2(text6),
44289
+ fts: quoted3(text6),
44034
44290
  ...stems ? { stems } : {}
44035
44291
  };
44036
44292
  }
@@ -44038,7 +44294,7 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
44038
44294
  if (operator === "term" || operator === "phrase") {
44039
44295
  const text6 = normalize(value);
44040
44296
  const stems = query.stemmer?.phrases(value);
44041
- return /[\p{L}\p{N}]/u.test(text6) ? { ...wordMatch2(quoted2(text6)), ...stems ? { stems } : {} } : bound4("0");
44297
+ return /[\p{L}\p{N}]/u.test(text6) ? { ...wordMatch2(quoted3(text6)), ...stems ? { stems } : {} } : bound4("0");
44042
44298
  }
44043
44299
  const pattern = operator === "wildcard" ? wildcardPattern(normalize(value)) : foldRegex(value, node.span);
44044
44300
  const matcher = automaton(pattern, node);
@@ -44049,7 +44305,7 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
44049
44305
  exhausted("term expansions");
44050
44306
  const matches2 = terms2.flatMap(({ term }) => {
44051
44307
  check3();
44052
- return matcher.test(String(term), budget) ? [quoted2(String(term))] : [];
44308
+ return matcher.test(String(term), budget) ? [quoted3(String(term))] : [];
44053
44309
  });
44054
44310
  return matches2.length ? wordMatch2(matches2.join(" OR ")) : bound4("0");
44055
44311
  }
@@ -44190,7 +44446,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
44190
44446
  const { database } = context;
44191
44447
  const stemmerFor2 = stemmerCache();
44192
44448
  const drain = /* @__PURE__ */ __name(() => drainNoteIndex(database, stemmerFor2), "drain");
44193
- const read2 = /* @__PURE__ */ __name((type, id2) => {
44449
+ const read3 = /* @__PURE__ */ __name((type, id2) => {
44194
44450
  const row2 = database.prepare(`SELECT * FROM ${type === "document" ? "documents" : "notes"} WHERE id = ?`).get(id2);
44195
44451
  return row2 ? type === "document" ? documentOf(row2) : noteOf(row2) : void 0;
44196
44452
  }, "read");
@@ -44220,7 +44476,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
44220
44476
  const textOf6 = /* @__PURE__ */ __name((owner) => {
44221
44477
  if (!texts2.has(owner)) {
44222
44478
  const [type, id2] = owner.split(":");
44223
- const note2 = read2(String(type), Number(id2));
44479
+ const note2 = read3(String(type), Number(id2));
44224
44480
  texts2.set(owner, note2 ? noteIndexText(note2.title, note2.text) : void 0);
44225
44481
  }
44226
44482
  return texts2.get(owner);
@@ -44309,7 +44565,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
44309
44565
  }, "scanned");
44310
44566
  return (indexed() ?? scanned()).flatMap(([key2, { score, start, end }]) => {
44311
44567
  const [type, id2] = key2.split(":");
44312
- const note2 = read2(String(type), Number(id2));
44568
+ const note2 = read3(String(type), Number(id2));
44313
44569
  return note2 ? [{ ref: note2.ref, note: note2, score, range: { start, end } }] : [];
44314
44570
  });
44315
44571
  }, "nearest"),
@@ -44337,7 +44593,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
44337
44593
  };
44338
44594
  }, "noteSearchOver");
44339
44595
 
44340
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
44596
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
44341
44597
  var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
44342
44598
  var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
44343
44599
  var EVENT_CORPUS = {
@@ -44469,7 +44725,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
44469
44725
  };
44470
44726
  }, "eventSearchOver");
44471
44727
 
44472
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
44728
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
44473
44729
  var refuse2 = /* @__PURE__ */ __name((message2, reason) => {
44474
44730
  throw new CliError("validation_error", message2, { reason });
44475
44731
  }, "refuse");
@@ -44547,7 +44803,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
44547
44803
  };
44548
44804
  }, "paymentEntriesOver");
44549
44805
 
44550
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
44806
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
44551
44807
  var EVIDENCE_FINDINGS_KIND = "evidence_findings";
44552
44808
  var reference = /* @__PURE__ */ __name((raw) => {
44553
44809
  if (/^(document|note):[1-9]\d*$/.test(raw))
@@ -44573,7 +44829,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
44573
44829
  return valid;
44574
44830
  }, "validateEvidenceFindings");
44575
44831
 
44576
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/moment.js
44832
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/moment.js
44577
44833
  var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
44578
44834
  try {
44579
44835
  return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
@@ -44585,7 +44841,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
44585
44841
  }
44586
44842
  }, "calendarMoment");
44587
44843
 
44588
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
44844
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
44589
44845
  var NAMED3 = "SELECT f.*, b.name AS author_name, b.kind AS author_kind FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
44590
44846
  var iso10 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
44591
44847
  var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -44794,7 +45050,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
44794
45050
  };
44795
45051
  }, "factsStoreOver");
44796
45052
 
44797
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
45053
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
44798
45054
  var invalid5 = /* @__PURE__ */ __name((message2) => {
44799
45055
  throw new CliError("validation_error", message2);
44800
45056
  }, "invalid");
@@ -44898,7 +45154,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
44898
45154
  return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
44899
45155
  }, "findingsCoreOver");
44900
45156
 
44901
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
45157
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
44902
45158
  var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
44903
45159
  var PROPOSAL_VERDICTS = ["useful", "not_useful"];
44904
45160
  var iso11 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
@@ -45063,7 +45319,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
45063
45319
  };
45064
45320
  }, "proposedActionsStoreOver");
45065
45321
 
45066
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
45322
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
45067
45323
  var stale = /* @__PURE__ */ __name(() => {
45068
45324
  throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
45069
45325
  reason: "evidence-findings.stale"
@@ -45244,7 +45500,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
45244
45500
  };
45245
45501
  }, "evidenceFindingsStoreOver");
45246
45502
 
45247
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
45503
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
45248
45504
  var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
45249
45505
  var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
45250
45506
  rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
@@ -45297,8 +45553,8 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
45297
45553
  }, "forPerson")
45298
45554
  }), "involvementStoreOver");
45299
45555
 
45300
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
45301
- import { createHash as createHash13 } from "node:crypto";
45556
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
45557
+ import { createHash as createHash14 } from "node:crypto";
45302
45558
  var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
45303
45559
  var id = /* @__PURE__ */ __name((value) => {
45304
45560
  if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
@@ -45327,7 +45583,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
45327
45583
  project: `project:${row2.to_id}`,
45328
45584
  confirmed: Number(row2.confirmed) === 1,
45329
45585
  provenance: row2.evidence == null ? null : String(row2.evidence),
45330
- fingerprint: createHash13("sha256").update(JSON.stringify([row2.id, row2.from_id, row2.to_id, row2.source, row2.confirmed, row2.evidence, row2.updated_at])).digest("hex")
45586
+ fingerprint: createHash14("sha256").update(JSON.stringify([row2.id, row2.from_id, row2.to_id, row2.source, row2.confirmed, row2.evidence, row2.updated_at])).digest("hex")
45331
45587
  };
45332
45588
  }, "linkOf");
45333
45589
  return {
@@ -45383,7 +45639,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
45383
45639
  };
45384
45640
  }, "meetingProjectsStoreOver");
45385
45641
 
45386
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
45642
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
45387
45643
  var ORGANIZATIONS_QUERY = {
45388
45644
  entity: "organization",
45389
45645
  backend: "sql",
@@ -45424,7 +45680,7 @@ var REMINDERS_QUERY = {
45424
45680
  })
45425
45681
  };
45426
45682
 
45427
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
45683
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
45428
45684
  var organizationOf = /* @__PURE__ */ __name((row2) => ({
45429
45685
  id: String(row2.id),
45430
45686
  ref: `organization:${row2.id}`,
@@ -45457,7 +45713,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
45457
45713
  }), "updateOrganization")
45458
45714
  }), "organizationsStoreOver");
45459
45715
 
45460
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
45716
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
45461
45717
  var relationOf = /* @__PURE__ */ __name((link3) => ({
45462
45718
  id: link3.id,
45463
45719
  from: link3.from,
@@ -45683,16 +45939,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
45683
45939
  provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
45684
45940
  }, "decidedOrigin");
45685
45941
 
45686
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
45942
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
45943
+ import { createHash as createHash17 } from "node:crypto";
45944
+
45945
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
45687
45946
  import { createHash as createHash16 } from "node:crypto";
45688
45947
 
45689
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
45948
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
45690
45949
  import { createHash as createHash15 } from "node:crypto";
45691
45950
 
45692
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
45693
- import { createHash as createHash14 } from "node:crypto";
45694
-
45695
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
45951
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
45696
45952
  var consolidationId = /* @__PURE__ */ __name((value, field4) => {
45697
45953
  if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
45698
45954
  throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
@@ -45743,7 +45999,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
45743
45999
  return input;
45744
46000
  }, "consolidationApplyInput");
45745
46001
 
45746
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
46002
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
45747
46003
  var receiptOf = /* @__PURE__ */ __name((row2) => ({
45748
46004
  id: String(row2.id),
45749
46005
  sourceId: String(row2.source_id),
@@ -45767,7 +46023,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
45767
46023
  check3();
45768
46024
  return write(database, () => {
45769
46025
  const owner = ownerPerson(database);
45770
- const request = createHash14("sha256").update(JSON.stringify([
46026
+ const request = createHash15("sha256").update(JSON.stringify([
45771
46027
  source2,
45772
46028
  survivor,
45773
46029
  owner.type,
@@ -45818,7 +46074,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
45818
46074
  }, { beforeCommit: check3 });
45819
46075
  }, "applyTagConsolidation");
45820
46076
 
45821
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
46077
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
45822
46078
  var selections = [
45823
46079
  ["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
45824
46080
  ["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
@@ -45864,7 +46120,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
45864
46120
  const memberIds = JSON.stringify([...sourceMemberIds, ...survivorMemberIds].map(Number));
45865
46121
  const captured = JSON.stringify(graph);
45866
46122
  let readBytes = Buffer.byteLength(captured);
45867
- const hash2 = createHash15("sha256").update(JSON.stringify([source2, survivor, catalog.fingerprint, graph]));
46123
+ const hash2 = createHash16("sha256").update(JSON.stringify([source2, survivor, catalog.fingerprint, graph]));
45868
46124
  for (const [table, where] of selections) {
45869
46125
  cancelled(options);
45870
46126
  const parameters = table === "links" ? [memberIds, memberIds] : [memberIds];
@@ -45962,7 +46218,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
45962
46218
  };
45963
46219
  }, "previewRows");
45964
46220
 
45965
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
46221
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
45966
46222
  var kinds = ["project", "tag", "topic"];
45967
46223
  var cancelled2 = /* @__PURE__ */ __name((signal) => {
45968
46224
  if (signal?.aborted)
@@ -46054,7 +46310,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
46054
46310
  cancelled2(options.signal);
46055
46311
  return {
46056
46312
  entries,
46057
- fingerprint: `v1:${options.kind ?? "all"}:${options.scope ?? "all"}:${createHash16("sha256").update(JSON.stringify(entries)).digest("hex")}`,
46313
+ fingerprint: `v1:${options.kind ?? "all"}:${options.scope ?? "all"}:${createHash17("sha256").update(JSON.stringify(entries)).digest("hex")}`,
46058
46314
  coverage: { complete: true, maxEntries, maxReadBytes }
46059
46315
  };
46060
46316
  }), "catalog");
@@ -46226,7 +46482,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
46226
46482
  };
46227
46483
  }, "vocabularyStoreOver");
46228
46484
 
46229
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
46485
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
46230
46486
  var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
46231
46487
  var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
46232
46488
  var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
@@ -46767,7 +47023,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
46767
47023
  return key2.padEnd(3, "X");
46768
47024
  }, "projectKey");
46769
47025
 
46770
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
47026
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
46771
47027
  var DAY5 = 864e5;
46772
47028
  var SETTING4 = "logs_pruned_at";
46773
47029
  var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
@@ -46794,7 +47050,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
46794
47050
  };
46795
47051
  }, "logPruner");
46796
47052
 
46797
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/mail/findings.js
47053
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mail/findings.js
46798
47054
  var MAIL_FINDINGS_PER_RUN = 30;
46799
47055
  var MAIL_FINDINGS_PER_SENDER = 5;
46800
47056
  var invalid7 = /* @__PURE__ */ __name((message2) => {
@@ -46917,7 +47173,7 @@ var oneOf7 = /* @__PURE__ */ __name((value, allowed, what) => {
46917
47173
  return value;
46918
47174
  }, "oneOf");
46919
47175
  var word = /* @__PURE__ */ __name((value, limit) => findingText(value, limit), "word");
46920
- var optional = /* @__PURE__ */ __name((key2, value, read2) => value === void 0 ? {} : { [key2]: read2(value) }, "optional");
47176
+ var optional = /* @__PURE__ */ __name((key2, value, read3) => value === void 0 ? {} : { [key2]: read3(value) }, "optional");
46921
47177
  var one = /* @__PURE__ */ __name((raw, ids) => {
46922
47178
  if (!raw || typeof raw !== "object")
46923
47179
  return invalid7("a finding is an object");
@@ -47170,7 +47426,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
47170
47426
  }, "checkMailFindings");
47171
47427
  var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
47172
47428
 
47173
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/mail/score.js
47429
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mail/score.js
47174
47430
  var import_disposable_email_domains_js = __toESM(require_dist(), 1);
47175
47431
  var import_tldts = __toESM(require_cjs(), 1);
47176
47432
  var WEIGHTS = {
@@ -47303,7 +47559,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
47303
47559
  return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
47304
47560
  }, "scoreGroup");
47305
47561
 
47306
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
47562
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
47307
47563
  var ORDERS = "SELECT o.*, b.name AS author_name, b.kind AS author_kind FROM orders o LEFT JOIN bots b ON o.author_type = 'bot' AND b.id = o.author_id";
47308
47564
  var orderOperationsOver = /* @__PURE__ */ __name((context) => {
47309
47565
  const { database, now: now2 } = context;
@@ -47455,7 +47711,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
47455
47711
  };
47456
47712
  }, "ordersStoreOver");
47457
47713
 
47458
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
47714
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
47459
47715
  var stale2 = /* @__PURE__ */ __name(() => {
47460
47716
  throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
47461
47717
  reason: "mail-findings.stale"
@@ -47518,14 +47774,14 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
47518
47774
  };
47519
47775
  }, "view");
47520
47776
  const cite = /* @__PURE__ */ __name((findings, account, deciding = false) => {
47521
- const read2 = /* @__PURE__ */ new Map();
47777
+ const read3 = /* @__PURE__ */ new Map();
47522
47778
  const perSender = /* @__PURE__ */ new Map();
47523
47779
  let bytes3 = 0;
47524
47780
  for (const finding of findings) {
47525
47781
  const senders = /* @__PURE__ */ new Set();
47526
47782
  let own = false;
47527
47783
  for (const { reference: reference2, fingerprint: fingerprint2 } of finding.evidence) {
47528
- let row2 = read2.get(reference2);
47784
+ let row2 = read3.get(reference2);
47529
47785
  if (!row2) {
47530
47786
  const at = parseLocator(reference2);
47531
47787
  row2 = database.prepare(EMAIL2).get(at.account, at.chat, at.message);
@@ -47547,7 +47803,7 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
47547
47803
  text: String(row2.body),
47548
47804
  revision: null
47549
47805
  });
47550
- read2.set(reference2, row2);
47806
+ read3.set(reference2, row2);
47551
47807
  }
47552
47808
  if (row2.fingerprint !== fingerprint2)
47553
47809
  return stale2();
@@ -47565,7 +47821,7 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
47565
47821
  perSender.set(sender, count);
47566
47822
  }
47567
47823
  }
47568
- return read2;
47824
+ return read3;
47569
47825
  }, "cite");
47570
47826
  const organizationsOf = /* @__PURE__ */ __name((sql2, ...params) => [
47571
47827
  ...new Set(database.prepare(sql2).all(...params).map((row2) => Number(row2.id)))
@@ -47648,8 +47904,8 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
47648
47904
  }
47649
47905
  }, "wouldWrite");
47650
47906
  const identityOfAddress = /* @__PURE__ */ __name((address) => database.prepare("SELECT i.id, l.person_id FROM identities i LEFT JOIN identity_links l ON l.identity_id = i.id WHERE i.provider = 'email' AND lower(i.external_id) = ?").get(address.toLowerCase()), "identityOfAddress");
47651
- const inCitedMail = /* @__PURE__ */ __name((address, finding, read2) => {
47652
- const ids = finding.evidence.map(({ reference: reference2 }) => Number(read2.get(reference2)?.id));
47907
+ const inCitedMail = /* @__PURE__ */ __name((address, finding, read3) => {
47908
+ const ids = finding.evidence.map(({ reference: reference2 }) => Number(read3.get(reference2)?.id));
47653
47909
  const marks = ids.map(() => "?").join(",");
47654
47910
  return Boolean(database.prepare(`SELECT 1 FROM emails WHERE id IN (${marks}) AND lower(from_address) = ? UNION ALL SELECT 1 FROM email_recipients WHERE email_id IN (${marks}) AND lower(address) = ? LIMIT 1`).get(...ids, address, ...ids, address));
47655
47911
  }, "inCitedMail");
@@ -47657,7 +47913,7 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
47657
47913
  const shop = fold(supplierName).trim();
47658
47914
  return database.prepare("SELECT p.id, json_extract(f.value, '$.supplierName') AS shop FROM proposed_actions p, json_each(p.payload, '$.findings') f WHERE p.kind = ? AND p.status = 'proposed' AND json_extract(f.value, '$.kind') = 'order' AND trim(json_extract(f.value, '$.number')) = ?").all(MAIL_FINDINGS_KIND, number3.trim()).filter((row2) => fold(String(row2.shop)).trim() === shop).map((row2) => String(row2.id))[0];
47659
47915
  }, "proposedOrder");
47660
- const targets = /* @__PURE__ */ __name((finding, read2) => {
47916
+ const targets = /* @__PURE__ */ __name((finding, read3) => {
47661
47917
  const thing = /* @__PURE__ */ __name((reference2, what) => {
47662
47918
  if (reference2 !== void 0)
47663
47919
  requiredThing(database, reference2, what);
@@ -47689,7 +47945,7 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
47689
47945
  "payeeEmail" in finding ? finding.payeeEmail : void 0,
47690
47946
  "customerEmail" in finding ? finding.customerEmail : void 0
47691
47947
  ])
47692
- if (address !== void 0 && !inCitedMail(address, finding, read2))
47948
+ if (address !== void 0 && !inCitedMail(address, finding, read3))
47693
47949
  return invalid8(`${address} neither sent nor received the mail finding ${finding.id} cites`);
47694
47950
  if (finding.kind === "order" && finding.number !== void 0) {
47695
47951
  const waiting = proposedOrder(finding.supplierName, finding.number);
@@ -47702,7 +47958,7 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
47702
47958
  orderOfShop(context, finding.supplierName, finding.number);
47703
47959
  return;
47704
47960
  case "new_contact": {
47705
- if (!inCitedMail(finding.address, finding, read2))
47961
+ if (!inCitedMail(finding.address, finding, read3))
47706
47962
  return invalid8(`${finding.address} neither sent nor received the mail finding ${finding.id} cites`);
47707
47963
  if (!identityOfAddress(finding.address))
47708
47964
  throw new CliError("not_found", `no stored contact ${finding.address}`);
@@ -47804,9 +48060,9 @@ ${evidence.join("\n")}`, agent);
47804
48060
  const held = heldBatch(account, input, by);
47805
48061
  if (held)
47806
48062
  return view(held);
47807
- const read2 = cite(input.findings, account);
48063
+ const read3 = cite(input.findings, account);
47808
48064
  for (const finding of input.findings)
47809
- targets(finding, read2);
48065
+ targets(finding, read3);
47810
48066
  const fingerprints = input.findings.map(mailFindingFingerprint);
47811
48067
  if (new Set(fingerprints).size !== fingerprints.length)
47812
48068
  return invalid8("the batch contains duplicate findings");
@@ -47912,7 +48168,7 @@ ${evidence.join("\n")}`, agent);
47912
48168
  };
47913
48169
  }, "mailFindingsStoreOver");
47914
48170
 
47915
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
48171
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
47916
48172
  var stale3 = /* @__PURE__ */ __name(() => {
47917
48173
  throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
47918
48174
  reason: "meeting-findings.stale"
@@ -48080,7 +48336,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
48080
48336
  };
48081
48337
  }, "meetingFindingsStoreOver");
48082
48338
 
48083
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
48339
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
48084
48340
  var RANK_BATCH = 512;
48085
48341
  var LIVE3 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
48086
48342
  var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
@@ -48351,7 +48607,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
48351
48607
  }
48352
48608
  }), "meetingVectorsOver");
48353
48609
 
48354
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
48610
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
48355
48611
  var OTHER_SOURCES = ["document", "note", "email"];
48356
48612
  var TEXTS = {
48357
48613
  document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
@@ -48452,11 +48708,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
48452
48708
  };
48453
48709
  }, "sourceMentionStoreOver");
48454
48710
 
48455
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
48711
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
48456
48712
  import { accessSync, constants, existsSync, mkdirSync as mkdirSync2, statSync, writeFileSync as writeFileSync2 } from "node:fs";
48457
48713
  import { dirname as dirname2 } from "node:path";
48458
48714
 
48459
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
48715
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
48460
48716
  import { readFileSync as readFileSync3 } from "node:fs";
48461
48717
  var CLIENTS_SETTING = "clients";
48462
48718
  var coreVersion = (() => {
@@ -48514,7 +48770,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
48514
48770
  return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
48515
48771
  }, "refusalAdvice");
48516
48772
 
48517
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
48773
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
48518
48774
  var GENERATED = [
48519
48775
  {
48520
48776
  "name": "20261010184427_initial",
@@ -49578,10 +49834,22 @@ WHERE json_type(params, '$.selection') = 'object';`
49578
49834
  "statements": [
49579
49835
  "CREATE TABLE `crm_fields` (\n `id` integer PRIMARY KEY,\n `account_id` integer NOT NULL,\n `kind` text NOT NULL,\n `code` text NOT NULL,\n `label` text,\n `type` text NOT NULL,\n `multiple` integer NOT NULL,\n `filterable` integer NOT NULL,\n `options` text,\n `position` integer NOT NULL,\n `created_at` integer NOT NULL,\n `updated_at` integer NOT NULL,\n `deleted_at` integer,\n CONSTRAINT `fk_crm_fields_account_id_accounts_id_fk` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`),\n CONSTRAINT `crm_fields_account_id_kind_code_unique` UNIQUE(`account_id`,`kind`,`code`)\n);"
49580
49836
  ]
49837
+ },
49838
+ {
49839
+ "name": "20261107032742_version-55-decision-requests",
49840
+ "statements": [
49841
+ "CREATE TABLE `decision_requests` (\n `id` integer PRIMARY KEY,\n `token_digest` text NOT NULL UNIQUE,\n `proposal_id` text NOT NULL,\n `action` text NOT NULL,\n `batch_digest` text NOT NULL,\n `channel` text NOT NULL,\n `bot_profile` text NOT NULL,\n `chat_id` text NOT NULL,\n `message_id` text NOT NULL,\n `owner_user_id` text NOT NULL,\n `created_at` integer NOT NULL,\n `expires_at` integer NOT NULL,\n `used_at` integer,\n `cancelled_at` integer\n);"
49842
+ ]
49843
+ },
49844
+ {
49845
+ "name": "20261107043407_version-55-decision-requests-index",
49846
+ "statements": [
49847
+ "CREATE INDEX `decision_requests_by_channel_bot_profile_chat_id_message_id` ON `decision_requests` (`channel`,`bot_profile`,`chat_id`,`message_id`);"
49848
+ ]
49581
49849
  }
49582
49850
  ];
49583
49851
 
49584
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
49852
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
49585
49853
  import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
49586
49854
  import { basename, dirname, join as join2, parse } from "node:path";
49587
49855
  var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
@@ -49814,7 +50082,7 @@ var rollBack = /* @__PURE__ */ __name((database, path) => {
49814
50082
  return { ...result, foreignKeyViolations };
49815
50083
  }, "rollBack");
49816
50084
 
49817
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
50085
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
49818
50086
  var V31_TABLES = [
49819
50087
  "accounts",
49820
50088
  "account_identities",
@@ -49924,7 +50192,9 @@ var MANIFEST = [
49924
50192
  { name: "20261106010504_version-52-deals", version: 52, minCompatible: 34 },
49925
50193
  { name: "20261106010507_version-52-deals-rules", version: 52, minCompatible: 34 },
49926
50194
  { name: "20261106165009_version-53-crm-pipelines", version: 53, minCompatible: 34 },
49927
- { name: "20261106225547_version-54-crm-fields", version: 54, minCompatible: 34 }
50195
+ { name: "20261106225547_version-54-crm-fields", version: 54, minCompatible: 34 },
50196
+ { name: "20261107032742_version-55-decision-requests", version: 55, minCompatible: 34 },
50197
+ { name: "20261107043407_version-55-decision-requests-index", version: 55, minCompatible: 34 }
49928
50198
  ];
49929
50199
  var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated = GENERATED) => {
49930
50200
  const migrations = [];
@@ -49960,7 +50230,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
49960
50230
  return migrations;
49961
50231
  }, "generatedMigrations");
49962
50232
 
49963
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/migrations.js
50233
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/migrations.js
49964
50234
  var MIGRATIONS = generatedMigrations();
49965
50235
  var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
49966
50236
  version INTEGER PRIMARY KEY,
@@ -50039,7 +50309,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
50039
50309
  }
50040
50310
  }, "migrate");
50041
50311
 
50042
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
50312
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
50043
50313
  var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
50044
50314
  const pending = database.prepare("SELECT id, join_url FROM meetings WHERE join_url IS NOT NULL AND join_key IS NULL AND id > ? ORDER BY id LIMIT ?");
50045
50315
  if (pending.get(0, 1) === void 0)
@@ -50061,7 +50331,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
50061
50331
  }
50062
50332
  }, "fillJoinKeys");
50063
50333
 
50064
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
50334
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
50065
50335
  var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
50066
50336
  refuseOwnerStoreInTests(path);
50067
50337
  const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
@@ -50075,8 +50345,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
50075
50345
  }, "openSqlite");
50076
50346
  var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
50077
50347
  quietSqliteWarning();
50078
- const { drizzle } = await import("./node-SPFML2D5.js");
50079
- const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-T3KILRCP.js");
50348
+ const { drizzle } = await import("./node-ZB4RNICS.js");
50349
+ const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-7XJ4J4E5.js");
50080
50350
  const client = await nodeClient(path, { readOnly });
50081
50351
  try {
50082
50352
  return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
@@ -50086,8 +50356,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
50086
50356
  }
50087
50357
  }, "openUnderNode");
50088
50358
  var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
50089
- const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-5FCGI6EO.js");
50090
- const { drizzle } = await import("./bun-3AIG5ML4.js");
50359
+ const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-RPSKGB4O.js");
50360
+ const { drizzle } = await import("./bun-HUHQD76Z.js");
50091
50361
  const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
50092
50362
  try {
50093
50363
  return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
@@ -50097,7 +50367,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
50097
50367
  }
50098
50368
  }, "openUnderBun");
50099
50369
 
50100
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
50370
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
50101
50371
  var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
50102
50372
  var paymentOf = /* @__PURE__ */ __name((metadata3) => {
50103
50373
  try {
@@ -50165,7 +50435,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
50165
50435
  });
50166
50436
  }, "movePaymentFacts");
50167
50437
 
50168
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
50438
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
50169
50439
  var readCompatibility = /* @__PURE__ */ __name((database, command) => {
50170
50440
  const ours = MIGRATIONS.at(-1)?.version ?? 0;
50171
50441
  if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
@@ -50183,7 +50453,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
50183
50453
  throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
50184
50454
  }, "assertReadCompatible");
50185
50455
 
50186
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
50456
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
50187
50457
  var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
50188
50458
  var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
50189
50459
  if (provenance2?.startsWith("rule:"))
@@ -50229,7 +50499,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
50229
50499
  });
50230
50500
  }, "moveSuggestedLinks");
50231
50501
 
50232
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
50502
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
50233
50503
  var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
50234
50504
  var TEST_PROVIDER = "chat";
50235
50505
  var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
@@ -50250,7 +50520,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
50250
50520
  }
50251
50521
  }, "purgeTestAccounts");
50252
50522
 
50253
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
50523
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
50254
50524
  var BACKFILL_ON_OPEN = 5e3;
50255
50525
  var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
50256
50526
  var createWritable = /* @__PURE__ */ __name((file) => {
@@ -50346,10 +50616,10 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
50346
50616
  }
50347
50617
  }, "openStoreContext");
50348
50618
 
50349
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
50350
- import { createHash as createHash17 } from "node:crypto";
50619
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
50620
+ import { createHash as createHash18 } from "node:crypto";
50351
50621
 
50352
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
50622
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
50353
50623
  var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
50354
50624
  var ref = text4(2048);
50355
50625
  var timestamp2 = pipe(number(), safeInteger(), minValue(0));
@@ -50415,7 +50685,7 @@ var projectAnnotationsSchema = strictObject({
50415
50685
  }))
50416
50686
  });
50417
50687
 
50418
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
50688
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
50419
50689
  var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
50420
50690
  var invalid10 = /* @__PURE__ */ __name((field4) => {
50421
50691
  throw new CliError("validation_error", `invalid project annotations.${field4}`);
@@ -50519,7 +50789,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
50519
50789
  invalid10("external.unused");
50520
50790
  }, "validateProjectAnnotationsGraph");
50521
50791
 
50522
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
50792
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
50523
50793
  var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
50524
50794
  var ref2 = pipe(string(), minLength(1), maxLength(2048));
50525
50795
  var targetSchema = strictObject({
@@ -50607,7 +50877,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
50607
50877
  }
50608
50878
  if (target.annotation_count > 0)
50609
50879
  conflicts.push({ reference: target.project, reason: "populated" });
50610
- const fingerprint2 = createHash17("sha256").update(JSON.stringify({
50880
+ const fingerprint2 = createHash18("sha256").update(JSON.stringify({
50611
50881
  manifest_fingerprint,
50612
50882
  target: {
50613
50883
  ...checked.output,
@@ -50625,8 +50895,8 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
50625
50895
  };
50626
50896
  }, "planBoundProjectAnnotations");
50627
50897
 
50628
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
50629
- import { createHash as createHash18 } from "node:crypto";
50898
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
50899
+ import { createHash as createHash19 } from "node:crypto";
50630
50900
  var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
50631
50901
  var timestamp3 = pipe(number(), safeInteger(), minValue(0));
50632
50902
  var projectAnnotationSnapshotSchema = strictObject({
@@ -50710,7 +50980,7 @@ var decodeProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3) => {
50710
50980
  var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
50711
50981
  const snapshot2 = decodeProjectAnnotationSnapshot(json3);
50712
50982
  const order = /* @__PURE__ */ __name((a, b) => a.ref < b.ref ? -1 : a.ref > b.ref ? 1 : 0, "order");
50713
- return createHash18("sha256").update(JSON.stringify({
50983
+ return createHash19("sha256").update(JSON.stringify({
50714
50984
  ...snapshot2,
50715
50985
  aliases: snapshot2.aliases.toSorted((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0),
50716
50986
  facts: snapshot2.facts.toSorted(order),
@@ -50719,7 +50989,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
50719
50989
  })).digest("hex");
50720
50990
  }, "projectAnnotationSnapshotFingerprint");
50721
50991
 
50722
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
50992
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
50723
50993
  var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
50724
50994
  if (!request || typeof request !== "object" || Array.isArray(request))
50725
50995
  throw new CliError("validation_error", "project annotation request is required");
@@ -50736,7 +51006,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
50736
51006
  return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
50737
51007
  }, "projectAnnotationRequest");
50738
51008
 
50739
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
51009
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
50740
51010
  var SnapshotBudget = class {
50741
51011
  static {
50742
51012
  __name(this, "SnapshotBudget");
@@ -50762,14 +51032,14 @@ var SnapshotBudget = class {
50762
51032
  }
50763
51033
  };
50764
51034
 
50765
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
50766
- import { createHash as createHash20 } from "node:crypto";
51035
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
51036
+ import { createHash as createHash21 } from "node:crypto";
50767
51037
 
50768
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
51038
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
50769
51039
  var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
50770
51040
 
50771
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
50772
- import { createHash as createHash19 } from "node:crypto";
51041
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
51042
+ import { createHash as createHash20 } from "node:crypto";
50773
51043
  var invalid12 = /* @__PURE__ */ __name(() => {
50774
51044
  throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
50775
51045
  }, "invalid");
@@ -50907,11 +51177,11 @@ var ProjectSnapshotSources = class {
50907
51177
  return this.digest("meeting_transcript", [header, cues]);
50908
51178
  }
50909
51179
  digest(kind4, content) {
50910
- return createHash19("sha256").update(JSON.stringify(["wirecat.project-source", 1, kind4, content])).digest("hex");
51180
+ return createHash20("sha256").update(JSON.stringify(["wirecat.project-source", 1, kind4, content])).digest("hex");
50911
51181
  }
50912
51182
  };
50913
51183
 
50914
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
51184
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
50915
51185
  var unsupported = /* @__PURE__ */ __name(() => {
50916
51186
  throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
50917
51187
  }, "unsupported");
@@ -51082,7 +51352,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
51082
51352
  return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
51083
51353
  }), "projectAnnotationSnapshot");
51084
51354
 
51085
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
51355
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
51086
51356
  var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
51087
51357
  const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
51088
51358
  const sources = new ProjectSnapshotSources(database, budget);
@@ -51123,7 +51393,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
51123
51393
  const target = {
51124
51394
  project: current.project.ref,
51125
51395
  annotation_count: current.aliases.length + current.facts.length + current.links.length,
51126
- revision_sha256: createHash20("sha256").update(JSON.stringify({
51396
+ revision_sha256: createHash21("sha256").update(JSON.stringify({
51127
51397
  snapshot: projectAnnotationSnapshotFingerprint(JSON.stringify(current)),
51128
51398
  projects: projects2,
51129
51399
  aliases: aliases2,
@@ -51138,13 +51408,13 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
51138
51408
  descriptor_conflicts,
51139
51409
  namespace_conflicts,
51140
51410
  ready: plan.ready && descriptor_conflicts.length === 0 && namespace_conflicts.length === 0,
51141
- fingerprint: createHash20("sha256").update(JSON.stringify({ plan: plan.fingerprint, descriptor_conflicts, namespace_conflicts })).digest("hex"),
51411
+ fingerprint: createHash21("sha256").update(JSON.stringify({ plan: plan.fingerprint, descriptor_conflicts, namespace_conflicts })).digest("hex"),
51142
51412
  read_bytes: budget.bytes,
51143
51413
  records: budget.records
51144
51414
  };
51145
51415
  }), "previewAnnotationSnapshot");
51146
51416
 
51147
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
51417
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
51148
51418
  var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
51149
51419
  const mappings = { ...bindings };
51150
51420
  const resolve = /* @__PURE__ */ __name((ref3) => {
@@ -51186,7 +51456,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
51186
51456
  return mappings;
51187
51457
  }, "restoreAnnotationRecords");
51188
51458
 
51189
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
51459
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
51190
51460
  var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
51191
51461
  async preview(request) {
51192
51462
  const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
@@ -51216,7 +51486,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
51216
51486
  }
51217
51487
  }), "projectAnnotationStoreOver");
51218
51488
 
51219
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
51489
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
51220
51490
  var PROJECTED = {
51221
51491
  invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
51222
51492
  payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
@@ -51629,7 +51899,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
51629
51899
  };
51630
51900
  }, "recordStoreOver");
51631
51901
 
51632
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
51902
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
51633
51903
  var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
51634
51904
  const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
51635
51905
  let merged = { from: from2, to };
@@ -51642,7 +51912,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
51642
51912
  }, "markRange");
51643
51913
  var ranges = /* @__PURE__ */ __name(({ orm }, chatKey) => orm.select({ from: syncRanges.fromKey, to: syncRanges.toKey }).from(syncRanges).where(eq(syncRanges.chatId, chatKey)).orderBy(syncRanges.fromKey).all(), "ranges");
51644
51914
 
51645
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
51915
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
51646
51916
  var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
51647
51917
  var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
51648
51918
  chatId: String(row2.key).slice(prefix.length),
@@ -51663,7 +51933,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
51663
51933
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(prefixOf2(account) + chatId, JSON.stringify({ ...saved, checkedAt: checkedAt ?? new Date(now2).toISOString() }), now2);
51664
51934
  }, "setTaskAnalysisMark");
51665
51935
 
51666
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
51936
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
51667
51937
  var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
51668
51938
  var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
51669
51939
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
@@ -51673,7 +51943,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
51673
51943
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf4(account), JSON.stringify(until), now2);
51674
51944
  }, "setTaskRulesStop");
51675
51945
 
51676
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sync.js
51946
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sync.js
51677
51947
  var syncStoreOver = /* @__PURE__ */ __name((context) => {
51678
51948
  const { database } = context;
51679
51949
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
@@ -51732,7 +52002,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
51732
52002
  };
51733
52003
  }, "syncStoreOver");
51734
52004
 
51735
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/tags.js
52005
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/tags.js
51736
52006
  var tagsStoreOver = /* @__PURE__ */ __name((context) => {
51737
52007
  const { database } = context;
51738
52008
  return {
@@ -51754,7 +52024,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
51754
52024
  };
51755
52025
  }, "tagsStoreOver");
51756
52026
 
51757
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
52027
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
51758
52028
  var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
51759
52029
  var neighbours = /* @__PURE__ */ __name(({ orm }, chatKey, messagePk, sentAt, { messages: messages2, withinMs }, side) => orm.all(sql`SELECT sender_name AS sender, text, sent_at AS sentAt FROM messages
51760
52030
  WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
@@ -51881,7 +52151,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
51881
52151
  dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
51882
52152
  }, "savePictureChunks");
51883
52153
 
51884
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
52154
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
51885
52155
  var messagesToEmbed = /* @__PURE__ */ __name(({ orm }, accountPk2, { chatKey, model, after: after2, limit }) => orm.all(sql`SELECT m.id AS messagePk, m.text, m.sent_at AS sentAt, k.content_hash AS hash,
51886
52156
  EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
51887
52157
  FROM messages m
@@ -51970,7 +52240,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
51970
52240
  return plain2(best(found2));
51971
52241
  }, "nearestMessages");
51972
52242
 
51973
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/vectors.js
52243
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/vectors.js
51974
52244
  var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
51975
52245
  const { database } = context;
51976
52246
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -52228,7 +52498,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
52228
52498
  embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
52229
52499
  }), "vectorsStoreOver");
52230
52500
 
52231
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
52501
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
52232
52502
  import { existsSync as existsSync2, readFileSync as readFileSync4 } from "node:fs";
52233
52503
  import { dirname as dirname3, join as join3 } from "node:path";
52234
52504
  var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
@@ -52316,10 +52586,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
52316
52586
  }
52317
52587
  }, "lastBackup");
52318
52588
 
52319
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/providers.js
52589
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/providers.js
52320
52590
  var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
52321
52591
 
52322
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
52592
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
52323
52593
  var COUNTED_TABLES = [
52324
52594
  "accounts",
52325
52595
  "chats",
@@ -52404,7 +52674,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
52404
52674
  };
52405
52675
  }, "storeContents");
52406
52676
 
52407
- // node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/store.js
52677
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/store.js
52408
52678
  var openStore = /* @__PURE__ */ __name(async (options = {}) => {
52409
52679
  const context = await openStoreContext(options);
52410
52680
  try {
@@ -52472,6 +52742,7 @@ var storeOver = /* @__PURE__ */ __name((context) => {
52472
52742
  const orders2 = once3(() => ordersStoreOver(context));
52473
52743
  const deals2 = once3(() => dealsStoreOver(context));
52474
52744
  const crm = once3(() => crmCopiesOver(context, accountPeopleOver(context)));
52745
+ const decisionRequests2 = once3(() => decisionRequestStoreOver(context));
52475
52746
  const records2 = once3(() => recordStoreOver(context));
52476
52747
  const memories2 = once3(() => memoriesStoreOver(context));
52477
52748
  const proposedActions2 = once3(() => proposedActionsStoreOver(context));
@@ -52588,6 +52859,9 @@ var storeOver = /* @__PURE__ */ __name((context) => {
52588
52859
  get crm() {
52589
52860
  return crm();
52590
52861
  },
52862
+ get decisionRequests() {
52863
+ return decisionRequests2();
52864
+ },
52591
52865
  get records() {
52592
52866
  return records2();
52593
52867
  },
@@ -52702,6 +52976,7 @@ export {
52702
52976
  MAIL_AGENDA_COLUMNS,
52703
52977
  mailOwnText,
52704
52978
  AGENDA_COLUMNS,
52979
+ plainQuery,
52705
52980
  correctWords,
52706
52981
  drainMeetingIndex,
52707
52982
  THREAD_COLUMNS,