@wirecat/hubspot-cli 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +6 -5
  3. package/dist/bin/hubspot.js +2 -2
  4. package/dist/bundle/agent-NST4YXJR.js +40 -0
  5. package/dist/bundle/{all-profiles-6452VSJB.js → all-profiles-JVEE4PXX.js} +11 -11
  6. package/dist/bundle/{anthropic-VQUOVYOW.js → anthropic-6HT57GNF.js} +5 -5
  7. package/dist/bundle/{app-server-EQZUP4H4.js → app-server-FOBFF6G6.js} +68 -68
  8. package/dist/bundle/{bun-AJPJ4ZUN.js → bun-GW443QB3.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-AGXGSF6D.js → bun-sqlite-TGIAICDN.js} +6 -6
  10. package/dist/bundle/{chunk-ARTJLL7W.js → chunk-2BCWK5BF.js} +5 -5
  11. package/dist/bundle/{chunk-JUKAIXKY.js → chunk-2Q2XIXDL.js} +1 -1
  12. package/dist/bundle/{chunk-X5S5KUSU.js → chunk-3BM6KBWP.js} +19 -19
  13. package/dist/bundle/{chunk-J5P5VSRG.js → chunk-3LMW7U7F.js} +8 -8
  14. package/dist/bundle/{chunk-NNMU2TDU.js → chunk-3MPMYAII.js} +1 -1
  15. package/dist/bundle/{chunk-WGBVRDY3.js → chunk-3MUHCLRY.js} +25 -3
  16. package/dist/bundle/{chunk-TIHDBKA7.js → chunk-3SRGN5MQ.js} +2 -2
  17. package/dist/bundle/{chunk-EMOVVERN.js → chunk-4OPN3KCN.js} +5 -5
  18. package/dist/bundle/{chunk-6MFP47XC.js → chunk-5G4L6NQJ.js} +35 -35
  19. package/dist/bundle/{chunk-DQB5JMTY.js → chunk-5KLNBGPU.js} +1 -1
  20. package/dist/bundle/{chunk-ABXVU5O4.js → chunk-5OBVICFK.js} +8 -1
  21. package/dist/bundle/{chunk-LKSNISYV.js → chunk-5WKJFMC3.js} +4 -4
  22. package/dist/bundle/{chunk-B2W3C4N6.js → chunk-5ZVYIA56.js} +5 -5
  23. package/dist/bundle/{chunk-AF7DANIR.js → chunk-6NUXFVJQ.js} +1 -1
  24. package/dist/bundle/{chunk-3PEKYGZ3.js → chunk-6ULR7N3T.js} +2 -2
  25. package/dist/bundle/{chunk-VW5F6FK3.js → chunk-7JVKQ6NM.js} +4 -4
  26. package/dist/bundle/{chunk-VQEAZXTV.js → chunk-7OJ43BAH.js} +7 -7
  27. package/dist/bundle/{chunk-PMP37KLR.js → chunk-7QH5BZUG.js} +3 -3
  28. package/dist/bundle/{chunk-OJIJVOOA.js → chunk-A6PVEUGN.js} +16 -16
  29. package/dist/bundle/{chunk-FIVD4HM4.js → chunk-AT43MYQL.js} +8 -8
  30. package/dist/bundle/{chunk-3R4KRNUZ.js → chunk-ATGD64VO.js} +8 -8
  31. package/dist/bundle/{chunk-DSRXCLPO.js → chunk-AV2ZJ4WX.js} +1 -1
  32. package/dist/bundle/{chunk-3DIXAEGH.js → chunk-BXZRSXBL.js} +3 -3
  33. package/dist/bundle/{chunk-5K3FGXZH.js → chunk-CFQQTDSA.js} +1 -1
  34. package/dist/bundle/{chunk-KO4VR5NK.js → chunk-DBPFHJXX.js} +4 -4
  35. package/dist/bundle/{chunk-GRFICQTZ.js → chunk-DG4RBKIV.js} +1 -1
  36. package/dist/bundle/{chunk-5AYKCKSE.js → chunk-E33KM3DB.js} +11 -11
  37. package/dist/bundle/{chunk-5ZV7REBE.js → chunk-EBJYK7UM.js} +63 -60
  38. package/dist/bundle/{chunk-GZZR5U3K.js → chunk-ETKLP4VE.js} +12 -12
  39. package/dist/bundle/{chunk-BN22EKQQ.js → chunk-EU7AVWSX.js} +2 -2
  40. package/dist/bundle/{chunk-PLRUUXK7.js → chunk-F3HJ2E3P.js} +6 -6
  41. package/dist/bundle/{chunk-B3EH22CO.js → chunk-F4ZLRS4B.js} +1 -1
  42. package/dist/bundle/{chunk-VNPC274V.js → chunk-FK4LEJZM.js} +3 -3
  43. package/dist/bundle/{chunk-M763RNWP.js → chunk-FOLKK6FW.js} +13 -13
  44. package/dist/bundle/{chunk-NTQBS2JL.js → chunk-FWW2CUXH.js} +4 -4
  45. package/dist/bundle/{chunk-SEELWPRD.js → chunk-GJSHLF43.js} +8 -8
  46. package/dist/bundle/{chunk-CBCEMFCF.js → chunk-GOOXUCJW.js} +2 -2
  47. package/dist/bundle/{chunk-BUGROVF3.js → chunk-HM6AMYHR.js} +2 -2
  48. package/dist/bundle/{chunk-PHXOL5HZ.js → chunk-HM72O37C.js} +156 -156
  49. package/dist/bundle/{chunk-KVXEEKBB.js → chunk-HPRKSL5S.js} +2 -2
  50. package/dist/bundle/{chunk-3TEFE6YU.js → chunk-HQYJ66ZX.js} +7 -7
  51. package/dist/bundle/{chunk-3I2FGNWO.js → chunk-HVXOA4FO.js} +1 -1
  52. package/dist/bundle/{chunk-IBTMK5KD.js → chunk-IED6MKPU.js} +25 -25
  53. package/dist/bundle/{chunk-LA3YU4K7.js → chunk-JKNUCEII.js} +1 -1
  54. package/dist/bundle/{chunk-IQ2XZ62J.js → chunk-JWO3PB5Z.js} +18 -18
  55. package/dist/bundle/{chunk-BAUK2MD5.js → chunk-K4DWBOO6.js} +43 -64
  56. package/dist/bundle/{chunk-Z6ZQVYIE.js → chunk-LS4S7PAP.js} +3 -3
  57. package/dist/bundle/{chunk-RVWGFD32.js → chunk-LX7QMRRG.js} +13 -13
  58. package/dist/bundle/{chunk-WCQW4GYO.js → chunk-M25KVDHA.js} +24 -8
  59. package/dist/bundle/{chunk-L433IDOX.js → chunk-MQACXJLG.js} +8 -8
  60. package/dist/bundle/{chunk-7VHBS5BJ.js → chunk-N4EIJ53V.js} +2 -2
  61. package/dist/bundle/{chunk-O3VM5PTJ.js → chunk-NL3RKJR6.js} +1 -1
  62. package/dist/bundle/{chunk-LT5KE44Q.js → chunk-NLZADZ4F.js} +61 -61
  63. package/dist/bundle/{chunk-E4X7JAFC.js → chunk-OLDIP4CV.js} +3 -3
  64. package/dist/bundle/{chunk-AVUMH42T.js → chunk-PKFLSX5F.js} +8 -8
  65. package/dist/bundle/{chunk-IXZLMFPO.js → chunk-PMJCZIV4.js} +1 -1
  66. package/dist/bundle/{chunk-NZGI74GS.js → chunk-PQUZ2YDC.js} +6 -6
  67. package/dist/bundle/{chunk-LTVYGXWT.js → chunk-Q7DIEU6L.js} +7 -7
  68. package/dist/bundle/{chunk-E4FAMU2S.js → chunk-QIFCH5DZ.js} +347 -313
  69. package/dist/bundle/{chunk-WRCKE5ND.js → chunk-QJHRRJKD.js} +3 -3
  70. package/dist/bundle/{chunk-7UEL65GQ.js → chunk-QNQ4V4UT.js} +8 -8
  71. package/dist/bundle/{chunk-JP2HJXFO.js → chunk-QODPEZC5.js} +3 -3
  72. package/dist/bundle/{chunk-ODPU3II6.js → chunk-QV4GDVBN.js} +8 -8
  73. package/dist/bundle/{chunk-2A64XS22.js → chunk-RFGIUCKU.js} +3 -3
  74. package/dist/bundle/{chunk-GC6FLHZF.js → chunk-T3GZKV5A.js} +12 -12
  75. package/dist/bundle/{chunk-HPZRUY6S.js → chunk-TAF4PKDS.js} +1 -1
  76. package/dist/bundle/{chunk-K4X5ZHI2.js → chunk-UHHXZKB2.js} +16 -16
  77. package/dist/bundle/{chunk-4DNHXRCJ.js → chunk-UIWWAT3C.js} +7 -7
  78. package/dist/bundle/{chunk-ITGNDZRR.js → chunk-V23OHBGM.js} +3 -3
  79. package/dist/bundle/{chunk-U6XA3OOM.js → chunk-V2B2OWTC.js} +2 -2
  80. package/dist/bundle/{chunk-2NCO4E4T.js → chunk-VDAYIXV4.js} +6 -6
  81. package/dist/bundle/{chunk-7NZT7Y55.js → chunk-VMF2UIQI.js} +1 -1
  82. package/dist/bundle/{chunk-XLDQTDF6.js → chunk-W5X37TBC.js} +2 -2
  83. package/dist/bundle/{chunk-EE4JSYGZ.js → chunk-WATDMTDC.js} +3 -3
  84. package/dist/bundle/{chunk-Q27QAB4X.js → chunk-WBUVNKHJ.js} +7 -7
  85. package/dist/bundle/{chunk-7LQRXVQ3.js → chunk-WLFYEAZ6.js} +978 -548
  86. package/dist/bundle/{chunk-5YNAVVCW.js → chunk-X5U7GLHD.js} +3 -3
  87. package/dist/bundle/{chunk-JK2SNLU5.js → chunk-XCDRFC6G.js} +17 -17
  88. package/dist/bundle/{chunk-AWOJYRQW.js → chunk-XDDTJYGA.js} +434 -371
  89. package/dist/bundle/{chunk-2PRVWEJC.js → chunk-XJVFXHDI.js} +2 -2
  90. package/dist/bundle/{chunk-2HYGCLKN.js → chunk-XMWMA2N5.js} +77 -38
  91. package/dist/bundle/{chunk-BHZUPOQY.js → chunk-YYYRE4AV.js} +26 -26
  92. package/dist/bundle/{chunk-DW23LM47.js → chunk-Z3YOKGVZ.js} +2 -2
  93. package/dist/bundle/{chunk-A6UFH3QU.js → chunk-Z4PY5BDP.js} +4 -4
  94. package/dist/bundle/command-contract-LYX2QNIA.js +40 -0
  95. package/dist/bundle/{command-server-entry-GJSMDSNE.js → command-server-entry-OJQ55UA2.js} +28 -28
  96. package/dist/bundle/{decode-6PLXHVHW.js → decode-CDQDRPRJ.js} +5 -5
  97. package/dist/bundle/{dispatch-TAQ7635E.js → dispatch-JQBAZWCL.js} +8 -8
  98. package/dist/bundle/{echarts-UZ7QLRE2.js → echarts-GJ5JJG2A.js} +2 -2
  99. package/dist/bundle/{embed-AWLL4EBF.js → embed-BUQXGMKR.js} +6 -6
  100. package/dist/bundle/{embedder-MM225YJ6.js → embedder-FCX6LE4O.js} +9 -9
  101. package/dist/bundle/{failure-MR2XVHFP.js → failure-I6AAF5R5.js} +2 -2
  102. package/dist/bundle/{first-run-KCZVNFJ7.js → first-run-RPYEXXQK.js} +12 -12
  103. package/dist/bundle/first-screen-Y4EH3HZS.js +40 -0
  104. package/dist/bundle/hubspot.js +25 -25
  105. package/dist/bundle/{instructions-ZJ7U3QUE.js → instructions-LPVTPERS.js} +1 -1
  106. package/dist/bundle/{mcp-CNV7F2XZ.js → mcp-YGOAUNC3.js} +2 -2
  107. package/dist/bundle/meeting-combined-FEEVVUGC.js +25 -0
  108. package/dist/bundle/{meeting-model-OYXB2NOE.js → meeting-model-TRGBEWCY.js} +11 -11
  109. package/dist/bundle/{meeting-semantic-S3DBB7XD.js → meeting-semantic-RSF5KNKD.js} +6 -6
  110. package/dist/bundle/{node-HGCZGZ4R.js → node-UAT3EIAP.js} +2 -2
  111. package/dist/bundle/{node-sqlite-RKYSRKEB.js → node-sqlite-3HKDQNFD.js} +7 -7
  112. package/dist/bundle/{oauth-PYDCAQ7Y.js → oauth-DYW2NSZP.js} +7 -7
  113. package/dist/bundle/{open-UCDSQUN2.js → open-KBRXJ5BC.js} +5 -5
  114. package/dist/bundle/{openai-Y4F5ZC7O.js → openai-YNCLRTSK.js} +15 -15
  115. package/dist/bundle/{process-P7FB7YO7.js → process-63BB7LKP.js} +1 -1
  116. package/dist/bundle/{program-O2A5L4S4.js → program-VX52OB3O.js} +132 -98
  117. package/dist/bundle/{prompt-E5TKZ37Q.js → prompt-TWLJ3M2O.js} +5 -5
  118. package/dist/bundle/{recognize-5NYPTSLT.js → recognize-GQ6DLGE7.js} +4 -4
  119. package/dist/bundle/{remote-U4LUAHF2.js → remote-RKNSF3TT.js} +9 -9
  120. package/dist/bundle/{rerank-AJAVKK5L.js → rerank-H4HSGQUJ.js} +7 -7
  121. package/dist/bundle/{schemas-QLQ2K6DL.js → schemas-LDK7O6VW.js} +1 -1
  122. package/dist/bundle/{serve-4UJ3R5IP.js → serve-4ZNIAL7H.js} +9 -9
  123. package/dist/bundle/server-3IYIZEEQ.js +86 -0
  124. package/dist/bundle/{server-DUKWJUKD.js → server-4G4QB3QN.js} +60 -60
  125. package/dist/bundle/{source-FCQDXCAD.js → source-2UCNCCO7.js} +79 -79
  126. package/dist/bundle/{sqlite-runtime-KLEA4XAU.js → sqlite-runtime-C2JYC7JF.js} +6 -6
  127. package/dist/bundle/{state-COGSYMVH.js → state-3KDXCXHG.js} +6 -6
  128. package/dist/bundle/store-2MNUHHZC.js +32 -0
  129. package/dist/bundle/{store-V5UMSWK4.js → store-J5FQBZYR.js} +26 -22
  130. package/dist/bundle/{store-BJXCSP26.js → store-LXLG5HTS.js} +24 -24
  131. package/dist/bundle/store-maintenance-command-DDB7TR6V.js +73 -0
  132. package/dist/bundle/surface-ZTZANYKC.js +72 -0
  133. package/dist/bundle/writer-X7PGBLDH.js +86 -0
  134. package/dist/config.d.ts +1 -0
  135. package/dist/config.d.ts.map +1 -1
  136. package/dist/config.js +56 -8
  137. package/dist/config.js.map +1 -1
  138. package/dist/version.d.ts +1 -1
  139. package/dist/version.js +1 -1
  140. package/package.json +3 -3
  141. package/skills/hubspot-cli/references/api/api-basic.md +34 -6
  142. package/skills/hubspot-cli/references/api/api-batch.md +19 -9
  143. package/skills/hubspot-cli/references/api/api-search.md +9 -0
  144. package/dist/bundle/agent-A7ARC3QB.js +0 -40
  145. package/dist/bundle/command-contract-R2FGN7CQ.js +0 -40
  146. package/dist/bundle/first-screen-SCDV7TXT.js +0 -40
  147. package/dist/bundle/meeting-combined-EL5XZIJ5.js +0 -25
  148. package/dist/bundle/server-UQVV2PPX.js +0 -86
  149. package/dist/bundle/store-CHH3G3SL.js +0 -32
  150. package/dist/bundle/store-maintenance-command-DQUBBWMD.js +0 -73
  151. package/dist/bundle/surface-IGBQUYE5.js +0 -72
  152. package/dist/bundle/writer-AQSEPEEN.js +0 -86
@@ -10,18 +10,18 @@ import {
10
10
  analyzerIdentity,
11
11
  createStemmer,
12
12
  parseStemmers
13
- } from "./chunk-7UEL65GQ.js";
13
+ } from "./chunk-QNQ4V4UT.js";
14
14
  import {
15
15
  calendarMoment,
16
16
  dayIn
17
- } from "./chunk-WRCKE5ND.js";
17
+ } from "./chunk-QJHRRJKD.js";
18
18
  import {
19
19
  PRESENCE,
20
20
  fuseRanked,
21
21
  isPresence,
22
22
  parseBytes,
23
23
  plainQuery
24
- } from "./chunk-Q27QAB4X.js";
24
+ } from "./chunk-WBUVNKHJ.js";
25
25
  import {
26
26
  ACCOUNT_GROUPS,
27
27
  CATEGORIES,
@@ -59,16 +59,16 @@ import {
59
59
  runEvent,
60
60
  severity,
61
61
  sourceOf2 as sourceOf
62
- } from "./chunk-IBTMK5KD.js";
62
+ } from "./chunk-IED6MKPU.js";
63
63
  import {
64
64
  sqliteCode
65
- } from "./chunk-DW23LM47.js";
65
+ } from "./chunk-Z3YOKGVZ.js";
66
66
  import {
67
67
  DEFAULT_TASK_CATEGORIES,
68
68
  sharedConfigPath,
69
69
  storedTaskCategories,
70
70
  taskCategoriesReader
71
- } from "./chunk-4DNHXRCJ.js";
71
+ } from "./chunk-UIWWAT3C.js";
72
72
  import {
73
73
  AMOUNT_ROLES,
74
74
  BARE_INTERNATIONAL_PROVIDERS,
@@ -119,19 +119,19 @@ import {
119
119
  typedPhone,
120
120
  validCounter,
121
121
  wildcardPattern
122
- } from "./chunk-IQ2XZ62J.js";
122
+ } from "./chunk-JWO3PB5Z.js";
123
123
  import {
124
124
  QUERY_LIMITS,
125
125
  exhausted,
126
126
  outOfTime,
127
127
  searchError,
128
128
  tooWideTerm
129
- } from "./chunk-JP2HJXFO.js";
129
+ } from "./chunk-QODPEZC5.js";
130
130
  import {
131
131
  NORMALIZER_VERSION,
132
132
  fold,
133
133
  normalize
134
- } from "./chunk-DQB5JMTY.js";
134
+ } from "./chunk-5KLNBGPU.js";
135
135
  import {
136
136
  ADDED_ACCOUNT,
137
137
  ADDED_PROVIDER,
@@ -220,11 +220,11 @@ import {
220
220
  usableLinkSql,
221
221
  useStoredProviders,
222
222
  walletLine
223
- } from "./chunk-GC6FLHZF.js";
223
+ } from "./chunk-T3GZKV5A.js";
224
224
  import {
225
225
  normalizeTag,
226
226
  tagOf
227
- } from "./chunk-CBCEMFCF.js";
227
+ } from "./chunk-GOOXUCJW.js";
228
228
  import {
229
229
  CHAT_MESSAGES_READ,
230
230
  FACT_TYPES,
@@ -280,21 +280,21 @@ import {
280
280
  validateQuery,
281
281
  walkQuery,
282
282
  zonedMoment
283
- } from "./chunk-LT5KE44Q.js";
283
+ } from "./chunk-NLZADZ4F.js";
284
284
  import {
285
285
  refuseOwnerStoreInTests,
286
286
  storePath
287
- } from "./chunk-3PEKYGZ3.js";
287
+ } from "./chunk-6ULR7N3T.js";
288
288
  import {
289
289
  quietSqliteWarning,
290
290
  storeCapable
291
- } from "./chunk-NZGI74GS.js";
291
+ } from "./chunk-PQUZ2YDC.js";
292
292
  import {
293
293
  PRAGMAS,
294
294
  TIME_LIMIT_FUNCTION,
295
295
  TimeLimitReached,
296
296
  isQueryOnly
297
- } from "./chunk-JUKAIXKY.js";
297
+ } from "./chunk-2Q2XIXDL.js";
298
298
  import {
299
299
  array,
300
300
  boolean,
@@ -320,7 +320,7 @@ import {
320
320
  CliError,
321
321
  isCliError,
322
322
  singleLine
323
- } from "./chunk-BUGROVF3.js";
323
+ } from "./chunk-HM6AMYHR.js";
324
324
  import {
325
325
  SQLiteTable,
326
326
  TableAliasProxyHandler,
@@ -345,7 +345,7 @@ import {
345
345
  sql,
346
346
  sqliteTable,
347
347
  text
348
- } from "./chunk-GRFICQTZ.js";
348
+ } from "./chunk-DG4RBKIV.js";
349
349
  import {
350
350
  __commonJS,
351
351
  __name,
@@ -10089,7 +10089,7 @@ var require_cjs = __commonJS({
10089
10089
  }
10090
10090
  });
10091
10091
 
10092
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/account-store.js
10092
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/account-store.js
10093
10093
  var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
10094
10094
  const methods = whole;
10095
10095
  return Object.fromEntries(Object.keys(keyed).map((name) => [
@@ -10217,7 +10217,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
10217
10217
  };
10218
10218
  }, "bindAccount");
10219
10219
 
10220
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
10220
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
10221
10221
  var IndexBuilderOn = class {
10222
10222
  static {
10223
10223
  __name(this, "IndexBuilderOn");
@@ -10412,7 +10412,7 @@ function alias(table, alias2) {
10412
10412
  }
10413
10413
  __name(alias, "alias");
10414
10414
 
10415
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
10415
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
10416
10416
  var ENTITY_TABLES = {
10417
10417
  ...RECORD_TABLES,
10418
10418
  account: "accounts",
@@ -10439,6 +10439,7 @@ var ENTITY_TABLES = {
10439
10439
  message: "messages",
10440
10440
  note: "notes",
10441
10441
  place: "places",
10442
+ post: "content_posts",
10442
10443
  tag: "canonical_tags",
10443
10444
  task: "tasks"
10444
10445
  };
@@ -10451,7 +10452,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
10451
10452
  return { table, pointer, type, count: count2, known: known2 };
10452
10453
  }).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
10453
10454
 
10454
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/identity-links.js
10455
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/identity-links.js
10455
10456
  var IDENTITY_LINK_KIND = "identity_link";
10456
10457
  var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
10457
10458
  var LINK_WEAKNESSES = [
@@ -10464,7 +10465,7 @@ var LINK_WEAKNESSES = [
10464
10465
  "not-own-number"
10465
10466
  ];
10466
10467
 
10467
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
10468
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
10468
10469
  var SEPARATIONS = ["unlink", "split", "undo-merge"];
10469
10470
  var mergeSql = /* @__PURE__ */ __name((event2) => `(${event2}.from_person_id IS NOT NULL AND ${event2}.from_person_id <> ${event2}.to_person_id AND ${event2}.method NOT IN (${SEPARATIONS.map((method) => `'${method}'`).join(", ")}) AND NOT EXISTS (SELECT 1 FROM identity_link_events stay WHERE stay.to_person_id = ${event2}.from_person_id AND stay.identity_id <> ${event2}.identity_id AND stay.id < ${event2}.id AND stay.id = (SELECT max(s.id) FROM identity_link_events s WHERE s.identity_id = stay.identity_id AND s.id < ${event2}.id) AND NOT EXISTS (SELECT 1 FROM identity_link_events went WHERE went.identity_id = stay.identity_id AND went.from_person_id = ${event2}.from_person_id AND went.to_person_id = ${event2}.to_person_id AND went.id = (SELECT min(w.id) FROM identity_link_events w WHERE w.identity_id = stay.identity_id AND w.id > ${event2}.id))))`, "mergeSql");
10470
10471
  var mergedAwaySql = /* @__PURE__ */ __name((person2) => `(${person2}.owner = 0 AND NOT EXISTS (SELECT 1 FROM identity_links ml WHERE ml.person_id = ${person2}.id) AND EXISTS (SELECT 1 FROM identity_link_events me WHERE me.from_person_id = ${person2}.id AND ${mergeSql("me")}))`, "mergedAwaySql");
@@ -10496,7 +10497,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
10496
10497
  }, "samePersons");
10497
10498
  var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
10498
10499
 
10499
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
10500
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
10500
10501
  var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
10501
10502
  var pkOf = /* @__PURE__ */ __name((database, ref3) => {
10502
10503
  const at2 = ref3.indexOf(":");
@@ -10603,13 +10604,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
10603
10604
  database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
10604
10605
  }, "forgetErasedLinks");
10605
10606
 
10606
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
10607
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
10607
10608
  var IDENTITY_SPLIT_KIND = "identity_split";
10608
10609
 
10609
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
10610
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
10610
10611
  var MAIL_FINDINGS_KIND = "mail_findings";
10611
10612
 
10612
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/decisions.js
10613
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/decisions.js
10613
10614
  var TASK_CLOSE_KIND = "task_close";
10614
10615
  var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
10615
10616
  var isOwnerOnlyKind = /* @__PURE__ */ __name((kind3) => kind3 === MAIL_FINDINGS_KIND || kind3 === MEETING_FINDINGS_KIND || kind3 === TASK_CLOSE_KIND || kind3 === SOURCE_REVIEW_KIND || kind3 === IDENTITY_LINK_KIND || kind3 === IDENTITY_SPLIT_KIND, "isOwnerOnlyKind");
@@ -10657,7 +10658,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
10657
10658
  }, "assertMayDecide");
10658
10659
  var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
10659
10660
 
10660
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/mail/score.js
10661
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/mail/score.js
10661
10662
  var import_disposable_email_domains_js = __toESM(require_dist(), 1);
10662
10663
  var import_tldts = __toESM(require_cjs(), 1);
10663
10664
  var FREE_MAIL = /* @__PURE__ */ new Set([
@@ -10687,7 +10688,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
10687
10688
  ]);
10688
10689
  var DAY_MS = 24 * 60 * 60 * 1e3;
10689
10690
 
10690
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
10691
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
10691
10692
  var BY_ADDRESS = "SELECT DISTINCT o.id FROM organizations o JOIN organization_identities oi ON oi.organization_id = o.id JOIN identities i ON i.id = oi.identity_id WHERE o.deleted_at IS NULL AND i.provider = 'email' AND ";
10692
10693
  var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
10693
10694
  var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
@@ -10712,10 +10713,10 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
10712
10713
  return id2;
10713
10714
  }, "organizationOfAddress");
10714
10715
 
10715
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
10716
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
10716
10717
  import { AsyncLocalStorage } from "node:async_hooks";
10717
10718
 
10718
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/journal.js
10719
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/journal.js
10719
10720
  import { existsSync, statSync } from "node:fs";
10720
10721
  var watched = /* @__PURE__ */ new WeakMap();
10721
10722
  var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
@@ -10741,7 +10742,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
10741
10742
  throw new CliError("conflict", "the store's journal file was deleted or replaced by another program while this command had the store open, so nothing more is written; `store recover` says what to do", { reason: "store.journal-replaced" });
10742
10743
  }, "checkJournal");
10743
10744
 
10744
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/write-events.js
10745
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/write-events.js
10745
10746
  var WRITE = /^\s*(?:WITH\b[\s\S]*?\)\s*)?(INSERT|REPLACE|UPDATE|DELETE)\b(?:\s+OR\s+[A-Za-z]+)?\s+(?:INTO\s+|FROM\s+)?(?:("?)(\w+)\2\.)?["`[]?(\w+)/i;
10746
10747
  var writeTarget = /* @__PURE__ */ __name((sql2) => {
10747
10748
  const match = WRITE.exec(sql2);
@@ -10821,7 +10822,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
10821
10822
  }, "committedWrites");
10822
10823
  var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
10823
10824
 
10824
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
10825
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
10825
10826
  var ARMS = [
10826
10827
  [
10827
10828
  "message",
@@ -10949,7 +10950,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
10949
10950
  return recomputed;
10950
10951
  }, "drainInvolvementQueue");
10951
10952
 
10952
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/mentions.js
10953
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/mentions.js
10953
10954
  import { domainToUnicode } from "node:url";
10954
10955
 
10955
10956
  // node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
@@ -20971,7 +20972,7 @@ var oa = /* @__PURE__ */ __name((e) => {
20971
20972
  }, "oa");
20972
20973
  var na = { parse: O, get: aa, isValid: oa };
20973
20974
 
20974
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
20975
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
20975
20976
  var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
20976
20977
  var ID = /^[\w-]{10,}$/;
20977
20978
  var trimUrl = /* @__PURE__ */ __name((url) => {
@@ -21013,7 +21014,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text8) => [...text8.matchAll(L
21013
21014
  return { url, documentId: googleDocumentId(url) };
21014
21015
  }), "googleDocumentLinks");
21015
21016
 
21016
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/places.js
21017
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/places.js
21017
21018
  var BEFORE = [
21018
21019
  [/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
21019
21020
  [/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
@@ -21273,7 +21274,7 @@ var findPlaces = /* @__PURE__ */ __name((text8) => {
21273
21274
  return found2.sort((a, b) => a.start - b.start);
21274
21275
  }, "findPlaces");
21275
21276
 
21276
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/mentions.js
21277
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/mentions.js
21277
21278
  var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
21278
21279
  var MENTION_VERSIONS = {
21279
21280
  phone: 1,
@@ -21449,7 +21450,7 @@ var exactlyOne = /* @__PURE__ */ __name((text8, options) => {
21449
21450
  return one2 && one2.start === 0 && one2.end === text8.length ? one2.value : void 0;
21450
21451
  }, "exactlyOne");
21451
21452
 
21452
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/first-names.js
21453
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/first-names.js
21453
21454
  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";
21454
21455
  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";
21455
21456
  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";
@@ -21457,7 +21458,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
21457
21458
  var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
21458
21459
  var NAME_WORDS = WORDS.split(" ");
21459
21460
 
21460
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/person-names.js
21461
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/person-names.js
21461
21462
  var LATIN_TO_CYRILLIC = {
21462
21463
  shch: "\u0449",
21463
21464
  sch: "\u0449",
@@ -21665,7 +21666,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text8, stem, taken) => {
21665
21666
  return found2;
21666
21667
  }, "findUnknownNames");
21667
21668
 
21668
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/attachments.js
21669
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/attachments.js
21669
21670
  var NOT_FILES = /* @__PURE__ */ new Set([
21670
21671
  "webpage",
21671
21672
  "share",
@@ -21706,7 +21707,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
21706
21707
  });
21707
21708
  }, "matchDownloads");
21708
21709
 
21709
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
21710
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
21710
21711
  var PRESET_VERSION = 1;
21711
21712
  var PRESETS = {
21712
21713
  password: {
@@ -21760,12 +21761,12 @@ var PRESETS = {
21760
21761
  }
21761
21762
  };
21762
21763
 
21763
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
21764
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
21764
21765
  var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
21765
21766
  var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
21766
21767
  var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
21767
21768
 
21768
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
21769
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
21769
21770
  var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
21770
21771
  var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
21771
21772
  var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
@@ -21789,7 +21790,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
21789
21790
  };
21790
21791
  }, "linkMatch");
21791
21792
 
21792
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
21793
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
21793
21794
  var SETTING = "phoneCountries";
21794
21795
  var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
21795
21796
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
@@ -21820,7 +21821,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
21820
21821
  return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
21821
21822
  }, "valueMatch");
21822
21823
 
21823
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
21824
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
21824
21825
  var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
21825
21826
  if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
21826
21827
  throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
@@ -21848,7 +21849,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
21848
21849
  return 2 * intersection2 / (aa2.size + bb.size);
21849
21850
  }, "vocabularySimilarity");
21850
21851
 
21851
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
21852
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
21852
21853
  import { createHash } from "node:crypto";
21853
21854
  var folded2 = /* @__PURE__ */ __name((name) => {
21854
21855
  try {
@@ -21914,7 +21915,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
21914
21915
  });
21915
21916
  }, "guardTagCreation");
21916
21917
 
21917
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
21918
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
21918
21919
  var invalid = /* @__PURE__ */ __name((message3) => {
21919
21920
  throw new CliError("validation_error", message3);
21920
21921
  }, "invalid");
@@ -21991,7 +21992,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
21991
21992
  };
21992
21993
  }, "createTagRedirectIndex");
21993
21994
 
21994
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
21995
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
21995
21996
  var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
21996
21997
  const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
21997
21998
  if (!row2)
@@ -22019,7 +22020,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
22019
22020
  return snapshot2;
22020
22021
  }, "tagRedirectSnapshot");
22021
22022
 
22022
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
22023
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
22023
22024
  import { createHash as createHash2 } from "node:crypto";
22024
22025
  var TASK_KEY_PREFIXES = {
22025
22026
  question: "Q",
@@ -22047,7 +22048,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
22047
22048
  return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
22048
22049
  }, "taskAccountOf");
22049
22050
 
22050
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
22051
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
22051
22052
  var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
22052
22053
  var REFERABLE = {
22053
22054
  ...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
@@ -22211,7 +22212,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
22211
22212
  return row2 ? String(row2.id ?? row2.key) : void 0;
22212
22213
  }, "taskIdOf");
22213
22214
 
22214
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
22215
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
22215
22216
  var toMs = /* @__PURE__ */ __name((iso17) => {
22216
22217
  if (iso17 === null || iso17 === void 0)
22217
22218
  return null;
@@ -22225,7 +22226,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
22225
22226
  var DELIVERY = { delivered: 1, read: 2 };
22226
22227
  var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
22227
22228
 
22228
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
22229
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
22229
22230
  var TAG_KINDS = ["tag", "topic"];
22230
22231
  var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
22231
22232
  var TAG_TYPE = {
@@ -22428,7 +22429,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
22428
22429
  return result;
22429
22430
  }, "tagsOf");
22430
22431
 
22431
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/trigram-match.js
22432
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/trigram-match.js
22432
22433
  var MOST_YO_SPELLINGS = 64;
22433
22434
  var yoSpellings = /* @__PURE__ */ __name((run) => {
22434
22435
  let spellings2 = [""];
@@ -22450,7 +22451,7 @@ var anyCaseGlob = /* @__PURE__ */ __name((word2) => `*${[...word2.normalize("NFC
22450
22451
  return forms2.size === 1 ? c : `[${[...forms2].join("")}]`;
22451
22452
  }).join("")}*`, "anyCaseGlob");
22452
22453
 
22453
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
22454
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
22454
22455
  var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
22455
22456
  var SPEECH = speech("att");
22456
22457
  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");
@@ -22938,7 +22939,7 @@ var FIELD_COMPILERS = {
22938
22939
  subject
22939
22940
  };
22940
22941
 
22941
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
22942
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
22942
22943
  var placeOf = /* @__PURE__ */ __name((database) => {
22943
22944
  const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
22944
22945
  const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
@@ -22954,7 +22955,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
22954
22955
  };
22955
22956
  }, "placeOf");
22956
22957
 
22957
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
22958
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
22958
22959
  var DRAIN_ON_WRITE = 500;
22959
22960
  var METHOD = "rules";
22960
22961
  var telegramLink = /* @__PURE__ */ __name((database) => {
@@ -23120,7 +23121,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
23120
23121
  return queued.length;
23121
23122
  }, "drainMentions");
23122
23123
 
23123
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
23124
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
23124
23125
  var indexRow = /* @__PURE__ */ __name((database, name) => {
23125
23126
  const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
23126
23127
  if (!exists2)
@@ -23128,7 +23129,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
23128
23129
  return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
23129
23130
  }, "indexRow");
23130
23131
 
23131
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
23132
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
23132
23133
  var INDEX = "message_stems";
23133
23134
  var SETTING2 = "searchStemmers";
23134
23135
  var DRAIN_ON_WRITE2 = 500;
@@ -23254,7 +23255,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
23254
23255
  };
23255
23256
  }, "stemmerCache");
23256
23257
 
23257
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
23258
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
23258
23259
  var rehearsal = new AsyncLocalStorage();
23259
23260
  var SQLITE_BUSY = 5;
23260
23261
  var pause = new Int32Array(new SharedArrayBuffer(4));
@@ -23397,7 +23398,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
23397
23398
  }
23398
23399
  }, "read");
23399
23400
 
23400
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
23401
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
23401
23402
  var FOLDED = [
23402
23403
  { table: "tasks", column: "title" },
23403
23404
  { table: "tasks", column: "close_reason" },
@@ -23434,7 +23435,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
23434
23435
  return filled;
23435
23436
  }, "fillFolded");
23436
23437
 
23437
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
23438
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
23438
23439
  import { createHash as createHash3 } from "node:crypto";
23439
23440
  var CHUNK_CHARS = 1200;
23440
23441
  var CHUNK_OVERLAP = 150;
@@ -23539,7 +23540,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
23539
23540
  return chunks2;
23540
23541
  }, "cutChunks");
23541
23542
 
23542
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/search/task-signature.js
23543
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/search/task-signature.js
23543
23544
  var DAY = 864e5;
23544
23545
  var CURRENCY = [
23545
23546
  [/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
@@ -23665,7 +23666,7 @@ var dueDayOf = /* @__PURE__ */ __name((text8, createdMs) => {
23665
23666
  return best?.day ?? null;
23666
23667
  }, "dueDayOf");
23667
23668
 
23668
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
23669
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
23669
23670
  var DAY2 = 864e5;
23670
23671
  var STOP_WORDS = new Set([
23671
23672
  // Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
@@ -23820,7 +23821,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
23820
23821
  ...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
23821
23822
  })).sort((a, b) => b.score - a.score), "rankCandidates");
23822
23823
 
23823
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
23824
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
23824
23825
  var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
23825
23826
  coalesce(CASE k.chunkable_type
23826
23827
  WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
@@ -23962,7 +23963,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
23962
23963
  }, "dropUnusedVectors");
23963
23964
  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");
23964
23965
 
23965
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
23966
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
23966
23967
  var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
23967
23968
  r.last_message_id, r.text_start, r.text_end FROM conversations c
23968
23969
  CROSS JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
@@ -24000,14 +24001,18 @@ var chunkFreshness = /* @__PURE__ */ __name(({ orm }, { conversationPk, firstMes
24000
24001
  }, "chunkFreshness");
24001
24002
  var purgeVectorHashes = /* @__PURE__ */ __name((context, hashes) => {
24002
24003
  const { orm } = context;
24003
- for (const hash2 of new Set(hashes)) {
24004
+ const unique2 = new Set(hashes);
24005
+ if (unique2.size === 0)
24006
+ return;
24007
+ const models = orm.all(sql`SELECT DISTINCT model FROM embeddings`).map(({ model }) => model);
24008
+ for (const hash2 of unique2) {
24004
24009
  let offset = 0;
24005
24010
  let valid = false;
24006
24011
  for (; ; ) {
24007
24012
  const candidates = orm.all(sql`SELECT k.chunkable_id AS conversation, r.first_message_id AS first,
24008
24013
  r.last_message_id AS last, r.text_start AS start, r.text_end AS end
24009
24014
  FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
24010
- JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
24015
+ JOIN conversations c ON +k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
24011
24016
  JOIN conversation_state s ON s.chat_id = c.chat_id AND s.current_build = c.build
24012
24017
  WHERE k.content_hash = ${hash2} ORDER BY k.chunkable_id, k.position LIMIT 100 OFFSET ${offset}`);
24013
24018
  valid = candidates.some(({ conversation: conversation2, first, last, start, end }) => {
@@ -24023,8 +24028,9 @@ var purgeVectorHashes = /* @__PURE__ */ __name((context, hashes) => {
24023
24028
  }
24024
24029
  }
24025
24030
  if (!valid)
24026
- orm.run(sql`DELETE FROM embeddings WHERE content_hash = ${hash2}
24027
- AND NOT EXISTS (SELECT 1 FROM chunks WHERE content_hash = ${hash2} AND chunkable_type <> 'conversation')`);
24031
+ for (const model of models)
24032
+ orm.run(sql`DELETE FROM embeddings WHERE model = ${model} AND content_hash = ${hash2}
24033
+ AND NOT EXISTS (SELECT 1 FROM chunks WHERE content_hash = ${hash2} AND chunkable_type <> 'conversation')`);
24028
24034
  }
24029
24035
  }, "purgeVectorHashes");
24030
24036
  var purgeVectorsOf = /* @__PURE__ */ __name((context, messagePk) => {
@@ -24094,7 +24100,7 @@ var dot = /* @__PURE__ */ __name((query, blob2) => {
24094
24100
  }, "dot");
24095
24101
  var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
24096
24102
  const { orm } = context;
24097
- const { chatKey, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, before: before2, personId } = filter;
24103
+ const { chatKey, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, before: before2, personId, fromOwner } = filter;
24098
24104
  const rows = /* @__PURE__ */ __name((page3) => orm.all(
24099
24105
  // CROSS JOIN keeps the chunks first, so each page walks their key; led by the vectors, SQLite re-read and
24100
24106
  // sorted every one of them per page — 1.3 s against 140 ms at 42k chunks (bench/embeddings/README.md).
@@ -24110,6 +24116,7 @@ var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
24110
24116
  ${projectId2 === void 0 ? sql`` : sql`AND k.project_id=${projectId2}`}
24111
24117
  ${before2 === void 0 ? sql`` : sql`AND k.occurred_at < ${before2}`}
24112
24118
  ${personId === void 0 ? sql`` : sql`AND EXISTS (SELECT 1 FROM conversation_messages pcm JOIN messages pm ON pm.id=pcm.message_id JOIN identity_links pil ON pil.identity_id=pm.sender_identity_id WHERE pcm.conversation_id=c.id AND pil.person_id=${personId})`}
24119
+ ${fromOwner ? sql`AND EXISTS (SELECT 1 FROM conversation_messages om JOIN messages m ON m.id = om.message_id WHERE om.conversation_id = c.id AND m.outgoing = 1 AND m.id BETWEEN r.first_message_id AND r.last_message_id)` : sql``}
24113
24120
  ${chatKey === void 0 ? sql`AND ch.searchable = 1` : sql`AND c.chat_id = ${chatKey}`}
24114
24121
  ${since === void 0 ? sql`` : sql`AND k.occurred_at >= ${since}`}
24115
24122
  ${exclude === void 0 ? sql`` : sql`AND c.id <> ${exclude}`}
@@ -24136,7 +24143,7 @@ var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
24136
24143
  }, "keepBest");
24137
24144
  const ranked = /* @__PURE__ */ __name((found2) => found2.sort((a, b) => b.score - a.score).slice(0, limit), "ranked");
24138
24145
  const plain2 = /* @__PURE__ */ __name((found2) => found2.map(({ id: _, ...chunk }) => chunk), "plain");
24139
- const indexable = personId === void 0 && projectId2 === void 0 && scope3 === void 0 && conversations2 === void 0;
24146
+ const indexable = personId === void 0 && projectId2 === void 0 && scope3 === void 0 && conversations2 === void 0 && !fromOwner;
24140
24147
  const indexed = indexable && searchIndex(context.database, model, {
24141
24148
  kind: "conversation",
24142
24149
  account: accountPk2,
@@ -24154,6 +24161,21 @@ var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
24154
24161
  });
24155
24162
  if (indexed)
24156
24163
  return plain2(indexed);
24164
+ if (fromOwner) {
24165
+ const ids3 = orm.all(sql`SELECT DISTINCT k.id FROM messages m
24166
+ JOIN conversation_messages om ON om.message_id = m.id
24167
+ JOIN conversations c ON c.id = om.conversation_id
24168
+ JOIN conversation_state s ON s.chat_id = c.chat_id AND s.current_build = c.build
24169
+ JOIN chats ch ON ch.id = c.chat_id
24170
+ JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
24171
+ JOIN chunk_messages r ON r.chunk_id = k.id AND m.id BETWEEN r.first_message_id AND r.last_message_id
24172
+ WHERE m.outgoing = 1 AND ch.account_id = ${accountPk2}
24173
+ ${chatKey === void 0 ? sql`AND ch.searchable = 1` : sql`AND c.chat_id = ${chatKey}`}`).map(({ id: id2 }) => id2);
24174
+ const best2 = /* @__PURE__ */ new Map();
24175
+ for (const row2 of rows({ ids: ids3 }))
24176
+ keepBest(best2, row2);
24177
+ return plain2(ranked([...best2.values()]));
24178
+ }
24157
24179
  const best = /* @__PURE__ */ new Map();
24158
24180
  let after2 = { conversation: 0, ordinal: -1 };
24159
24181
  for (; ; ) {
@@ -24286,7 +24308,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
24286
24308
  Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
24287
24309
  ])), "vectorCounts");
24288
24310
 
24289
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
24311
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
24290
24312
  var DOCUMENT_PICTURE = "document_picture";
24291
24313
  var SCAN_PAGE2 = 5e3;
24292
24314
  var idOf = /* @__PURE__ */ __name((ref3) => {
@@ -24349,12 +24371,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
24349
24371
  }, "nearestPictures")
24350
24372
  }), "documentPicturesOver");
24351
24373
 
24352
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
24374
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
24353
24375
  var noteIndexText = /* @__PURE__ */ __name((title2, text8) => title2 ? `${title2}
24354
24376
 
24355
24377
  ${text8}` : text8, "noteIndexText");
24356
24378
 
24357
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
24379
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
24358
24380
  var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
24359
24381
  var ENRICHMENT_POSITION = 1e6;
24360
24382
  var EMAIL_ENRICHMENT = "email_enrichment";
@@ -24448,7 +24470,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
24448
24470
  }), "clear")
24449
24471
  }), "enrichmentsOver");
24450
24472
 
24451
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
24473
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
24452
24474
  var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
24453
24475
  const literal4 = escaped2 ?? plain2 ?? "";
24454
24476
  return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
@@ -24524,7 +24546,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
24524
24546
  var queryFilter = /* @__PURE__ */ __name((ast, columns2, options) => compile(ast.root, columns2, options), "queryFilter");
24525
24547
  var bound2 = /* @__PURE__ */ __name(({ sql: text8, params }) => sql.join(text8.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
24526
24548
 
24527
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
24549
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
24528
24550
  var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
24529
24551
  var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
24530
24552
  var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
@@ -24614,7 +24636,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
24614
24636
  });
24615
24637
  }, "linkMeeting");
24616
24638
 
24617
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
24639
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
24618
24640
  var MAX_TITLE = 120;
24619
24641
  var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
24620
24642
  var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
@@ -24676,7 +24698,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
24676
24698
  }
24677
24699
  }, "fillFoundTaskTitles");
24678
24700
 
24679
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
24701
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
24680
24702
  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), ''))";
24681
24703
  var UNSEARCHED_EVENT_TYPES = [
24682
24704
  "working-location",
@@ -24923,7 +24945,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
24923
24945
  return true;
24924
24946
  }, "resetNoteIndex");
24925
24947
 
24926
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
24948
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
24927
24949
  var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
24928
24950
  var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
24929
24951
  for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf2))) {
@@ -24942,7 +24964,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
24942
24964
  }
24943
24965
  }, "resolvePersonLinks");
24944
24966
 
24945
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
24967
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
24946
24968
  var canonicalTags = sqliteTable("canonical_tags", {
24947
24969
  id: integer("id").primaryKey(),
24948
24970
  name: text("name").notNull().unique(),
@@ -24951,7 +24973,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
24951
24973
  updatedAt: integer("updated_at").notNull()
24952
24974
  });
24953
24975
 
24954
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
24976
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
24955
24977
  var linkRevisions = sqliteTable("link_revisions", {
24956
24978
  id: integer("id").primaryKey(),
24957
24979
  linkId: integer("link_id").notNull(),
@@ -24963,7 +24985,7 @@ var linkRevisions = sqliteTable("link_revisions", {
24963
24985
  createdAt: integer("created_at").notNull()
24964
24986
  }, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
24965
24987
 
24966
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
24988
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
24967
24989
  var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
24968
24990
  sourceKey: text("source_key").notNull(),
24969
24991
  collection: text("collection").notNull(),
@@ -24973,13 +24995,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
24973
24995
  createdAt: integer("created_at").notNull()
24974
24996
  }, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
24975
24997
 
24976
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
24998
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
24977
24999
  var documentIndexPending = sqliteTable("document_index_pending", {
24978
25000
  id: integer("id").notNull(),
24979
25001
  indexableType: text("indexable_type").notNull()
24980
25002
  }, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
24981
25003
 
24982
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
25004
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
24983
25005
  var decisionRequests = sqliteTable("decision_requests", {
24984
25006
  id: integer("id").primaryKey(),
24985
25007
  tokenDigest: text("token_digest").notNull().unique(),
@@ -24999,7 +25021,7 @@ var decisionRequests = sqliteTable("decision_requests", {
24999
25021
  index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
25000
25022
  ]);
25001
25023
 
25002
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
25024
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
25003
25025
  var enrichments = sqliteTable("enrichments", {
25004
25026
  subjectType: text("subject_type").notNull(),
25005
25027
  subjectId: integer("subject_id").notNull(),
@@ -25011,7 +25033,7 @@ var enrichments = sqliteTable("enrichments", {
25011
25033
  createdAt: integer("created_at").notNull()
25012
25034
  }, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
25013
25035
 
25014
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
25036
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
25015
25037
  var templates = sqliteTable("templates", {
25016
25038
  key: text("key").notNull(),
25017
25039
  channel: text("channel").notNull(),
@@ -25033,7 +25055,7 @@ var templatesHistory = sqliteTable("templates_history", {
25033
25055
  index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
25034
25056
  ]);
25035
25057
 
25036
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
25058
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
25037
25059
  var links = sqliteTable("links", {
25038
25060
  id: integer("id").primaryKey(),
25039
25061
  fromType: text("from_type").notNull(),
@@ -25064,7 +25086,7 @@ var links = sqliteTable("links", {
25064
25086
  index("links_by_to_type_to_id").on(table.toType, table.toId)
25065
25087
  ]);
25066
25088
 
25067
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
25089
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
25068
25090
  var tagRedirects = sqliteTable("tag_redirects", {
25069
25091
  sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
25070
25092
  survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
@@ -25090,7 +25112,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
25090
25112
  index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
25091
25113
  ]);
25092
25114
 
25093
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
25115
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
25094
25116
  var accounts = sqliteTable("accounts", {
25095
25117
  id: integer("id").primaryKey(),
25096
25118
  provider: text("provider").notNull(),
@@ -27167,13 +27189,97 @@ var trackerItems = sqliteTable("tracker_items", {
27167
27189
  unique().on(table.accountId, table.kind, table.externalId),
27168
27190
  index("tracker_items_by_account_id_kind_parent_id").on(table.accountId, table.kind, table.parentId)
27169
27191
  ]);
27192
+ var contentChannels = sqliteTable("content_channels", {
27193
+ id: integer("id").primaryKey(),
27194
+ accountId: integer("account_id").notNull().references(() => accounts.id),
27195
+ externalId: text("external_id").notNull(),
27196
+ kind: text("kind").notNull(),
27197
+ network: text("network").notNull(),
27198
+ name: text("name").notNull(),
27199
+ url: text("url"),
27200
+ handle: text("handle"),
27201
+ deletedAt: integer("deleted_at"),
27202
+ syncedAt: integer("synced_at").notNull()
27203
+ }, (table) => [unique().on(table.accountId, table.externalId)]);
27204
+ var contentAuthors = sqliteTable("content_authors", {
27205
+ id: integer("id").primaryKey(),
27206
+ accountId: integer("account_id").notNull().references(() => accounts.id),
27207
+ externalId: text("external_id").notNull(),
27208
+ name: text("name").notNull(),
27209
+ email: text("email"),
27210
+ data: text("data").notNull(),
27211
+ sourceUpdatedAt: integer("source_updated_at"),
27212
+ deletedAt: integer("deleted_at"),
27213
+ syncedAt: integer("synced_at").notNull()
27214
+ }, (table) => [unique().on(table.accountId, table.externalId)]);
27215
+ var contentTerms = sqliteTable("content_terms", {
27216
+ id: integer("id").primaryKey(),
27217
+ accountId: integer("account_id").notNull().references(() => accounts.id),
27218
+ externalId: text("external_id").notNull(),
27219
+ kind: text("kind").notNull(),
27220
+ name: text("name").notNull(),
27221
+ slug: text("slug"),
27222
+ parentId: text("parent_id"),
27223
+ tagId: integer("tag_id").references(() => canonicalTags.id),
27224
+ data: text("data").notNull(),
27225
+ sourceUpdatedAt: integer("source_updated_at"),
27226
+ deletedAt: integer("deleted_at"),
27227
+ syncedAt: integer("synced_at").notNull()
27228
+ }, (table) => [unique().on(table.accountId, table.externalId), index("content_terms_by_tag_id").on(table.tagId)]);
27229
+ var contentPosts = sqliteTable("content_posts", {
27230
+ id: integer("id").primaryKey(),
27231
+ accountId: integer("account_id").notNull().references(() => accounts.id),
27232
+ externalId: text("external_id").notNull(),
27233
+ channelId: text("channel_id"),
27234
+ type: text("type").notNull(),
27235
+ title: text("title"),
27236
+ titleFolded: text("title_folded").notNull(),
27237
+ body: text("body"),
27238
+ contentHash: text("content_hash").notNull(),
27239
+ status: text("status").notNull(),
27240
+ publishedAt: integer("published_at"),
27241
+ scheduledFor: integer("scheduled_for"),
27242
+ sourceCreatedAt: integer("source_created_at"),
27243
+ sourceUpdatedAt: integer("source_updated_at"),
27244
+ version: text("version"),
27245
+ normalizedText: text("normalized_text").notNull(),
27246
+ data: text("data").notNull(),
27247
+ deletedAt: integer("deleted_at"),
27248
+ syncedAt: integer("synced_at").notNull()
27249
+ }, (table) => [
27250
+ unique().on(table.accountId, table.externalId),
27251
+ index("content_posts_by_account_id_status").on(table.accountId, table.status),
27252
+ index("content_posts_by_account_id_published_at").on(table.accountId, table.publishedAt)
27253
+ ]);
27254
+ var contentPostRevisions = sqliteTable("content_post_revisions", {
27255
+ id: integer("id").primaryKey(),
27256
+ postId: integer("post_id").notNull().references(() => contentPosts.id),
27257
+ title: text("title"),
27258
+ body: text("body"),
27259
+ status: text("status").notNull(),
27260
+ contentHash: text("content_hash").notNull(),
27261
+ version: text("version"),
27262
+ reason: text("reason").notNull(),
27263
+ createdAt: integer("created_at").notNull()
27264
+ }, (table) => [index("content_post_revisions_by_post_id_created_at").on(table.postId, table.createdAt)]);
27265
+ var contentMetrics = sqliteTable("content_metrics", {
27266
+ id: integer("id").primaryKey(),
27267
+ postId: integer("post_id").notNull().references(() => contentPosts.id),
27268
+ at: integer("at").notNull(),
27269
+ views: integer("views"),
27270
+ reactions: integer("reactions"),
27271
+ comments: integer("comments"),
27272
+ shares: integer("shares"),
27273
+ clicks: integer("clicks"),
27274
+ raw: text("raw")
27275
+ }, (table) => [index("content_metrics_by_post_id_at").on(table.postId, table.at)]);
27170
27276
  var storeSettings = sqliteTable("store_settings", {
27171
27277
  key: text("key").primaryKey(),
27172
27278
  value: text("value").notNull(),
27173
27279
  at: integer("at").notNull()
27174
27280
  });
27175
27281
 
27176
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
27282
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
27177
27283
  var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
27178
27284
  if (phones2 === void 0 && emails3 === void 0)
27179
27285
  return void 0;
@@ -27419,7 +27525,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
27419
27525
  }, "meetingIdentityPk");
27420
27526
  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");
27421
27527
 
27422
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
27528
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
27423
27529
  var identitiesOf = /* @__PURE__ */ __name(({ database }, person2) => database.prepare("SELECT identity_id AS pk FROM identity_links WHERE person_id = ?").all(person2).map(({ pk }) => Number(pk)), "identitiesOf");
27424
27530
  var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
27425
27531
  AND (moved.from_person_id IN (SELECT value FROM json_each(?))
@@ -27434,7 +27540,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
27434
27540
  var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
27435
27541
  var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
27436
27542
 
27437
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
27543
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
27438
27544
  var MESSAGE_FIELDS = {
27439
27545
  pk: messages.id,
27440
27546
  nativeId: messages.externalId,
@@ -27614,7 +27720,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
27614
27720
  storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
27615
27721
  }), "chatActivity");
27616
27722
 
27617
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
27723
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
27618
27724
  var HIT_FIELDS = {
27619
27725
  ...MESSAGE_FIELDS,
27620
27726
  chatTitle: sql`${chats.title}`.as("chat_title"),
@@ -27715,7 +27821,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
27715
27821
  };
27716
27822
  }, "directReplies");
27717
27823
 
27718
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
27824
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
27719
27825
  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");
27720
27826
  var required = /* @__PURE__ */ __name((context, ref3) => {
27721
27827
  const found2 = identityRow(context, ref3);
@@ -27928,7 +28034,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
27928
28034
  }, "mentioning");
27929
28035
  var escaped = /* @__PURE__ */ __name((text8) => text8.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
27930
28036
 
27931
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
28037
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
27932
28038
  var BOT_KINDS = ["agent", "rule", "script", "integration"];
27933
28039
  var ownerPerson = /* @__PURE__ */ __name((database) => {
27934
28040
  const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
@@ -27985,7 +28091,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
27985
28091
  return { sql: bot("pb.name = ?"), params: [by.bot] };
27986
28092
  }, "proposedBySql");
27987
28093
 
27988
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
28094
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
27989
28095
  var TABLES = { memory: "memories", fact: "facts" };
27990
28096
  var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
27991
28097
  var KEPT = 20;
@@ -28080,7 +28186,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
28080
28186
  return scrubbed;
28081
28187
  }, "scrubSourceReviews");
28082
28188
 
28083
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
28189
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
28084
28190
  var QUOTE_LIMIT = 500;
28085
28191
  var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
28086
28192
  var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
@@ -28359,11 +28465,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
28359
28465
  database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
28360
28466
  }, "deleteDocumentRow");
28361
28467
 
28362
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
28468
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
28363
28469
  var profilesOn = /* @__PURE__ */ __name((profiles, app, key2) => Object.entries(profiles[app] ?? {}).filter(([, saved]) => saved.provider === key2.provider && saved.account === key2.account).map(([name]) => name), "profilesOn");
28364
28470
  var oneLine = /* @__PURE__ */ __name((text8) => singleLine(text8.replace(/\s+/g, " ").trim()), "oneLine");
28365
28471
 
28366
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
28472
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
28367
28473
  var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
28368
28474
  const unique2 = [...new Set(ids3)];
28369
28475
  if (unique2.length === 0)
@@ -28452,7 +28558,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text8) => {
28452
28558
  }, "refEndsOf");
28453
28559
  var refAccountsOf = /* @__PURE__ */ __name((database, text8) => refEndsOf(database, text8)?.flat(), "refAccountsOf");
28454
28560
 
28455
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
28561
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
28456
28562
  var EXCERPT_CHARS = 280;
28457
28563
  var TITLE_CHARS = 120;
28458
28564
  var MEMORY_TITLE_CHARS = 80;
@@ -28876,7 +28982,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
28876
28982
  ends: /* @__PURE__ */ __name(async (text8) => refEndsOf(context.database, text8), "ends")
28877
28983
  }), "refsStoreOver");
28878
28984
 
28879
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
28985
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
28880
28986
  var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
28881
28987
  ref: ref3,
28882
28988
  kind: read2.kind,
@@ -28914,7 +29020,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
28914
29020
  });
28915
29021
  }, "evidenceSourcesOf");
28916
29022
 
28917
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/attachments/limits.js
29023
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/attachments/limits.js
28918
29024
  var MAX_FILE_BYTES = 50 * 1024 * 1024;
28919
29025
  var MAX_TEXT_CHARS = 2e6;
28920
29026
  var ATTACHMENT_LIMIT_ENV = [
@@ -28940,7 +29046,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
28940
29046
  return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
28941
29047
  }, "pdfPreviewLimits");
28942
29048
 
28943
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/ulid.js
29049
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/ulid.js
28944
29050
  import { randomBytes } from "node:crypto";
28945
29051
  var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
28946
29052
  var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
@@ -28953,7 +29059,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
28953
29059
  return time3 + random;
28954
29060
  }, "ulid");
28955
29061
 
28956
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
29062
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
28957
29063
  var FOLDED_FIELDS = ["title", "site", "language", "author"];
28958
29064
  var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
28959
29065
  if (!meta && !sections?.length)
@@ -28974,11 +29080,11 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
28974
29080
  return typeof language === "string" && language !== "" ? language : null;
28975
29081
  }, "languageOf");
28976
29082
 
28977
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note.js
29083
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note.js
28978
29084
  var LIVE3 = "f.deleted_at IS NULL AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1";
28979
29085
  var fileNoteRow = /* @__PURE__ */ __name((database, account, local, path) => database.prepare(local ? `SELECT d.*, f.account_id AS account_id, f.external_id 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 WHERE f.account_id = ? AND f.external_id = ? AND ${LIVE3} ORDER BY d.created_at, d.id LIMIT 1` : `SELECT d.*, f.account_id AS account_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM documents d JOIN files f ON f.document_id = d.id AND f.account_id = d.account_id WHERE d.account_id = ? AND d.external_id = ? AND ${LIVE3} LIMIT 1`).get(account, path), "fileNoteRow");
28980
29086
 
28981
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
29087
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
28982
29088
  var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
28983
29089
  var objectOf = /* @__PURE__ */ __name((value) => {
28984
29090
  if (isObject2(value))
@@ -29225,7 +29331,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
29225
29331
  };
29226
29332
  }, "filesStoreOver");
29227
29333
 
29228
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
29334
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
29229
29335
  var IMPORTED_DOCUMENT_QUERY = defineQuery({
29230
29336
  entity: "document",
29231
29337
  backend: "sql",
@@ -29271,7 +29377,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
29271
29377
  return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2, { zone: timezoneOf() });
29272
29378
  }, "importedDocumentWhere");
29273
29379
 
29274
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
29380
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
29275
29381
  var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
29276
29382
  database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
29277
29383
  VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
@@ -29279,7 +29385,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
29279
29385
  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);
29280
29386
  }, "reviewLink");
29281
29387
 
29282
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
29388
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
29283
29389
  var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
29284
29390
  var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
29285
29391
  var hasBothEnds = /* @__PURE__ */ __name((link3) => link3.from !== null && link3.to !== null, "hasBothEnds");
@@ -29313,7 +29419,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
29313
29419
  };
29314
29420
  }, "linkOf");
29315
29421
 
29316
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
29422
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
29317
29423
  var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
29318
29424
  const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
29319
29425
  const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
@@ -29334,7 +29440,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
29334
29440
  return changed;
29335
29441
  }, "dateFileNotes");
29336
29442
 
29337
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
29443
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
29338
29444
  var textOf2 = /* @__PURE__ */ __name((text8, what, max = 1e5, allowEmpty = false) => {
29339
29445
  const value = text8.trim();
29340
29446
  if (!value && !allowEmpty || value.length > max)
@@ -29347,7 +29453,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
29347
29453
  return value;
29348
29454
  }, "oneOf");
29349
29455
 
29350
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
29456
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
29351
29457
  var NOTE_FORMATS = ["obsidian", "markdown"];
29352
29458
  var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
29353
29459
  var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
@@ -29869,10 +29975,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
29869
29975
  };
29870
29976
  }, "notesStoreOver");
29871
29977
 
29872
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
29978
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
29873
29979
  var pageOfRows = /* @__PURE__ */ __name((rows, limit, offset = 0) => rows.length > limit ? { items: rows.slice(0, limit), hasMore: true, nextOffset: offset + limit } : { items: rows, hasMore: false }, "pageOfRows");
29874
29980
 
29875
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
29981
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
29876
29982
  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";
29877
29983
  var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
29878
29984
  var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -30137,7 +30243,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
30137
30243
  };
30138
30244
  }, "memoriesStoreOver");
30139
30245
 
30140
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
30246
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
30141
30247
  var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
30142
30248
  var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
30143
30249
  throw new CliError(code, message3, { reason });
@@ -30285,7 +30391,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
30285
30391
  return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
30286
30392
  }, "reviewedRowsOver");
30287
30393
 
30288
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
30394
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
30289
30395
  var MAX_LINES = 500;
30290
30396
  var PARENTS = {
30291
30397
  invoice: {
@@ -30385,7 +30491,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
30385
30491
  return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
30386
30492
  }, "moneyLinesOver");
30387
30493
 
30388
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
30494
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
30389
30495
  var COUNTED = {
30390
30496
  confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
30391
30497
  // A proposed refund promises nothing back yet, so it must not free room an import could then fill.
@@ -30460,7 +30566,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
30460
30566
  return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
30461
30567
  }, "refundRulesOver");
30462
30568
 
30463
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
30569
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
30464
30570
  var FINANCE_TYPES = ["invoice", "payment"];
30465
30571
  var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
30466
30572
  var PAID = netPaidSql("i.id");
@@ -30864,7 +30970,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
30864
30970
  };
30865
30971
  }, "financeStoreOver");
30866
30972
 
30867
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
30973
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
30868
30974
  var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
30869
30975
  throw new CliError("validation_error", message3, { reason });
30870
30976
  }, "refuse");
@@ -30942,7 +31048,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
30942
31048
  };
30943
31049
  }, "paymentEntriesOver");
30944
31050
 
30945
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
31051
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
30946
31052
  var EVIDENCE_FINDINGS_KIND = "evidence_findings";
30947
31053
  var reference = /* @__PURE__ */ __name((raw) => {
30948
31054
  if (/^(document|note):[1-9]\d*$/.test(raw))
@@ -30969,7 +31075,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
30969
31075
  return valid;
30970
31076
  }, "validateEvidenceFindings");
30971
31077
 
30972
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
31078
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
30973
31079
  var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
30974
31080
  var PROPOSAL_VERDICTS = ["useful", "not_useful"];
30975
31081
  var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
@@ -31163,7 +31269,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
31163
31269
  };
31164
31270
  }, "proposedActionsStoreOver");
31165
31271
 
31166
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
31272
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
31167
31273
  var CONFIRMED = "proposal";
31168
31274
  var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
31169
31275
  const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
@@ -31515,7 +31621,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
31515
31621
  return { items, hasMore: rows.length > limit };
31516
31622
  }, "identityLinkRows");
31517
31623
 
31518
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
31624
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
31519
31625
  var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
31520
31626
  var parseMergeId = /* @__PURE__ */ __name((id2) => {
31521
31627
  const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
@@ -31618,7 +31724,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
31618
31724
  return recordOf(context, alone);
31619
31725
  }, "split");
31620
31726
 
31621
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
31727
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
31622
31728
  var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
31623
31729
  var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
31624
31730
  var planOf = /* @__PURE__ */ __name((context, input) => {
@@ -31795,7 +31901,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
31795
31901
  database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
31796
31902
  }, "forgetErasedSplits");
31797
31903
 
31798
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/test-data.js
31904
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/test-data.js
31799
31905
  var SEED_PEOPLE = [
31800
31906
  { name: "Owner", username: "owner" },
31801
31907
  { name: "Ann Lee", username: "ann" },
@@ -31812,7 +31918,7 @@ var RESERVED_ADDRESS_GLOBS = [
31812
31918
  ];
31813
31919
  var SEED_ID_GLOBS = ["person-[0-9]*"];
31814
31920
 
31815
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
31921
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
31816
31922
  var TEST_DATA_KIND = "test_data";
31817
31923
  var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
31818
31924
  var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
@@ -31881,7 +31987,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
31881
31987
  database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
31882
31988
  }, "forgetErasedTestData");
31883
31989
 
31884
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
31990
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
31885
31991
  var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
31886
31992
  provider,
31887
31993
  externalId: account,
@@ -31975,7 +32081,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
31975
32081
  AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
31976
32082
  }, "dropOrphanPeople");
31977
32083
 
31978
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
32084
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
31979
32085
  var HISTORY_KEY = "$history";
31980
32086
  var objectOf2 = /* @__PURE__ */ __name((text8) => {
31981
32087
  if (typeof text8 !== "string")
@@ -32051,7 +32157,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
32051
32157
  return rest;
32052
32158
  }, "withoutHistory");
32053
32159
 
32054
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
32160
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
32055
32161
  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");
32056
32162
  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");
32057
32163
  var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
@@ -32349,7 +32455,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
32349
32455
  }
32350
32456
  }, "replaceAutoTags");
32351
32457
 
32352
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
32458
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
32353
32459
  var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
32354
32460
  var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
32355
32461
  var MASKED_THROUGH = "bot_tokens_masked_through";
@@ -32389,7 +32495,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
32389
32495
  }, "maskStoredBotTokens");
32390
32496
  var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
32391
32497
 
32392
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/context/evidence.js
32498
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/context/evidence.js
32393
32499
  import { createHash as createHash4 } from "node:crypto";
32394
32500
  var CONTEXT_MAX_READ_BYTES = 262144;
32395
32501
  var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
@@ -32487,7 +32593,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
32487
32593
  return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
32488
32594
  }, "contextEvidenceRequest");
32489
32595
 
32490
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
32596
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
32491
32597
  var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
32492
32598
  var ACTIVITY = `
32493
32599
  SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
@@ -32617,7 +32723,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
32617
32723
  threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
32618
32724
  }), "mailActivity");
32619
32725
 
32620
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
32726
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
32621
32727
  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");
32622
32728
  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;
32623
32729
  var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
@@ -32698,7 +32804,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
32698
32804
  return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
32699
32805
  }, "mailCore");
32700
32806
 
32701
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
32807
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
32702
32808
  var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
32703
32809
  var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
32704
32810
  k.start_offset, k.end_offset, k.account_id, k.occurred_at,
@@ -32811,7 +32917,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
32811
32917
  return emails3 + threads;
32812
32918
  }, "drainEmailIndex");
32813
32919
 
32814
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
32920
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
32815
32921
  var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
32816
32922
  SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
32817
32923
  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,
@@ -32909,7 +33015,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
32909
33015
  var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
32910
33016
  SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
32911
33017
 
32912
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
33018
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
32913
33019
  var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
32914
33020
  emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
32915
33021
  last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
@@ -32959,7 +33065,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
32959
33065
  return threads.length;
32960
33066
  }, "markEmailsRestored");
32961
33067
 
32962
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
33068
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
32963
33069
  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
32964
33070
  FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
32965
33071
  WHERE p.account_id = ?
@@ -33019,7 +33125,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
33019
33125
  }, "indexedMailPieces");
33020
33126
  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");
33021
33127
 
33022
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
33128
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
33023
33129
  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");
33024
33130
  var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
33025
33131
  var ruleOf = /* @__PURE__ */ __name((row2) => ({
@@ -33086,7 +33192,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
33086
33192
  }
33087
33193
  }), "mailRulesOver");
33088
33194
 
33089
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
33195
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
33090
33196
  function checkMeetingCancelled(signal) {
33091
33197
  if (!signal?.aborted)
33092
33198
  return;
@@ -33097,7 +33203,7 @@ function checkMeetingCancelled(signal) {
33097
33203
  }
33098
33204
  __name(checkMeetingCancelled, "checkMeetingCancelled");
33099
33205
 
33100
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
33206
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
33101
33207
  var managerOf = /* @__PURE__ */ __name((database, meetingId) => {
33102
33208
  const found2 = database.prepare("SELECT p.display_name, i.name, l.person_id FROM meeting_participants p JOIN identities i ON i.id = p.identity_id LEFT JOIN identity_links l ON l.identity_id = p.identity_id WHERE p.meeting_id = ? AND p.role = 'manager' ORDER BY p.id LIMIT 1").get(meetingId);
33103
33209
  if (!found2)
@@ -33162,7 +33268,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
33162
33268
  createdAt: Number(row2.created_at)
33163
33269
  }), "transcriptRowOf");
33164
33270
 
33165
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
33271
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
33166
33272
  var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
33167
33273
  var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
33168
33274
  var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
@@ -33329,7 +33435,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
33329
33435
  }
33330
33436
  }), "meetingReadsOver");
33331
33437
 
33332
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
33438
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
33333
33439
  var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
33334
33440
  const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
33335
33441
  const params = [input.accountId];
@@ -33372,7 +33478,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
33372
33478
  return { clauses, params };
33373
33479
  }, "meetingSelectionSql");
33374
33480
 
33375
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-calls.js
33481
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-calls.js
33376
33482
  var MOST_CALLS = 2e5;
33377
33483
  var parsed3 = /* @__PURE__ */ __name((value) => {
33378
33484
  if (typeof value !== "string")
@@ -33427,7 +33533,7 @@ var meetingCallsOver = /* @__PURE__ */ __name(({ database }) => ({
33427
33533
  }
33428
33534
  }), "meetingCallsOver");
33429
33535
 
33430
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
33536
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
33431
33537
  var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
33432
33538
  async meetingChatLines(input) {
33433
33539
  checkMeetingCancelled(input.signal);
@@ -33455,7 +33561,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
33455
33561
  }
33456
33562
  }), "meetingChatLinesOver");
33457
33563
 
33458
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
33564
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
33459
33565
  var missing2 = /* @__PURE__ */ __name(() => {
33460
33566
  throw new CliError("not_found", "Meeting, participant or selected target not found");
33461
33567
  }, "missing");
@@ -33578,7 +33684,7 @@ function meetingContextLinksOver(context) {
33578
33684
  }
33579
33685
  __name(meetingContextLinksOver, "meetingContextLinksOver");
33580
33686
 
33581
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
33687
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
33582
33688
  var TRANSCRIPT_ROLE = "transcript";
33583
33689
  var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
33584
33690
  var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
@@ -33652,7 +33758,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
33652
33758
  };
33653
33759
  }, "meetingTranscriptDocumentsOver");
33654
33760
 
33655
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
33761
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
33656
33762
  var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
33657
33763
  var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
33658
33764
  var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
@@ -33681,7 +33787,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
33681
33787
  return row2 ? summaryText(summaryOf2(row2)) : null;
33682
33788
  }, "indexedText");
33683
33789
 
33684
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
33790
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
33685
33791
  var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
33686
33792
  var meetingCurrentIndexRows = `
33687
33793
  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
@@ -33712,7 +33818,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
33712
33818
  }, "invalidateMeetingStems");
33713
33819
  var meetingStemmableText = /* @__PURE__ */ __name((text8) => text8.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
33714
33820
 
33715
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
33821
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
33716
33822
  function meetingHitIndexOver({ database, now: now2 }) {
33717
33823
  return {
33718
33824
  async indexSearch(original) {
@@ -33780,10 +33886,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
33780
33886
  }
33781
33887
  __name(meetingHitIndexOver, "meetingHitIndexOver");
33782
33888
 
33783
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
33889
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
33784
33890
  import { createHash as createHash5 } from "node:crypto";
33785
33891
 
33786
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/search/correct.js
33892
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/search/correct.js
33787
33893
  var SHORTEST_CORRECTION = 3;
33788
33894
  var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
33789
33895
  var editDistance = /* @__PURE__ */ __name((a, b, max) => {
@@ -33830,7 +33936,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
33830
33936
  return corrections;
33831
33937
  }, "correctWords");
33832
33938
 
33833
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/search/garbled.js
33939
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/search/garbled.js
33834
33940
  var SHORTEST_GARBLED = 4;
33835
33941
  var MOST_WIDENED = 64;
33836
33942
  var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
@@ -33922,7 +34028,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
33922
34028
  return found2.map((words4) => words4.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
33923
34029
  }, "widenWords");
33924
34030
 
33925
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
34031
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
33926
34032
  import { readFileSync } from "node:fs";
33927
34033
  var loaded;
33928
34034
  var dictionary = /* @__PURE__ */ __name(() => {
@@ -33981,7 +34087,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
33981
34087
  return false;
33982
34088
  }, "knownRussianWord");
33983
34089
 
33984
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
34090
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
33985
34091
  var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
33986
34092
  var MOST_WORDS = 128;
33987
34093
  var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
@@ -34237,7 +34343,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text8, stemmer2) => {
34237
34343
  return [...found2];
34238
34344
  }, "matchedMeetingWords");
34239
34345
 
34240
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
34346
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
34241
34347
  var fail = /* @__PURE__ */ __name((message3) => {
34242
34348
  throw new CliError("validation_error", message3);
34243
34349
  }, "fail");
@@ -34421,7 +34527,7 @@ function meetingHitSearchOver({ database }) {
34421
34527
  }
34422
34528
  __name(meetingHitSearchOver, "meetingHitSearchOver");
34423
34529
 
34424
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
34530
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
34425
34531
  var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
34426
34532
  async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
34427
34533
  positiveReadInteger(accountId, "accountId");
@@ -34453,7 +34559,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
34453
34559
  }
34454
34560
  }), "meetingLanguagesOver");
34455
34561
 
34456
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
34562
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
34457
34563
  import { createHash as createHash6 } from "node:crypto";
34458
34564
  var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
34459
34565
  if (value === void 0)
@@ -34546,7 +34652,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
34546
34652
  }
34547
34653
  }), "meetingParticipantSearchOver");
34548
34654
 
34549
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
34655
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
34550
34656
  var preparationQueries = {
34551
34657
  participants: {
34552
34658
  fields: "p.id, p.identity_id, p.display_name, l.person_id",
@@ -34596,7 +34702,7 @@ var preparationQueries = {
34596
34702
  }
34597
34703
  };
34598
34704
 
34599
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
34705
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
34600
34706
  var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
34601
34707
  async preparationContext(original) {
34602
34708
  const input = validateMeetingPreparationContext(original);
@@ -34637,7 +34743,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
34637
34743
  }
34638
34744
  }), "meetingPreparationContextOver");
34639
34745
 
34640
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
34746
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
34641
34747
  var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
34642
34748
  SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
34643
34749
  WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
@@ -34651,7 +34757,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
34651
34757
  JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
34652
34758
  )`, "preparationSubjects");
34653
34759
 
34654
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
34760
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
34655
34761
  var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
34656
34762
  async preparationKnowledge(original) {
34657
34763
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -34696,7 +34802,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
34696
34802
  }
34697
34803
  }), "meetingPreparationKnowledgeOver");
34698
34804
 
34699
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
34805
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
34700
34806
  var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
34701
34807
  async preparationNotes(original) {
34702
34808
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -34749,7 +34855,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
34749
34855
  }
34750
34856
  }), "meetingPreparationNotesOver");
34751
34857
 
34752
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
34858
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
34753
34859
  var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
34754
34860
  async relatedHistory(original) {
34755
34861
  const input = validateMeetingRelatedHistory(original);
@@ -34820,7 +34926,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
34820
34926
  }
34821
34927
  }), "meetingRelatedHistoryOver");
34822
34928
 
34823
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
34929
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
34824
34930
  var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
34825
34931
  var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
34826
34932
  var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
@@ -34901,7 +35007,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
34901
35007
  }
34902
35008
  }), "meetingReviewOver");
34903
35009
 
34904
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
35010
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
34905
35011
  var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
34906
35012
  var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
34907
35013
  if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
@@ -34955,7 +35061,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
34955
35061
  }
34956
35062
  }), "meetingSeriesHistoryOver");
34957
35063
 
34958
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
35064
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
34959
35065
  var MOST_ROWS = 5e5;
34960
35066
  var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
34961
35067
  EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
@@ -35024,7 +35130,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
35024
35130
  }
35025
35131
  }), "meetingStatsOver");
35026
35132
 
35027
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
35133
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
35028
35134
  var CYRILLIC_TO_LATIN = {
35029
35135
  \u0430: "a",
35030
35136
  \u0431: "b",
@@ -35246,7 +35352,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
35246
35352
  }
35247
35353
  var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
35248
35354
 
35249
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
35355
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
35250
35356
  var peopleByNameKey = /* @__PURE__ */ __name((database) => {
35251
35357
  const found2 = /* @__PURE__ */ new Map();
35252
35358
  for (const row2 of database.prepare("SELECT p.id, p.name FROM persons p WHERE p.owner = 0 AND p.name IS NOT NULL AND EXISTS (SELECT 1 FROM identity_links l WHERE l.person_id = p.id) ORDER BY p.id").all()) {
@@ -35362,7 +35468,7 @@ function* sharedTraces(database, a, b, name, except) {
35362
35468
  }
35363
35469
  __name(sharedTraces, "sharedTraces");
35364
35470
 
35365
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
35471
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
35366
35472
  var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
35367
35473
  var PERSON_BY = {
35368
35474
  // UNION, not OR: each branch reads its own index.
@@ -35385,7 +35491,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
35385
35491
  return [...found2].sort((a, b) => a - b);
35386
35492
  }, "personsByIdentifiers");
35387
35493
 
35388
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
35494
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
35389
35495
  var BY = "rule";
35390
35496
  var RULE = { bot: "rule", kind: "rule" };
35391
35497
  var MOST_SHARING = 6;
@@ -35834,7 +35940,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
35834
35940
  return pass.result;
35835
35941
  }, "linkPhones");
35836
35942
 
35837
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
35943
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
35838
35944
  var CURSOR_KEY = "meetings";
35839
35945
  var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
35840
35946
  id: Number(row2.id),
@@ -36441,7 +36547,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
36441
36547
  };
36442
36548
  }, "meetingStoreOver");
36443
36549
 
36444
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
36550
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
36445
36551
  var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
36446
36552
  const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
36447
36553
  return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
@@ -36467,7 +36573,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
36467
36573
  orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
36468
36574
  }, "release");
36469
36575
 
36470
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
36576
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
36471
36577
  var THREAD_COLUMNS = {
36472
36578
  subject: {
36473
36579
  where: /* @__PURE__ */ __name(({ value }) => ({
@@ -36484,7 +36590,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
36484
36590
  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);
36485
36591
  }, "threadRows");
36486
36592
 
36487
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
36593
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
36488
36594
  var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
36489
36595
  id: `email:${place.emailId}`,
36490
36596
  chatId: place.threadExternalId,
@@ -37026,7 +37132,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
37026
37132
  }
37027
37133
  }), "mailStoreOver");
37028
37134
 
37029
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/search/dictionary.js
37135
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/search/dictionary.js
37030
37136
  import { readFileSync as readFileSync2 } from "node:fs";
37031
37137
  var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
37032
37138
  var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
@@ -37116,7 +37222,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
37116
37222
  }, "knownWord");
37117
37223
  var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
37118
37224
 
37119
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
37225
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
37120
37226
  var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
37121
37227
  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");
37122
37228
  var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
@@ -37202,7 +37308,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
37202
37308
  return found2;
37203
37309
  }, "spokenTranscripts");
37204
37310
 
37205
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
37311
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
37206
37312
  var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
37207
37313
  var matchOf = /* @__PURE__ */ __name((node) => {
37208
37314
  const start = startOf(node);
@@ -37260,7 +37366,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
37260
37366
  });
37261
37367
  }, "placeHits");
37262
37368
 
37263
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
37369
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
37264
37370
  var GROUPS = {
37265
37371
  chat: {
37266
37372
  key: "m.chat_id",
@@ -37282,7 +37388,7 @@ var GROUPS = {
37282
37388
  }
37283
37389
  };
37284
37390
 
37285
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
37391
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
37286
37392
  var MESSAGES = {
37287
37393
  rows: "messages",
37288
37394
  threads: "chats",
@@ -37778,7 +37884,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
37778
37884
  };
37779
37885
  }, "runCompiled");
37780
37886
 
37781
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
37887
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
37782
37888
  function invalidMetadata() {
37783
37889
  throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
37784
37890
  }
@@ -37880,7 +37986,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
37880
37986
  };
37881
37987
  }), "counterTargets");
37882
37988
 
37883
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
37989
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
37884
37990
  var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
37885
37991
  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,
37886
37992
  att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
@@ -37999,7 +38105,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
37999
38105
  }));
38000
38106
  }, "attachmentViews");
38001
38107
 
38002
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
38108
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
38003
38109
  var transcript2 = /* @__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");
38004
38110
  var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text8, source2) => {
38005
38111
  const { orm, database, now: now2 } = context;
@@ -38037,7 +38143,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
38037
38143
  keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
38038
38144
  }, "intoVoiceAttachment");
38039
38145
 
38040
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
38146
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
38041
38147
  var FIELDS = [
38042
38148
  "threadExternalId",
38043
38149
  "senderIdentityId",
@@ -38361,7 +38467,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
38361
38467
  reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
38362
38468
  }, "writeDerivedReactions");
38363
38469
 
38364
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/keys.js
38470
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/keys.js
38365
38471
  var keysOver = /* @__PURE__ */ __name((context) => {
38366
38472
  const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
38367
38473
  const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
@@ -38382,7 +38488,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
38382
38488
  };
38383
38489
  }, "keysOver");
38384
38490
 
38385
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
38491
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
38386
38492
  var accountGroupsOf = /* @__PURE__ */ __name((database) => {
38387
38493
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
38388
38494
  if (!row2)
@@ -38429,7 +38535,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
38429
38535
  database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
38430
38536
  }, "forgetProfile");
38431
38537
 
38432
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
38538
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
38433
38539
  var DAY3 = 864e5;
38434
38540
  var COUNTERPART_LINK = `EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'event' AND l.from_id = e.id AND l.to_type = 'person' AND l.to_id = ? AND l.kind = ${linkKind("related-to")} AND l.role = '${COUNTERPART_ROLE}')`;
38435
38541
  var accountsOf = /* @__PURE__ */ __name((filter) => {
@@ -38545,7 +38651,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
38545
38651
  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);
38546
38652
  }, "listEvents");
38547
38653
 
38548
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
38654
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
38549
38655
  var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
38550
38656
  var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey, now: now2 }, refresh) => {
38551
38657
  const unseenBefore = unreferenced(database, "identities");
@@ -38602,7 +38708,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
38602
38708
  return { entries: entryIds.length, events: goneEvents.length };
38603
38709
  }, "forgetCalendarRows");
38604
38710
 
38605
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
38711
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
38606
38712
  var calendarOf = /* @__PURE__ */ __name((row2) => ({
38607
38713
  id: Number(row2.id),
38608
38714
  accountId: Number(row2.account_id),
@@ -39205,7 +39311,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
39205
39311
  };
39206
39312
  }, "eventStoreOver");
39207
39313
 
39208
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/account-purge.js
39314
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/account-purge.js
39209
39315
  var purgeAccount = /* @__PURE__ */ __name((context, accountKey) => {
39210
39316
  const { orm, database, now: now2 } = context;
39211
39317
  const unseenBefore = unreferenced(database, "identities");
@@ -39282,6 +39388,13 @@ var purgeAccount = /* @__PURE__ */ __name((context, accountKey) => {
39282
39388
  orm.run(sql`DELETE FROM crm_fields WHERE account_id = ${accountKey}`);
39283
39389
  orm.run(sql`DELETE FROM crm_files WHERE account_id = ${accountKey}`);
39284
39390
  orm.run(sql`DELETE FROM tracker_items WHERE account_id = ${accountKey}`);
39391
+ const postsOf = sql`(SELECT id FROM content_posts WHERE account_id = ${accountKey})`;
39392
+ orm.run(sql`DELETE FROM content_post_revisions WHERE post_id IN ${postsOf}`);
39393
+ orm.run(sql`DELETE FROM content_metrics WHERE post_id IN ${postsOf}`);
39394
+ orm.run(sql`DELETE FROM content_posts WHERE account_id = ${accountKey}`);
39395
+ orm.run(sql`DELETE FROM content_terms WHERE account_id = ${accountKey}`);
39396
+ orm.run(sql`DELETE FROM content_authors WHERE account_id = ${accountKey}`);
39397
+ orm.run(sql`DELETE FROM content_channels WHERE account_id = ${accountKey}`);
39285
39398
  const recordsOf = sql`(SELECT id FROM records WHERE account_id = ${accountKey})`;
39286
39399
  orm.run(sql`DELETE FROM record_relations WHERE record_id IN ${recordsOf} OR target_id IN ${recordsOf}`);
39287
39400
  orm.run(sql`DELETE FROM records WHERE account_id = ${accountKey}`);
@@ -39322,7 +39435,7 @@ var purgeCrmCopies = /* @__PURE__ */ __name((database, accountKey) => {
39322
39435
  run("DELETE FROM pipelines WHERE account_id = ?", accountKey);
39323
39436
  }, "purgeCrmCopies");
39324
39437
 
39325
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
39438
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
39326
39439
  var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
39327
39440
  var ownerNames = /* @__PURE__ */ __name(({ database }, owner) => database.prepare("SELECT i.name FROM identity_links l JOIN identities i ON i.id = l.identity_id WHERE l.person_id = ?").all(owner).map(({ name }) => new Set(nameSkeletons(displayName(typeof name === "string" ? name : null)))).filter((words4) => words4.size > 0), "ownerNames");
39328
39441
  var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
@@ -39381,7 +39494,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
39381
39494
  return personOf2(context, ref3);
39382
39495
  }, "linkToOwner");
39383
39496
 
39384
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
39497
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
39385
39498
  var PROVIDERS_SETTING = "providers";
39386
39499
  var storedProvidersOf = /* @__PURE__ */ __name((database) => {
39387
39500
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
@@ -39429,7 +39542,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
39429
39542
  });
39430
39543
  }, "registerProvider");
39431
39544
 
39432
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
39545
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
39433
39546
  var DAY4 = 864e5;
39434
39547
  var RECENTLY_CLOSED_MS = 14 * DAY4;
39435
39548
  var TEXT_LIMIT = 20;
@@ -39627,7 +39740,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
39627
39740
  };
39628
39741
  }, "taskSimilarityOver");
39629
39742
 
39630
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
39743
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
39631
39744
  var SETTING3 = "taskCategories";
39632
39745
  var savedTaskCategories = /* @__PURE__ */ __name((database) => {
39633
39746
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
@@ -39646,7 +39759,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
39646
39759
  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);
39647
39760
  }, "saveTaskCategories");
39648
39761
 
39649
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
39762
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
39650
39763
  var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
39651
39764
  var ALLOWED = "taskAgentClose";
39652
39765
  var MIN = "taskAgentCloseMin";
@@ -39702,7 +39815,7 @@ var SUGGESTION_COLUMNS = [
39702
39815
  ];
39703
39816
  var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
39704
39817
 
39705
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
39818
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
39706
39819
  var DEFAULT_FIRST_PASS_PER_CHAT = 0;
39707
39820
  var KEY = "taskFirstPassPerChat";
39708
39821
  var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
@@ -39722,7 +39835,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
39722
39835
  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);
39723
39836
  }, "saveFirstPassPerChat");
39724
39837
 
39725
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/external-links.js
39838
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/external-links.js
39726
39839
  var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
39727
39840
  var EXTERNAL_ID_CHARS = 200;
39728
39841
  var SOURCE_URL_CHARS = 2e3;
@@ -39749,7 +39862,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
39749
39862
  return text8;
39750
39863
  }, "sourceUrlOf");
39751
39864
 
39752
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
39865
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
39753
39866
  var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
39754
39867
  var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
39755
39868
  name,
@@ -40001,7 +40114,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
40001
40114
  var TASK_PEOPLE = `WITH merged AS (SELECT json_extract(value, '$[0]') AS id, json_extract(value, '$[1]') AS now FROM json_each(?)), counts AS (SELECT coalesce(m.now, a.assignee_id) AS person, count(DISTINCT t.id) AS n FROM task_assignments a JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL LEFT JOIN merged m ON m.id = a.assignee_id WHERE a.assignee_type = 'person' GROUP BY 1) SELECT p.id, p.name, p.owner, coalesce(c.n, 0) AS n FROM persons p LEFT JOIN counts c ON c.person = p.id WHERE NOT ${mergedAwaySql("p")} ORDER BY p.owner DESC, n DESC, p.name IS NULL, p.name COLLATE NOCASE, p.id LIMIT ?`;
40002
40115
  var mergedAssignees = /* @__PURE__ */ __name((database) => JSON.stringify(database.prepare(`SELECT DISTINCT a.assignee_id AS id FROM task_assignments a JOIN persons p ON p.id = a.assignee_id WHERE a.assignee_type = 'person' AND ${mergedAwaySql("p")}`).all().map(({ id: id2 }) => [Number(id2), currentPerson(database, Number(id2))])), "mergedAssignees");
40003
40116
 
40004
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
40117
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
40005
40118
  var authorNamed = /* @__PURE__ */ __name((database, row2) => {
40006
40119
  if (row2.author_type == null)
40007
40120
  return null;
@@ -40029,7 +40142,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
40029
40142
  return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
40030
40143
  }, "addComment");
40031
40144
 
40032
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
40145
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
40033
40146
  var TASK_RELATION_KINDS = [
40034
40147
  "blocked-by",
40035
40148
  "follow-up-of",
@@ -40159,7 +40272,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record3) => {
40159
40272
  };
40160
40273
  }, "taskRelationsStoreOver");
40161
40274
 
40162
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
40275
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
40163
40276
  var TASK_ROLES = ["assignee", "reviewer", "watcher"];
40164
40277
  var TASK_EVENT_KINDS = [
40165
40278
  "created",
@@ -40718,7 +40831,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
40718
40831
  };
40719
40832
  }, "workTasksOver");
40720
40833
 
40721
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
40834
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
40722
40835
  var taskCloseOver = /* @__PURE__ */ __name((context) => {
40723
40836
  const { database, now: now2 } = context;
40724
40837
  const liveRow = /* @__PURE__ */ __name((id2) => {
@@ -40767,7 +40880,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
40767
40880
  };
40768
40881
  }, "taskCloseOver");
40769
40882
 
40770
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
40883
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
40771
40884
  var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
40772
40885
  var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
40773
40886
  const { database, now: now2 } = context;
@@ -40986,7 +41099,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
40986
41099
  };
40987
41100
  }, "taskPairsOver");
40988
41101
 
40989
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
41102
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
40990
41103
  var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
40991
41104
  var TASK_STATS_SQL = {
40992
41105
  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 ? PROJECT_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
@@ -41025,7 +41138,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
41025
41138
  }, "statNames")
41026
41139
  }), "taskStatsOver");
41027
41140
 
41028
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
41141
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
41029
41142
  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";
41030
41143
  var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
41031
41144
  const key2 = inboxKey(account);
@@ -41241,7 +41354,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
41241
41354
  throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
41242
41355
  }, "oneOf");
41243
41356
 
41244
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/accounts.js
41357
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/accounts.js
41245
41358
  var accountAccountsOver = /* @__PURE__ */ __name((context) => {
41246
41359
  const { database } = context;
41247
41360
  const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
@@ -41311,7 +41424,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
41311
41424
  };
41312
41425
  }, "accountsStoreOver");
41313
41426
 
41314
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
41427
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
41315
41428
  var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
41316
41429
  var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
41317
41430
  const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
@@ -41335,7 +41448,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
41335
41448
  })), "keepDownloads");
41336
41449
  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");
41337
41450
 
41338
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/attachments.js
41451
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/attachments.js
41339
41452
  var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
41340
41453
  const { database } = context;
41341
41454
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -41392,7 +41505,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
41392
41505
  }, "keepAttachmentText")
41393
41506
  }), "attachmentsStoreOver");
41394
41507
 
41395
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
41508
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
41396
41509
  var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
41397
41510
  var pointerMover = /* @__PURE__ */ __name((context, type) => {
41398
41511
  const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
@@ -41577,7 +41690,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
41577
41690
  return done;
41578
41691
  }, "rekeyChats");
41579
41692
 
41580
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
41693
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
41581
41694
  var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
41582
41695
  var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
41583
41696
  var CHAT_LIST_KEY = "chat_list_complete";
@@ -41635,7 +41748,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
41635
41748
  return { ...coverage, oldestMessageAt: toIso(oldest) };
41636
41749
  }, "chatCoverage");
41637
41750
 
41638
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/chats.js
41751
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/chats.js
41639
41752
  var chatsStoreOver = /* @__PURE__ */ __name((context) => {
41640
41753
  const { database } = context;
41641
41754
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
@@ -41784,7 +41897,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
41784
41897
  };
41785
41898
  }, "chatsStoreOver");
41786
41899
 
41787
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
41900
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
41788
41901
  import { createHash as createHash7 } from "node:crypto";
41789
41902
  var BATCH_CONTEXT = 50;
41790
41903
  var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
@@ -41924,7 +42037,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
41924
42037
  var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
41925
42038
  ${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
41926
42039
 
41927
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
42040
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
41928
42041
  import { setTimeout } from "node:timers/promises";
41929
42042
  var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
41930
42043
  var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
@@ -42236,7 +42349,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
42236
42349
  AND NOT EXISTS (SELECT 1 FROM messages d
42237
42350
  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");
42238
42351
 
42239
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/conversations.js
42352
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/conversations.js
42240
42353
  var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
42241
42354
  const { database } = context;
42242
42355
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -42343,7 +42456,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
42343
42456
  };
42344
42457
  }, "conversationsStoreOver");
42345
42458
 
42346
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/counters.js
42459
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/counters.js
42347
42460
  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";
42348
42461
  var accountCountersOver = /* @__PURE__ */ __name((context) => {
42349
42462
  const { database } = context;
@@ -42368,7 +42481,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
42368
42481
  counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
42369
42482
  }), "countersStoreOver");
42370
42483
 
42371
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
42484
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
42372
42485
  var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
42373
42486
  var MENTION_QUERY = defineQuery({
42374
42487
  entity: "mention",
@@ -42587,7 +42700,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
42587
42700
  return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
42588
42701
  }, "listPlaces");
42589
42702
 
42590
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/mentions.js
42703
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/mentions.js
42591
42704
  var accountMentionsOver = /* @__PURE__ */ __name((context) => {
42592
42705
  const { database } = context;
42593
42706
  const { findAccountPk: findAccountPk2 } = keysOver(context);
@@ -42622,7 +42735,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
42622
42735
  places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
42623
42736
  }), "mentionsStoreOver");
42624
42737
 
42625
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
42738
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
42626
42739
  var FAR = Number.MAX_SAFE_INTEGER;
42627
42740
  var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
42628
42741
  var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
@@ -42721,7 +42834,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
42721
42834
  });
42722
42835
  }, "waitingChats");
42723
42836
 
42724
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
42837
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
42725
42838
  var SQL = `SELECT coalesce(nullif(trim(c.title), ''), (SELECT sender_name FROM messages WHERE chat_id = c.id AND outgoing = 0 AND deleted_at IS NULL ORDER BY sent_at DESC LIMIT 1)) AS title, ${MUTED_NOW} AS muted, w.messages, w.sent, (SELECT max(sent_at) FROM messages WHERE chat_id = c.id AND deleted_at IS NULL AND sent_at < ?) AS last FROM chats c, (SELECT count(*) AS messages, coalesce(sum(outgoing = 1), 0) AS sent FROM messages WHERE chat_id = ? AND deleted_at IS NULL AND sent_at >= ? AND sent_at < ?) w WHERE c.id = ?`;
42726
42839
  var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
42727
42840
  const statement = database.prepare(SQL);
@@ -42741,7 +42854,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
42741
42854
  return found2;
42742
42855
  }, "chatActivityCounts");
42743
42856
 
42744
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
42857
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
42745
42858
  var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
42746
42859
  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");
42747
42860
  const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
@@ -42756,7 +42869,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
42756
42869
  }));
42757
42870
  }, "documentLinkMessages");
42758
42871
 
42759
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
42872
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
42760
42873
  var stemmerFor = stemmerCache();
42761
42874
  var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
42762
42875
  if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
@@ -42800,7 +42913,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
42800
42913
  });
42801
42914
  }, "laterSharingRare");
42802
42915
 
42803
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/messages.js
42916
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/messages.js
42804
42917
  var accountMessagesOver = /* @__PURE__ */ __name((context) => {
42805
42918
  const { database } = context;
42806
42919
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
@@ -42941,7 +43054,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
42941
43054
  laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
42942
43055
  }), "messagesStoreOver");
42943
43056
 
42944
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-links.js
43057
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-links.js
42945
43058
  var AGENT_METHOD = "agent";
42946
43059
  var personsOf = /* @__PURE__ */ __name(({ database }) => new Map(database.prepare("SELECT identity_id, person_id FROM identity_links").all().map((row2) => [Number(row2.identity_id), Number(row2.person_id)])), "personsOf");
42947
43060
  var weaknessOf = /* @__PURE__ */ __name((context, kind3, value, holders, sides, others) => {
@@ -43085,7 +43198,7 @@ var agentMerges = /* @__PURE__ */ __name((context, { limit, offset }) => {
43085
43198
  return { items: found2.slice(offset, offset + limit), hasMore: found2.length > offset + limit };
43086
43199
  }, "agentMerges");
43087
43200
 
43088
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-rekey.js
43201
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-rekey.js
43089
43202
  var quoted2 = /* @__PURE__ */ __name((name) => `"${name.replace(/"/g, '""')}"`, "quoted");
43090
43203
  var columnsOf3 = /* @__PURE__ */ __name((database, table) => database.prepare("SELECT name, pk, type FROM pragma_table_info(?)").all(table), "columnsOf");
43091
43204
  var foreignKeysTo = /* @__PURE__ */ __name((database, table) => database.prepare(`SELECT m.name AS tbl, f."from" AS col FROM sqlite_master m JOIN pragma_foreign_key_list(m.name) f
@@ -43229,7 +43342,7 @@ var rekeyIdentities = /* @__PURE__ */ __name((context, provider, pairs, { lockMs
43229
43342
  return done;
43230
43343
  }, "rekeyIdentities");
43231
43344
 
43232
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
43345
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
43233
43346
  var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
43234
43347
  var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
43235
43348
  "noreply",
@@ -43292,7 +43405,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
43292
43405
  return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
43293
43406
  }, "isCompanyName");
43294
43407
 
43295
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
43408
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
43296
43409
  var SMALL_GROUP_MEMBERS = 10;
43297
43410
  var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
43298
43411
  var ALWAYS_SHOWN = ["owner", "added", "task"];
@@ -43347,7 +43460,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
43347
43460
  return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
43348
43461
  }, "shownReasons");
43349
43462
 
43350
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
43463
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
43351
43464
  var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
43352
43465
  var MIN_QUERY = 3;
43353
43466
  var matching2 = /* @__PURE__ */ __name((query) => {
@@ -43692,7 +43805,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
43692
43805
  return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
43693
43806
  }, "similarPeople");
43694
43807
 
43695
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
43808
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
43696
43809
  var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
43697
43810
  var COLUMNS5 = "l.person_id AS person, p.owner, p.name AS person_name, i.id AS pk, i.provider, i.external_id, i.name, i.phone, i.email, i.username, l.method, l.author, l.created_at, EXISTS (SELECT 1 FROM accounts a WHERE a.provider = i.provider AND a.external_id = i.external_id) AS account FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN persons p ON p.id = l.person_id";
43698
43811
  var text4 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
@@ -43948,7 +44061,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
43948
44061
  return { person: `person:${person2}`, identities: identities2 };
43949
44062
  }, "markTestData");
43950
44063
 
43951
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
44064
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
43952
44065
  var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
43953
44066
  var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
43954
44067
  var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
@@ -44017,7 +44130,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
44017
44130
  });
44018
44131
  }, "personPreparation");
44019
44132
 
44020
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
44133
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
44021
44134
  var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
44022
44135
  const id2 = Number(uid);
44023
44136
  if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
@@ -44025,7 +44138,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
44025
44138
  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(currentPerson(database, id2), JSON.stringify(accountIds)));
44026
44139
  }, "personSeenInAccounts");
44027
44140
 
44028
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
44141
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
44029
44142
  var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
44030
44143
  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);
44031
44144
  if (!row2)
@@ -44092,7 +44205,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
44092
44205
  return { id: id2, personId, removed: true };
44093
44206
  }, "removeNote");
44094
44207
 
44095
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/people.js
44208
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/people.js
44096
44209
  var accountPeopleOver = /* @__PURE__ */ __name((context) => {
44097
44210
  const { database } = context;
44098
44211
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
@@ -44235,13 +44348,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
44235
44348
  };
44236
44349
  }, "peopleStoreOver");
44237
44350
 
44238
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
44351
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
44239
44352
  import { createHash as createHash9 } from "node:crypto";
44240
44353
 
44241
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
44354
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
44242
44355
  import { createHash as createHash8 } from "node:crypto";
44243
44356
 
44244
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
44357
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
44245
44358
  var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
44246
44359
  var exhausted2 = /* @__PURE__ */ __name((budget) => {
44247
44360
  throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
@@ -44463,7 +44576,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
44463
44576
  };
44464
44577
  }, "rankReplyGraph");
44465
44578
 
44466
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
44579
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
44467
44580
  var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
44468
44581
  var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
44469
44582
  var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
@@ -44637,7 +44750,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
44637
44750
  return { items, evidence, summary, graph: graph.quality };
44638
44751
  }, "calculateAdminStatistics");
44639
44752
 
44640
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
44753
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
44641
44754
  var rankingContextRange = /* @__PURE__ */ __name((root) => {
44642
44755
  const dates = [];
44643
44756
  const visit = /* @__PURE__ */ __name((node, required3) => {
@@ -44659,7 +44772,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
44659
44772
  return dates[0].node.resolution.date;
44660
44773
  }, "rankingContextRange");
44661
44774
 
44662
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
44775
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
44663
44776
  var reactionCounts = /* @__PURE__ */ __name((stored4) => {
44664
44777
  let counts;
44665
44778
  try {
@@ -44954,7 +45067,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
44954
45067
  });
44955
45068
  }, "rankQuery");
44956
45069
 
44957
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
45070
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
44958
45071
  function fail2(message3, reason = "query.too-large") {
44959
45072
  throw new CliError("validation_error", message3, { reason, complete: false });
44960
45073
  }
@@ -45131,7 +45244,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
45131
45244
  return result;
45132
45245
  }), "adminStatisticsQuery");
45133
45246
 
45134
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
45247
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
45135
45248
  var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
45136
45249
  if (!execution.accounts.length)
45137
45250
  return { conversations: [], chats: [] };
@@ -45149,7 +45262,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
45149
45262
  return { conversations: conversations2, chats: chats2 };
45150
45263
  }, "conversationEligibility");
45151
45264
 
45152
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
45265
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
45153
45266
  import { createHash as createHash10 } from "node:crypto";
45154
45267
  var EVIDENCE_BYTES = 64 * 1024;
45155
45268
  var FINGERPRINT_BYTES = 8 * 1024 * 1024;
@@ -45299,7 +45412,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
45299
45412
  return result;
45300
45413
  }, "rankingEvidence");
45301
45414
 
45302
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/queries.js
45415
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/queries.js
45303
45416
  var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
45304
45417
  const mailIndexed = /* @__PURE__ */ __name((execution) => {
45305
45418
  if (execution.corpus === "mail")
@@ -45320,7 +45433,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
45320
45433
  };
45321
45434
  }, "queriesStoreOver");
45322
45435
 
45323
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
45436
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
45324
45437
  var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
45325
45438
  const { database, now: now2 } = context;
45326
45439
  const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
@@ -45359,10 +45472,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
45359
45472
  }));
45360
45473
  }, "chatEventsOf");
45361
45474
 
45362
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
45475
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
45363
45476
  import { createHash as createHash11 } from "node:crypto";
45364
45477
 
45365
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/calendar.js
45478
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/calendar.js
45366
45479
  var calendarKey = /* @__PURE__ */ __name((zone, by) => {
45367
45480
  const format = new Intl.DateTimeFormat("en-CA", {
45368
45481
  timeZone: zone,
@@ -45382,7 +45495,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
45382
45495
  return date3.toISOString().slice(0, 10);
45383
45496
  }, "weekKey");
45384
45497
 
45385
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/retention.js
45498
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/retention.js
45386
45499
  var RETENTION_TOLERANCE = 864e5;
45387
45500
  var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
45388
45501
  const { since, until, cutoff, checkpoints, within, limit, by } = options;
@@ -45436,7 +45549,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
45436
45549
  return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
45437
45550
  }, "retentionCohorts");
45438
45551
 
45439
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
45552
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
45440
45553
  var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
45441
45554
  var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
45442
45555
  validateRetentionOptions(options);
@@ -45567,7 +45680,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
45567
45680
  };
45568
45681
  }, "retentionQuery");
45569
45682
 
45570
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
45683
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
45571
45684
  var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
45572
45685
  var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
45573
45686
  ...isBot2 === void 0 ? {} : { bot: isBot2 },
@@ -45696,7 +45809,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
45696
45809
  lastCount: memberCountsOf(context, pk).at(-1) ?? null
45697
45810
  })), "trackedChats");
45698
45811
 
45699
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/roster.js
45812
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/roster.js
45700
45813
  var rosterStoreOver = /* @__PURE__ */ __name((context) => {
45701
45814
  const { database } = context;
45702
45815
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
@@ -45752,7 +45865,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
45752
45865
  };
45753
45866
  }, "rosterStoreOver");
45754
45867
 
45755
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
45868
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
45756
45869
  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");
45757
45870
  var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
45758
45871
  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 ?`);
@@ -45776,7 +45889,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
45776
45889
  }
45777
45890
  }, "backfillNormalized");
45778
45891
 
45779
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
45892
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
45780
45893
  var INDEX2 = "message_words";
45781
45894
  var searchIndexState2 = /* @__PURE__ */ __name((database) => {
45782
45895
  const row2 = indexRow(database, INDEX2);
@@ -45903,7 +46016,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
45903
46016
  });
45904
46017
  }, "resetSearchIndex");
45905
46018
 
45906
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
46019
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
45907
46020
  var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
45908
46021
  const filled = { stemmed: 0, drained: 0 };
45909
46022
  const before2 = stemsState(database);
@@ -45998,7 +46111,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
45998
46111
  return resetStems(database, { now: now2 });
45999
46112
  }, "followDefaultStemmers");
46000
46113
 
46001
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
46114
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
46002
46115
  var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
46003
46116
  var knownTerms = /* @__PURE__ */ __name(({ database }, terms) => {
46004
46117
  const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
@@ -46020,7 +46133,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
46020
46133
  });
46021
46134
  }, "termCandidates");
46022
46135
 
46023
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/search-index.js
46136
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/search-index.js
46024
46137
  var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
46025
46138
  const { database } = context;
46026
46139
  const stemmerFor2 = stemmerCache();
@@ -46045,7 +46158,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
46045
46158
  };
46046
46159
  }, "searchIndexStoreOver");
46047
46160
 
46048
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
46161
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
46049
46162
  var HISTORY_KEPT = 1e3;
46050
46163
  var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
46051
46164
  var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
@@ -46115,7 +46228,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
46115
46228
  return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
46116
46229
  }, "clearHistory");
46117
46230
 
46118
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/searches.js
46231
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/searches.js
46119
46232
  var searchesStoreOver = /* @__PURE__ */ __name((context) => {
46120
46233
  const { database } = context;
46121
46234
  return {
@@ -46139,7 +46252,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
46139
46252
  };
46140
46253
  }, "searchesStoreOver");
46141
46254
 
46142
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
46255
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
46143
46256
  import { createHash as createHash12 } from "node:crypto";
46144
46257
  var ADDED_KINDS = ["text", "file", "page"];
46145
46258
  var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
@@ -46381,7 +46494,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
46381
46494
  };
46382
46495
  }, "addedSourcesOver");
46383
46496
 
46384
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
46497
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
46385
46498
  var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
46386
46499
  var ACTION_OUTCOMES = ["ok", "refused", "failed"];
46387
46500
  var CODE = /^[a-z][a-z0-9_]{0,63}$/;
@@ -46429,7 +46542,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
46429
46542
  };
46430
46543
  }, "agentActionsStoreOver");
46431
46544
 
46432
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
46545
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
46433
46546
  var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
46434
46547
  var storedPipeline = /* @__PURE__ */ __name((value) => {
46435
46548
  if (typeof value !== "string")
@@ -46475,11 +46588,11 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
46475
46588
  }
46476
46589
  }, "suggestBaseStages");
46477
46590
 
46478
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/copy-viewer.js
46591
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/copy-viewer.js
46479
46592
  var viewerSql = /* @__PURE__ */ __name((alias2, viewer) => viewer === void 0 ? { sql: "1", params: [] } : viewer.assignee === null ? { sql: "0", params: [] } : { sql: `json_extract(${alias2}.metadata, '$.assignee') = ?`, params: [viewer.assignee] }, "viewerSql");
46480
46593
  var seenBy = /* @__PURE__ */ __name((viewer, row2) => viewer === void 0 || row2.provider !== viewer.account.provider || row2.account !== viewer.account.account || viewer.assignee !== null && row2.assignee === viewer.assignee, "seenBy");
46481
46594
 
46482
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
46595
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
46483
46596
  var TABLES2 = { deal: "deals", lead: "leads" };
46484
46597
  var MONEY_REFUSALS = ["money.currency", "money.amount"];
46485
46598
  var amountFault = /* @__PURE__ */ __name((item, code) => {
@@ -46651,7 +46764,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
46651
46764
  return { savePipeline, saveItemRow };
46652
46765
  }, "crmRowsOver");
46653
46766
 
46654
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
46767
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
46655
46768
  var ACTIVITY_RECORD = "crm.activity";
46656
46769
  var forgetActivitiesOn = /* @__PURE__ */ __name((database, accountId, kind3, externalIds, at2) => {
46657
46770
  const removed = "rr.target_type = ? AND rr.target_external_id IN (SELECT value FROM json_each(?))";
@@ -46839,7 +46952,7 @@ var seenSql = /* @__PURE__ */ __name((viewer) => {
46839
46952
  };
46840
46953
  }, "seenSql");
46841
46954
 
46842
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
46955
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
46843
46956
  var STAGE_ENTRY_RECORD = "crm.stage-entry";
46844
46957
  var STAGE_ENTRY_DAYS = 90;
46845
46958
  var STAGE_TASK_DAYS = 7;
@@ -46907,7 +47020,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
46907
47020
  return { save: save2, pending, handled, expire };
46908
47021
  }, "crmStageEntriesOver");
46909
47022
 
46910
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
47023
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
46911
47024
  var TABLES3 = { deal: "deals", lead: "leads" };
46912
47025
  var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { since, until }, viewer) => {
46913
47026
  const seen = viewerSql("d", viewer);
@@ -46925,7 +47038,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { si
46925
47038
  });
46926
47039
  }, "stageAmountsOf");
46927
47040
 
46928
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/pipeline-period.js
47041
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/pipeline-period.js
46929
47042
  var TABLES4 = { deal: "deals", lead: "leads" };
46930
47043
  var DAY6 = 864e5;
46931
47044
  var LOST_REASONS = 10;
@@ -47082,7 +47195,7 @@ var pipelinePeriod = /* @__PURE__ */ __name((context, pipeline, window, zone, vi
47082
47195
  };
47083
47196
  }, "pipelinePeriod");
47084
47197
 
47085
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
47198
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
47086
47199
  var TABLES5 = { deal: "deals", lead: "leads" };
47087
47200
  var itemsSql = /* @__PURE__ */ __name((kind3) => `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, bs.id AS base_stage_ref_id, bs.name AS base_stage_name FROM ${TABLES5[kind3]} 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 LEFT JOIN pipeline_stages bs ON s.base_confirmed = 1 AND bs.id = s.base_stage_id`, "itemsSql");
47088
47201
  var MAX_STAGES = 30;
@@ -47144,7 +47257,7 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
47144
47257
  const { partyOf, partyThing } = reviewedRowsOver(context);
47145
47258
  const today = /* @__PURE__ */ __name(() => new Date(now2()).toISOString().slice(0, 10), "today");
47146
47259
  const peopleOf2 = /* @__PURE__ */ __name((kind3, id2) => database.prepare(`SELECT to_id, role FROM links WHERE from_type = ? AND from_id = ? AND kind = ${linkKind("related-to")} AND to_type = 'person' AND to_id IS NOT NULL AND deleted_at IS NULL AND ${notOverriddenSql("links")} ORDER BY id`).all(kind3, id2).map((row2) => ({ ...partyOf("person", row2.to_id), role: row2.role })), "peopleOf");
47147
- const itemOf2 = /* @__PURE__ */ __name((kind3) => (row2) => {
47260
+ const itemOf3 = /* @__PURE__ */ __name((kind3) => (row2) => {
47148
47261
  const currency = row2.currency == null ? null : String(row2.currency);
47149
47262
  const amount = row2.amount == null || currency === null ? null : Number(row2.amount);
47150
47263
  const fields4 = {
@@ -47199,7 +47312,7 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
47199
47312
  }, "rowOf");
47200
47313
  const read2 = /* @__PURE__ */ __name((reference2) => {
47201
47314
  const { kind: kind3, row: row2 } = rowOf4(reference2);
47202
- return itemOf2(kind3)(row2);
47315
+ return itemOf3(kind3)(row2);
47203
47316
  }, "read");
47204
47317
  const inScope = /* @__PURE__ */ __name((scope3, row2) => scope3 === void 0 || (scope3 === "own" ? row2.account_id == null : row2.account_provider === scope3.provider && row2.account_external_id === scope3.account), "inScope");
47205
47318
  const kindOf4 = /* @__PURE__ */ __name((kind3) => kind3 === void 0 ? "deal" : oneOf3(kind3, DEAL_KINDS, "a kind"), "kindOf");
@@ -47409,7 +47522,7 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
47409
47522
  filter.owner === null ? { sql: "json_extract(d.metadata, '$.assignee') IS NULL", params: [] } : { sql: "json_extract(d.metadata, '$.assignee') = ?", params: [filter.owner] }
47410
47523
  ]
47411
47524
  ];
47412
- const rows = database.prepare(`${itemsSql(kind3)} WHERE d.deleted_at IS NULL ${within.map(({ sql: sql2 }) => `AND ${sql2} `).join("")}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 = ?)) ${inAccounts}AND ${by.sql} ORDER BY d.created_at DESC, d.id DESC LIMIT ? OFFSET ?`).all(...within.flatMap(({ params }) => params), status2, status2, project2, project2, stage, stage, pipeline, pipeline, organization2?.id ?? null, organization2?.id ?? null, own, provider, provider, account, ...keys ?? [], ...by.params, limit + 1, offset).map(itemOf2(kind3));
47525
+ const rows = database.prepare(`${itemsSql(kind3)} WHERE d.deleted_at IS NULL ${within.map(({ sql: sql2 }) => `AND ${sql2} `).join("")}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 = ?)) ${inAccounts}AND ${by.sql} ORDER BY d.created_at DESC, d.id DESC LIMIT ? OFFSET ?`).all(...within.flatMap(({ params }) => params), status2, status2, project2, project2, stage, stage, pipeline, pipeline, organization2?.id ?? null, organization2?.id ?? null, own, provider, provider, account, ...keys ?? [], ...by.params, limit + 1, offset).map(itemOf3(kind3));
47413
47526
  return pageOfRows(rows, limit, offset);
47414
47527
  }, "list"),
47415
47528
  find: /* @__PURE__ */ __name(async (wanted) => {
@@ -47555,7 +47668,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
47555
47668
  };
47556
47669
  }, "dealsStoreOver");
47557
47670
 
47558
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
47671
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
47559
47672
  var KEY2 = "ownerLanguages";
47560
47673
  var ISO_639_1 = new Set("aa ab ae af ak am an ar as av ay az ba be bg bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu".split(" "));
47561
47674
  var DEFAULT_OWNER_LANGUAGES = ["ru"];
@@ -47585,7 +47698,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
47585
47698
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY2, JSON.stringify(languages), now2);
47586
47699
  }, "saveOwnerLanguages");
47587
47700
 
47588
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
47701
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
47589
47702
  var OUTCOMES = {
47590
47703
  lead: ["open", "open", "open", "won", "lost"],
47591
47704
  deal: ["open", "open", "open", "open", "won", "lost"]
@@ -47918,7 +48031,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
47918
48031
  };
47919
48032
  }, "baseStagesStoreOver");
47920
48033
 
47921
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
48034
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
47922
48035
  var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
47923
48036
  }) => {
47924
48037
  const { database, now: now2 } = context;
@@ -47977,7 +48090,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
47977
48090
  };
47978
48091
  }, "botUpdateStoreOver");
47979
48092
 
47980
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
48093
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
47981
48094
  var IMPORTER = { bot: "import" };
47982
48095
  var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
47983
48096
  var codeOf = /* @__PURE__ */ __name((error) => {
@@ -48022,7 +48135,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
48022
48135
  };
48023
48136
  }), "moneyLinesOf");
48024
48137
 
48025
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
48138
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
48026
48139
  var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
48027
48140
  var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
48028
48141
  var listOf2 = /* @__PURE__ */ __name((list2) => {
@@ -48106,7 +48219,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
48106
48219
  };
48107
48220
  }, "relationRolesOver");
48108
48221
 
48109
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
48222
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
48110
48223
  var CRM_LINK_MODES = ["reported", "review"];
48111
48224
  var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
48112
48225
  var CRM_SCOPES = ["mine", "all"];
@@ -48337,7 +48450,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
48337
48450
  return [{ setting: String(row2.key), value: settingValue(database, parsed5.key, parsed5.name) }];
48338
48451
  }), "crmSettingsOf");
48339
48452
 
48340
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
48453
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
48341
48454
  var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
48342
48455
  var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
48343
48456
  id: link3.id,
@@ -48697,7 +48810,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
48697
48810
  provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
48698
48811
  }, "decidedOrigin");
48699
48812
 
48700
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
48813
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
48701
48814
  var keyOf4 = /* @__PURE__ */ __name((kind3, fromType, fromId, toType, toId, role) => `${String(kind3)}|${String(fromType)}:${String(fromId)}|${String(toType)}:${String(toId)}|${role == null ? "" : String(role)}`, "keyOf");
48702
48815
  var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
48703
48816
  var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
@@ -48835,7 +48948,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
48835
48948
  syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
48836
48949
  }), "relationsStoreOver");
48837
48950
 
48838
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
48951
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
48839
48952
  var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
48840
48953
  var noRelationships = /* @__PURE__ */ __name(() => ({
48841
48954
  added: 0,
@@ -49025,7 +49138,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
49025
49138
  return { report, placeOf: placeOf2, withdrawFrom };
49026
49139
  }, "recordRelationshipsOver");
49027
49140
 
49028
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
49141
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
49029
49142
  var CONTRACTS = "SELECT k.*, b.name AS author_name, b.kind AS author_kind FROM contracts k LEFT JOIN bots b ON k.author_type = 'bot' AND b.id = k.author_id";
49030
49143
  var DAY_MS2 = 864e5;
49031
49144
  var deadlineOf = /* @__PURE__ */ __name((expiration, days) => expiration === null || days === null ? null : new Date(Date.parse(`${expiration}T00:00:00Z`) - days * DAY_MS2).toISOString().slice(0, 10), "deadlineOf");
@@ -49184,7 +49297,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
49184
49297
  };
49185
49298
  }, "contractsStoreOver");
49186
49299
 
49187
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
49300
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
49188
49301
  var BUSINESS_FIND_MAX = 2001;
49189
49302
  var party2 = /* @__PURE__ */ __name((kind3, id2, as) => `LEFT JOIN persons ${as}p ON ${kind3} = 'person' AND ${as}p.id = ${id2} AND ${as}p.owner = 0 LEFT JOIN organizations ${as}o ON ${kind3} = 'organization' AND ${as}o.id = ${id2} LEFT JOIN projects ${as}j ON ${kind3} = 'project' AND ${as}j.id = ${id2}`, "party");
49190
49303
  var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
@@ -49289,7 +49402,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
49289
49402
  };
49290
49403
  }, "businessSearchOver");
49291
49404
 
49292
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
49405
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
49293
49406
  var CATALOG_QUERY = defineQuery({
49294
49407
  entity: "document",
49295
49408
  backend: "sql",
@@ -49522,7 +49635,414 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
49522
49635
  };
49523
49636
  }, "catalogStoreOver");
49524
49637
 
49525
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
49638
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/content.js
49639
+ import { createHash as createHash13 } from "node:crypto";
49640
+
49641
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-files.js
49642
+ import { sep } from "node:path";
49643
+ var MOST = 500;
49644
+ var CURRENTLY = /* @__PURE__ */ __name((table) => `EXISTS (SELECT 1 FROM ${table} r WHERE r.account_id = f.account_id AND r.external_id = f.owner_id AND r.deleted_at IS NULL AND json_extract(r.metadata, '$.assignee') = ?)`, "CURRENTLY");
49645
+ var EXCERPT = 240;
49646
+ var COLUMNS7 = "f.external_id, f.owner_kind, f.owner_id, f.owner_assignee, f.source, f.name, f.mime, f.size, f.external_created_at, f.local_path, f.content_sha256, f.extraction, f.extraction_error, f.downloaded_by, f.downloaded_at";
49647
+ var text5 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
49648
+ var number3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
49649
+ var rowOf2 = /* @__PURE__ */ __name((row2) => ({
49650
+ externalId: String(row2.external_id),
49651
+ ownerKind: String(row2.owner_kind),
49652
+ ownerId: String(row2.owner_id),
49653
+ ownerAssignee: text5(row2.owner_assignee),
49654
+ source: String(row2.source),
49655
+ name: String(row2.name),
49656
+ mime: text5(row2.mime),
49657
+ size: number3(row2.size),
49658
+ externalCreatedAt: number3(row2.external_created_at),
49659
+ localPath: text5(row2.local_path),
49660
+ contentSha256: text5(row2.content_sha256),
49661
+ extraction: text5(row2.extraction),
49662
+ extractionError: text5(row2.extraction_error),
49663
+ downloadedBy: text5(row2.downloaded_by),
49664
+ downloadedAt: Number(row2.downloaded_at)
49665
+ }), "rowOf");
49666
+ var matchOf2 = /* @__PURE__ */ __name((words4, anyWord, exact) => {
49667
+ const phrases = words4.map((word2) => normalize(word2).trim()).filter(Boolean).map((word2) => {
49668
+ const quoted6 = `"${word2.replaceAll('"', '""')}"`;
49669
+ return exact || /\s/u.test(word2) || word2.length < 3 ? quoted6 : `${quoted6}*`;
49670
+ });
49671
+ return phrases.length ? [...new Set(phrases)].join(anyWord ? " OR " : " AND ") : void 0;
49672
+ }, "matchOf");
49673
+ var excerptOf = /* @__PURE__ */ __name((body2, words4) => {
49674
+ const folded6 = fold(body2);
49675
+ const at2 = words4.map((word2) => folded6.indexOf(fold(word2).trim())).filter((index2) => index2 >= 0).sort((a, b) => a - b)[0];
49676
+ const start = Math.max(0, (at2 ?? 0) - EXCERPT / 4);
49677
+ return body2.slice(start, start + EXCERPT).replace(/\s+/gu, " ").trim();
49678
+ }, "excerptOf");
49679
+ var resetCrmFileWords = /* @__PURE__ */ __name((database) => {
49680
+ if (!database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'crm_file_words'").get())
49681
+ return 0;
49682
+ return write(database, () => {
49683
+ const update2 = database.prepare("UPDATE crm_files SET normalized_text = ? WHERE id = ?");
49684
+ for (const row2 of database.prepare("SELECT id, text, normalized_text FROM crm_files WHERE text IS NOT NULL").all()) {
49685
+ const normalized = normalize(String(row2.text));
49686
+ if (normalized !== row2.normalized_text)
49687
+ update2.run(normalized, Number(row2.id));
49688
+ }
49689
+ database.exec("INSERT INTO crm_file_words (crm_file_words) VALUES ('delete-all')");
49690
+ const { changes } = database.prepare("INSERT INTO crm_file_words (rowid, normalized_text) SELECT id, normalized_text FROM crm_files WHERE normalized_text <> ''").run();
49691
+ return Number(changes);
49692
+ });
49693
+ }, "resetCrmFileWords");
49694
+ var crmFilesOver = /* @__PURE__ */ __name((context) => {
49695
+ const { database } = context;
49696
+ const under = "substr(f.local_path, 1, length(?)) = ?";
49697
+ const inside = /* @__PURE__ */ __name((folder) => folder.endsWith(sep) ? folder : `${folder}${sep}`, "inside");
49698
+ const save2 = /* @__PURE__ */ __name((key2, file) => write(database, () => {
49699
+ const accountId = accountPk(context, key2);
49700
+ database.prepare("INSERT INTO crm_files (account_id, external_id, owner_kind, owner_id, owner_assignee, source, name, name_folded, mime, size, external_created_at, local_path, content_sha256, text, normalized_text, extraction, extraction_error, downloaded_by, downloaded_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (account_id, external_id) DO UPDATE SET owner_assignee = excluded.owner_assignee, source = excluded.source, name = excluded.name, name_folded = excluded.name_folded, mime = excluded.mime, size = excluded.size, external_created_at = excluded.external_created_at, local_path = excluded.local_path, content_sha256 = excluded.content_sha256, text = excluded.text, normalized_text = excluded.normalized_text, extraction = excluded.extraction, extraction_error = excluded.extraction_error, downloaded_by = excluded.downloaded_by, downloaded_at = excluded.downloaded_at").run(accountId, file.externalId, file.ownerKind, file.ownerId, file.ownerAssignee, file.source, file.name, fold(file.name), file.mime, file.size, file.externalCreatedAt, file.localPath, file.contentSha256, file.text, file.text === null ? null : normalize(file.text), file.extraction, file.extractionError, file.downloadedBy, file.downloadedAt);
49701
+ }), "save");
49702
+ const rowsOf2 = /* @__PURE__ */ __name((key2, columns2, where, ...params) => {
49703
+ const accountId = findAccountPk(context, key2);
49704
+ if (accountId === void 0)
49705
+ return [];
49706
+ return database.prepare(`SELECT ${columns2} FROM crm_files f WHERE f.account_id = ? AND ${where}`).all(accountId, ...params);
49707
+ }, "rowsOf");
49708
+ const find2 = /* @__PURE__ */ __name(({ words: words4, anyWord = false, exact = false, accounts: accounts2, viewers = [], limit }) => {
49709
+ const match = matchOf2(words4, anyWord, exact);
49710
+ if (!match)
49711
+ return { items: [], hasMore: false };
49712
+ const most = Math.min(Math.max(limit ?? 100, 1), MOST);
49713
+ const scoped2 = accounts2?.map((one2) => findAccountPk(context, one2)).filter((one2) => one2 !== void 0) ?? [];
49714
+ if (accounts2 !== void 0 && !scoped2.length)
49715
+ return { items: [], hasMore: false };
49716
+ const limits = viewers.flatMap((viewer) => {
49717
+ const id2 = findAccountPk(context, viewer.account);
49718
+ return id2 === void 0 ? [] : [{ id: id2, assignee: viewer.assignee }];
49719
+ });
49720
+ const params = [match];
49721
+ let sql2 = `SELECT ${COLUMNS7}, f.text, a.provider, a.external_id AS account FROM crm_files f JOIN accounts a ON a.id = f.account_id JOIN (SELECT rowid, rank FROM crm_file_words WHERE crm_file_words MATCH ?) w ON w.rowid = f.id WHERE 1`;
49722
+ if (accounts2 !== void 0) {
49723
+ sql2 += ` AND f.account_id IN (${scoped2.map(() => "?").join(", ")})`;
49724
+ for (const id2 of scoped2)
49725
+ params.push(id2);
49726
+ }
49727
+ for (const one2 of limits) {
49728
+ if (one2.assignee === null) {
49729
+ sql2 += " AND f.account_id <> ?";
49730
+ params.push(one2.id);
49731
+ continue;
49732
+ }
49733
+ sql2 += ` AND (f.account_id <> ? OR CASE f.owner_kind WHEN 'deal' THEN ${CURRENTLY("deals")} WHEN 'lead' THEN ${CURRENTLY("leads")} ELSE f.owner_assignee = ? END)`;
49734
+ params.push(one2.id, one2.assignee, one2.assignee, one2.assignee);
49735
+ }
49736
+ sql2 += " ORDER BY w.rank, f.downloaded_at DESC, f.id DESC LIMIT ?";
49737
+ params.push(most + 1);
49738
+ const hits = database.prepare(sql2).all(...params).map((row2) => ({
49739
+ account: { provider: String(row2.provider), account: String(row2.account) },
49740
+ file: rowOf2(row2),
49741
+ excerpt: excerptOf(String(row2.text ?? ""), words4)
49742
+ }));
49743
+ return pageOfRows(hits, most);
49744
+ }, "find");
49745
+ return {
49746
+ save: /* @__PURE__ */ __name(async (key2, file) => save2(key2, file), "save"),
49747
+ get: /* @__PURE__ */ __name(async (key2, externalId) => {
49748
+ const [row2] = rowsOf2(key2, `${COLUMNS7}, f.text`, "f.external_id = ?", externalId);
49749
+ return row2 ? { ...rowOf2(row2), text: text5(row2.text) } : void 0;
49750
+ }, "get"),
49751
+ ofOwner: /* @__PURE__ */ __name(async (key2, kind3, id2) => rowsOf2(key2, COLUMNS7, "f.owner_kind = ? AND f.owner_id = ? ORDER BY f.downloaded_at DESC, f.id DESC", kind3, id2).map(rowOf2), "ofOwner"),
49752
+ storedBytes: /* @__PURE__ */ __name(async (key2, folder) => rowsOf2(key2, "coalesce(sum(f.size), 0) AS bytes", `f.local_path IS NOT NULL AND ${under}`, inside(folder), inside(folder)).reduce((sum, row2) => sum + Number(row2.bytes), 0), "storedBytes"),
49753
+ droppable: /* @__PURE__ */ __name(async (key2, folder) => rowsOf2(key2, COLUMNS7, `f.local_path IS NOT NULL AND ${under} AND coalesce(f.text, '') <> '' ORDER BY f.downloaded_at, f.id`, inside(folder), inside(folder)).map(rowOf2), "droppable"),
49754
+ savedPaths: /* @__PURE__ */ __name(async (key2) => rowsOf2(key2, "f.local_path", "f.local_path IS NOT NULL ORDER BY f.id").map((row2) => String(row2.local_path)), "savedPaths"),
49755
+ forgetFile: /* @__PURE__ */ __name(async (key2, externalId) => {
49756
+ const accountId = findAccountPk(context, key2);
49757
+ if (accountId === void 0)
49758
+ return;
49759
+ write(database, () => database.prepare("UPDATE crm_files SET local_path = NULL WHERE account_id = ? AND external_id = ?").run(accountId, externalId));
49760
+ }, "forgetFile"),
49761
+ find: /* @__PURE__ */ __name(async (search2) => find2(search2), "find"),
49762
+ limits: /* @__PURE__ */ __name(async (key2) => crmFileLimits(database, key2), "limits")
49763
+ };
49764
+ }, "crmFilesOver");
49765
+
49766
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/content.js
49767
+ var MOST2 = 500;
49768
+ var TABLE = {
49769
+ author: "content_authors",
49770
+ term: "content_terms",
49771
+ post: "content_posts"
49772
+ };
49773
+ var definedOnly = /* @__PURE__ */ __name((record3) => Object.fromEntries(Object.entries(record3).filter(([, value]) => value !== void 0)), "definedOnly");
49774
+ var itemOf = /* @__PURE__ */ __name((kind3, row2) => ({
49775
+ kind: kind3,
49776
+ record: JSON.parse(String(row2.data)),
49777
+ deletedAt: row2.deleted_at == null ? null : Number(row2.deleted_at),
49778
+ syncedAt: Number(row2.synced_at)
49779
+ }), "itemOf");
49780
+ var contentHashOf = /* @__PURE__ */ __name((post) => createHash13("sha256").update(JSON.stringify([post.title ?? null, post.body ?? null])).digest("hex"), "contentHashOf");
49781
+ var resetContentPostWords = /* @__PURE__ */ __name((database) => {
49782
+ if (!database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'content_post_words'").get())
49783
+ return 0;
49784
+ return write(database, () => {
49785
+ const update2 = database.prepare("UPDATE content_posts SET normalized_text = ? WHERE id = ?");
49786
+ for (const row2 of database.prepare("SELECT id, title, body, normalized_text FROM content_posts").all()) {
49787
+ const normalized = normalize([row2.title, row2.body].filter(Boolean).join("\n"));
49788
+ if (normalized !== row2.normalized_text)
49789
+ update2.run(normalized, Number(row2.id));
49790
+ }
49791
+ database.exec("INSERT INTO content_post_words (content_post_words) VALUES ('delete-all')");
49792
+ const { changes } = database.prepare("INSERT INTO content_post_words (rowid, normalized_text) SELECT id, normalized_text FROM content_posts WHERE normalized_text <> ''").run();
49793
+ return Number(changes);
49794
+ });
49795
+ }, "resetContentPostWords");
49796
+ var tagIdOf = /* @__PURE__ */ __name((context, term) => {
49797
+ const name = tagOf(term.slug ?? "") ?? tagOf(term.name);
49798
+ if (name === void 0)
49799
+ return null;
49800
+ try {
49801
+ return ensureTag(context, name).id;
49802
+ } catch (error) {
49803
+ if (isCliError(error))
49804
+ return null;
49805
+ throw error;
49806
+ }
49807
+ }, "tagIdOf");
49808
+ var contentStoreOver = /* @__PURE__ */ __name((context) => {
49809
+ const { database } = context;
49810
+ const keepRevision2 = /* @__PURE__ */ __name((postId2, row2, reason, now2) => database.prepare("INSERT INTO content_post_revisions (post_id, title, body, status, content_hash, version, reason, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)").run(postId2, row2.title ?? null, row2.body ?? null, String(row2.status), String(row2.content_hash), row2.version ?? null, reason, now2), "keepRevision");
49811
+ const tagPost = /* @__PURE__ */ __name((accountId, postId2, terms) => {
49812
+ const ids3 = terms.length ? database.prepare(`SELECT DISTINCT t.name FROM content_terms ct JOIN canonical_tags t ON t.id = ct.tag_id WHERE ct.account_id = ? AND ct.deleted_at IS NULL AND ct.external_id IN (${terms.map(() => "?").join(", ")})`).all(accountId, ...terms).map((row2) => String(row2.name)) : [];
49813
+ database.prepare("DELETE FROM taggings WHERE taggable_type = 'post' AND taggable_id = ? AND source = 'file' AND tag_id NOT IN (SELECT t.id FROM canonical_tags t JOIN json_each(?) j ON j.value = t.name)").run(postId2, JSON.stringify(ids3));
49814
+ if (ids3.length)
49815
+ addTags(context, { type: "post", id: postId2 }, ids3, "file");
49816
+ }, "tagPost");
49817
+ const savePost = /* @__PURE__ */ __name((accountId, record3, before2, now2, reason) => {
49818
+ const merged2 = {
49819
+ ...before2 ? JSON.parse(String(before2.data)) : {},
49820
+ ...definedOnly(record3)
49821
+ };
49822
+ const title2 = merged2.title ?? null;
49823
+ const body2 = merged2.body ?? null;
49824
+ const hash2 = contentHashOf(merged2);
49825
+ if (before2 && (before2.content_hash !== hash2 || before2.status !== merged2.status || before2.title !== title2))
49826
+ keepRevision2(Number(before2.id), before2, reason, now2);
49827
+ const row2 = database.prepare("INSERT INTO content_posts (account_id, external_id, channel_id, type, title, title_folded, body, content_hash, status, published_at, scheduled_for, source_created_at, source_updated_at, version, normalized_text, data, deleted_at, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?) ON CONFLICT (account_id, external_id) DO UPDATE SET channel_id = excluded.channel_id, type = excluded.type, title = excluded.title, title_folded = excluded.title_folded, body = excluded.body, content_hash = excluded.content_hash, status = excluded.status, published_at = excluded.published_at, scheduled_for = excluded.scheduled_for, source_created_at = excluded.source_created_at, source_updated_at = excluded.source_updated_at, version = excluded.version, normalized_text = excluded.normalized_text, data = excluded.data, deleted_at = NULL, synced_at = excluded.synced_at RETURNING id").get(accountId, merged2.externalId, merged2.channel ?? null, merged2.type ?? "post", title2, fold(title2 ?? ""), body2, hash2, merged2.status, merged2.publishedAt ?? null, merged2.scheduledFor ?? null, merged2.createdAt ?? null, merged2.updatedAt ?? null, merged2.version ?? null, normalize([title2, body2].filter(Boolean).join("\n")), JSON.stringify(merged2), now2);
49828
+ tagPost(accountId, Number(row2?.id), merged2.terms ?? []);
49829
+ }, "savePost");
49830
+ const save2 = /* @__PURE__ */ __name((key2, kind3, records2, now2, reason) => write(database, () => {
49831
+ const accountId = accountPk(context, key2);
49832
+ const stored4 = database.prepare(`SELECT * FROM ${TABLE[kind3]} WHERE account_id = ? AND external_id = ?`);
49833
+ for (const record3 of records2) {
49834
+ const before2 = stored4.get(accountId, record3.externalId);
49835
+ if (kind3 === "post") {
49836
+ savePost(accountId, record3, before2, now2, reason);
49837
+ continue;
49838
+ }
49839
+ const merged2 = {
49840
+ ...before2 ? JSON.parse(String(before2.data)) : {},
49841
+ ...definedOnly(record3)
49842
+ };
49843
+ if (kind3 === "author")
49844
+ database.prepare("INSERT INTO content_authors (account_id, external_id, name, email, data, source_updated_at, deleted_at, synced_at) VALUES (?, ?, ?, ?, ?, ?, NULL, ?) ON CONFLICT (account_id, external_id) DO UPDATE SET name = excluded.name, email = excluded.email, data = excluded.data, source_updated_at = excluded.source_updated_at, deleted_at = NULL, synced_at = excluded.synced_at").run(accountId, merged2.externalId, merged2.name, merged2.email ?? null, JSON.stringify(merged2), merged2.updatedAt ?? null, now2);
49845
+ else
49846
+ database.prepare("INSERT INTO content_terms (account_id, external_id, kind, name, slug, parent_id, tag_id, data, source_updated_at, deleted_at, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?) ON CONFLICT (account_id, external_id) DO UPDATE SET kind = excluded.kind, name = excluded.name, slug = excluded.slug, parent_id = excluded.parent_id, tag_id = excluded.tag_id, data = excluded.data, source_updated_at = excluded.source_updated_at, deleted_at = NULL, synced_at = excluded.synced_at").run(accountId, merged2.externalId, merged2.kind, merged2.name, merged2.slug ?? null, merged2.parent ?? null, tagIdOf(context, merged2), JSON.stringify(merged2), merged2.updatedAt ?? null, now2);
49847
+ }
49848
+ return records2.length;
49849
+ }), "save");
49850
+ const mark = /* @__PURE__ */ __name((accountId, kind3, row2, now2) => {
49851
+ if (kind3 === "post") {
49852
+ keepRevision2(Number(row2.id), row2, "deleted", now2);
49853
+ database.prepare("DELETE FROM taggings WHERE taggable_type = 'post' AND taggable_id = ? AND source = 'file'").run(Number(row2.id));
49854
+ }
49855
+ database.prepare(`UPDATE ${TABLE[kind3]} SET deleted_at = ? WHERE id = ? AND account_id = ?`).run(now2, Number(row2.id), accountId);
49856
+ }, "mark");
49857
+ const unlisted = /* @__PURE__ */ __name((key2, kind3, listed, before2) => {
49858
+ const accountId = findAccountPk(context, key2);
49859
+ if (accountId === void 0)
49860
+ return [];
49861
+ const keep2 = new Set(listed);
49862
+ return database.prepare(`SELECT external_id FROM ${TABLE[kind3]} WHERE account_id = ? AND deleted_at IS NULL AND synced_at < ?`).all(accountId, before2).map((row2) => String(row2.external_id)).filter((id2) => !keep2.has(id2));
49863
+ }, "unlisted");
49864
+ const list2 = /* @__PURE__ */ __name((key2, kind3, filter = {}) => {
49865
+ const accountId = findAccountPk(context, key2);
49866
+ if (accountId === void 0)
49867
+ return { items: [], hasMore: false };
49868
+ const limit = Math.min(Math.max(filter.limit ?? 100, 1), MOST2);
49869
+ const params = [accountId];
49870
+ let sql2 = `SELECT t.* FROM ${TABLE[kind3]} t WHERE t.account_id = ? AND t.deleted_at IS NULL`;
49871
+ if (kind3 === "post") {
49872
+ if (filter.channel !== void 0) {
49873
+ sql2 += " AND t.channel_id = ?";
49874
+ params.push(filter.channel);
49875
+ }
49876
+ if (filter.statuses?.length) {
49877
+ sql2 += ` AND t.status IN (${filter.statuses.map(() => "?").join(", ")})`;
49878
+ params.push(...filter.statuses);
49879
+ }
49880
+ if (filter.type !== void 0) {
49881
+ sql2 += " AND t.type = ?";
49882
+ params.push(filter.type);
49883
+ }
49884
+ for (const [field4, value] of [
49885
+ ["terms", filter.term],
49886
+ ["authors", filter.author]
49887
+ ])
49888
+ if (value !== void 0) {
49889
+ sql2 += ` AND EXISTS (SELECT 1 FROM json_each(t.data, '$.${field4}') j WHERE j.value = ?)`;
49890
+ params.push(value);
49891
+ }
49892
+ if (filter.since !== void 0) {
49893
+ sql2 += " AND t.published_at >= ?";
49894
+ params.push(filter.since);
49895
+ }
49896
+ if (filter.until !== void 0) {
49897
+ sql2 += " AND t.published_at < ?";
49898
+ params.push(filter.until);
49899
+ }
49900
+ }
49901
+ sql2 += " ORDER BY coalesce(t.source_updated_at, t.synced_at) DESC, t.id DESC LIMIT ? OFFSET ?";
49902
+ params.push(limit + 1, filter.offset ?? 0);
49903
+ const rows = database.prepare(sql2).all(...params);
49904
+ return { items: rows.slice(0, limit).map((row2) => itemOf(kind3, row2)), hasMore: rows.length > limit };
49905
+ }, "list");
49906
+ const find2 = /* @__PURE__ */ __name(({ words: words4, anyWord = false, exact = false, accounts: accounts2, limit, offset = 0 }) => {
49907
+ const match = matchOf2(words4, anyWord, exact);
49908
+ if (!match)
49909
+ return { items: [], hasMore: false };
49910
+ const most = Math.min(Math.max(limit ?? 100, 1), MOST2);
49911
+ const scoped2 = accounts2?.map((one2) => findAccountPk(context, one2)).filter((one2) => one2 !== void 0) ?? [];
49912
+ if (accounts2 !== void 0 && !scoped2.length)
49913
+ return { items: [], hasMore: false };
49914
+ const params = [match];
49915
+ let sql2 = "SELECT t.*, a.provider, a.external_id AS account FROM content_posts t JOIN accounts a ON a.id = t.account_id JOIN (SELECT rowid, rank FROM content_post_words WHERE content_post_words MATCH ?) w ON w.rowid = t.id WHERE t.deleted_at IS NULL";
49916
+ if (accounts2 !== void 0) {
49917
+ sql2 += ` AND t.account_id IN (${scoped2.map(() => "?").join(", ")})`;
49918
+ params.push(...scoped2);
49919
+ }
49920
+ sql2 += " ORDER BY w.rank, t.source_updated_at DESC, t.id DESC LIMIT ? OFFSET ?";
49921
+ params.push(most + 1, offset);
49922
+ const rows = database.prepare(sql2).all(...params);
49923
+ return {
49924
+ items: rows.slice(0, most).map((row2) => ({
49925
+ account: { provider: String(row2.provider), account: String(row2.account) },
49926
+ item: itemOf("post", row2),
49927
+ excerpt: excerptOf([row2.title, row2.body].filter(Boolean).join("\n"), words4)
49928
+ })),
49929
+ hasMore: rows.length > most
49930
+ };
49931
+ }, "find");
49932
+ const postId = /* @__PURE__ */ __name((key2, post) => {
49933
+ const accountId = findAccountPk(context, key2);
49934
+ if (accountId === void 0)
49935
+ return void 0;
49936
+ const row2 = database.prepare("SELECT id FROM content_posts WHERE account_id = ? AND external_id = ?").get(accountId, post);
49937
+ return row2 ? Number(row2.id) : void 0;
49938
+ }, "postId");
49939
+ return {
49940
+ saveChannels: /* @__PURE__ */ __name(async (key2, channels, now2) => write(database, () => {
49941
+ const accountId = accountPk(context, key2);
49942
+ const upsert2 = database.prepare("INSERT INTO content_channels (account_id, external_id, kind, network, name, url, handle, deleted_at, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?, NULL, ?) ON CONFLICT (account_id, external_id) DO UPDATE SET kind = excluded.kind, network = excluded.network, name = excluded.name, url = excluded.url, handle = excluded.handle, deleted_at = NULL, synced_at = excluded.synced_at");
49943
+ for (const one2 of channels)
49944
+ upsert2.run(accountId, one2.externalId, one2.kind, one2.network, one2.name, one2.url ?? null, one2.handle ?? null, now2);
49945
+ return channels.length;
49946
+ }), "saveChannels"),
49947
+ channels: /* @__PURE__ */ __name(async (key2) => {
49948
+ const accountId = findAccountPk(context, key2);
49949
+ if (accountId === void 0)
49950
+ return [];
49951
+ return database.prepare("SELECT * FROM content_channels WHERE account_id = ? AND deleted_at IS NULL ORDER BY id").all(accountId).map((row2) => ({
49952
+ externalId: String(row2.external_id),
49953
+ kind: String(row2.kind),
49954
+ network: String(row2.network),
49955
+ name: String(row2.name),
49956
+ url: row2.url == null ? null : String(row2.url),
49957
+ handle: row2.handle == null ? null : String(row2.handle)
49958
+ }));
49959
+ }, "channels"),
49960
+ save: /* @__PURE__ */ __name(async (key2, kind3, records2, now2, options) => save2(key2, kind3, records2, now2, options?.reason ?? "sync"), "save"),
49961
+ unlisted: /* @__PURE__ */ __name(async (key2, kind3, listed, before2) => unlisted(key2, kind3, listed, before2), "unlisted"),
49962
+ markDeleted: /* @__PURE__ */ __name(async (key2, kind3, externalId, now2) => {
49963
+ const accountId = findAccountPk(context, key2);
49964
+ if (accountId === void 0)
49965
+ return false;
49966
+ return write(database, () => {
49967
+ const row2 = database.prepare(`SELECT * FROM ${TABLE[kind3]} WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL`).get(accountId, externalId);
49968
+ if (!row2)
49969
+ return false;
49970
+ mark(accountId, kind3, row2, now2);
49971
+ return true;
49972
+ });
49973
+ }, "markDeleted"),
49974
+ get: /* @__PURE__ */ __name(async (key2, kind3, externalId) => {
49975
+ const accountId = findAccountPk(context, key2);
49976
+ if (accountId === void 0)
49977
+ return void 0;
49978
+ const row2 = database.prepare(`SELECT * FROM ${TABLE[kind3]} WHERE account_id = ? AND external_id = ?`).get(accountId, externalId);
49979
+ return row2 ? itemOf(kind3, row2) : void 0;
49980
+ }, "get"),
49981
+ list: /* @__PURE__ */ __name(async (key2, kind3, filter) => list2(key2, kind3, filter), "list"),
49982
+ find: /* @__PURE__ */ __name(async (search2) => find2(search2), "find"),
49983
+ count: /* @__PURE__ */ __name(async (key2, kind3) => {
49984
+ const accountId = findAccountPk(context, key2);
49985
+ if (accountId === void 0)
49986
+ return 0;
49987
+ return Number(database.prepare(`SELECT count(*) AS n FROM ${TABLE[kind3]} WHERE account_id = ? AND deleted_at IS NULL`).get(accountId)?.n ?? 0);
49988
+ }, "count"),
49989
+ due: /* @__PURE__ */ __name(async (key2, now2) => {
49990
+ const accountId = findAccountPk(context, key2);
49991
+ if (accountId === void 0)
49992
+ return [];
49993
+ return database.prepare("SELECT external_id FROM content_posts WHERE account_id = ? AND deleted_at IS NULL AND status = 'scheduled' AND scheduled_for IS NOT NULL AND scheduled_for <= ? ORDER BY synced_at, scheduled_for, id").all(accountId, now2).map((row2) => String(row2.external_id));
49994
+ }, "due"),
49995
+ revisions: /* @__PURE__ */ __name(async (key2, post) => {
49996
+ const id2 = postId(key2, post);
49997
+ if (id2 === void 0)
49998
+ return [];
49999
+ return database.prepare("SELECT * FROM content_post_revisions WHERE post_id = ? ORDER BY created_at DESC, id DESC").all(id2).map((row2) => ({
50000
+ title: row2.title == null ? null : String(row2.title),
50001
+ body: row2.body == null ? null : String(row2.body),
50002
+ status: String(row2.status),
50003
+ contentHash: String(row2.content_hash),
50004
+ version: row2.version == null ? null : String(row2.version),
50005
+ reason: String(row2.reason),
50006
+ createdAt: Number(row2.created_at)
50007
+ }));
50008
+ }, "revisions"),
50009
+ saveMetrics: /* @__PURE__ */ __name(async (key2, metrics) => write(database, () => {
50010
+ const insert = database.prepare("INSERT INTO content_metrics (post_id, at, views, reactions, comments, shares, clicks, raw) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
50011
+ let saved = 0;
50012
+ for (const one2 of metrics) {
50013
+ const id2 = postId(key2, one2.post);
50014
+ if (id2 === void 0)
50015
+ continue;
50016
+ insert.run(id2, one2.at, one2.views ?? null, one2.reactions ?? null, one2.comments ?? null, one2.shares ?? null, one2.clicks ?? null, one2.raw === void 0 ? null : JSON.stringify(one2.raw));
50017
+ saved += 1;
50018
+ }
50019
+ return saved;
50020
+ }), "saveMetrics"),
50021
+ metrics: /* @__PURE__ */ __name(async (key2, post, limit = 100) => {
50022
+ const id2 = postId(key2, post);
50023
+ if (id2 === void 0)
50024
+ return [];
50025
+ return database.prepare("SELECT * FROM content_metrics WHERE post_id = ? ORDER BY at DESC, id DESC LIMIT ?").all(id2, Math.min(Math.max(limit, 1), MOST2)).map((row2) => ({
50026
+ post,
50027
+ at: Number(row2.at),
50028
+ ...Object.fromEntries(["views", "reactions", "comments", "shares", "clicks"].flatMap((name) => row2[name] == null ? [] : [[name, Number(row2[name])]])),
50029
+ ...row2.raw == null ? {} : { raw: JSON.parse(String(row2.raw)) }
50030
+ }));
50031
+ }, "metrics"),
50032
+ people: /* @__PURE__ */ __name(async (key2, authors) => {
50033
+ const accountId = findAccountPk(context, key2);
50034
+ if (accountId === void 0 || authors.length === 0)
50035
+ return [];
50036
+ return database.prepare(`SELECT u.external_id AS author, p.id AS person, p.name AS name FROM content_authors u JOIN identities i ON i.email IS NOT NULL AND lower(i.email) = lower(u.email) JOIN identity_links l ON l.identity_id = i.id JOIN persons p ON p.id = l.person_id WHERE u.account_id = ? AND u.external_id IN (${authors.map(() => "?").join(", ")}) GROUP BY u.external_id HAVING count(DISTINCT p.id) = 1 ORDER BY u.external_id`).all(accountId, ...authors).map((row2) => ({
50037
+ author: String(row2.author),
50038
+ person: `person:${String(row2.person)}`,
50039
+ name: row2.name == null ? null : String(row2.name)
50040
+ }));
50041
+ }, "people")
50042
+ };
50043
+ }, "contentStoreOver");
50044
+
50045
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
49526
50046
  var remote = /* @__PURE__ */ __name(() => `CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source') IN (${documentAccountProvidersSql()}) ELSE 0 END`, "remote");
49527
50047
  var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${remote()}) THEN
49528
50048
  CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
@@ -49535,7 +50055,7 @@ var contextDocumentTimeKind = /* @__PURE__ */ __name(() => `CASE WHEN (${remoteT
49535
50055
  THEN 'source-modified' ELSE 'stored-update' END`, "contextDocumentTimeKind");
49536
50056
  var contextDocumentUrl = /* @__PURE__ */ __name(() => `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`, "contextDocumentUrl");
49537
50057
 
49538
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
50058
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
49539
50059
  var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
49540
50060
  const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
49541
50061
  signal?.throwIfAborted();
@@ -49634,7 +50154,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
49634
50154
  });
49635
50155
  }, "readMeetingContextEvidence");
49636
50156
 
49637
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
50157
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
49638
50158
  var corpora = {
49639
50159
  message: {
49640
50160
  table: "messages",
@@ -49879,7 +50399,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
49879
50399
  }
49880
50400
  }), "contextRecordsOver");
49881
50401
 
49882
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-changes.js
50402
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-changes.js
49883
50403
  var CRM_CHANGES = [
49884
50404
  "created",
49885
50405
  "moved",
@@ -49904,7 +50424,7 @@ var changesQuery = /* @__PURE__ */ __name((context, key2, filter) => {
49904
50424
  const items = /* @__PURE__ */ __name((table, kind3) => `SELECT '${kind3}' AS kind, d.id, d.external_id, d.status, d.created_at, d.closed_date, json_extract(d.metadata, '$.assignee') AS owner, s.pipeline_id FROM ${table} d JOIN pipeline_stages s ON s.id = d.stage_id WHERE d.account_id = ?1 AND d.deleted_at IS NULL AND (?15 IS NULL OR json_extract(d.metadata, '$.assignee') = ?16)`, "items");
49905
50425
  const entries = "SELECT r.id AS record, i.kind, i.id AS item, i.owner, i.pipeline_id, CAST(json_extract(r.fields, '$.at') AS INTEGER) AS at, CAST(json_extract(r.fields, '$.stage_id') AS INTEGER) AS stage, lag(CAST(json_extract(r.fields, '$.stage_id') AS INTEGER)) OVER (PARTITION BY i.kind, i.id ORDER BY json_extract(r.fields, '$.at'), r.id) AS before FROM records r JOIN record_relations rr ON rr.record_id = r.id AND rr.role = 'on' JOIN items i ON i.kind = rr.target_type AND i.external_id = rr.target_external_id WHERE r.account_id = ?1 AND r.type = ?2 AND r.deleted_at IS NULL";
49906
50426
  const closing = "(SELECT outcome FROM pipeline_stages WHERE id = m.stage) IN ('won', 'lost')";
49907
- const itemOf2 = /* @__PURE__ */ __name((record3) => `(SELECT i.kind || ':' || i.id FROM record_relations rr JOIN items i ON i.kind = rr.target_type AND i.external_id = rr.target_external_id WHERE rr.record_id = ${record3} AND rr.role = 'on' LIMIT 1)`, "itemOf");
50427
+ const itemOf3 = /* @__PURE__ */ __name((record3) => `(SELECT i.kind || ':' || i.id FROM record_relations rr JOIN items i ON i.kind = rr.target_type AND i.external_id = rr.target_external_id WHERE rr.record_id = ${record3} AND rr.role = 'on' LIMIT 1)`, "itemOf");
49908
50428
  const closedAt = "(SELECT max(m.at) FROM entries m WHERE m.kind = i.kind AND m.item = i.id AND (SELECT outcome FROM pipeline_stages WHERE id = m.stage) = i.status)";
49909
50429
  const onDealOrLead = "EXISTS (SELECT 1 FROM record_relations x WHERE x.record_id = a.id AND x.role = 'on' AND x.target_type IN ('deal', 'lead'))";
49910
50430
  const linkedToSeen = "EXISTS (SELECT 1 FROM identities n JOIN identity_links l ON l.identity_id = n.id JOIN links k ON k.to_type = 'person' AND k.to_id = l.person_id AND k.deleted_at IS NULL JOIN items v ON v.kind = k.from_type AND v.id = k.from_id WHERE n.provider = ?17 AND n.external_id = ?18 || r.external_id)";
@@ -49915,7 +50435,7 @@ var changesQuery = /* @__PURE__ */ __name((context, key2, filter) => {
49915
50435
  // The closed day only narrows the rows; the window is checked on `at`, so a deal is listed in one window only.
49916
50436
  `SELECT i.status, coalesce(${closedAt}, CAST(strftime('%s', i.closed_date) AS INTEGER) * 1000 + ${HALF_DAY}), i.kind, i.id, NULL, NULL, NULL, ${closedAt} IS NOT NULL, i.owner, i.pipeline_id FROM items i WHERE i.status IN ('won', 'lost') AND i.closed_date BETWEEN ?8 AND ?9`,
49917
50437
  "SELECT 'owner_changed', CAST(json_extract(r.fields, '$.at') AS INTEGER), i.kind, i.id, r.id, NULL, NULL, 0, json_extract(r.fields, '$.to'), i.pipeline_id FROM records r JOIN record_relations rr ON rr.record_id = r.id AND rr.role = 'on' JOIN items i ON i.kind = rr.target_type AND i.external_id = rr.target_external_id WHERE r.account_id = ?1 AND r.type = ?3 AND r.deleted_at IS NULL AND json_extract(r.fields, '$.at') BETWEEN ?6 AND ?7",
49918
- ...["created_at", "done_at"].map((field4) => `SELECT '${field4 === "created_at" ? "activity_added" : "activity_done"}', CAST(json_extract(a.fields, '$.${field4}') AS INTEGER), coalesce(substr(a.item, 1, instr(a.item, ':') - 1), a.target), CAST(substr(a.item, instr(a.item, ':') + 1) AS INTEGER), a.id, NULL, NULL, 0, coalesce((SELECT owner FROM items i WHERE i.kind || ':' || i.id = a.item), json_extract(a.fields, '$.assignee')), (SELECT pipeline_id FROM items i WHERE i.kind || ':' || i.id = a.item) FROM (SELECT r.id, r.fields, ${itemOf2("r.id")} AS item, (SELECT target_type FROM record_relations WHERE record_id = r.id AND role = 'on' LIMIT 1) AS target FROM records r WHERE r.account_id = ?1 AND r.type = ?4 AND r.deleted_at IS NULL AND json_extract(r.fields, '$.${field4}') BETWEEN ?6 AND ?7` + // One that arrived done with no due date was done as it was made: its `activity_added` says it.
50438
+ ...["created_at", "done_at"].map((field4) => `SELECT '${field4 === "created_at" ? "activity_added" : "activity_done"}', CAST(json_extract(a.fields, '$.${field4}') AS INTEGER), coalesce(substr(a.item, 1, instr(a.item, ':') - 1), a.target), CAST(substr(a.item, instr(a.item, ':') + 1) AS INTEGER), a.id, NULL, NULL, 0, coalesce((SELECT owner FROM items i WHERE i.kind || ':' || i.id = a.item), json_extract(a.fields, '$.assignee')), (SELECT pipeline_id FROM items i WHERE i.kind || ':' || i.id = a.item) FROM (SELECT r.id, r.fields, ${itemOf3("r.id")} AS item, (SELECT target_type FROM record_relations WHERE record_id = r.id AND role = 'on' LIMIT 1) AS target FROM records r WHERE r.account_id = ?1 AND r.type = ?4 AND r.deleted_at IS NULL AND json_extract(r.fields, '$.${field4}') BETWEEN ?6 AND ?7` + // One that arrived done with no due date was done as it was made: its `activity_added` says it.
49919
50439
  (field4 === "done_at" ? " AND NOT (json_extract(r.fields, '$.due_at') IS NULL AND json_extract(r.fields, '$.done_at') = json_extract(r.fields, '$.created_at'))" : "") + `) a WHERE ?15 IS NULL OR a.item IS NOT NULL OR (NOT ${onDealOrLead} AND json_extract(a.fields, '$.assignee') = ?16)`),
49920
50440
  `SELECT 'person_added', CAST(json_extract(r.fields, '$.created_at') AS INTEGER), 'person', NULL, r.id, NULL, NULL, 0, json_extract(r.fields, '$.assignee'), NULL FROM records r WHERE r.account_id = ?1 AND r.type = ?5 AND r.deleted_at IS NULL AND json_extract(r.fields, '$.created_at') BETWEEN ?6 AND ?7 AND (?15 IS NULL OR json_extract(r.fields, '$.assignee') = ?16 OR ${linkedToSeen})`
49921
50441
  ];
@@ -50022,7 +50542,7 @@ var crmReadsOver = /* @__PURE__ */ __name((context) => {
50022
50542
  };
50023
50543
  }, "crmReadsOver");
50024
50544
 
50025
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
50545
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
50026
50546
  var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
50027
50547
  var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
50028
50548
  var DryRun = class extends Error {
@@ -50101,7 +50621,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
50101
50621
  }
50102
50622
  }, "removeCrmContacts");
50103
50623
 
50104
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
50624
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
50105
50625
  var PENDING = "crm:pending-relations";
50106
50626
  var PENDING_DAYS = 30;
50107
50627
  var PENDING_MOST = 5e3;
@@ -50656,135 +51176,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
50656
51176
  };
50657
51177
  }, "crmCopiesOver");
50658
51178
 
50659
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-files.js
50660
- import { sep } from "node:path";
50661
- var MOST = 500;
50662
- var CURRENTLY = /* @__PURE__ */ __name((table) => `EXISTS (SELECT 1 FROM ${table} r WHERE r.account_id = f.account_id AND r.external_id = f.owner_id AND r.deleted_at IS NULL AND json_extract(r.metadata, '$.assignee') = ?)`, "CURRENTLY");
50663
- var EXCERPT = 240;
50664
- var COLUMNS7 = "f.external_id, f.owner_kind, f.owner_id, f.owner_assignee, f.source, f.name, f.mime, f.size, f.external_created_at, f.local_path, f.content_sha256, f.extraction, f.extraction_error, f.downloaded_by, f.downloaded_at";
50665
- var text5 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
50666
- var number3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
50667
- var rowOf2 = /* @__PURE__ */ __name((row2) => ({
50668
- externalId: String(row2.external_id),
50669
- ownerKind: String(row2.owner_kind),
50670
- ownerId: String(row2.owner_id),
50671
- ownerAssignee: text5(row2.owner_assignee),
50672
- source: String(row2.source),
50673
- name: String(row2.name),
50674
- mime: text5(row2.mime),
50675
- size: number3(row2.size),
50676
- externalCreatedAt: number3(row2.external_created_at),
50677
- localPath: text5(row2.local_path),
50678
- contentSha256: text5(row2.content_sha256),
50679
- extraction: text5(row2.extraction),
50680
- extractionError: text5(row2.extraction_error),
50681
- downloadedBy: text5(row2.downloaded_by),
50682
- downloadedAt: Number(row2.downloaded_at)
50683
- }), "rowOf");
50684
- var matchOf2 = /* @__PURE__ */ __name((words4, anyWord, exact) => {
50685
- const phrases = words4.map((word2) => normalize(word2).trim()).filter(Boolean).map((word2) => {
50686
- const quoted6 = `"${word2.replaceAll('"', '""')}"`;
50687
- return exact || /\s/u.test(word2) || word2.length < 3 ? quoted6 : `${quoted6}*`;
50688
- });
50689
- return phrases.length ? [...new Set(phrases)].join(anyWord ? " OR " : " AND ") : void 0;
50690
- }, "matchOf");
50691
- var excerptOf = /* @__PURE__ */ __name((body2, words4) => {
50692
- const folded6 = fold(body2);
50693
- const at2 = words4.map((word2) => folded6.indexOf(fold(word2).trim())).filter((index2) => index2 >= 0).sort((a, b) => a - b)[0];
50694
- const start = Math.max(0, (at2 ?? 0) - EXCERPT / 4);
50695
- return body2.slice(start, start + EXCERPT).replace(/\s+/gu, " ").trim();
50696
- }, "excerptOf");
50697
- var resetCrmFileWords = /* @__PURE__ */ __name((database) => {
50698
- if (!database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'crm_file_words'").get())
50699
- return 0;
50700
- return write(database, () => {
50701
- const update2 = database.prepare("UPDATE crm_files SET normalized_text = ? WHERE id = ?");
50702
- for (const row2 of database.prepare("SELECT id, text, normalized_text FROM crm_files WHERE text IS NOT NULL").all()) {
50703
- const normalized = normalize(String(row2.text));
50704
- if (normalized !== row2.normalized_text)
50705
- update2.run(normalized, Number(row2.id));
50706
- }
50707
- database.exec("INSERT INTO crm_file_words (crm_file_words) VALUES ('delete-all')");
50708
- const { changes } = database.prepare("INSERT INTO crm_file_words (rowid, normalized_text) SELECT id, normalized_text FROM crm_files WHERE normalized_text <> ''").run();
50709
- return Number(changes);
50710
- });
50711
- }, "resetCrmFileWords");
50712
- var crmFilesOver = /* @__PURE__ */ __name((context) => {
50713
- const { database } = context;
50714
- const under = "substr(f.local_path, 1, length(?)) = ?";
50715
- const inside = /* @__PURE__ */ __name((folder) => folder.endsWith(sep) ? folder : `${folder}${sep}`, "inside");
50716
- const save2 = /* @__PURE__ */ __name((key2, file) => write(database, () => {
50717
- const accountId = accountPk(context, key2);
50718
- database.prepare("INSERT INTO crm_files (account_id, external_id, owner_kind, owner_id, owner_assignee, source, name, name_folded, mime, size, external_created_at, local_path, content_sha256, text, normalized_text, extraction, extraction_error, downloaded_by, downloaded_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (account_id, external_id) DO UPDATE SET owner_assignee = excluded.owner_assignee, source = excluded.source, name = excluded.name, name_folded = excluded.name_folded, mime = excluded.mime, size = excluded.size, external_created_at = excluded.external_created_at, local_path = excluded.local_path, content_sha256 = excluded.content_sha256, text = excluded.text, normalized_text = excluded.normalized_text, extraction = excluded.extraction, extraction_error = excluded.extraction_error, downloaded_by = excluded.downloaded_by, downloaded_at = excluded.downloaded_at").run(accountId, file.externalId, file.ownerKind, file.ownerId, file.ownerAssignee, file.source, file.name, fold(file.name), file.mime, file.size, file.externalCreatedAt, file.localPath, file.contentSha256, file.text, file.text === null ? null : normalize(file.text), file.extraction, file.extractionError, file.downloadedBy, file.downloadedAt);
50719
- }), "save");
50720
- const rowsOf2 = /* @__PURE__ */ __name((key2, columns2, where, ...params) => {
50721
- const accountId = findAccountPk(context, key2);
50722
- if (accountId === void 0)
50723
- return [];
50724
- return database.prepare(`SELECT ${columns2} FROM crm_files f WHERE f.account_id = ? AND ${where}`).all(accountId, ...params);
50725
- }, "rowsOf");
50726
- const find2 = /* @__PURE__ */ __name(({ words: words4, anyWord = false, exact = false, accounts: accounts2, viewers = [], limit }) => {
50727
- const match = matchOf2(words4, anyWord, exact);
50728
- if (!match)
50729
- return { items: [], hasMore: false };
50730
- const most = Math.min(Math.max(limit ?? 100, 1), MOST);
50731
- const scoped2 = accounts2?.map((one2) => findAccountPk(context, one2)).filter((one2) => one2 !== void 0) ?? [];
50732
- if (accounts2 !== void 0 && !scoped2.length)
50733
- return { items: [], hasMore: false };
50734
- const limits = viewers.flatMap((viewer) => {
50735
- const id2 = findAccountPk(context, viewer.account);
50736
- return id2 === void 0 ? [] : [{ id: id2, assignee: viewer.assignee }];
50737
- });
50738
- const params = [match];
50739
- let sql2 = `SELECT ${COLUMNS7}, f.text, a.provider, a.external_id AS account FROM crm_files f JOIN accounts a ON a.id = f.account_id JOIN (SELECT rowid, rank FROM crm_file_words WHERE crm_file_words MATCH ?) w ON w.rowid = f.id WHERE 1`;
50740
- if (accounts2 !== void 0) {
50741
- sql2 += ` AND f.account_id IN (${scoped2.map(() => "?").join(", ")})`;
50742
- for (const id2 of scoped2)
50743
- params.push(id2);
50744
- }
50745
- for (const one2 of limits) {
50746
- if (one2.assignee === null) {
50747
- sql2 += " AND f.account_id <> ?";
50748
- params.push(one2.id);
50749
- continue;
50750
- }
50751
- sql2 += ` AND (f.account_id <> ? OR CASE f.owner_kind WHEN 'deal' THEN ${CURRENTLY("deals")} WHEN 'lead' THEN ${CURRENTLY("leads")} ELSE f.owner_assignee = ? END)`;
50752
- params.push(one2.id, one2.assignee, one2.assignee, one2.assignee);
50753
- }
50754
- sql2 += " ORDER BY w.rank, f.downloaded_at DESC, f.id DESC LIMIT ?";
50755
- params.push(most + 1);
50756
- const hits = database.prepare(sql2).all(...params).map((row2) => ({
50757
- account: { provider: String(row2.provider), account: String(row2.account) },
50758
- file: rowOf2(row2),
50759
- excerpt: excerptOf(String(row2.text ?? ""), words4)
50760
- }));
50761
- return pageOfRows(hits, most);
50762
- }, "find");
50763
- return {
50764
- save: /* @__PURE__ */ __name(async (key2, file) => save2(key2, file), "save"),
50765
- get: /* @__PURE__ */ __name(async (key2, externalId) => {
50766
- const [row2] = rowsOf2(key2, `${COLUMNS7}, f.text`, "f.external_id = ?", externalId);
50767
- return row2 ? { ...rowOf2(row2), text: text5(row2.text) } : void 0;
50768
- }, "get"),
50769
- ofOwner: /* @__PURE__ */ __name(async (key2, kind3, id2) => rowsOf2(key2, COLUMNS7, "f.owner_kind = ? AND f.owner_id = ? ORDER BY f.downloaded_at DESC, f.id DESC", kind3, id2).map(rowOf2), "ofOwner"),
50770
- storedBytes: /* @__PURE__ */ __name(async (key2, folder) => rowsOf2(key2, "coalesce(sum(f.size), 0) AS bytes", `f.local_path IS NOT NULL AND ${under}`, inside(folder), inside(folder)).reduce((sum, row2) => sum + Number(row2.bytes), 0), "storedBytes"),
50771
- droppable: /* @__PURE__ */ __name(async (key2, folder) => rowsOf2(key2, COLUMNS7, `f.local_path IS NOT NULL AND ${under} AND coalesce(f.text, '') <> '' ORDER BY f.downloaded_at, f.id`, inside(folder), inside(folder)).map(rowOf2), "droppable"),
50772
- savedPaths: /* @__PURE__ */ __name(async (key2) => rowsOf2(key2, "f.local_path", "f.local_path IS NOT NULL ORDER BY f.id").map((row2) => String(row2.local_path)), "savedPaths"),
50773
- forgetFile: /* @__PURE__ */ __name(async (key2, externalId) => {
50774
- const accountId = findAccountPk(context, key2);
50775
- if (accountId === void 0)
50776
- return;
50777
- write(database, () => database.prepare("UPDATE crm_files SET local_path = NULL WHERE account_id = ? AND external_id = ?").run(accountId, externalId));
50778
- }, "forgetFile"),
50779
- find: /* @__PURE__ */ __name(async (search2) => find2(search2), "find"),
50780
- limits: /* @__PURE__ */ __name(async (key2) => crmFileLimits(database, key2), "limits")
50781
- };
50782
- }, "crmFilesOver");
51179
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
51180
+ import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
50783
51181
 
50784
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
50785
- import { createHash as createHash13, randomBytes as randomBytes2 } from "node:crypto";
50786
-
50787
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
51182
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
50788
51183
  var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
50789
51184
  var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
50790
51185
  var CALLBACK_PREFIX = "wcr1:";
@@ -50798,8 +51193,8 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
50798
51193
  }, "callbackDataOf");
50799
51194
  var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
50800
51195
 
50801
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
50802
- var digestOf = /* @__PURE__ */ __name((token) => createHash13("sha256").update(token).digest("hex"), "digestOf");
51196
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
51197
+ var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
50803
51198
  var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
50804
51199
  var requestOf = /* @__PURE__ */ __name((row2) => ({
50805
51200
  proposalId: row2.proposal_id,
@@ -50897,7 +51292,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
50897
51292
  };
50898
51293
  }, "decisionRequestStoreOver");
50899
51294
 
50900
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
51295
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
50901
51296
  var MEETING_ROW_KINDS = ["meeting", "call", "event"];
50902
51297
  var DAY8 = 864e5;
50903
51298
  var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
@@ -51284,7 +51679,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
51284
51679
  };
51285
51680
  }, "meetingListingOver");
51286
51681
 
51287
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
51682
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
51288
51683
  var DOCUMENT_KINDS = [
51289
51684
  "transcript",
51290
51685
  "doc",
@@ -51521,7 +51916,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
51521
51916
  };
51522
51917
  }, "documentListingOver");
51523
51918
 
51524
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
51919
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
51525
51920
  var NOTE_FIELDS = [
51526
51921
  "text",
51527
51922
  "exact",
@@ -52018,7 +52413,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
52018
52413
  };
52019
52414
  }, "noteSearchOver");
52020
52415
 
52021
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
52416
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
52022
52417
  var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
52023
52418
  var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
52024
52419
  var EVENT_CORPUS = {
@@ -52158,7 +52553,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
52158
52553
  };
52159
52554
  }, "eventSearchOver");
52160
52555
 
52161
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
52556
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
52162
52557
  var NAMED4 = "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";
52163
52558
  var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
52164
52559
  var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -52421,7 +52816,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
52421
52816
  };
52422
52817
  }, "factsStoreOver");
52423
52818
 
52424
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
52819
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
52425
52820
  var invalid4 = /* @__PURE__ */ __name((message3) => {
52426
52821
  throw new CliError("validation_error", message3);
52427
52822
  }, "invalid");
@@ -52589,7 +52984,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
52589
52984
  return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
52590
52985
  }, "findingsCoreOver");
52591
52986
 
52592
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
52987
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
52593
52988
  var stale = /* @__PURE__ */ __name(() => {
52594
52989
  throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
52595
52990
  reason: "evidence-findings.stale"
@@ -52853,7 +53248,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
52853
53248
  };
52854
53249
  }, "evidenceFindingsStoreOver");
52855
53250
 
52856
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
53251
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
52857
53252
  var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
52858
53253
  var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
52859
53254
  rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
@@ -52907,7 +53302,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
52907
53302
  }, "forPerson")
52908
53303
  }), "involvementStoreOver");
52909
53304
 
52910
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
53305
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
52911
53306
  var LABELLED = {
52912
53307
  note: "note",
52913
53308
  document: "document",
@@ -52920,8 +53315,8 @@ var LABELLED = {
52920
53315
  };
52921
53316
  var accountMeetingTagging = /* @__PURE__ */ __name((alias2) => `(${alias2}.taggable_type <> 'meeting' OR EXISTS (SELECT 1 FROM meetings mt WHERE mt.id = ${alias2}.taggable_id AND mt.deleted_at IS NULL AND (? IS NULL OR mt.account_id = ?)))`, "accountMeetingTagging");
52922
53317
 
52923
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
52924
- import { createHash as createHash14 } from "node:crypto";
53318
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
53319
+ import { createHash as createHash15 } from "node:crypto";
52925
53320
  var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
52926
53321
  var id = /* @__PURE__ */ __name((value) => {
52927
53322
  if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
@@ -52950,7 +53345,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
52950
53345
  project: `project:${row2.to_id}`,
52951
53346
  confirmed: Number(row2.confirmed) === 1,
52952
53347
  provenance: row2.evidence == null ? null : String(row2.evidence),
52953
- 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")
53348
+ fingerprint: createHash15("sha256").update(JSON.stringify([row2.id, row2.from_id, row2.to_id, row2.source, row2.confirmed, row2.evidence, row2.updated_at])).digest("hex")
52954
53349
  };
52955
53350
  }, "linkOf");
52956
53351
  return {
@@ -53006,7 +53401,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
53006
53401
  };
53007
53402
  }, "meetingProjectsStoreOver");
53008
53403
 
53009
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
53404
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
53010
53405
  var ORGANIZATIONS_QUERY = {
53011
53406
  entity: "organization",
53012
53407
  backend: "sql",
@@ -53047,7 +53442,7 @@ var REMINDERS_QUERY = {
53047
53442
  })
53048
53443
  };
53049
53444
 
53050
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
53445
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
53051
53446
  var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
53052
53447
  var EMPLOYED = "('employee', 'contractor', 'founder')";
53053
53448
  var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
@@ -53068,7 +53463,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
53068
53463
  return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
53069
53464
  }, "categorySql");
53070
53465
 
53071
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
53466
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
53072
53467
  var organizationOf = /* @__PURE__ */ __name((row2) => ({
53073
53468
  id: String(row2.id),
53074
53469
  ref: `organization:${row2.id}`,
@@ -53113,7 +53508,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
53113
53508
  }), "setOwnOrganization")
53114
53509
  }), "organizationsStoreOver");
53115
53510
 
53116
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
53511
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
53117
53512
  var KINDS = RELATION_KINDS.map(linkKind).join(", ");
53118
53513
  var ACCOUNT_ENDS = [
53119
53514
  ["deal", "deals"],
@@ -53276,13 +53671,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
53276
53671
  __name(proposalItem, "proposalItem");
53277
53672
  }, "relationListOver");
53278
53673
 
53279
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
53674
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
53280
53675
  var relationReadsOver = /* @__PURE__ */ __name((context) => ({
53281
53676
  ...relationListOver(context),
53282
53677
  ...relationRolesOver(context)
53283
53678
  }), "relationReadsOver");
53284
53679
 
53285
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
53680
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
53286
53681
  var TABLES6 = { memory: "memories", fact: "facts" };
53287
53682
  var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
53288
53683
  var DEFAULT_LIMIT = 500;
@@ -53525,16 +53920,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
53525
53920
  };
53526
53921
  }, "sourceReviewStoreOver");
53527
53922
 
53528
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
53923
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
53924
+ import { createHash as createHash18 } from "node:crypto";
53925
+
53926
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
53529
53927
  import { createHash as createHash17 } from "node:crypto";
53530
53928
 
53531
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
53929
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
53532
53930
  import { createHash as createHash16 } from "node:crypto";
53533
53931
 
53534
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
53535
- import { createHash as createHash15 } from "node:crypto";
53536
-
53537
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
53932
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
53538
53933
  var consolidationId = /* @__PURE__ */ __name((value, field4) => {
53539
53934
  if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
53540
53935
  throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
@@ -53585,7 +53980,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
53585
53980
  return input;
53586
53981
  }, "consolidationApplyInput");
53587
53982
 
53588
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
53983
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
53589
53984
  var receiptOf = /* @__PURE__ */ __name((row2) => ({
53590
53985
  id: String(row2.id),
53591
53986
  sourceId: String(row2.source_id),
@@ -53609,7 +54004,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
53609
54004
  check3();
53610
54005
  return write(database, () => {
53611
54006
  const owner = ownerPerson(database);
53612
- const request = createHash15("sha256").update(JSON.stringify([
54007
+ const request = createHash16("sha256").update(JSON.stringify([
53613
54008
  source2,
53614
54009
  survivor,
53615
54010
  owner.type,
@@ -53660,7 +54055,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
53660
54055
  }, { beforeCommit: check3 });
53661
54056
  }, "applyTagConsolidation");
53662
54057
 
53663
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
54058
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
53664
54059
  var selections = [
53665
54060
  ["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
53666
54061
  ["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
@@ -53706,7 +54101,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
53706
54101
  const memberIds = JSON.stringify([...sourceMemberIds, ...survivorMemberIds].map(Number));
53707
54102
  const captured = JSON.stringify(graph);
53708
54103
  let readBytes = Buffer.byteLength(captured);
53709
- const hash2 = createHash16("sha256").update(JSON.stringify([source2, survivor, catalog.fingerprint, graph]));
54104
+ const hash2 = createHash17("sha256").update(JSON.stringify([source2, survivor, catalog.fingerprint, graph]));
53710
54105
  for (const [table, where] of selections) {
53711
54106
  cancelled(options);
53712
54107
  const parameters = table === "links" ? [memberIds, memberIds] : [memberIds];
@@ -53804,7 +54199,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
53804
54199
  };
53805
54200
  }, "previewRows");
53806
54201
 
53807
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
54202
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
53808
54203
  var kinds = ["project", "tag", "topic"];
53809
54204
  var cancelled2 = /* @__PURE__ */ __name((signal) => {
53810
54205
  if (signal?.aborted)
@@ -53896,7 +54291,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
53896
54291
  cancelled2(options.signal);
53897
54292
  return {
53898
54293
  entries,
53899
- fingerprint: `v1:${options.kind ?? "all"}:${options.scope ?? "all"}:${createHash17("sha256").update(JSON.stringify(entries)).digest("hex")}`,
54294
+ fingerprint: `v1:${options.kind ?? "all"}:${options.scope ?? "all"}:${createHash18("sha256").update(JSON.stringify(entries)).digest("hex")}`,
53900
54295
  coverage: { complete: true, maxEntries, maxReadBytes }
53901
54296
  };
53902
54297
  }), "catalog");
@@ -54068,7 +54463,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
54068
54463
  };
54069
54464
  }, "vocabularyStoreOver");
54070
54465
 
54071
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
54466
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
54072
54467
  var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
54073
54468
  var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
54074
54469
  var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
@@ -54622,7 +55017,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
54622
55017
  return key2.padEnd(3, "X");
54623
55018
  }, "projectKey");
54624
55019
 
54625
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
55020
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
54626
55021
  var DAY9 = 864e5;
54627
55022
  var SETTING5 = "logs_pruned_at";
54628
55023
  var LOG_RETENTION = { agentActionsMs: 90 * DAY9, botUpdatePayloadsMs: 30 * DAY9 };
@@ -54649,7 +55044,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
54649
55044
  };
54650
55045
  }, "logPruner");
54651
55046
 
54652
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/mail/findings.js
55047
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/mail/findings.js
54653
55048
  var MAIL_FINDINGS_PER_RUN = 30;
54654
55049
  var MAIL_FINDINGS_PER_SENDER = 5;
54655
55050
  var invalid6 = /* @__PURE__ */ __name((message3) => {
@@ -55008,7 +55403,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
55008
55403
  }, "checkMailFindings");
55009
55404
  var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
55010
55405
 
55011
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
55406
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
55012
55407
  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";
55013
55408
  var orderOperationsOver = /* @__PURE__ */ __name((context) => {
55014
55409
  const { database, now: now2 } = context;
@@ -55223,7 +55618,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
55223
55618
  };
55224
55619
  }, "ordersStoreOver");
55225
55620
 
55226
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
55621
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
55227
55622
  var MAIL_EDITS = {
55228
55623
  task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
55229
55624
  fact: ["statement", "type", "reason", "subject", "project"],
@@ -55712,7 +56107,7 @@ ${evidence.join("\n")}`, agent);
55712
56107
  };
55713
56108
  }, "mailFindingsStoreOver");
55714
56109
 
55715
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
56110
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
55716
56111
  var stale3 = /* @__PURE__ */ __name(() => {
55717
56112
  throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
55718
56113
  reason: "meeting-findings.stale"
@@ -55925,7 +56320,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
55925
56320
  };
55926
56321
  }, "meetingFindingsStoreOver");
55927
56322
 
55928
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
56323
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
55929
56324
  var RANK_BATCH = 512;
55930
56325
  var LIVE6 = "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";
55931
56326
  var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
@@ -56196,7 +56591,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
56196
56591
  }
56197
56592
  }), "meetingVectorsOver");
56198
56593
 
56199
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
56594
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
56200
56595
  var OTHER_SOURCES = ["document", "note", "email"];
56201
56596
  var TEXTS = {
56202
56597
  document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
@@ -56297,7 +56692,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
56297
56692
  };
56298
56693
  }, "sourceMentionStoreOver");
56299
56694
 
56300
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
56695
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
56301
56696
  var TRANSACTIONS = "SELECT t.*, w.name AS wallet_name, b.name AS author_name, b.kind AS author_kind, (SELECT coalesce(sum(amount), 0) FROM transaction_splits WHERE transaction_id = t.id) AS split FROM financial_transactions t JOIN financial_accounts w ON w.id = t.financial_account_id LEFT JOIN bots b ON t.author_type = 'bot' AND b.id = t.author_id";
56302
56697
  var MAX_SPLITS = 100;
56303
56698
  var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
@@ -56531,11 +56926,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
56531
56926
  };
56532
56927
  }, "transactionsStoreOver");
56533
56928
 
56534
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
56929
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
56535
56930
  import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
56536
56931
  import { dirname as dirname2 } from "node:path";
56537
56932
 
56538
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
56933
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
56539
56934
  import { readFileSync as readFileSync3 } from "node:fs";
56540
56935
  var CLIENTS_SETTING = "clients";
56541
56936
  var coreVersion = (() => {
@@ -56596,7 +56991,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
56596
56991
  return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
56597
56992
  }, "refusalAdvice");
56598
56993
 
56599
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
56994
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
56600
56995
  var GENERATED = [
56601
56996
  {
56602
56997
  "name": "20261010184427_initial",
@@ -58010,10 +58405,36 @@ WHERE json_type(params, '$.selection') = 'object';`
58010
58405
  "CREATE TRIGGER tracker_item_words_au AFTER UPDATE OF normalized_text ON tracker_items\n WHEN old.normalized_text IS NOT new.normalized_text BEGIN\n DELETE FROM tracker_item_words WHERE rowid = old.id;\n INSERT INTO tracker_item_words (rowid, normalized_text)\n SELECT new.id, new.normalized_text WHERE new.normalized_text <> '';\nEND;",
58011
58406
  "CREATE TRIGGER tracker_item_words_ad AFTER DELETE ON tracker_items BEGIN\n DELETE FROM tracker_item_words WHERE rowid = old.id;\nEND;"
58012
58407
  ]
58408
+ },
58409
+ {
58410
+ "name": "20261118230213_version-71-content",
58411
+ "statements": [
58412
+ "CREATE TABLE `content_authors` (\n `id` integer PRIMARY KEY,\n `account_id` integer NOT NULL,\n `external_id` text NOT NULL,\n `name` text NOT NULL,\n `email` text,\n `data` text NOT NULL,\n `source_updated_at` integer,\n `deleted_at` integer,\n `synced_at` integer NOT NULL,\n CONSTRAINT `fk_content_authors_account_id_accounts_id_fk` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`),\n CONSTRAINT `content_authors_account_id_external_id_unique` UNIQUE(`account_id`,`external_id`)\n);",
58413
+ "CREATE TABLE `content_channels` (\n `id` integer PRIMARY KEY,\n `account_id` integer NOT NULL,\n `external_id` text NOT NULL,\n `kind` text NOT NULL,\n `network` text NOT NULL,\n `name` text NOT NULL,\n `url` text,\n `handle` text,\n `deleted_at` integer,\n `synced_at` integer NOT NULL,\n CONSTRAINT `fk_content_channels_account_id_accounts_id_fk` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`),\n CONSTRAINT `content_channels_account_id_external_id_unique` UNIQUE(`account_id`,`external_id`)\n);",
58414
+ "CREATE TABLE `content_metrics` (\n `id` integer PRIMARY KEY,\n `post_id` integer NOT NULL,\n `at` integer NOT NULL,\n `views` integer,\n `reactions` integer,\n `comments` integer,\n `shares` integer,\n `clicks` integer,\n `raw` text,\n CONSTRAINT `fk_content_metrics_post_id_content_posts_id_fk` FOREIGN KEY (`post_id`) REFERENCES `content_posts`(`id`)\n);",
58415
+ "CREATE TABLE `content_post_revisions` (\n `id` integer PRIMARY KEY,\n `post_id` integer NOT NULL,\n `title` text,\n `body` text,\n `status` text NOT NULL,\n `content_hash` text NOT NULL,\n `version` text,\n `reason` text NOT NULL,\n `created_at` integer NOT NULL,\n CONSTRAINT `fk_content_post_revisions_post_id_content_posts_id_fk` FOREIGN KEY (`post_id`) REFERENCES `content_posts`(`id`)\n);",
58416
+ "CREATE TABLE `content_posts` (\n `id` integer PRIMARY KEY,\n `account_id` integer NOT NULL,\n `external_id` text NOT NULL,\n `channel_id` text,\n `type` text NOT NULL,\n `title` text,\n `title_folded` text NOT NULL,\n `body` text,\n `content_hash` text NOT NULL,\n `status` text NOT NULL,\n `published_at` integer,\n `scheduled_for` integer,\n `source_created_at` integer,\n `source_updated_at` integer,\n `version` text,\n `normalized_text` text NOT NULL,\n `data` text NOT NULL,\n `deleted_at` integer,\n `synced_at` integer NOT NULL,\n CONSTRAINT `fk_content_posts_account_id_accounts_id_fk` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`),\n CONSTRAINT `content_posts_account_id_external_id_unique` UNIQUE(`account_id`,`external_id`)\n);",
58417
+ "CREATE TABLE `content_terms` (\n `id` integer PRIMARY KEY,\n `account_id` integer NOT NULL,\n `external_id` text NOT NULL,\n `kind` text NOT NULL,\n `name` text NOT NULL,\n `slug` text,\n `parent_id` text,\n `tag_id` integer,\n `data` text NOT NULL,\n `source_updated_at` integer,\n `deleted_at` integer,\n `synced_at` integer NOT NULL,\n CONSTRAINT `fk_content_terms_account_id_accounts_id_fk` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`),\n CONSTRAINT `fk_content_terms_tag_id_canonical_tags_id_fk` FOREIGN KEY (`tag_id`) REFERENCES `canonical_tags`(`id`),\n CONSTRAINT `content_terms_account_id_external_id_unique` UNIQUE(`account_id`,`external_id`)\n);",
58418
+ "CREATE INDEX `content_metrics_by_post_id_at` ON `content_metrics` (`post_id`,`at`);",
58419
+ "CREATE INDEX `content_post_revisions_by_post_id_created_at` ON `content_post_revisions` (`post_id`,`created_at`);",
58420
+ "CREATE INDEX `content_posts_by_account_id_status` ON `content_posts` (`account_id`,`status`);",
58421
+ "CREATE INDEX `content_posts_by_account_id_published_at` ON `content_posts` (`account_id`,`published_at`);",
58422
+ "CREATE INDEX `content_terms_by_tag_id` ON `content_terms` (`tag_id`);"
58423
+ ]
58424
+ },
58425
+ {
58426
+ "name": "20261118230214_version-71-content-words",
58427
+ "statements": [
58428
+ "-- Words of a post's title and text, rowid = content_posts.id.\nCREATE VIRTUAL TABLE content_post_words USING fts5(\n normalized_text,\n content = '', contentless_delete = 1,\n tokenize = 'unicode61 remove_diacritics 2', prefix = '3');",
58429
+ "CREATE VIRTUAL TABLE content_post_words_vocab USING fts5vocab(content_post_words, 'col');",
58430
+ "CREATE TRIGGER content_post_words_ai AFTER INSERT ON content_posts WHEN new.normalized_text <> '' BEGIN\n INSERT INTO content_post_words (rowid, normalized_text) VALUES (new.id, new.normalized_text);\nEND;",
58431
+ "CREATE TRIGGER content_post_words_au AFTER UPDATE OF normalized_text ON content_posts\n WHEN old.normalized_text IS NOT new.normalized_text BEGIN\n DELETE FROM content_post_words WHERE rowid = old.id;\n INSERT INTO content_post_words (rowid, normalized_text)\n SELECT new.id, new.normalized_text WHERE new.normalized_text <> '';\nEND;",
58432
+ "-- Taggings are polymorphic, with no foreign key: a post row that goes takes its tags along.\nCREATE TRIGGER content_post_words_ad AFTER DELETE ON content_posts BEGIN\n DELETE FROM content_post_words WHERE rowid = old.id;\n DELETE FROM taggings WHERE taggable_type = 'post' AND taggable_id = old.id;\nEND;"
58433
+ ]
58013
58434
  }
58014
58435
  ];
58015
58436
 
58016
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
58437
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
58017
58438
  import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
58018
58439
  import { basename, dirname, join as join3, parse } from "node:path";
58019
58440
  var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
@@ -58246,7 +58667,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
58246
58667
  return { ...result, foreignKeyViolations };
58247
58668
  }, "rollBack");
58248
58669
 
58249
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
58670
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
58250
58671
  var V31_TABLES = [
58251
58672
  "accounts",
58252
58673
  "account_identities",
@@ -58382,7 +58803,9 @@ var MANIFEST = [
58382
58803
  { name: "20261117015456_version-69-conversation-readiness", version: 69, minCompatible: 56 },
58383
58804
  { name: "20261117015457_version-69-conversation-readiness-triggers", version: 69, minCompatible: 56 },
58384
58805
  { name: "20261117211410_version-70-tracker-items", version: 70, minCompatible: 56 },
58385
- { name: "20261117211414_version-70-tracker-item-words", version: 70, minCompatible: 56 }
58806
+ { name: "20261117211414_version-70-tracker-item-words", version: 70, minCompatible: 56 },
58807
+ { name: "20261118230213_version-71-content", version: 71, minCompatible: 56 },
58808
+ { name: "20261118230214_version-71-content-words", version: 71, minCompatible: 56 }
58386
58809
  ];
58387
58810
  var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated = GENERATED) => {
58388
58811
  const migrations = [];
@@ -58418,7 +58841,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
58418
58841
  return migrations;
58419
58842
  }, "generatedMigrations");
58420
58843
 
58421
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/migrations.js
58844
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/migrations.js
58422
58845
  var MIGRATIONS = generatedMigrations();
58423
58846
  var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
58424
58847
  version INTEGER PRIMARY KEY,
@@ -58515,7 +58938,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
58515
58938
  }
58516
58939
  }, "migrate");
58517
58940
 
58518
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
58941
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
58519
58942
  var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
58520
58943
  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 ?");
58521
58944
  if (pending.get(0, 1) === void 0)
@@ -58537,7 +58960,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
58537
58960
  }
58538
58961
  }, "fillJoinKeys");
58539
58962
 
58540
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
58963
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
58541
58964
  var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
58542
58965
  refuseOwnerStoreInTests(path);
58543
58966
  const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
@@ -58551,8 +58974,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
58551
58974
  }, "openSqlite");
58552
58975
  var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
58553
58976
  quietSqliteWarning();
58554
- const { drizzle } = await import("./node-HGCZGZ4R.js");
58555
- const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-RKYSRKEB.js");
58977
+ const { drizzle } = await import("./node-UAT3EIAP.js");
58978
+ const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-3HKDQNFD.js");
58556
58979
  const client = await nodeClient(path, { readOnly });
58557
58980
  try {
58558
58981
  if (!readOnly)
@@ -58566,8 +58989,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
58566
58989
  }
58567
58990
  }, "openUnderNode");
58568
58991
  var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
58569
- const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-AGXGSF6D.js");
58570
- const { drizzle } = await import("./bun-AJPJ4ZUN.js");
58992
+ const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-TGIAICDN.js");
58993
+ const { drizzle } = await import("./bun-GW443QB3.js");
58571
58994
  const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
58572
58995
  try {
58573
58996
  if (!readOnly)
@@ -58581,7 +59004,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
58581
59004
  }
58582
59005
  }, "openUnderBun");
58583
59006
 
58584
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
59007
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
58585
59008
  var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
58586
59009
  var paymentOf = /* @__PURE__ */ __name((metadata3) => {
58587
59010
  try {
@@ -58649,7 +59072,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
58649
59072
  });
58650
59073
  }, "movePaymentFacts");
58651
59074
 
58652
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
59075
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
58653
59076
  var readCompatibility = /* @__PURE__ */ __name((database, command) => {
58654
59077
  const ours = MIGRATIONS.at(-1)?.version ?? 0;
58655
59078
  if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
@@ -58667,7 +59090,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
58667
59090
  throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
58668
59091
  }, "assertReadCompatible");
58669
59092
 
58670
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
59093
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
58671
59094
  var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
58672
59095
  var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
58673
59096
  if (provenance2?.startsWith("rule:"))
@@ -58713,7 +59136,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
58713
59136
  });
58714
59137
  }, "moveSuggestedLinks");
58715
59138
 
58716
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
59139
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
58717
59140
  var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
58718
59141
  var TEST_PROVIDER = "chat";
58719
59142
  var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
@@ -58734,7 +59157,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
58734
59157
  }
58735
59158
  }, "purgeTestAccounts");
58736
59159
 
58737
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
59160
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
58738
59161
  var BACKFILL_ON_OPEN = 5e3;
58739
59162
  var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
58740
59163
  var createWritable = /* @__PURE__ */ __name((file) => {
@@ -58846,7 +59269,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
58846
59269
  }
58847
59270
  }, "openStoreContext");
58848
59271
 
58849
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
59272
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
58850
59273
  var PRODUCTS = "SELECT c.*, b.name AS author_name, b.kind AS author_kind FROM catalog_items c LEFT JOIN bots b ON c.author_type = 'bot' AND b.id = c.author_id";
58851
59274
  var productOperationsOver = /* @__PURE__ */ __name((context) => {
58852
59275
  const { database, now: now2 } = context;
@@ -58954,13 +59377,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
58954
59377
  };
58955
59378
  }, "productsStoreOver");
58956
59379
 
58957
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
58958
- import { createHash as createHash19 } from "node:crypto";
59380
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
59381
+ import { createHash as createHash20 } from "node:crypto";
58959
59382
 
58960
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
58961
- import { createHash as createHash18 } from "node:crypto";
59383
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
59384
+ import { createHash as createHash19 } from "node:crypto";
58962
59385
 
58963
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
59386
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
58964
59387
  var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
58965
59388
  var ref = text6(2048);
58966
59389
  var timestamp2 = pipe(number(), safeInteger(), minValue(0));
@@ -59030,7 +59453,7 @@ var projectAnnotationsSchema = strictObject({
59030
59453
  }))
59031
59454
  });
59032
59455
 
59033
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
59456
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
59034
59457
  var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
59035
59458
  var invalid9 = /* @__PURE__ */ __name((field4) => {
59036
59459
  throw new CliError("validation_error", `invalid project annotations.${field4}`);
@@ -59160,10 +59583,10 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
59160
59583
  links: manifest.links.toSorted((a, b) => a.ref.localeCompare(b.ref)),
59161
59584
  external: manifest.external.toSorted((a, b) => a.ref.localeCompare(b.ref))
59162
59585
  };
59163
- return createHash18("sha256").update(JSON.stringify(normalized)).digest("hex");
59586
+ return createHash19("sha256").update(JSON.stringify(normalized)).digest("hex");
59164
59587
  }, "projectAnnotationsFingerprint");
59165
59588
 
59166
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
59589
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
59167
59590
  var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
59168
59591
  var ref2 = pipe(string(), minLength(1), maxLength(2048));
59169
59592
  var targetSchema = strictObject({
@@ -59251,7 +59674,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
59251
59674
  }
59252
59675
  if (target.annotation_count > 0)
59253
59676
  conflicts.push({ reference: target.project, reason: "populated" });
59254
- const fingerprint2 = createHash19("sha256").update(JSON.stringify({
59677
+ const fingerprint2 = createHash20("sha256").update(JSON.stringify({
59255
59678
  manifest_fingerprint,
59256
59679
  target: {
59257
59680
  ...checked3.output,
@@ -59270,8 +59693,8 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
59270
59693
  }, "planBoundProjectAnnotations");
59271
59694
  var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
59272
59695
 
59273
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
59274
- import { createHash as createHash20 } from "node:crypto";
59696
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
59697
+ import { createHash as createHash21 } from "node:crypto";
59275
59698
  var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
59276
59699
  var timestamp3 = pipe(number(), safeInteger(), minValue(0));
59277
59700
  var projectAnnotationSnapshotSchema = strictObject({
@@ -59355,7 +59778,7 @@ var decodeProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3) => {
59355
59778
  var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
59356
59779
  const snapshot2 = decodeProjectAnnotationSnapshot(json3);
59357
59780
  const order = /* @__PURE__ */ __name((a, b) => a.ref < b.ref ? -1 : a.ref > b.ref ? 1 : 0, "order");
59358
- return createHash20("sha256").update(JSON.stringify({
59781
+ return createHash21("sha256").update(JSON.stringify({
59359
59782
  ...snapshot2,
59360
59783
  aliases: snapshot2.aliases.toSorted((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0),
59361
59784
  facts: snapshot2.facts.toSorted(order),
@@ -59364,7 +59787,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
59364
59787
  })).digest("hex");
59365
59788
  }, "projectAnnotationSnapshotFingerprint");
59366
59789
 
59367
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
59790
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
59368
59791
  var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
59369
59792
  if (!request || typeof request !== "object" || Array.isArray(request))
59370
59793
  throw new CliError("validation_error", "project annotation request is required");
@@ -59381,7 +59804,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
59381
59804
  return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
59382
59805
  }, "projectAnnotationRequest");
59383
59806
 
59384
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
59807
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
59385
59808
  var SnapshotBudget = class {
59386
59809
  static {
59387
59810
  __name(this, "SnapshotBudget");
@@ -59407,14 +59830,14 @@ var SnapshotBudget = class {
59407
59830
  }
59408
59831
  };
59409
59832
 
59410
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
59411
- import { createHash as createHash22 } from "node:crypto";
59833
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
59834
+ import { createHash as createHash23 } from "node:crypto";
59412
59835
 
59413
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
59836
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
59414
59837
  var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
59415
59838
 
59416
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
59417
- import { createHash as createHash21 } from "node:crypto";
59839
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
59840
+ import { createHash as createHash22 } from "node:crypto";
59418
59841
  var invalid11 = /* @__PURE__ */ __name(() => {
59419
59842
  throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
59420
59843
  }, "invalid");
@@ -59552,11 +59975,11 @@ var ProjectSnapshotSources = class {
59552
59975
  return this.digest("meeting_transcript", [header, cues]);
59553
59976
  }
59554
59977
  digest(kind3, content2) {
59555
- return createHash21("sha256").update(JSON.stringify(["wirecat.project-source", 1, kind3, content2])).digest("hex");
59978
+ return createHash22("sha256").update(JSON.stringify(["wirecat.project-source", 1, kind3, content2])).digest("hex");
59556
59979
  }
59557
59980
  };
59558
59981
 
59559
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
59982
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
59560
59983
  var unsupported = /* @__PURE__ */ __name(() => {
59561
59984
  throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
59562
59985
  }, "unsupported");
@@ -59734,7 +60157,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
59734
60157
  return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
59735
60158
  }), "projectAnnotationSnapshot");
59736
60159
 
59737
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
60160
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
59738
60161
  var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
59739
60162
  const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
59740
60163
  const sources = new ProjectSnapshotSources(database, budget);
@@ -59775,7 +60198,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
59775
60198
  const target = {
59776
60199
  project: current2.project.ref,
59777
60200
  annotation_count: current2.aliases.length + current2.facts.length + current2.links.length,
59778
- revision_sha256: createHash22("sha256").update(JSON.stringify({
60201
+ revision_sha256: createHash23("sha256").update(JSON.stringify({
59779
60202
  snapshot: projectAnnotationSnapshotFingerprint(JSON.stringify(current2)),
59780
60203
  projects: projects2,
59781
60204
  aliases: aliases2,
@@ -59790,13 +60213,13 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
59790
60213
  descriptor_conflicts,
59791
60214
  namespace_conflicts,
59792
60215
  ready: plan.ready && descriptor_conflicts.length === 0 && namespace_conflicts.length === 0,
59793
- fingerprint: createHash22("sha256").update(JSON.stringify({ plan: plan.fingerprint, descriptor_conflicts, namespace_conflicts })).digest("hex"),
60216
+ fingerprint: createHash23("sha256").update(JSON.stringify({ plan: plan.fingerprint, descriptor_conflicts, namespace_conflicts })).digest("hex"),
59794
60217
  read_bytes: budget.bytes,
59795
60218
  records: budget.records
59796
60219
  };
59797
60220
  }), "previewAnnotationSnapshot");
59798
60221
 
59799
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
60222
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
59800
60223
  var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
59801
60224
  const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
59802
60225
  if (link3.kind === "evidence" && to)
@@ -59863,7 +60286,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
59863
60286
  return mappings;
59864
60287
  }, "restoreAnnotationRecords");
59865
60288
 
59866
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
60289
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
59867
60290
  var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
59868
60291
  async preview(request) {
59869
60292
  const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
@@ -59893,7 +60316,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
59893
60316
  }
59894
60317
  }), "projectAnnotationStoreOver");
59895
60318
 
59896
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
60319
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
59897
60320
  var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
59898
60321
  var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
59899
60322
  const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
@@ -59964,7 +60387,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
59964
60387
  return { entityRef, relatedOf, storedRelations, relate, missingOf };
59965
60388
  }, "recordRelationsOver");
59966
60389
 
59967
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
60390
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
59968
60391
  var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
59969
60392
  const pointedAt = /* @__PURE__ */ __name((type, id2) => {
59970
60393
  for (const { table, pointer } of pointerPairs(database))
@@ -60018,7 +60441,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
60018
60441
  return { pointedAt, remap };
60019
60442
  }, "recordRemapOver");
60020
60443
 
60021
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
60444
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
60022
60445
  var runs = 0;
60023
60446
  var PAGE = 500;
60024
60447
  var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
@@ -60231,7 +60654,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
60231
60654
  return pointerOf("records", index2, "fields", key2);
60232
60655
  }, "waitingPointer");
60233
60656
 
60234
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
60657
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
60235
60658
  var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
60236
60659
  var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
60237
60660
  var ORG_EMAIL = "org-email";
@@ -60397,7 +60820,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
60397
60820
  ]);
60398
60821
  }, "renameMade");
60399
60822
 
60400
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
60823
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
60401
60824
  var productFields = /* @__PURE__ */ __name((fields4) => ({
60402
60825
  name: given(fields4, "name"),
60403
60826
  unit: given(fields4, "unit"),
@@ -60520,7 +60943,7 @@ var DIRECT_PROJECTORS = {
60520
60943
  lead: dealProjector("lead")
60521
60944
  };
60522
60945
 
60523
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
60946
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
60524
60947
  var TEXT_ONLY = { storage: "text", localPath: null };
60525
60948
  var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
60526
60949
  const text8 = String(fields4.text ?? "");
@@ -60589,7 +61012,7 @@ var DOCUMENT_PROJECTORS = {
60589
61012
  }
60590
61013
  };
60591
61014
 
60592
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
61015
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
60593
61016
  var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
60594
61017
  const importer = authorActor(context, IMPORTER).actor;
60595
61018
  return context.database.prepare("SELECT 1 FROM payment_allocations WHERE payment_id = ? AND NOT (author_type = ? AND author_id = ?) LIMIT 1").get(paymentId, importer.type, importer.id) !== void 0;
@@ -60799,7 +61222,7 @@ var MONEY_PROJECTORS = {
60799
61222
  }
60800
61223
  };
60801
61224
 
60802
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
61225
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
60803
61226
  var CALLS_CALENDAR = "calls";
60804
61227
  var importOnly = /* @__PURE__ */ __name((source2, type) => {
60805
61228
  if (!isImportedProvider(source2.provider))
@@ -60974,7 +61397,7 @@ var PHONE_PROJECTORS = {
60974
61397
  }
60975
61398
  };
60976
61399
 
60977
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
61400
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
60978
61401
  var RECORD_PROJECTORS = {
60979
61402
  ...MONEY_PROJECTORS,
60980
61403
  ...DIRECT_PROJECTORS,
@@ -60985,7 +61408,7 @@ var RECORD_PROJECTORS = {
60985
61408
  project: null
60986
61409
  };
60987
61410
 
60988
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
61411
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
60989
61412
  var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
60990
61413
  const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
60991
61414
  const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
@@ -61047,8 +61470,8 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
61047
61470
  return { settle, checkShares };
61048
61471
  }, "recordSettlingOver");
61049
61472
 
61050
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
61051
- import { createHash as createHash23 } from "node:crypto";
61473
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
61474
+ import { createHash as createHash24 } from "node:crypto";
61052
61475
  var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
61053
61476
  var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
61054
61477
  var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
@@ -61056,14 +61479,14 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
61056
61479
  const { table } = RECORD_TYPES[type];
61057
61480
  const parts = nestedOf(type).map(([, nested]) => database.prepare(`SELECT * FROM ${nested.table} WHERE ${nested.parent} = ? ORDER BY id`).all(id2).map((row3) => content(row3)));
61058
61481
  const row2 = database.prepare(`SELECT * FROM ${table} WHERE id = ?`).get(id2);
61059
- return createHash23("sha256").update(JSON.stringify([content(row2), parts])).digest("hex");
61482
+ return createHash24("sha256").update(JSON.stringify([content(row2), parts])).digest("hex");
61060
61483
  }, "stateOf");
61061
61484
  const stamp = /* @__PURE__ */ __name((type, id2) => database.prepare(`UPDATE ${RECORD_TYPES[type].table} SET metadata = json_set(coalesce(metadata, '{}'), '$.imported', ?) WHERE id = ?`).run(stateOf3(type, id2), id2), "stamp");
61062
61485
  const untouched = /* @__PURE__ */ __name((type, id2) => database.prepare(`SELECT json_extract(metadata, '$.imported') AS stamp FROM ${RECORD_TYPES[type].table} WHERE id = ?`).get(id2)?.stamp === stateOf3(type, id2), "untouched");
61063
61486
  return { stamp, untouched };
61064
61487
  }, "importStampsOver");
61065
61488
 
61066
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
61489
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
61067
61490
  var SUBSCRIPTIONS = "SELECT s.*, b.name AS author_name, b.kind AS author_kind FROM subscriptions s LEFT JOIN bots b ON s.author_type = 'bot' AND b.id = s.author_id";
61068
61491
  var PRICES = "SELECT p.*, b.name AS author_name, b.kind AS author_kind FROM subscription_prices p LEFT JOIN bots b ON p.author_type = 'bot' AND b.id = p.author_id";
61069
61492
  var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
@@ -61300,7 +61723,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
61300
61723
  };
61301
61724
  }, "subscriptionsStoreOver");
61302
61725
 
61303
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
61726
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
61304
61727
  var WALLETS = "SELECT w.*, b.name AS author_name, b.kind AS author_kind FROM financial_accounts w LEFT JOIN bots b ON w.author_type = 'bot' AND b.id = w.author_id";
61305
61728
  var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
61306
61729
  var walletOperationsOver = /* @__PURE__ */ __name((context) => {
@@ -61425,7 +61848,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
61425
61848
  };
61426
61849
  }, "walletsStoreOver");
61427
61850
 
61428
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
61851
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
61429
61852
  var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
61430
61853
  var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
61431
61854
  var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
@@ -61684,7 +62107,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
61684
62107
  return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
61685
62108
  }, "recordWritesOver");
61686
62109
 
61687
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
62110
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
61688
62111
  var LIMIT = 1e3;
61689
62112
  var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
61690
62113
  var checkLimit = /* @__PURE__ */ __name((limit) => {
@@ -61908,7 +62331,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
61908
62331
  };
61909
62332
  }, "recordStoreOver");
61910
62333
 
61911
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
62334
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
61912
62335
  var templateOf = /* @__PURE__ */ __name((row2) => ({
61913
62336
  key: row2.key,
61914
62337
  channel: row2.channel,
@@ -61963,21 +62386,21 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
61963
62386
  return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
61964
62387
  }, "storedTemplateBodies");
61965
62388
 
61966
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/domain/tracker.js
62389
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/domain/tracker.js
61967
62390
  var trackerTitleOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "issue" ? record3.title : kind3 === "comment" ? record3.body.split("\n")[0]?.slice(0, 120) || "(comment)" : record3.name, "trackerTitleOf");
61968
62391
  var trackerBodyOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.body : kind3 === "issue" || kind3 === "project" ? record3.description : null, "trackerBodyOf");
61969
62392
  var trackerParentOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.issue : kind3 === "state" || kind3 === "label" ? record3.team : kind3 === "issue" ? record3.team : null, "trackerParentOf");
61970
62393
 
61971
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/tracker.js
61972
- var MOST2 = 500;
61973
- var itemOf = /* @__PURE__ */ __name((row2) => ({
62394
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/tracker.js
62395
+ var MOST3 = 500;
62396
+ var itemOf2 = /* @__PURE__ */ __name((row2) => ({
61974
62397
  kind: String(row2.kind),
61975
62398
  record: JSON.parse(String(row2.data)),
61976
62399
  deletedAt: row2.deleted_at == null ? null : Number(row2.deleted_at),
61977
62400
  syncedAt: Number(row2.synced_at)
61978
62401
  }), "itemOf");
61979
62402
  var COLUMNS10 = "t.kind, t.data, t.deleted_at, t.synced_at";
61980
- var definedOnly = /* @__PURE__ */ __name((record3) => Object.fromEntries(Object.entries(record3).filter(([, value]) => value !== void 0)), "definedOnly");
62403
+ var definedOnly2 = /* @__PURE__ */ __name((record3) => Object.fromEntries(Object.entries(record3).filter(([, value]) => value !== void 0)), "definedOnly");
61981
62404
  var resetTrackerItemWords = /* @__PURE__ */ __name((database) => {
61982
62405
  if (!database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'tracker_item_words'").get())
61983
62406
  return 0;
@@ -62004,7 +62427,7 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
62004
62427
  const before2 = stored4.get(accountId, kind3, record3.externalId);
62005
62428
  const merged2 = {
62006
62429
  ...before2 ? JSON.parse(String(before2.data)) : {},
62007
- ...definedOnly(record3)
62430
+ ...definedOnly2(record3)
62008
62431
  };
62009
62432
  const title2 = trackerTitleOf(kind3, merged2);
62010
62433
  const body2 = trackerBodyOf(kind3, merged2) ?? null;
@@ -62034,7 +62457,7 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
62034
62457
  const accountId = findAccountPk(context, key2);
62035
62458
  if (accountId === void 0)
62036
62459
  return { items: [], hasMore: false };
62037
- const limit = Math.min(Math.max(filter.limit ?? 100, 1), MOST2);
62460
+ const limit = Math.min(Math.max(filter.limit ?? 100, 1), MOST3);
62038
62461
  const params = [accountId, kind3];
62039
62462
  let sql2 = `SELECT ${COLUMNS10} FROM tracker_items t WHERE t.account_id = ? AND t.kind = ? AND t.deleted_at IS NULL`;
62040
62463
  if (!filter.archived)
@@ -62066,13 +62489,13 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
62066
62489
  sql2 += " ORDER BY coalesce(t.source_updated_at, t.synced_at) DESC, t.id DESC LIMIT ? OFFSET ?";
62067
62490
  params.push(limit + 1, filter.offset ?? 0);
62068
62491
  const rows = database.prepare(sql2).all(...params);
62069
- return { items: rows.slice(0, limit).map((row2) => itemOf(row2)), hasMore: rows.length > limit };
62492
+ return { items: rows.slice(0, limit).map((row2) => itemOf2(row2)), hasMore: rows.length > limit };
62070
62493
  }, "list");
62071
62494
  const find2 = /* @__PURE__ */ __name(({ words: words4, anyWord = false, exact = false, accounts: accounts2, kinds: kinds2, limit, offset = 0 }) => {
62072
62495
  const match = matchOf2(words4, anyWord, exact);
62073
62496
  if (!match)
62074
62497
  return { items: [], hasMore: false };
62075
- const most = Math.min(Math.max(limit ?? 100, 1), MOST2);
62498
+ const most = Math.min(Math.max(limit ?? 100, 1), MOST3);
62076
62499
  const scoped2 = accounts2?.map((one2) => findAccountPk(context, one2)).filter((one2) => one2 !== void 0) ?? [];
62077
62500
  if (accounts2 !== void 0 && !scoped2.length)
62078
62501
  return { items: [], hasMore: false };
@@ -62094,7 +62517,7 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
62094
62517
  return {
62095
62518
  items: rows.slice(0, most).map((row2) => ({
62096
62519
  account: { provider: String(row2.provider), account: String(row2.account) },
62097
- item: itemOf(row2),
62520
+ item: itemOf2(row2),
62098
62521
  excerpt: excerptOf([row2.title, row2.body].filter(Boolean).join("\n"), words4)
62099
62522
  })),
62100
62523
  hasMore: rows.length > most
@@ -62108,14 +62531,14 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
62108
62531
  if (accountId === void 0)
62109
62532
  return void 0;
62110
62533
  const row2 = database.prepare(`SELECT ${COLUMNS10} FROM tracker_items t WHERE t.account_id = ? AND t.kind = ? AND t.external_id = ?`).get(accountId, kind3, externalId);
62111
- return row2 ? itemOf(row2) : void 0;
62534
+ return row2 ? itemOf2(row2) : void 0;
62112
62535
  }, "get"),
62113
62536
  issueByKey: /* @__PURE__ */ __name(async (key2, issueKey) => {
62114
62537
  const accountId = findAccountPk(context, key2);
62115
62538
  if (accountId === void 0)
62116
62539
  return void 0;
62117
62540
  const row2 = database.prepare(`SELECT ${COLUMNS10} FROM tracker_items t WHERE t.account_id = ? AND t.kind = 'issue' AND upper(json_extract(t.data, '$.key')) = upper(?) ORDER BY t.deleted_at IS NOT NULL LIMIT 1`).get(accountId, issueKey);
62118
- return row2 ? itemOf(row2) : void 0;
62541
+ return row2 ? itemOf2(row2) : void 0;
62119
62542
  }, "issueByKey"),
62120
62543
  list: /* @__PURE__ */ __name(async (key2, kind3, filter) => list2(key2, kind3, filter), "list"),
62121
62544
  find: /* @__PURE__ */ __name(async (search2) => find2(search2), "find"),
@@ -62138,7 +62561,7 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
62138
62561
  };
62139
62562
  }, "trackerStoreOver");
62140
62563
 
62141
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/store-errors.js
62564
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/store-errors.js
62142
62565
  var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
62143
62566
  var wrapped2 = /* @__PURE__ */ new WeakMap();
62144
62567
  var storeErrors = /* @__PURE__ */ __name((area) => {
@@ -62173,7 +62596,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
62173
62596
  return proxy;
62174
62597
  }, "storeErrors");
62175
62598
 
62176
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
62599
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
62177
62600
  var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
62178
62601
  const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
62179
62602
  let merged2 = { from: from2, to };
@@ -62186,7 +62609,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
62186
62609
  }, "markRange");
62187
62610
  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");
62188
62611
 
62189
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
62612
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
62190
62613
  var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
62191
62614
  var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
62192
62615
  chatId: String(row2.key).slice(prefix.length),
@@ -62207,7 +62630,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
62207
62630
  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);
62208
62631
  }, "setTaskAnalysisMark");
62209
62632
 
62210
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
62633
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
62211
62634
  var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
62212
62635
  var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
62213
62636
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
@@ -62217,7 +62640,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
62217
62640
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf6(account), JSON.stringify(until), now2);
62218
62641
  }, "setTaskRulesStop");
62219
62642
 
62220
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sync.js
62643
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sync.js
62221
62644
  var syncStoreOver = /* @__PURE__ */ __name((context) => {
62222
62645
  const { database } = context;
62223
62646
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
@@ -62276,7 +62699,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
62276
62699
  };
62277
62700
  }, "syncStoreOver");
62278
62701
 
62279
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/tags.js
62702
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/tags.js
62280
62703
  var tagsStoreOver = /* @__PURE__ */ __name((context) => {
62281
62704
  const { database } = context;
62282
62705
  return {
@@ -62298,7 +62721,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
62298
62721
  };
62299
62722
  }, "tagsStoreOver");
62300
62723
 
62301
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
62724
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
62302
62725
  var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
62303
62726
  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
62304
62727
  WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
@@ -62425,7 +62848,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
62425
62848
  dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
62426
62849
  }, "savePictureChunks");
62427
62850
 
62428
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
62851
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
62429
62852
  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,
62430
62853
  EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
62431
62854
  FROM messages m
@@ -62514,7 +62937,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
62514
62937
  return plain2(best(found2));
62515
62938
  }, "nearestMessages");
62516
62939
 
62517
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/vectors.js
62940
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/vectors.js
62518
62941
  var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
62519
62942
  const { database } = context;
62520
62943
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -62673,12 +63096,12 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
62673
63096
  });
62674
63097
  return cleared;
62675
63098
  }, "clearVectors"),
62676
- nearestConversations: /* @__PURE__ */ __name(async (key2, { chatId, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, personId, before: before2 }) => {
63099
+ nearestConversations: /* @__PURE__ */ __name(async (key2, { chatId, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, personId, before: before2, fromOwner }) => {
62677
63100
  const accountPk2 = findAccountPk2(key2);
62678
63101
  if (accountPk2 === void 0)
62679
63102
  return [];
62680
63103
  const chatKey = chatId === void 0 ? void 0 : chatKeyOf(key2, chatId);
62681
- const mailToo = key2.provider === "email" && conversations2 === void 0 && scope3 === void 0 && projectId2 === void 0 && personId === void 0 && before2 === void 0;
63104
+ const mailToo = key2.provider === "email" && conversations2 === void 0 && scope3 === void 0 && projectId2 === void 0 && personId === void 0 && before2 === void 0 && !fromOwner;
62682
63105
  const mailHits = /* @__PURE__ */ __name(async () => mailToo ? (await mail().nearest(model, query, {
62683
63106
  accountId: accountPk2,
62684
63107
  limit,
@@ -62703,7 +63126,8 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
62703
63126
  ...scope3 === void 0 ? {} : { scope: scope3 },
62704
63127
  ...projectId2 === void 0 ? {} : { projectId: Number(projectId2) },
62705
63128
  ...personId === void 0 ? {} : { personId: Number(personId) },
62706
- ...before2 === void 0 ? {} : { before: Date.parse(before2) }
63129
+ ...before2 === void 0 ? {} : { before: Date.parse(before2) },
63130
+ ...fromOwner ? { fromOwner } : {}
62707
63131
  });
62708
63132
  const found2 = summariesOf(context, accountPk2, nearest.map(({ conversationPk }) => conversationPk));
62709
63133
  const ids3 = messageIds(context, nearest.flatMap(({ firstMessagePk, lastMessagePk }) => [firstMessagePk, lastMessagePk]));
@@ -62777,7 +63201,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
62777
63201
  vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
62778
63202
  }), "vectorsStoreOver");
62779
63203
 
62780
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
63204
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
62781
63205
  import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
62782
63206
  import { dirname as dirname3, join as join4 } from "node:path";
62783
63207
  var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
@@ -62865,10 +63289,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
62865
63289
  }
62866
63290
  }, "lastBackup");
62867
63291
 
62868
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/providers.js
63292
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/providers.js
62869
63293
  var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
62870
63294
 
62871
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
63295
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
62872
63296
  var COUNTED_TABLES = [
62873
63297
  "accounts",
62874
63298
  "chats",
@@ -62953,7 +63377,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
62953
63377
  };
62954
63378
  }, "storeContents");
62955
63379
 
62956
- // node_modules/.pnpm/@wirecat+cli-core@0.699.0_@wirecat+cli-base@0.119.0_commander@15.0.0_esbuild@0.28.2_typ_13ea275dd452fd1070c59d86b8d8c388/node_modules/@wirecat/cli-core/dist/store/store.js
63380
+ // node_modules/.pnpm/@wirecat+cli-core@0.705.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1668a48934ee0d2606b0d61251c2625b/node_modules/@wirecat/cli-core/dist/store/store.js
62957
63381
  var openStore = /* @__PURE__ */ __name(async (options = {}) => {
62958
63382
  const context = await openStoreContext(options);
62959
63383
  try {
@@ -63025,6 +63449,7 @@ var storeOver = /* @__PURE__ */ __name((context) => {
63025
63449
  const crm = once3(() => crmCopiesOver(context, accountPeopleOver(context)));
63026
63450
  const crmFiles2 = once3(() => crmFilesOver(context));
63027
63451
  const tracker = once3(() => trackerStoreOver(context));
63452
+ const content2 = once3(() => contentStoreOver(context));
63028
63453
  const relations = once3(() => relationsStoreOver(context));
63029
63454
  const decisionRequests2 = once3(() => decisionRequestStoreOver(context));
63030
63455
  const templates2 = once3(() => templateStoreOver(context));
@@ -63173,6 +63598,9 @@ var storeOver = /* @__PURE__ */ __name((context) => {
63173
63598
  get tracker() {
63174
63599
  return tracker();
63175
63600
  },
63601
+ get content() {
63602
+ return content2();
63603
+ },
63176
63604
  get crmFiles() {
63177
63605
  return crmFiles2();
63178
63606
  },
@@ -63366,8 +63794,10 @@ export {
63366
63794
  crmSettingsOf,
63367
63795
  BUSINESS_FIND_MAX,
63368
63796
  CATALOG_QUERY,
63369
- CRM_CHANGES,
63370
63797
  resetCrmFileWords,
63798
+ contentHashOf,
63799
+ resetContentPostWords,
63800
+ CRM_CHANGES,
63371
63801
  DECISION_ACTIONS,
63372
63802
  DECISION_TTL_MS,
63373
63803
  CALLBACK_PREFIX,