@wirecat/notion-cli 0.4.0 → 0.5.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 (153) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/bin/notion.js +2 -2
  3. package/dist/bundle/{all-profiles-4IONYZB6.js → all-profiles-V37KCXH3.js} +9 -9
  4. package/dist/bundle/{anthropic-OXF74J4P.js → anthropic-Q4S3BYXD.js} +5 -5
  5. package/dist/bundle/{app-server-M2VF6ABM.js → app-server-43SR3ACI.js} +54 -54
  6. package/dist/bundle/{bun-DLA6QRLL.js → bun-M3J2QTR3.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-F4BYLW3F.js → bun-sqlite-EJ3W2PSV.js} +6 -6
  8. package/dist/bundle/{chunk-7NGFGFE5.js → chunk-2FJNMADN.js} +7 -7
  9. package/dist/bundle/{chunk-RMJMID5D.js → chunk-3RL2MIUF.js} +8 -8
  10. package/dist/bundle/{chunk-GCCPFKSU.js → chunk-5P5TXU2K.js} +462 -392
  11. package/dist/bundle/{chunk-L62XTC7N.js → chunk-6EOZTUHT.js} +10 -10
  12. package/dist/bundle/{chunk-4TQVZXOV.js → chunk-AT5I34AN.js} +3 -3
  13. package/dist/bundle/{chunk-FIHXADRF.js → chunk-B3FSLAIU.js} +4 -4
  14. package/dist/bundle/{chunk-7NVPM55S.js → chunk-BBSFQ3PU.js} +1262 -1048
  15. package/dist/bundle/{chunk-JIRRF6BM.js → chunk-BNEE35WD.js} +4 -4
  16. package/dist/bundle/{chunk-HTKSCSJU.js → chunk-BWLBSQSU.js} +3 -3
  17. package/dist/bundle/{chunk-T5UNSFES.js → chunk-C32AKHTY.js} +8 -8
  18. package/dist/bundle/{chunk-GK4GLPG2.js → chunk-CDK5E45T.js} +3 -3
  19. package/dist/bundle/{chunk-NO2LIHWA.js → chunk-CWXOXIWS.js} +1 -1
  20. package/dist/bundle/{chunk-LIQMUDIZ.js → chunk-DB2XKHI4.js} +2 -2
  21. package/dist/bundle/{chunk-Z53LYX4M.js → chunk-DBEQI5YM.js} +3 -3
  22. package/dist/bundle/{chunk-2MHMKNWD.js → chunk-DFCHHR5M.js} +1 -1
  23. package/dist/bundle/{chunk-OI5DWZJG.js → chunk-DO7BLXO3.js} +3 -3
  24. package/dist/bundle/{chunk-5UA2TYMI.js → chunk-DSP36YHQ.js} +2 -2
  25. package/dist/bundle/{chunk-WZEEEQGC.js → chunk-E2AFUJDR.js} +3 -3
  26. package/dist/bundle/{chunk-YFWLHTNO.js → chunk-E5WLE7BM.js} +1 -1
  27. package/dist/bundle/{chunk-P3P6DA6K.js → chunk-ECC2UX7X.js} +6 -6
  28. package/dist/bundle/{chunk-GSNE7OB4.js → chunk-ECEZOLOD.js} +4 -4
  29. package/dist/bundle/{chunk-CIVXTBJY.js → chunk-FBZI4Z3Z.js} +41 -41
  30. package/dist/bundle/{chunk-5XP4KQ2F.js → chunk-FKA7DOCK.js} +1 -1
  31. package/dist/bundle/chunk-FPUGMDJV.js +7 -0
  32. package/dist/bundle/{chunk-OCDJ4FFA.js → chunk-G2MJYXZG.js} +3 -3
  33. package/dist/bundle/{chunk-5LBJNTEJ.js → chunk-GCZ6MAEN.js} +6 -6
  34. package/dist/bundle/{chunk-M2EEIYBU.js → chunk-GTY6N5KZ.js} +2 -2
  35. package/dist/bundle/{chunk-TJCPTRYD.js → chunk-H3E2PZ5Y.js} +7 -7
  36. package/dist/bundle/{chunk-FSJHASRQ.js → chunk-HHVFIXDO.js} +304 -265
  37. package/dist/bundle/{chunk-6JBLIQQN.js → chunk-HZRQLAHO.js} +1 -1
  38. package/dist/bundle/{chunk-WU3XHGOB.js → chunk-J3NKZ6MO.js} +17 -15
  39. package/dist/bundle/{chunk-QX3TPFEX.js → chunk-JCKWQGCD.js} +36 -36
  40. package/dist/bundle/{chunk-4KUJTSHG.js → chunk-KHWOLBHQ.js} +2 -2
  41. package/dist/bundle/{chunk-R6SDRSZK.js → chunk-KHZ2RGXI.js} +33 -32
  42. package/dist/bundle/{chunk-SGBS5QCU.js → chunk-LBYGJKXW.js} +4 -4
  43. package/dist/bundle/{chunk-EY6S7FV3.js → chunk-MNRMKWCN.js} +6 -6
  44. package/dist/bundle/{chunk-TFNRCCGR.js → chunk-N2XADGL4.js} +3 -3
  45. package/dist/bundle/{chunk-IJMFG7HB.js → chunk-NA6QLHBZ.js} +7 -7
  46. package/dist/bundle/{chunk-TXONV3HW.js → chunk-NE43YXKL.js} +2 -2
  47. package/dist/bundle/{chunk-TZ2QJ53V.js → chunk-NHHJHXMQ.js} +2 -2
  48. package/dist/bundle/{chunk-K5I64ZVI.js → chunk-NTG657MI.js} +8 -8
  49. package/dist/bundle/{chunk-YAPDU3SV.js → chunk-O3DYRCIT.js} +1 -1
  50. package/dist/bundle/{chunk-KL3P5TQK.js → chunk-O5YB7FQD.js} +4 -4
  51. package/dist/bundle/{chunk-WHJWURZB.js → chunk-ONZVPE24.js} +5 -5
  52. package/dist/bundle/{chunk-7NF3V5L2.js → chunk-P5BHKKBI.js} +4 -4
  53. package/dist/bundle/{chunk-GBFEEHQC.js → chunk-PAW6RRCW.js} +11 -26
  54. package/dist/bundle/{chunk-D6RCRBDH.js → chunk-PPHBRESD.js} +2 -2
  55. package/dist/bundle/{chunk-MRA62W5K.js → chunk-PWRRDDMZ.js} +182 -170
  56. package/dist/bundle/{chunk-COH7OEER.js → chunk-QIG55MZH.js} +12 -12
  57. package/dist/bundle/{chunk-L6H7PY4X.js → chunk-QWYMXFKM.js} +3 -3
  58. package/dist/bundle/{chunk-M6DGZ2O6.js → chunk-QYXWRKNA.js} +7 -7
  59. package/dist/bundle/{chunk-JODE2XED.js → chunk-RIGE67FR.js} +24 -24
  60. package/dist/bundle/{chunk-ZC6ZQQ55.js → chunk-RJMQGG3P.js} +30 -30
  61. package/dist/bundle/{chunk-BEPFGITI.js → chunk-TD2JZ25O.js} +59 -56
  62. package/dist/bundle/{chunk-EQPAZ33O.js → chunk-TDNURSU6.js} +17 -17
  63. package/dist/bundle/{chunk-6GN7KU7X.js → chunk-TOSCB4SO.js} +14 -8
  64. package/dist/bundle/{chunk-Y5LAJWR5.js → chunk-TP7GDWVF.js} +1 -1
  65. package/dist/bundle/{chunk-UROEWCOG.js → chunk-UZSBGECU.js} +3 -3
  66. package/dist/bundle/{chunk-7YZPBAQX.js → chunk-W53EJOFQ.js} +1 -1
  67. package/dist/bundle/{chunk-AYU5TFDU.js → chunk-W5JZMXGW.js} +29 -20
  68. package/dist/bundle/{chunk-UKE3CGHK.js → chunk-W7HM2VGO.js} +1 -1
  69. package/dist/bundle/{chunk-FEMHUSGO.js → chunk-WE4UFASG.js} +1 -1
  70. package/dist/bundle/{chunk-XCTOCVMW.js → chunk-WPP76PSX.js} +14 -14
  71. package/dist/bundle/{chunk-YGCI3DHS.js → chunk-X2M6NIQG.js} +1 -1
  72. package/dist/bundle/{chunk-CDGZZNGY.js → chunk-XUPN2EHR.js} +21 -7
  73. package/dist/bundle/command-contract-TVRFW2IX.js +38 -0
  74. package/dist/bundle/{command-server-entry-2SORMVRM.js → command-server-entry-LJ627ZUA.js} +26 -26
  75. package/dist/bundle/{decode-5O7IEFPN.js → decode-PX2LZ5Y2.js} +5 -5
  76. package/dist/bundle/{dispatch-YHQX6FEJ.js → dispatch-KOISQ5QJ.js} +8 -8
  77. package/dist/bundle/{echarts-ARLMVQC7.js → echarts-FVTUDXDU.js} +2 -2
  78. package/dist/bundle/{embed-FUDUKQ3K.js → embed-CCSDK43I.js} +6 -6
  79. package/dist/bundle/{embedder-HDRV7GX3.js → embedder-VHI4DHB7.js} +9 -9
  80. package/dist/bundle/{failure-JHXICWIL.js → failure-FZ6VYKEQ.js} +2 -2
  81. package/dist/bundle/{first-run-BGEFTXOE.js → first-run-7JKE5AHN.js} +12 -12
  82. package/dist/bundle/first-screen-ZROHOEYJ.js +38 -0
  83. package/dist/bundle/{instructions-MEFIKCDI.js → instructions-HET7BCYK.js} +1 -1
  84. package/dist/bundle/{mcp-VMS6PBCU.js → mcp-RGNRW77S.js} +2 -2
  85. package/dist/bundle/meeting-combined-SSTOJUIJ.js +24 -0
  86. package/dist/bundle/{meeting-model-REZVYGQW.js → meeting-model-K7TPS4S5.js} +12 -12
  87. package/dist/bundle/{meeting-semantic-R4CSLVRG.js → meeting-semantic-UD26T37N.js} +6 -6
  88. package/dist/bundle/{node-MAQALPLA.js → node-CXZIFHZC.js} +2 -2
  89. package/dist/bundle/{node-sqlite-J7IJYNBO.js → node-sqlite-ME7KMORI.js} +7 -7
  90. package/dist/bundle/notion.js +13 -13
  91. package/dist/bundle/{oauth-AMV4YGJD.js → oauth-XBTROXHB.js} +7 -7
  92. package/dist/bundle/{open-AB27MTGR.js → open-HA6D3SXR.js} +5 -5
  93. package/dist/bundle/{openai-D77MU5XV.js → openai-H5AJPZBX.js} +16 -16
  94. package/dist/bundle/{process-SIOWTRJ6.js → process-5RUXWGYS.js} +1 -1
  95. package/dist/bundle/{program-7K34KI27.js → program-F3NBTZ7J.js} +1459 -829
  96. package/dist/bundle/{prompt-W77YDHA6.js → prompt-6XSUOLHK.js} +5 -5
  97. package/dist/bundle/{recognize-3JAXQQ36.js → recognize-2Y7AUVGG.js} +4 -4
  98. package/dist/bundle/{remote-PSOJXCXO.js → remote-KCABPXQ3.js} +10 -10
  99. package/dist/bundle/{rerank-EE44ZTGL.js → rerank-BTN7LUVA.js} +7 -7
  100. package/dist/bundle/{schemas-LBYUMBC6.js → schemas-VVLTLMXS.js} +1 -1
  101. package/dist/bundle/{serve-XJMGAMFW.js → serve-CYEMVRFC.js} +9 -9
  102. package/dist/bundle/server-UC2FNNXX.js +72 -0
  103. package/dist/bundle/{server-ASU6CP5R.js → server-WFIICGMI.js} +46 -46
  104. package/dist/bundle/{services-PT4PA4J6.js → services-L4W6ZWDG.js} +41 -41
  105. package/dist/bundle/{sqlite-runtime-YHXRTVXE.js → sqlite-runtime-IKMYLRQC.js} +6 -6
  106. package/dist/bundle/{state-T6ZKFWGD.js → state-LMUP636P.js} +6 -6
  107. package/dist/bundle/{store-3MUCZEI3.js → store-A2QZFBOX.js} +19 -17
  108. package/dist/bundle/{store-E5EE25FY.js → store-W2JC2JP4.js} +19 -19
  109. package/dist/bundle/store-maintenance-command-LRGQJPSZ.js +63 -0
  110. package/dist/commands/library.d.ts.map +1 -1
  111. package/dist/commands/library.js +9 -4
  112. package/dist/commands/library.js.map +1 -1
  113. package/dist/generated/manifest.d.ts +4 -1
  114. package/dist/generated/manifest.d.ts.map +1 -1
  115. package/dist/generated/manifest.js +20 -0
  116. package/dist/generated/manifest.js.map +1 -1
  117. package/dist/knowledge.d.ts +1 -0
  118. package/dist/knowledge.d.ts.map +1 -1
  119. package/dist/knowledge.js +68 -2
  120. package/dist/knowledge.js.map +1 -1
  121. package/dist/library.d.ts +4 -1
  122. package/dist/library.d.ts.map +1 -1
  123. package/dist/library.js +11 -0
  124. package/dist/library.js.map +1 -1
  125. package/dist/notion/port.d.ts.map +1 -1
  126. package/dist/notion/port.js +1 -0
  127. package/dist/notion/port.js.map +1 -1
  128. package/dist/notion/reads.d.ts +13 -1
  129. package/dist/notion/reads.d.ts.map +1 -1
  130. package/dist/notion/reads.js +1 -1
  131. package/dist/program.d.ts.map +1 -1
  132. package/dist/program.js +17 -2
  133. package/dist/program.js.map +1 -1
  134. package/dist/sync/files.d.ts +7 -0
  135. package/dist/sync/files.d.ts.map +1 -1
  136. package/dist/sync/files.js.map +1 -1
  137. package/dist/sync/source.d.ts +1 -1
  138. package/dist/sync/source.d.ts.map +1 -1
  139. package/dist/sync/source.js +10 -21
  140. package/dist/sync/source.js.map +1 -1
  141. package/dist/sync/users.d.ts +9 -0
  142. package/dist/sync/users.d.ts.map +1 -0
  143. package/dist/sync/users.js +76 -0
  144. package/dist/sync/users.js.map +1 -0
  145. package/dist/version.d.ts +1 -1
  146. package/dist/version.js +1 -1
  147. package/package.json +3 -3
  148. package/dist/bundle/chunk-SHTHNBHG.js +0 -2
  149. package/dist/bundle/command-contract-UBXS6NHI.js +0 -38
  150. package/dist/bundle/first-screen-F5F3VS6Y.js +0 -38
  151. package/dist/bundle/meeting-combined-HNSS3FQY.js +0 -24
  152. package/dist/bundle/server-WSPQ5EOA.js +0 -72
  153. package/dist/bundle/store-maintenance-command-ZZ55BBBG.js +0 -63
@@ -3,16 +3,16 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answerOf,
5
5
  messengerContext
6
- } from "./chunk-XCTOCVMW.js";
6
+ } from "./chunk-WPP76PSX.js";
7
7
  import {
8
8
  chatEventAnswer,
9
9
  memberAnswer,
10
10
  pollVoteAnswer,
11
11
  serveRelay
12
- } from "./chunk-L62XTC7N.js";
12
+ } from "./chunk-6EOZTUHT.js";
13
13
  import {
14
14
  readSecret
15
- } from "./chunk-Z53LYX4M.js";
15
+ } from "./chunk-DBEQI5YM.js";
16
16
  import {
17
17
  stringWidth,
18
18
  wrapAnsi
@@ -37,14 +37,14 @@ import {
37
37
  typedQuery,
38
38
  withQuery,
39
39
  withTimeLimit
40
- } from "./chunk-GCCPFKSU.js";
40
+ } from "./chunk-5P5TXU2K.js";
41
41
  import {
42
42
  holdLock,
43
43
  lockPath,
44
44
  releaseLock,
45
45
  servingProfiles,
46
46
  takeLock
47
- } from "./chunk-OI5DWZJG.js";
47
+ } from "./chunk-DO7BLXO3.js";
48
48
  import {
49
49
  Command,
50
50
  LOCAL_READ,
@@ -72,10 +72,10 @@ import {
72
72
  snakeKeys,
73
73
  storeTable,
74
74
  withoutProviderRefs
75
- } from "./chunk-MRA62W5K.js";
75
+ } from "./chunk-PWRRDDMZ.js";
76
76
  import {
77
77
  holdersOf
78
- } from "./chunk-7YZPBAQX.js";
78
+ } from "./chunk-W53EJOFQ.js";
79
79
  import {
80
80
  QUICK_HEALTH_CHECKS,
81
81
  fts5Tables,
@@ -83,7 +83,7 @@ import {
83
83
  lossUnknown,
84
84
  storeDamageReport,
85
85
  storeHealth
86
- } from "./chunk-EQPAZ33O.js";
86
+ } from "./chunk-TDNURSU6.js";
87
87
  import {
88
88
  CORPORA,
89
89
  MIGRATIONS,
@@ -107,6 +107,7 @@ import {
107
107
  readStoreTables,
108
108
  rebuildMentions,
109
109
  resetAttachmentWords,
110
+ resetCrmFileWords,
110
111
  resetNoteIndex,
111
112
  resetSearchIndex,
112
113
  resetStems,
@@ -118,7 +119,7 @@ import {
118
119
  storeClients,
119
120
  storeContents,
120
121
  vectorIndexCounts
121
- } from "./chunk-7NVPM55S.js";
122
+ } from "./chunk-BBSFQ3PU.js";
122
123
  import {
123
124
  currentRun,
124
125
  formatLocator,
@@ -127,35 +128,35 @@ import {
127
128
  readHealthMark,
128
129
  readJournalMark,
129
130
  recordDeepCheck
130
- } from "./chunk-QX3TPFEX.js";
131
+ } from "./chunk-JCKWQGCD.js";
131
132
  import {
132
133
  failureKey,
133
134
  isStoreDamage
134
- } from "./chunk-UROEWCOG.js";
135
+ } from "./chunk-UZSBGECU.js";
135
136
  import {
136
137
  queryFieldsOf
137
- } from "./chunk-FSJHASRQ.js";
138
+ } from "./chunk-HHVFIXDO.js";
138
139
  import {
139
140
  modelAddressAllowed,
140
141
  onThisComputer
141
- } from "./chunk-WZEEEQGC.js";
142
+ } from "./chunk-E2AFUJDR.js";
142
143
  import {
143
144
  readSharedSection,
144
145
  sharedConfigPath,
145
146
  writeSharedSection
146
- } from "./chunk-TJCPTRYD.js";
147
+ } from "./chunk-H3E2PZ5Y.js";
147
148
  import {
148
149
  storePath
149
- } from "./chunk-M2EEIYBU.js";
150
+ } from "./chunk-GTY6N5KZ.js";
150
151
  import {
151
152
  openCache
152
- } from "./chunk-EY6S7FV3.js";
153
+ } from "./chunk-MNRMKWCN.js";
153
154
  import {
154
155
  Credentials,
155
156
  isMovedRun,
156
157
  resolvePaths,
157
158
  writeSecurely
158
- } from "./chunk-AYU5TFDU.js";
159
+ } from "./chunk-W5JZMXGW.js";
159
160
  import {
160
161
  array,
161
162
  boolean,
@@ -182,7 +183,7 @@ import {
182
183
  CliError,
183
184
  singleLine,
184
185
  visibleControls
185
- } from "./chunk-LIQMUDIZ.js";
186
+ } from "./chunk-DB2XKHI4.js";
186
187
  import {
187
188
  __commonJS,
188
189
  __name,
@@ -5522,11 +5523,11 @@ var require_liquid_node = __commonJS({
5522
5523
  }
5523
5524
  });
5524
5525
 
5525
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5526
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5526
5527
  import { chmodSync, constants, copyFileSync, existsSync as existsSync10, mkdirSync, realpathSync as realpathSync3, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
5527
5528
  import { dirname as dirname3, resolve } from "node:path";
5528
5529
 
5529
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/sealed.js
5530
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/sealed.js
5530
5531
  import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
5531
5532
  import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
5532
5533
  import { Transform } from "node:stream";
@@ -5633,7 +5634,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
5633
5634
  renameSync(pending, to);
5634
5635
  }, "unsealFile");
5635
5636
 
5636
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5637
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5637
5638
  var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
5638
5639
  var fileSchemaOf = /* @__PURE__ */ __name((database) => {
5639
5640
  const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
@@ -5657,7 +5658,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
5657
5658
  };
5658
5659
  }, "compatibilityOf");
5659
5660
 
5660
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/repair.js
5661
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/repair.js
5661
5662
  import { createHash as createHash2 } from "node:crypto";
5662
5663
  var COPY_MARK = "__repair_";
5663
5664
  var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
@@ -5911,19 +5912,19 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
5911
5912
  return found;
5912
5913
  }, "deleteCopy");
5913
5914
 
5914
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5915
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5915
5916
  import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
5916
5917
 
5917
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5918
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5918
5919
  import { existsSync as existsSync3 } from "node:fs";
5919
5920
 
5920
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/recover.js
5921
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/recover.js
5921
5922
  import { execFileSync, spawn } from "node:child_process";
5922
5923
  import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
5923
5924
  import { basename, dirname, join } from "node:path";
5924
5925
  import { Transform as Transform2 } from "node:stream";
5925
5926
 
5926
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/refill.js
5927
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/refill.js
5927
5928
  var REFILL_MARGIN_MS = 864e5;
5928
5929
  var TIME_KEYS = 1e12;
5929
5930
  var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
@@ -6003,7 +6004,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
6003
6004
  return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
6004
6005
  }, "forgetMail");
6005
6006
 
6006
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/recover.js
6007
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/recover.js
6007
6008
  var SQLITE3_MINIMUM = [3, 43, 0];
6008
6009
  var STORE_PARTS = ["", "-wal", "-shm"];
6009
6010
  var RECOVER_LOCK = ".recover-lock";
@@ -6280,6 +6281,7 @@ var FILLERS = {
6280
6281
  fillStems(database, { now });
6281
6282
  }, "message_stems"),
6282
6283
  attachment_words: /* @__PURE__ */ __name((database) => void resetAttachmentWords(database), "attachment_words"),
6284
+ crm_file_words: /* @__PURE__ */ __name((database) => void resetCrmFileWords(database), "crm_file_words"),
6283
6285
  attachment_name_words: /* @__PURE__ */ __name((database) => (
6284
6286
  // As migration 20 filled it: й and ё fold as the triggers fold them.
6285
6287
  database.exec("INSERT INTO attachment_name_words (rowid, name) SELECT id, replace(replace(replace(replace(name, '\u0439', '\u0438'), '\u0419', '\u0418'), '\u0451', '\u0435'), '\u0401', '\u0415') FROM attachments WHERE name IS NOT NULL")
@@ -6531,7 +6533,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6531
6533
  }
6532
6534
  }, "recoverLocked");
6533
6535
 
6534
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6536
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6535
6537
  var COUNTED = [
6536
6538
  "accounts",
6537
6539
  "chats",
@@ -6687,7 +6689,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
6687
6689
  return recover;
6688
6690
  }, "storeRecoverCommand");
6689
6691
 
6690
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6692
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6691
6693
  var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
6692
6694
  var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
6693
6695
  var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
@@ -6733,7 +6735,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
6733
6735
  renderAnswer(this, outputFor(this), itemOf(answer));
6734
6736
  }), "storeInfoCommand");
6735
6737
 
6736
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6738
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6737
6739
  var ENCRYPT_OPTION = [
6738
6740
  "--encrypt",
6739
6741
  "compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
@@ -6752,7 +6754,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
6752
6754
  return password;
6753
6755
  }, "passwordOf");
6754
6756
 
6755
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/rules.js
6757
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/rules.js
6756
6758
  import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
6757
6759
  import { join as join2 } from "node:path";
6758
6760
  var REPLY_ACTIONS = ["reply", "task"];
@@ -6923,7 +6925,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
6923
6925
  }, "problem");
6924
6926
  var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
6925
6927
 
6926
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/state.js
6928
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/state.js
6927
6929
  import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
6928
6930
  import { join as join3 } from "node:path";
6929
6931
  var ANSWERED_KEPT = 1e3;
@@ -6976,7 +6978,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
6976
6978
  }, "recordReply");
6977
6979
  var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
6978
6980
 
6979
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/decide.js
6981
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/decide.js
6980
6982
  var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
6981
6983
  var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
6982
6984
  const { message, chat, owner, sender } = incoming;
@@ -7082,10 +7084,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
7082
7084
  return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
7083
7085
  }, "filled");
7084
7086
 
7085
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/template.js
7087
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/template.js
7086
7088
  var import_liquidjs2 = __toESM(require_liquid_node(), 1);
7087
7089
 
7088
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/render/liquid.js
7090
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/render/liquid.js
7089
7091
  var import_liquidjs = __toESM(require_liquid_node(), 1);
7090
7092
  var safeLiquid = /* @__PURE__ */ __name((limits) => {
7091
7093
  const engine = new import_liquidjs.Liquid({
@@ -7112,7 +7114,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
7112
7114
  return engine;
7113
7115
  }, "safeLiquid");
7114
7116
 
7115
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/template.js
7117
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/template.js
7116
7118
  var TEMPLATE_LIMITS = {
7117
7119
  parse: 32768,
7118
7120
  renders: 2e3,
@@ -7251,7 +7253,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
7251
7253
  }
7252
7254
  }, "renderReplyTemplate");
7253
7255
 
7254
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7256
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7255
7257
  var DRY_RUN_DAYS = 7;
7256
7258
  var PAGE = 500;
7257
7259
  var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
@@ -7365,7 +7367,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
7365
7367
  }
7366
7368
  }, "storedSince");
7367
7369
 
7368
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/models/ai.js
7370
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/models/ai.js
7369
7371
  var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
7370
7372
  var DEFAULT_BASE_URL = {
7371
7373
  anthropic: "https://api.anthropic.com",
@@ -7515,7 +7517,7 @@ var checkAi = /* @__PURE__ */ __name(async (deps) => {
7515
7517
  }
7516
7518
  }, "checkAi");
7517
7519
 
7518
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/models/purpose.js
7520
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/models/purpose.js
7519
7521
  var HOSTED = {
7520
7522
  openai: "https://api.openai.com/v1",
7521
7523
  anthropic: "https://api.anthropic.com"
@@ -7536,7 +7538,7 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
7536
7538
  return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
7537
7539
  }, "purposeModel");
7538
7540
 
7539
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/consents.js
7541
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/consents.js
7540
7542
  import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
7541
7543
  import { join as join4 } from "node:path";
7542
7544
  var shape = strictObject({
@@ -7561,7 +7563,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
7561
7563
  return consent.provider === provider && !consent.deniedChats.includes(chat);
7562
7564
  }, "mayModelReply");
7563
7565
 
7564
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7566
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7565
7567
  var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
7566
7568
  ai: true
7567
7569
  }) => async (rule2, message, chat, now) => {
@@ -7609,7 +7611,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
7609
7611
  return result2;
7610
7612
  }, "replyRenderer");
7611
7613
 
7612
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/replies/serve.js
7614
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/replies/serve.js
7613
7615
  var NOT_ALLOWED = "replies.send is not allow";
7614
7616
  var NO_RULES = "no rules";
7615
7617
  var ONLY_TASK = "opened a task, sent nothing";
@@ -7702,7 +7704,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
7702
7704
  return { skip: why };
7703
7705
  }, "replyTo");
7704
7706
 
7705
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7707
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7706
7708
  var START_SYNC_DELAY_MS = 3e4;
7707
7709
  var START_SYNC_BUDGET_MS = 5 * 6e4;
7708
7710
  var START_SYNC_WINDOW_MS = 7 * 864e5;
@@ -7779,7 +7781,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
7779
7781
  };
7780
7782
  }, "startSync");
7781
7783
 
7782
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7784
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7783
7785
  var FIRST_FETCH_MS = 6e4;
7784
7786
  var DAY_MS = 864e5;
7785
7787
  var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
@@ -7833,7 +7835,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
7833
7835
  };
7834
7836
  }, "memberFetches");
7835
7837
 
7836
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7838
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7837
7839
  var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
7838
7840
  var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
7839
7841
  if (context.format === "pretty") {
@@ -7866,7 +7868,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
7866
7868
  return context;
7867
7869
  }, "recordDiagnostics");
7868
7870
 
7869
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7871
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7870
7872
  import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
7871
7873
  import { dirname as dirname2, join as join5 } from "node:path";
7872
7874
  var OUTDATED_CHECK_MS = 6e4;
@@ -7952,7 +7954,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
7952
7954
  };
7953
7955
  }, "watchOutdated");
7954
7956
 
7955
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7957
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7956
7958
  var STEMS_EVERY_MS = 3e4;
7957
7959
  var STEMS_SLICE_MS = 2e3;
7958
7960
  var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
@@ -7992,7 +7994,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
7992
7994
  };
7993
7995
  }, "stemFills");
7994
7996
 
7995
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/render/messages.js
7997
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/render/messages.js
7996
7998
  import { styleText } from "node:util";
7997
7999
  var TIME_WIDTH = 8;
7998
8000
  var INDENT = " ".repeat(TIME_WIDTH + 2);
@@ -8168,7 +8170,7 @@ var editedAt = /* @__PURE__ */ __name((message, options) => {
8168
8170
  return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
8169
8171
  }, "editedAt");
8170
8172
 
8171
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
8173
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
8172
8174
  var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
8173
8175
  var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
8174
8176
  kind: attachment.kind,
@@ -8264,7 +8266,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
8264
8266
  locale: messenger.app.locale
8265
8267
  }), "viewOf");
8266
8268
 
8267
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
8269
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
8268
8270
  var observed = /* @__PURE__ */ __name((value) => ({
8269
8271
  value: value.value,
8270
8272
  observed_at: value.observedAt,
@@ -8331,7 +8333,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
8331
8333
  }
8332
8334
  }, "watchEventItem");
8333
8335
 
8334
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8336
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8335
8337
  var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
8336
8338
  output: { entity: "watch_item" },
8337
8339
  effects: REMOTE_READ,
@@ -8486,7 +8488,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
8486
8488
  }
8487
8489
  }, "describe");
8488
8490
 
8489
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8491
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8490
8492
  var serveCommand = /* @__PURE__ */ __name((messenger) => {
8491
8493
  const command = annotate(new Command("serve"), {
8492
8494
  output: { entity: "serve_summary" },
@@ -8772,7 +8774,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
8772
8774
  };
8773
8775
  }, "tasking");
8774
8776
 
8775
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8777
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8776
8778
  import { existsSync as existsSync9 } from "node:fs";
8777
8779
  var PATH = "store tables list";
8778
8780
  var STORE_TABLES_QUERY = {
@@ -8815,7 +8817,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
8815
8817
  return tables;
8816
8818
  }, "storeTablesCommand");
8817
8819
 
8818
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8820
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8819
8821
  var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
8820
8822
  var WORD_INDEX = "message_words";
8821
8823
  var schemaOf = /* @__PURE__ */ __name((database) => {
@@ -9057,7 +9059,8 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
9057
9059
  ...schema.version > 0 ? SEARCH_INDEXES.map((index) => [index, indexIntegrity(database, index)]) : [],
9058
9060
  ...wordIndex ? [[WORD_INDEX, indexIntegrity(database, WORD_INDEX, 0)]] : [],
9059
9061
  ...stems ? [["message_stems", indexIntegrity(database, "message_stems", 0)]] : [],
9060
- ...schema.version > 0 ? [["attachment_words", indexIntegrity(database, "attachment_words", 0)]] : []
9062
+ ...schema.version > 0 ? [["attachment_words", indexIntegrity(database, "attachment_words", 0)]] : [],
9063
+ ...schema.version >= 68 ? [["crm_file_words", indexIntegrity(database, "crm_file_words", 0)]] : []
9061
9064
  ]);
9062
9065
  const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
9063
9066
  const { bavail, bsize } = statfsSync2(dirname3(path));
@@ -9225,7 +9228,7 @@ var reindexCommand = /* @__PURE__ */ __name((owner) => destroysNothing(annotate(
9225
9228
  throw new CliError("validation_error", `the store is behind this build \u2014 \`${lineOf(this, "store migrate")}\` first`);
9226
9229
  }
9227
9230
  resetSearchIndex(database);
9228
- const fileTexts = resetAttachmentWords(database);
9231
+ const fileTexts = resetAttachmentWords(database) + resetCrmFileWords(database);
9229
9232
  const words = buildWordIndex(database, (note) => renderer.note(note));
9230
9233
  return {
9231
9234
  path,
@@ -23,28 +23,28 @@ import {
23
23
  tagMemberIds,
24
24
  thingOf,
25
25
  write
26
- } from "./chunk-7NVPM55S.js";
26
+ } from "./chunk-BBSFQ3PU.js";
27
27
  import {
28
28
  fold
29
- } from "./chunk-6JBLIQQN.js";
29
+ } from "./chunk-HZRQLAHO.js";
30
30
  import {
31
31
  ADDED_PROVIDER,
32
32
  filesAccountSql,
33
33
  folderProviderOf,
34
34
  folderProviderSql,
35
35
  isDocumentAccountProvider
36
- } from "./chunk-QX3TPFEX.js";
36
+ } from "./chunk-JCKWQGCD.js";
37
37
  import {
38
38
  damagedFile
39
- } from "./chunk-UROEWCOG.js";
39
+ } from "./chunk-UZSBGECU.js";
40
40
  import {
41
41
  CliError
42
- } from "./chunk-LIQMUDIZ.js";
42
+ } from "./chunk-DB2XKHI4.js";
43
43
  import {
44
44
  __name
45
45
  } from "./chunk-ZVVMGPBJ.js";
46
46
 
47
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/damage.js
47
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/damage.js
48
48
  var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
49
49
  var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
50
50
  var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
@@ -147,11 +147,11 @@ var storeDamageReport = /* @__PURE__ */ __name(({ health, command, mark = null,
147
147
  };
148
148
  }, "storeDamageReport");
149
149
 
150
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
150
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
151
151
  import { realpathSync, statSync } from "node:fs";
152
152
  import { resolve } from "node:path";
153
153
 
154
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
154
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
155
155
  var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
156
156
  const creatable = /* @__PURE__ */ new Set();
157
157
  let people = 0, identities = 0;
@@ -214,11 +214,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
214
214
  }
215
215
  }, "copyPeople");
216
216
 
217
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
217
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
218
218
  import { createHash } from "node:crypto";
219
219
  var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
220
220
 
221
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
221
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
222
222
  var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
223
223
  const colon = collection.indexOf(":");
224
224
  const provider = collection.slice(0, colon);
@@ -262,7 +262,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
262
262
  };
263
263
  }, "currentCollection");
264
264
 
265
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
265
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
266
266
  var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
267
267
  const mappings = /* @__PURE__ */ new Map();
268
268
  const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
@@ -429,7 +429,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
429
429
  };
430
430
  }, "planTransfer");
431
431
 
432
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
432
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
433
433
  var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
434
434
  var MAX_ENTITIES = 1e3;
435
435
  var MAX_AUXILIARY = 1e4;
@@ -591,7 +591,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
591
591
  };
592
592
  }), "transferSnapshot");
593
593
 
594
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
594
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
595
595
  var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
596
596
  if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
597
597
  return provider ?? null;
@@ -763,7 +763,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
763
763
  database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
764
764
  }, "remapEntity");
765
765
 
766
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
766
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
767
767
  var locations = /* @__PURE__ */ __name((options) => {
768
768
  for (const value of [options.source, options.destination, options.collection])
769
769
  if (typeof value !== "string" || !value.trim())
@@ -865,7 +865,7 @@ var applyWith = /* @__PURE__ */ __name(async (location, options) => {
865
865
  }
866
866
  }, "applyWith");
867
867
 
868
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/health.js
868
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/health.js
869
869
  import { existsSync, statSync as statSync2 } from "node:fs";
870
870
  var JSON_COLUMNS = {
871
871
  accounts: ["settings"],
@@ -1007,7 +1007,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
1007
1007
  }
1008
1008
  }, "storeHealth");
1009
1009
 
1010
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
1010
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
1011
1011
  var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
1012
1012
  if (!options || typeof options !== "object" || Array.isArray(options))
1013
1013
  throw new CliError("validation_error", "project preview options are required");
@@ -1033,7 +1033,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
1033
1033
  });
1034
1034
  }, "previewProjectAnnotationSnapshot");
1035
1035
 
1036
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
1036
+ // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
1037
1037
  var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
1038
1038
  if (!options || typeof options !== "object" || Array.isArray(options))
1039
1039
  throw new CliError("validation_error", "snapshot options are required");