@wirecat/cli-memo 0.131.38 → 0.131.39

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 (111) hide show
  1. package/dist/bin/memo.js +2 -2
  2. package/dist/bundle/{all-profiles-W26PFZ2J.js → all-profiles-5CXMPAOF.js} +5 -5
  3. package/dist/bundle/{anthropic-SY6QPTQW.js → anthropic-KJECM7MD.js} +3 -3
  4. package/dist/bundle/{app-server-WUXDTYU4.js → app-server-ZO7Z7RMA.js} +35 -35
  5. package/dist/bundle/auto-MA47DOER.js +86 -0
  6. package/dist/bundle/{bun-O3KE32D7.js → bun-V2HGEGFF.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-5X2NBSLA.js → bun-sqlite-DSFSAFNQ.js} +2 -2
  8. package/dist/bundle/{chunk-TJXVMLK4.js → chunk-3ZEH35NH.js} +1 -1
  9. package/dist/bundle/{chunk-2EDP7PDR.js → chunk-4GA7IMXD.js} +279 -303
  10. package/dist/bundle/{chunk-QTLYWZXB.js → chunk-4MFNKTQQ.js} +3 -3
  11. package/dist/bundle/{chunk-DVHDIQBI.js → chunk-552IRBSA.js} +4 -4
  12. package/dist/bundle/{chunk-J7FP7PRV.js → chunk-5I75PUEK.js} +531 -583
  13. package/dist/bundle/{chunk-5ZKNRR6O.js → chunk-6BJPSIFE.js} +36 -36
  14. package/dist/bundle/{chunk-L2CXODLV.js → chunk-72DBFKCI.js} +1 -1
  15. package/dist/bundle/{chunk-ZP7F76D3.js → chunk-7DMTHV2P.js} +1 -1
  16. package/dist/bundle/{chunk-M3TUIVRK.js → chunk-7VBSW2RI.js} +5 -5
  17. package/dist/bundle/{chunk-CXWKBOKQ.js → chunk-AKLFOL4C.js} +3 -3
  18. package/dist/bundle/{chunk-F4BXYTIW.js → chunk-AX6AMVVY.js} +7 -7
  19. package/dist/bundle/{chunk-WVXTZWH3.js → chunk-B2YW6VOA.js} +1 -1
  20. package/dist/bundle/{chunk-WRZP6DJT.js → chunk-BHBLLZAO.js} +279 -210
  21. package/dist/bundle/{chunk-75QQ7MLH.js → chunk-CHAA2BOM.js} +8 -8
  22. package/dist/bundle/{chunk-GXCXOITM.js → chunk-CQJO22KN.js} +20 -20
  23. package/dist/bundle/{chunk-CEOXSWU3.js → chunk-D7JMUN36.js} +2 -2
  24. package/dist/bundle/{chunk-HJTDA7AE.js → chunk-DMY2YVJ7.js} +5 -5
  25. package/dist/bundle/{chunk-XCAGVFRC.js → chunk-DZBNKSE2.js} +487 -421
  26. package/dist/bundle/{chunk-4NJQJZRO.js → chunk-EP5U5WCQ.js} +1 -1
  27. package/dist/bundle/{chunk-CVCL77DZ.js → chunk-ER7SUNTY.js} +4 -4
  28. package/dist/bundle/{chunk-LV6FBPUQ.js → chunk-EY42TTWE.js} +11 -11
  29. package/dist/bundle/{chunk-374FSLTB.js → chunk-G35CZBBF.js} +5 -5
  30. package/dist/bundle/{chunk-SSQDA7X6.js → chunk-GANKKP5F.js} +4 -4
  31. package/dist/bundle/{chunk-B4LT2DHH.js → chunk-GRTELFME.js} +4 -4
  32. package/dist/bundle/{chunk-K3GMQLFM.js → chunk-H4DBYU2J.js} +2 -2
  33. package/dist/bundle/{chunk-S5KSC4B3.js → chunk-H4GQZLTW.js} +27 -27
  34. package/dist/bundle/{chunk-3G63U4VK.js → chunk-HB3YU52J.js} +9 -9
  35. package/dist/bundle/{chunk-JT36R23P.js → chunk-JQSFIPWA.js} +7 -7
  36. package/dist/bundle/{chunk-RS5WAI7D.js → chunk-KBDZG6XU.js} +3 -3
  37. package/dist/bundle/{chunk-UUD4QHAN.js → chunk-LXNWBHCK.js} +4 -4
  38. package/dist/bundle/{chunk-4OF64T67.js → chunk-O6ZLAFWQ.js} +1 -1
  39. package/dist/bundle/{chunk-QM5CNTGT.js → chunk-OJBM56FX.js} +20 -20
  40. package/dist/bundle/{chunk-5EBYGKZB.js → chunk-P357OGUL.js} +1 -1
  41. package/dist/bundle/{chunk-5J5RTJUJ.js → chunk-P3QBCCBA.js} +1 -1
  42. package/dist/bundle/{chunk-SDIKN2OR.js → chunk-PWVNSJBL.js} +10 -10
  43. package/dist/bundle/{chunk-FOQBIEL5.js → chunk-Q35DHKBZ.js} +1 -1
  44. package/dist/bundle/{chunk-AOFYLQK2.js → chunk-Q3O7N35U.js} +2 -2
  45. package/dist/bundle/{chunk-32WLB6I3.js → chunk-QAFJG52K.js} +1 -1
  46. package/dist/bundle/{chunk-2Q4DYGNU.js → chunk-QL2YLPB5.js} +2 -2
  47. package/dist/bundle/{chunk-UWJ3RJF4.js → chunk-QMDVWF3C.js} +2 -2
  48. package/dist/bundle/{chunk-ZMZVRVCK.js → chunk-QUJXYDYY.js} +2 -2
  49. package/dist/bundle/{chunk-2IST54UV.js → chunk-QZABT7XH.js} +9 -9
  50. package/dist/bundle/{chunk-CEENCS5P.js → chunk-RBLUTSSL.js} +6 -6
  51. package/dist/bundle/{chunk-AJ4SVCBD.js → chunk-S7W5GFOI.js} +249 -249
  52. package/dist/bundle/{chunk-TXJYVD5U.js → chunk-SANEKFUF.js} +1 -1
  53. package/dist/bundle/{chunk-S2K3FWLA.js → chunk-SB7V3HFM.js} +12 -12
  54. package/dist/bundle/{chunk-7P3PM3OL.js → chunk-TOZ2COFV.js} +7 -7
  55. package/dist/bundle/{chunk-4AXSD77N.js → chunk-TSGJRL2S.js} +1 -1
  56. package/dist/bundle/{chunk-XLUOKHFN.js → chunk-U5B2ORUM.js} +3 -3
  57. package/dist/bundle/{chunk-GSVNF5TX.js → chunk-UECWAAZ3.js} +4 -4
  58. package/dist/bundle/{chunk-4CADISNA.js → chunk-UIUMG7AY.js} +1 -1
  59. package/dist/bundle/{chunk-43CMY3YD.js → chunk-WBWFH7ZT.js} +1 -1
  60. package/dist/bundle/{chunk-TJNW4L7P.js → chunk-WDDYMCLD.js} +43 -43
  61. package/dist/bundle/{chunk-O762IE2F.js → chunk-WJCBQFEM.js} +1 -1
  62. package/dist/bundle/{chunk-L2M3LTQQ.js → chunk-XED6NO7E.js} +1 -1
  63. package/dist/bundle/{chunk-QP7BTVMT.js → chunk-YFBNICKS.js} +2 -2
  64. package/dist/bundle/{chunk-4CD37FZU.js → chunk-ZQTFPZ36.js} +5 -5
  65. package/dist/bundle/{command-contract-FRRW2Z4S.js → command-contract-JXLIGF3U.js} +11 -11
  66. package/dist/bundle/{decode-RVPTVZ3W.js → decode-HXMDIZKS.js} +2 -2
  67. package/dist/bundle/{echarts-CW6DTALT.js → echarts-MRWQC3FY.js} +2 -2
  68. package/dist/bundle/{embed-VXWYSZ7X.js → embed-IEJFYZ7N.js} +3 -3
  69. package/dist/bundle/{embedder-QX3GSPBN.js → embedder-N2TXC47Z.js} +6 -6
  70. package/dist/bundle/{entry-LBDVYMDG.js → entry-VX4RACD7.js} +4 -4
  71. package/dist/bundle/failure-LU3CYK3U.js +66 -0
  72. package/dist/bundle/{first-run-VPR5YFMD.js → first-run-2GXQUNFV.js} +5 -5
  73. package/dist/bundle/{first-screen-WRKQ4GAM.js → first-screen-JRKMDJPK.js} +12 -12
  74. package/dist/bundle/{instructions-2XLUHPQH.js → instructions-FR4H42RI.js} +1 -1
  75. package/dist/bundle/{mcp-RD54TNKO.js → mcp-IP3FEW24.js} +35 -35
  76. package/dist/bundle/memo.js +6 -6
  77. package/dist/bundle/{node-AQ7O3PGH.js → node-QWBBKDHE.js} +2 -2
  78. package/dist/bundle/{node-sqlite-RKDBK624.js → node-sqlite-GKJHUPHC.js} +3 -3
  79. package/dist/bundle/{oauth-ZQCL2HPA.js → oauth-ZQ7B32ZI.js} +4 -4
  80. package/dist/bundle/{open-ME6M3BWL.js → open-TDGXVXNV.js} +2 -2
  81. package/dist/bundle/{openai-PHW5QKNC.js → openai-3T4YGUZM.js} +7 -7
  82. package/dist/bundle/{process-4HJLMEHS.js → process-OBTDURL4.js} +1 -1
  83. package/dist/bundle/{program-EVPU3PMC.js → program-6UJEO4TI.js} +80 -59
  84. package/dist/bundle/{prompt-U5JMQJPC.js → prompt-JZIIKSM4.js} +2 -2
  85. package/dist/bundle/{recognize-OYKFXOLL.js → recognize-47F6WJYE.js} +1 -1
  86. package/dist/bundle/{remote-IXABNXVH.js → remote-NHSYSI2S.js} +4 -4
  87. package/dist/bundle/{rerank-6ASLHI5I.js → rerank-HONNCBTA.js} +4 -4
  88. package/dist/bundle/{serve-ZYQO2Z23.js → serve-63BFDEQS.js} +6 -6
  89. package/dist/bundle/server-I6M5QH5W.js +48 -0
  90. package/dist/bundle/{server-5XHYKDVY.js → server-QWJPOH7K.js} +50 -50
  91. package/dist/bundle/server-XYUNBCYP.js +61 -0
  92. package/dist/bundle/{state-5W7BQVQO.js → state-ZLODXERO.js} +3 -3
  93. package/dist/bundle/{store-6WW7XV2O.js → store-Q36VLED7.js} +9 -9
  94. package/dist/bundle/store-maintenance-command-EM53HVOY.js +48 -0
  95. package/dist/bundle/update-UKMV74FK.js +69 -0
  96. package/dist/examples.d.ts.map +1 -1
  97. package/dist/examples.js +5 -1
  98. package/dist/examples.js.map +1 -1
  99. package/dist/knowledge/command.d.ts.map +1 -1
  100. package/dist/knowledge/command.js +23 -1
  101. package/dist/knowledge/command.js.map +1 -1
  102. package/dist/version.d.ts +1 -1
  103. package/dist/version.js +1 -1
  104. package/package.json +2 -2
  105. package/dist/bundle/auto-2TNLCAEM.js +0 -86
  106. package/dist/bundle/failure-NBJBRA6G.js +0 -66
  107. package/dist/bundle/server-BMXFJO2T.js +0 -61
  108. package/dist/bundle/server-V7JU6YLA.js +0 -48
  109. package/dist/bundle/store-maintenance-command-YPNP663U.js +0 -48
  110. package/dist/bundle/update-CVHXLX72.js +0 -69
  111. /package/dist/bundle/{chunk-FEJOKQPV.js → chunk-TYQAAHHM.js} +0 -0
@@ -38,6 +38,7 @@ import {
38
38
  defineQuery,
39
39
  entryInWindow,
40
40
  entryMetadata,
41
+ evaluate,
41
42
  findingFields,
42
43
  findingFingerprint,
43
44
  findingHash,
@@ -64,6 +65,7 @@ import {
64
65
  normalizeTag,
65
66
  orderLine,
66
67
  orderTitle,
68
+ organization,
67
69
  parseDecimal,
68
70
  parseMeetingQuery,
69
71
  parseMeetingReference,
@@ -72,9 +74,12 @@ import {
72
74
  paymentTitle,
73
75
  priorityBand,
74
76
  priorityLabel,
77
+ project,
75
78
  quantityOf,
76
79
  queryAstSchema,
77
80
  queryError,
81
+ queryFieldsOf,
82
+ reminder,
78
83
  scaleOf,
79
84
  settledStatus,
80
85
  tagOf,
@@ -93,11 +98,11 @@ import {
93
98
  validateQuery,
94
99
  walkQuery,
95
100
  zonedMoment
96
- } from "./chunk-WRZP6DJT.js";
101
+ } from "./chunk-BHBLLZAO.js";
97
102
  import {
98
103
  holdsCredential,
99
104
  secretNamed
100
- } from "./chunk-32WLB6I3.js";
105
+ } from "./chunk-QAFJG52K.js";
101
106
  import {
102
107
  DEFAULT_STEMMERS,
103
108
  DEFAULT_STEMMERS_VERSION,
@@ -110,26 +115,26 @@ import {
110
115
  fold,
111
116
  normalize,
112
117
  parseStemmers
113
- } from "./chunk-7P3PM3OL.js";
118
+ } from "./chunk-TOZ2COFV.js";
114
119
  import {
115
120
  DEFAULT_TASK_CATEGORIES,
116
121
  sharedConfigPath,
117
122
  storedTaskCategories,
118
123
  taskCategoriesReader
119
- } from "./chunk-B4LT2DHH.js";
124
+ } from "./chunk-GRTELFME.js";
120
125
  import {
121
126
  refuseOwnerStoreInTests,
122
127
  storePath
123
- } from "./chunk-4CADISNA.js";
128
+ } from "./chunk-UIUMG7AY.js";
124
129
  import {
125
130
  quietSqliteWarning,
126
131
  storeCapable
127
- } from "./chunk-374FSLTB.js";
132
+ } from "./chunk-G35CZBBF.js";
128
133
  import {
129
134
  PRAGMAS,
130
135
  TIME_LIMIT_FUNCTION,
131
136
  TimeLimitReached
132
- } from "./chunk-L2M3LTQQ.js";
137
+ } from "./chunk-XED6NO7E.js";
133
138
  import {
134
139
  array,
135
140
  boolean,
@@ -179,7 +184,7 @@ import {
179
184
  sql,
180
185
  sqliteTable,
181
186
  text
182
- } from "./chunk-4AXSD77N.js";
187
+ } from "./chunk-TSGJRL2S.js";
183
188
  import {
184
189
  __commonJS,
185
190
  __name,
@@ -9923,7 +9928,7 @@ var require_cjs = __commonJS({
9923
9928
  }
9924
9929
  });
9925
9930
 
9926
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/account-store.js
9931
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/account-store.js
9927
9932
  var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
9928
9933
  const methods = whole;
9929
9934
  return Object.fromEntries(Object.keys(keyed).map((name) => [
@@ -10051,7 +10056,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
10051
10056
  };
10052
10057
  }, "bindAccount");
10053
10058
 
10054
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/locator.js
10059
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/locator.js
10055
10060
  var SCHEME = "msg:";
10056
10061
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
10057
10062
  var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
@@ -10065,7 +10070,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
10065
10070
  return { provider, account, chat: chat2, message: message2 };
10066
10071
  }, "parseLocator");
10067
10072
 
10068
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/references.js
10073
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/references.js
10069
10074
  var SIMPLE_REFERENCES = [
10070
10075
  "note",
10071
10076
  "document",
@@ -10213,7 +10218,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
10213
10218
  return match !== null && byPrefix.has(match[1]);
10214
10219
  }, "looksLikeReference");
10215
10220
 
10216
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/providers.js
10221
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/providers.js
10217
10222
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
10218
10223
  var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
10219
10224
  var PROVIDERS = [
@@ -10329,7 +10334,7 @@ var providerNamed = /* @__PURE__ */ __name((word2) => {
10329
10334
  var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
10330
10335
  var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
10331
10336
 
10332
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/query.js
10337
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/query.js
10333
10338
  var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
10334
10339
  var inSource = /* @__PURE__ */ __name((source2, provider) => source2 === "all" || source2 === "bots" && isBotProvider(provider) || source2 === "personal" && !isBotProvider(provider) || source2 === provider || providerNamed(source2)?.name === provider || isKind(source2) && kindOf(provider) === source2, "inSource");
10335
10340
  var fail = /* @__PURE__ */ __name((message2) => {
@@ -10352,7 +10357,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
10352
10357
  return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
10353
10358
  }, "sourceOf");
10354
10359
 
10355
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/account-list.js
10360
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/account-list.js
10356
10361
  var ACCOUNT_GROUPS = "accountGroups";
10357
10362
  var ACCOUNT_GROUPS_SETTING = "account_groups";
10358
10363
  var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
@@ -10539,7 +10544,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
10539
10544
  return { accounts: [...chosen.values()], skipped };
10540
10545
  }, "fitting");
10541
10546
 
10542
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
10547
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
10543
10548
  var IndexBuilderOn = class {
10544
10549
  static {
10545
10550
  __name(this, "IndexBuilderOn");
@@ -10734,7 +10739,7 @@ function alias(table, alias2) {
10734
10739
  }
10735
10740
  __name(alias, "alias");
10736
10741
 
10737
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
10742
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
10738
10743
  var ENTITY_TABLES = {
10739
10744
  account: "accounts",
10740
10745
  attachment: "attachments",
@@ -10777,7 +10782,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
10777
10782
  return { table, pointer, type, count, known: known2 };
10778
10783
  }).filter(({ count }) => count > 0)), "orphanPointers");
10779
10784
 
10780
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
10785
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
10781
10786
  var canonicalTags = sqliteTable("canonical_tags", {
10782
10787
  id: integer("id").primaryKey(),
10783
10788
  name: text("name").notNull().unique(),
@@ -10786,7 +10791,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
10786
10791
  updatedAt: integer("updated_at").notNull()
10787
10792
  });
10788
10793
 
10789
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
10794
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
10790
10795
  var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
10791
10796
  sourceKey: text("source_key").notNull(),
10792
10797
  collection: text("collection").notNull(),
@@ -10796,13 +10801,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
10796
10801
  createdAt: integer("created_at").notNull()
10797
10802
  }, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
10798
10803
 
10799
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
10804
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
10800
10805
  var documentIndexPending = sqliteTable("document_index_pending", {
10801
10806
  id: integer("id").notNull(),
10802
10807
  indexableType: text("indexable_type").notNull()
10803
10808
  }, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
10804
10809
 
10805
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
10810
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
10806
10811
  var tagRedirects = sqliteTable("tag_redirects", {
10807
10812
  sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
10808
10813
  survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
@@ -10828,7 +10833,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
10828
10833
  index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
10829
10834
  ]);
10830
10835
 
10831
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
10836
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
10832
10837
  var accounts = sqliteTable("accounts", {
10833
10838
  id: integer("id").primaryKey(),
10834
10839
  provider: text("provider").notNull(),
@@ -12495,7 +12500,7 @@ var storeSettings = sqliteTable("store_settings", {
12495
12500
  at: integer("at").notNull()
12496
12501
  });
12497
12502
 
12498
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
12503
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
12499
12504
  var ARMS = [
12500
12505
  [
12501
12506
  "message",
@@ -12622,7 +12627,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
12622
12627
  return recomputed;
12623
12628
  }, "drainInvolvementQueue");
12624
12629
 
12625
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/mentions.js
12630
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/mentions.js
12626
12631
  import { domainToUnicode } from "node:url";
12627
12632
 
12628
12633
  // node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
@@ -22644,7 +22649,7 @@ var oa = /* @__PURE__ */ __name((e) => {
22644
22649
  }, "oa");
22645
22650
  var na = { parse: O, get: aa, isValid: oa };
22646
22651
 
22647
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
22652
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
22648
22653
  var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
22649
22654
  var ID = /^[\w-]{10,}$/;
22650
22655
  var trimUrl = /* @__PURE__ */ __name((url) => {
@@ -22685,7 +22690,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
22685
22690
  return { url, documentId: googleDocumentId(url) };
22686
22691
  }), "googleDocumentLinks");
22687
22692
 
22688
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
22693
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
22689
22694
  var PHONE_PLANS = [
22690
22695
  {
22691
22696
  country: "us",
@@ -23065,7 +23070,7 @@ var PHONE_PLANS = [
23065
23070
  }
23066
23071
  ];
23067
23072
 
23068
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/phones.js
23073
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/phones.js
23069
23074
  var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
23070
23075
  var DEFAULT_PHONE_COUNTRIES = ["ru"];
23071
23076
  var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
@@ -23106,7 +23111,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
23106
23111
  return void 0;
23107
23112
  }, "nationalPhone");
23108
23113
 
23109
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/places.js
23114
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/places.js
23110
23115
  var BEFORE = [
23111
23116
  [/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
23112
23117
  [/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
@@ -23366,7 +23371,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
23366
23371
  return found2.sort((a, b) => a.start - b.start);
23367
23372
  }, "findPlaces");
23368
23373
 
23369
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/mentions.js
23374
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/mentions.js
23370
23375
  var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
23371
23376
  var MENTION_VERSIONS = {
23372
23377
  phone: 1,
@@ -23556,7 +23561,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
23556
23561
  };
23557
23562
  }, "typedPhone");
23558
23563
 
23559
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/first-names.js
23564
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/first-names.js
23560
23565
  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";
23561
23566
  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";
23562
23567
  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";
@@ -23564,7 +23569,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
23564
23569
  var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
23565
23570
  var NAME_WORDS = WORDS.split(" ");
23566
23571
 
23567
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/person-names.js
23572
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/person-names.js
23568
23573
  var LATIN_TO_CYRILLIC = {
23569
23574
  shch: "\u0449",
23570
23575
  sch: "\u0449",
@@ -23772,7 +23777,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
23772
23777
  return found2;
23773
23778
  }, "findUnknownNames");
23774
23779
 
23775
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/attachments.js
23780
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/attachments.js
23776
23781
  var NOT_FILES = /* @__PURE__ */ new Set([
23777
23782
  "webpage",
23778
23783
  "share",
@@ -23812,7 +23817,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
23812
23817
  });
23813
23818
  }, "matchDownloads");
23814
23819
 
23815
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
23820
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
23816
23821
  var QUERY_VERSION = 1;
23817
23822
  var QUERY_LIMITS2 = {
23818
23823
  ...QUERY_LIMITS,
@@ -23848,7 +23853,7 @@ function exhausted(budget) {
23848
23853
  }
23849
23854
  __name(exhausted, "exhausted");
23850
23855
 
23851
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
23856
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
23852
23857
  var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
23853
23858
  var literal2 = /* @__PURE__ */ __name((c) => ({
23854
23859
  kind: "char",
@@ -24248,7 +24253,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
24248
24253
  return out;
24249
24254
  }, "foldRegex");
24250
24255
 
24251
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
24256
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
24252
24257
  var PRESET_VERSION = 1;
24253
24258
  var PRESETS = {
24254
24259
  password: {
@@ -24302,7 +24307,7 @@ var PRESETS = {
24302
24307
  }
24303
24308
  };
24304
24309
 
24305
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
24310
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
24306
24311
  var FIELD_VERSION = 2;
24307
24312
  var UNITS = {
24308
24313
  "": 1,
@@ -24763,12 +24768,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
24763
24768
  return validateFields(parsed3.output);
24764
24769
  }, "validateAst");
24765
24770
 
24766
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
24771
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
24767
24772
  var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
24768
24773
  var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
24769
24774
  var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
24770
24775
 
24771
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
24776
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
24772
24777
  var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
24773
24778
  var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
24774
24779
  var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
@@ -24792,7 +24797,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
24792
24797
  };
24793
24798
  }, "linkMatch");
24794
24799
 
24795
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
24800
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
24796
24801
  var SETTING = "phoneCountries";
24797
24802
  var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
24798
24803
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
@@ -24823,7 +24828,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
24823
24828
  return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
24824
24829
  }, "valueMatch");
24825
24830
 
24826
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
24831
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
24827
24832
  var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
24828
24833
  if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
24829
24834
  throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
@@ -24851,7 +24856,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
24851
24856
  return 2 * intersection2 / (aa2.size + bb.size);
24852
24857
  }, "vocabularySimilarity");
24853
24858
 
24854
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
24859
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
24855
24860
  import { createHash } from "node:crypto";
24856
24861
  var folded2 = /* @__PURE__ */ __name((name) => {
24857
24862
  try {
@@ -24917,7 +24922,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
24917
24922
  });
24918
24923
  }, "guardTagCreation");
24919
24924
 
24920
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
24925
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
24921
24926
  var invalid2 = /* @__PURE__ */ __name((message2) => {
24922
24927
  throw new CliError("validation_error", message2);
24923
24928
  }, "invalid");
@@ -24994,7 +24999,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
24994
24999
  };
24995
25000
  }, "createTagRedirectIndex");
24996
25001
 
24997
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
25002
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
24998
25003
  var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
24999
25004
  const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
25000
25005
  if (!row2)
@@ -25022,7 +25027,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
25022
25027
  return snapshot2;
25023
25028
  }, "tagRedirectSnapshot");
25024
25029
 
25025
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
25030
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
25026
25031
  import { createHash as createHash2 } from "node:crypto";
25027
25032
  var TASK_KEY_PREFIXES = {
25028
25033
  question: "Q",
@@ -25050,7 +25055,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
25050
25055
  return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
25051
25056
  }, "taskAccountOf");
25052
25057
 
25053
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
25058
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
25054
25059
  var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
25055
25060
  var REFERABLE = {
25056
25061
  note: { tombstone: true },
@@ -25215,7 +25220,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
25215
25220
  return row2 ? String(row2.id ?? row2.key) : void 0;
25216
25221
  }, "taskIdOf");
25217
25222
 
25218
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
25223
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
25219
25224
  var toMs = /* @__PURE__ */ __name((iso13) => {
25220
25225
  if (iso13 === null || iso13 === void 0)
25221
25226
  return null;
@@ -25229,7 +25234,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
25229
25234
  var DELIVERY = { delivered: 1, read: 2 };
25230
25235
  var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
25231
25236
 
25232
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
25237
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
25233
25238
  var TAG_KINDS = ["tag", "topic"];
25234
25239
  var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
25235
25240
  var TAG_TYPE = {
@@ -25432,7 +25437,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
25432
25437
  return result;
25433
25438
  }, "tagsOf");
25434
25439
 
25435
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
25440
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
25436
25441
  var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
25437
25442
  var SPEECH = speech("att");
25438
25443
  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");
@@ -25796,7 +25801,7 @@ var FIELD_COMPILERS = {
25796
25801
  subject
25797
25802
  };
25798
25803
 
25799
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
25804
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
25800
25805
  var placeOf = /* @__PURE__ */ __name((database) => {
25801
25806
  const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
25802
25807
  const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
@@ -25812,7 +25817,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
25812
25817
  };
25813
25818
  }, "placeOf");
25814
25819
 
25815
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
25820
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
25816
25821
  var DRAIN_ON_WRITE = 500;
25817
25822
  var METHOD = "rules";
25818
25823
  var telegramLink = /* @__PURE__ */ __name((database) => {
@@ -25975,7 +25980,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
25975
25980
  return queued.length;
25976
25981
  }, "drainMentions");
25977
25982
 
25978
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
25983
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
25979
25984
  var indexRow = /* @__PURE__ */ __name((database, name) => {
25980
25985
  const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
25981
25986
  if (!exists2)
@@ -25983,7 +25988,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
25983
25988
  return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
25984
25989
  }, "indexRow");
25985
25990
 
25986
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
25991
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
25987
25992
  var INDEX = "message_stems";
25988
25993
  var SETTING2 = "searchStemmers";
25989
25994
  var DRAIN_ON_WRITE2 = 500;
@@ -26105,7 +26110,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
26105
26110
  };
26106
26111
  }, "stemmerCache");
26107
26112
 
26108
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
26113
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
26109
26114
  var SQLITE_BUSY = 5;
26110
26115
  var pause = new Int32Array(new SharedArrayBuffer(4));
26111
26116
  var isBusy = /* @__PURE__ */ __name((error) => {
@@ -26200,7 +26205,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
26200
26205
  }
26201
26206
  }, "read");
26202
26207
 
26203
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
26208
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
26204
26209
  var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
26205
26210
  coalesce(CASE k.chunkable_type
26206
26211
  WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
@@ -26342,7 +26347,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
26342
26347
  }, "dropUnusedVectors");
26343
26348
  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");
26344
26349
 
26345
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
26350
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
26346
26351
  var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null) => Number(orm.insert(accounts).values({ provider, externalId: account, name, scope: scope3 ?? "personal", createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
26347
26352
  target: [accounts.provider, accounts.externalId],
26348
26353
  set: {
@@ -26451,7 +26456,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
26451
26456
  AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
26452
26457
  }, "dropOrphanPeople");
26453
26458
 
26454
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
26459
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
26455
26460
  var FOLDED = [
26456
26461
  { table: "tasks", column: "title" },
26457
26462
  { table: "tasks", column: "close_reason" },
@@ -26488,7 +26493,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
26488
26493
  return filled2;
26489
26494
  }, "fillFolded");
26490
26495
 
26491
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
26496
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
26492
26497
  var HISTORY_KEY = "$history";
26493
26498
  var objectOf = /* @__PURE__ */ __name((text6) => {
26494
26499
  if (typeof text6 !== "string")
@@ -26564,7 +26569,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
26564
26569
  return rest;
26565
26570
  }, "withoutHistory");
26566
26571
 
26567
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
26572
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
26568
26573
  import { createHash as createHash3 } from "node:crypto";
26569
26574
  var CHUNK_CHARS = 1200;
26570
26575
  var CHUNK_OVERLAP = 150;
@@ -26669,7 +26674,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
26669
26674
  return chunks2;
26670
26675
  }, "cutChunks");
26671
26676
 
26672
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/task-signature.js
26677
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/task-signature.js
26673
26678
  var DAY = 864e5;
26674
26679
  var CURRENCY = [
26675
26680
  [/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
@@ -26795,7 +26800,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
26795
26800
  return best?.day ?? null;
26796
26801
  }, "dueDayOf");
26797
26802
 
26798
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
26803
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
26799
26804
  var DAY2 = 864e5;
26800
26805
  var STOP_WORDS = new Set([
26801
26806
  // Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
@@ -26950,7 +26955,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
26950
26955
  ...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
26951
26956
  })).sort((a, b) => b.score - a.score), "rankCandidates");
26952
26957
 
26953
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
26958
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
26954
26959
  var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
26955
26960
  r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
26956
26961
  JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
@@ -27221,7 +27226,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
27221
27226
  };
27222
27227
  }, "readiness");
27223
27228
 
27224
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
27229
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
27225
27230
  var DOCUMENT_PICTURE = "document_picture";
27226
27231
  var SCAN_PAGE2 = 5e3;
27227
27232
  var idOf = /* @__PURE__ */ __name((ref3) => {
@@ -27284,7 +27289,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
27284
27289
  }, "nearestPictures")
27285
27290
  }), "documentPicturesOver");
27286
27291
 
27287
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
27292
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
27288
27293
  var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
27289
27294
  const literal4 = escaped2 ?? plain2 ?? "";
27290
27295
  return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
@@ -27349,7 +27354,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
27349
27354
  var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
27350
27355
  var bound2 = /* @__PURE__ */ __name(({ sql: text6, params }) => sql.join(text6.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
27351
27356
 
27352
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
27357
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
27353
27358
  var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
27354
27359
  var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
27355
27360
  var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
@@ -27439,7 +27444,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
27439
27444
  });
27440
27445
  }, "linkMeeting");
27441
27446
 
27442
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
27447
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
27443
27448
  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), ''))";
27444
27449
  var UNSEARCHED_EVENT_TYPES = [
27445
27450
  "working-location",
@@ -27669,7 +27674,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
27669
27674
  return true;
27670
27675
  }, "resetNoteIndex");
27671
27676
 
27672
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
27677
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
27673
27678
  var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
27674
27679
  var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
27675
27680
  for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
@@ -27688,7 +27693,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
27688
27693
  }
27689
27694
  }, "resolvePersonLinks");
27690
27695
 
27691
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
27696
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
27692
27697
  var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
27693
27698
  var prepare = /* @__PURE__ */ __name((orm) => ({
27694
27699
  find: orm.select({
@@ -27913,7 +27918,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
27913
27918
  }, "meetingIdentityPk");
27914
27919
  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");
27915
27920
 
27916
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
27921
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
27917
27922
  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");
27918
27923
  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");
27919
27924
  var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
@@ -28193,7 +28198,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
28193
28198
  }
28194
28199
  }, "replaceAutoTags");
28195
28200
 
28196
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/counters.js
28201
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/counters.js
28197
28202
  var COUNTER_FIELDS = ["views", "reactions", "comments"];
28198
28203
  var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
28199
28204
  var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
@@ -28212,7 +28217,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
28212
28217
  return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
28213
28218
  }, "counterFreshness");
28214
28219
 
28215
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/context/evidence.js
28220
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/context/evidence.js
28216
28221
  import { createHash as createHash4 } from "node:crypto";
28217
28222
  var CONTEXT_MAX_READ_BYTES = 262144;
28218
28223
  var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
@@ -28310,7 +28315,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
28310
28315
  return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
28311
28316
  }, "contextEvidenceRequest");
28312
28317
 
28313
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
28318
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
28314
28319
  var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
28315
28320
  var ACTIVITY = `
28316
28321
  SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
@@ -28427,7 +28432,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
28427
28432
  threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
28428
28433
  }), "mailActivity");
28429
28434
 
28430
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
28435
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
28431
28436
  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");
28432
28437
  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;
28433
28438
  var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
@@ -28568,7 +28573,7 @@ var mailOwnText = /* @__PURE__ */ __name((body2) => {
28568
28573
  return text6 || body2.trim();
28569
28574
  }, "mailOwnText");
28570
28575
 
28571
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
28576
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
28572
28577
  var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
28573
28578
  var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
28574
28579
  k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
@@ -28678,7 +28683,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
28678
28683
  return emails3 + threads;
28679
28684
  }, "drainEmailIndex");
28680
28685
 
28681
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
28686
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
28682
28687
  var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
28683
28688
  SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
28684
28689
  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,
@@ -28776,7 +28781,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
28776
28781
  var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
28777
28782
  SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
28778
28783
 
28779
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
28784
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
28780
28785
  var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
28781
28786
  emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
28782
28787
  last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
@@ -28826,7 +28831,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
28826
28831
  return threads.length;
28827
28832
  }, "markEmailsRestored");
28828
28833
 
28829
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
28834
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
28830
28835
  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");
28831
28836
  var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
28832
28837
  var ruleOf = /* @__PURE__ */ __name((row2) => ({
@@ -28893,7 +28898,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
28893
28898
  }
28894
28899
  }), "mailRulesOver");
28895
28900
 
28896
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
28901
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
28897
28902
  var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
28898
28903
  database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
28899
28904
  VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
@@ -28901,7 +28906,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
28901
28906
  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);
28902
28907
  }, "reviewLink");
28903
28908
 
28904
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
28909
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
28905
28910
  function checkMeetingCancelled(signal) {
28906
28911
  if (!signal?.aborted)
28907
28912
  return;
@@ -28912,7 +28917,7 @@ function checkMeetingCancelled(signal) {
28912
28917
  }
28913
28918
  __name(checkMeetingCancelled, "checkMeetingCancelled");
28914
28919
 
28915
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
28920
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
28916
28921
  var meetingOf = /* @__PURE__ */ __name((row2) => ({
28917
28922
  id: Number(row2.id),
28918
28923
  accountId: Number(row2.account_id),
@@ -28962,7 +28967,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
28962
28967
  createdAt: Number(row2.created_at)
28963
28968
  }), "transcriptRowOf");
28964
28969
 
28965
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
28970
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
28966
28971
  var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
28967
28972
  var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
28968
28973
  var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
@@ -29129,7 +29134,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
29129
29134
  }
29130
29135
  }), "meetingReadsOver");
29131
29136
 
29132
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
29137
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
29133
29138
  var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
29134
29139
  const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
29135
29140
  const params = [input.accountId];
@@ -29172,7 +29177,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
29172
29177
  return { clauses, params };
29173
29178
  }, "meetingSelectionSql");
29174
29179
 
29175
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
29180
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
29176
29181
  var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
29177
29182
  async meetingChatLines(input) {
29178
29183
  checkMeetingCancelled(input.signal);
@@ -29200,7 +29205,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
29200
29205
  }
29201
29206
  }), "meetingChatLinesOver");
29202
29207
 
29203
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
29208
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
29204
29209
  var MESSAGE_FIELDS = {
29205
29210
  pk: messages.id,
29206
29211
  nativeId: messages.externalId,
@@ -29371,7 +29376,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
29371
29376
  storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
29372
29377
  }), "chatActivity");
29373
29378
 
29374
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
29379
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
29375
29380
  var HIT_FIELDS = {
29376
29381
  ...MESSAGE_FIELDS,
29377
29382
  chatTitle: sql`${chats.title}`.as("chat_title"),
@@ -29470,7 +29475,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
29470
29475
  };
29471
29476
  }, "directReplies");
29472
29477
 
29473
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
29478
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
29474
29479
  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");
29475
29480
  var required = /* @__PURE__ */ __name((context, ref3) => {
29476
29481
  const found2 = identityRow(context, ref3);
@@ -29601,7 +29606,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
29601
29606
  }, "mentioning");
29602
29607
  var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
29603
29608
 
29604
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
29609
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
29605
29610
  var missing2 = /* @__PURE__ */ __name(() => {
29606
29611
  throw new CliError("not_found", "Meeting, participant or selected target not found");
29607
29612
  }, "missing");
@@ -29723,7 +29728,7 @@ function meetingContextLinksOver(context) {
29723
29728
  }
29724
29729
  __name(meetingContextLinksOver, "meetingContextLinksOver");
29725
29730
 
29726
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
29731
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
29727
29732
  var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
29728
29733
  var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
29729
29734
  var summaryOf = /* @__PURE__ */ __name((row2) => ({
@@ -29752,7 +29757,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
29752
29757
  return row2 ? summaryText(summaryOf(row2)) : null;
29753
29758
  }, "indexedText");
29754
29759
 
29755
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
29760
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
29756
29761
  var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
29757
29762
  var meetingCurrentIndexRows = `
29758
29763
  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
@@ -29783,7 +29788,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
29783
29788
  }, "invalidateMeetingStems");
29784
29789
  var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
29785
29790
 
29786
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
29791
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
29787
29792
  function meetingHitIndexOver({ database, now: now2 }) {
29788
29793
  return {
29789
29794
  async indexSearch(original) {
@@ -29851,10 +29856,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
29851
29856
  }
29852
29857
  __name(meetingHitIndexOver, "meetingHitIndexOver");
29853
29858
 
29854
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
29859
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
29855
29860
  import { createHash as createHash5 } from "node:crypto";
29856
29861
 
29857
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/trigrams.js
29862
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/trigrams.js
29858
29863
  var trigrams = /* @__PURE__ */ __name((term) => {
29859
29864
  const padded = ` ${term} `;
29860
29865
  const pieces = /* @__PURE__ */ new Set();
@@ -29863,7 +29868,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
29863
29868
  return [...pieces];
29864
29869
  }, "trigrams");
29865
29870
 
29866
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/correct.js
29871
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/correct.js
29867
29872
  var SHORTEST_CORRECTION = 3;
29868
29873
  var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
29869
29874
  var editDistance = /* @__PURE__ */ __name((a, b, max) => {
@@ -29910,7 +29915,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
29910
29915
  return corrections;
29911
29916
  }, "correctWords");
29912
29917
 
29913
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/garbled.js
29918
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/garbled.js
29914
29919
  var SHORTEST_GARBLED = 4;
29915
29920
  var MOST_WIDENED = 64;
29916
29921
  var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
@@ -30002,7 +30007,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
30002
30007
  return found2.map((words3) => words3.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
30003
30008
  }, "widenWords");
30004
30009
 
30005
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
30010
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
30006
30011
  import { readFileSync } from "node:fs";
30007
30012
  var loaded;
30008
30013
  var dictionary = /* @__PURE__ */ __name(() => {
@@ -30061,7 +30066,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
30061
30066
  return false;
30062
30067
  }, "knownRussianWord");
30063
30068
 
30064
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
30069
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
30065
30070
  var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
30066
30071
  var MOST_WORDS = 128;
30067
30072
  var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
@@ -30288,7 +30293,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
30288
30293
  return check3(tree);
30289
30294
  }, "matchMeetingText");
30290
30295
 
30291
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30296
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30292
30297
  var fail3 = /* @__PURE__ */ __name((message2) => {
30293
30298
  throw new CliError("validation_error", message2);
30294
30299
  }, "fail");
@@ -30470,7 +30475,7 @@ function meetingHitSearchOver({ database }) {
30470
30475
  }
30471
30476
  __name(meetingHitSearchOver, "meetingHitSearchOver");
30472
30477
 
30473
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
30478
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
30474
30479
  var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
30475
30480
  async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
30476
30481
  positiveReadInteger(accountId, "accountId");
@@ -30502,7 +30507,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
30502
30507
  }
30503
30508
  }), "meetingLanguagesOver");
30504
30509
 
30505
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
30510
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
30506
30511
  import { createHash as createHash6 } from "node:crypto";
30507
30512
  var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
30508
30513
  if (value === void 0)
@@ -30592,7 +30597,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
30592
30597
  }
30593
30598
  }), "meetingParticipantSearchOver");
30594
30599
 
30595
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
30600
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
30596
30601
  var preparationQueries = {
30597
30602
  participants: {
30598
30603
  fields: "p.id, p.identity_id, p.display_name, l.person_id",
@@ -30642,7 +30647,7 @@ var preparationQueries = {
30642
30647
  }
30643
30648
  };
30644
30649
 
30645
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
30650
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
30646
30651
  var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
30647
30652
  async preparationContext(original) {
30648
30653
  const input = validateMeetingPreparationContext(original);
@@ -30683,7 +30688,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
30683
30688
  }
30684
30689
  }), "meetingPreparationContextOver");
30685
30690
 
30686
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
30691
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
30687
30692
  var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
30688
30693
  SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
30689
30694
  WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
@@ -30697,7 +30702,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
30697
30702
  JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
30698
30703
  )`, "preparationSubjects");
30699
30704
 
30700
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
30705
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
30701
30706
  var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
30702
30707
  async preparationKnowledge(original) {
30703
30708
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -30742,7 +30747,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
30742
30747
  }
30743
30748
  }), "meetingPreparationKnowledgeOver");
30744
30749
 
30745
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
30750
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
30746
30751
  var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
30747
30752
  async preparationNotes(original) {
30748
30753
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -30795,7 +30800,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
30795
30800
  }
30796
30801
  }), "meetingPreparationNotesOver");
30797
30802
 
30798
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
30803
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
30799
30804
  var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
30800
30805
  async relatedHistory(original) {
30801
30806
  const input = validateMeetingRelatedHistory(original);
@@ -30811,7 +30816,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
30811
30816
  JOIN identity_links al ON al.person_id=cl.person_id
30812
30817
  JOIN meeting_participants ap ON ap.identity_id=al.identity_id
30813
30818
  JOIN anchors a ON a.id=ap.meeting_id WHERE cp.meeting_id=m.id)`;
30814
- const project = `EXISTS(SELECT 1 FROM links c JOIN projects p ON p.id=c.to_id
30819
+ const project2 = `EXISTS(SELECT 1 FROM links c JOIN projects p ON p.id=c.to_id
30815
30820
  JOIN links a ON a.to_type='project' AND a.to_id=p.id AND a.from_type='meeting'
30816
30821
  AND a.kind=${linkKind("member-of")} AND a.confirmed=1
30817
30822
  JOIN anchors seed ON seed.id=a.from_id
@@ -30819,7 +30824,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
30819
30824
  AND c.kind=${linkKind("member-of")} AND c.confirmed=1 AND p.account_id IS NULL AND p.deleted_at IS NULL)`;
30820
30825
  const selection = `WITH anchors AS (${anchors}), candidates AS (
30821
30826
  SELECT m.id,m.external_id,m.title,m.event_id,m.started_at,m.ended_at,m.updated_at,
30822
- ${person2} AS shared_person, ${project} AS shared_project
30827
+ ${person2} AS shared_person, ${project2} AS shared_project
30823
30828
  FROM meetings m LEFT JOIN meeting_series s ON s.id=m.meeting_series_id
30824
30829
  WHERE m.account_id=? AND (m.meeting_series_id IS NULL OR m.meeting_series_id<>?)
30825
30830
  AND (m.meeting_series_id IS NULL OR (s.deleted_at IS NULL AND s.account_id=m.account_id))
@@ -30866,7 +30871,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
30866
30871
  }
30867
30872
  }), "meetingRelatedHistoryOver");
30868
30873
 
30869
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
30874
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
30870
30875
  var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
30871
30876
  var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
30872
30877
  var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
@@ -30947,7 +30952,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
30947
30952
  }
30948
30953
  }), "meetingReviewOver");
30949
30954
 
30950
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
30955
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
30951
30956
  var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
30952
30957
  var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
30953
30958
  if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
@@ -31001,7 +31006,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
31001
31006
  }
31002
31007
  }), "meetingSeriesHistoryOver");
31003
31008
 
31004
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
31009
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
31005
31010
  var MOST_ROWS = 5e5;
31006
31011
  var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
31007
31012
  EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
@@ -31070,7 +31075,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
31070
31075
  }
31071
31076
  }), "meetingStatsOver");
31072
31077
 
31073
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
31078
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
31074
31079
  var CURSOR_KEY = "meetings";
31075
31080
  var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
31076
31081
  id: Number(row2.id),
@@ -31639,7 +31644,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
31639
31644
  };
31640
31645
  }, "meetingStoreOver");
31641
31646
 
31642
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
31647
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
31643
31648
  var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
31644
31649
  const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
31645
31650
  return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
@@ -31665,7 +31670,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
31665
31670
  orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
31666
31671
  }, "release");
31667
31672
 
31668
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
31673
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
31669
31674
  var THREAD_COLUMNS = {
31670
31675
  subject: {
31671
31676
  where: /* @__PURE__ */ __name(({ value }) => ({
@@ -31682,7 +31687,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
31682
31687
  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);
31683
31688
  }, "threadRows");
31684
31689
 
31685
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
31690
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
31686
31691
  var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
31687
31692
  id: `email:${place.emailId}`,
31688
31693
  chatId: place.threadExternalId,
@@ -32238,7 +32243,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
32238
32243
  }
32239
32244
  }), "mailStoreOver");
32240
32245
 
32241
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/search/dictionary.js
32246
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/search/dictionary.js
32242
32247
  import { readFileSync as readFileSync2 } from "node:fs";
32243
32248
  var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
32244
32249
  var folded4 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
@@ -32328,7 +32333,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
32328
32333
  }, "knownWord");
32329
32334
  var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
32330
32335
 
32331
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
32336
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
32332
32337
  var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
32333
32338
  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");
32334
32339
  var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
@@ -32414,7 +32419,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
32414
32419
  return found2;
32415
32420
  }, "spokenTranscripts");
32416
32421
 
32417
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
32422
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
32418
32423
  var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
32419
32424
  const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
32420
32425
  if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
@@ -32461,7 +32466,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
32461
32466
  });
32462
32467
  }, "placeHits");
32463
32468
 
32464
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
32469
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
32465
32470
  var GROUPS = {
32466
32471
  chat: {
32467
32472
  key: "m.chat_id",
@@ -32483,7 +32488,7 @@ var GROUPS = {
32483
32488
  }
32484
32489
  };
32485
32490
 
32486
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
32491
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
32487
32492
  var MESSAGES2 = {
32488
32493
  rows: "messages",
32489
32494
  threads: "chats",
@@ -32781,7 +32786,7 @@ var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachment
32781
32786
  const exact = leaves.filter(({ test }) => test === void 0);
32782
32787
  const projection = exact.map(({ fragment }, index2) => `coalesce(${fragment.sql},0) AS q${index2}`).join(",");
32783
32788
  const projectionParams = exact.flatMap(({ fragment }) => fragment.params);
32784
- const evaluate = /* @__PURE__ */ __name((node, row2, text6, attachments2) => {
32789
+ const evaluate2 = /* @__PURE__ */ __name((node, row2, text6, attachments2) => {
32785
32790
  if (node.kind === "predicate") {
32786
32791
  const leaf2 = fragments.get(node);
32787
32792
  return leaf2.test ? leaf2.test(text6, attachments2) : Number(row2[`q${exact.indexOf(leaf2)}`]) === 1;
@@ -32789,7 +32794,7 @@ var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachment
32789
32794
  const must = node.clauses.filter(({ occur }) => occur === "must");
32790
32795
  const should = node.clauses.filter(({ occur }) => occur === "should");
32791
32796
  const not = node.clauses.filter(({ occur }) => occur === "must_not");
32792
- return (must.length ? must.every(({ node: node2 }) => evaluate(node2, row2, text6, attachments2)) : should.length > 0 && should.some(({ node: node2 }) => evaluate(node2, row2, text6, attachments2))) && not.every(({ node: node2 }) => !evaluate(node2, row2, text6, attachments2));
32797
+ return (must.length ? must.every(({ node: node2 }) => evaluate2(node2, row2, text6, attachments2)) : should.length > 0 && should.some(({ node: node2 }) => evaluate2(node2, row2, text6, attachments2))) && not.every(({ node: node2 }) => !evaluate2(node2, row2, text6, attachments2));
32793
32798
  }, "evaluate");
32794
32799
  const grouped = /* @__PURE__ */ __name((by, sql2, params, source2, prefix = "") => {
32795
32800
  const group = GROUPS[by];
@@ -32829,7 +32834,7 @@ var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachment
32829
32834
  projection,
32830
32835
  projectionParams,
32831
32836
  joinedFrom,
32832
- evaluate
32837
+ evaluate: evaluate2
32833
32838
  };
32834
32839
  }, "compileQuery");
32835
32840
  var withQuerySelection = /* @__PURE__ */ __name((context, execution, consume) => {
@@ -32880,7 +32885,7 @@ var runQuery = /* @__PURE__ */ __name((context, execution, by) => {
32880
32885
  }
32881
32886
  }, "runQuery");
32882
32887
  var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
32883
- const { corpus, rowsFrom, hits, database, check: check3, grouped, where, from: from2, withRanking, ranked, leaves, stemmed, exactTier, driver, baseFrom, filtered: filtered2, ranking, relevance, rankedFrom, exactColumn, order, placeTier, projection, projectionParams, joinedFrom, evaluate } = compileQuery(context, execution);
32888
+ const { corpus, rowsFrom, hits, database, check: check3, grouped, where, from: from2, withRanking, ranked, leaves, stemmed, exactTier, driver, baseFrom, filtered: filtered2, ranking, relevance, rankedFrom, exactColumn, order, placeTier, projection, projectionParams, joinedFrom, evaluate: evaluate2 } = compileQuery(context, execution);
32884
32889
  if (by === "pks" && leaves.every(({ test }) => !test)) {
32885
32890
  const rows = database.prepare(`${withRanking}SELECT m.id AS id ${from2} WHERE ${where.sql}`).all(...ranked.params, ...where.params);
32886
32891
  await new Promise((resolve) => setImmediate(resolve));
@@ -32944,7 +32949,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
32944
32949
  check3();
32945
32950
  const row2 = byPk.get(id2);
32946
32951
  const attachments2 = JSON.parse(String(row2.attachment_kinds));
32947
- if (evaluate(execution.root, row2, String(row2.body), Array.isArray(attachments2) ? attachments2.map(String) : []))
32952
+ if (evaluate2(execution.root, row2, String(row2.body), Array.isArray(attachments2) ? attachments2.map(String) : []))
32948
32953
  found2.push(id2);
32949
32954
  if (!by && found2.length > execution.limit)
32950
32955
  break;
@@ -32966,7 +32971,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
32966
32971
  };
32967
32972
  }, "runCompiled");
32968
32973
 
32969
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
32974
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
32970
32975
  function invalidMetadata() {
32971
32976
  throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
32972
32977
  }
@@ -33068,7 +33073,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
33068
33073
  };
33069
33074
  }), "counterTargets");
33070
33075
 
33071
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
33076
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
33072
33077
  var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
33073
33078
  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,
33074
33079
  att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
@@ -33187,7 +33192,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
33187
33192
  }));
33188
33193
  }, "attachmentViews");
33189
33194
 
33190
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
33195
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
33191
33196
  var transcript = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
33192
33197
  var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
33193
33198
  const { orm, database, now: now2 } = context;
@@ -33225,7 +33230,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
33225
33230
  keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
33226
33231
  }, "intoVoiceAttachment");
33227
33232
 
33228
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
33233
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
33229
33234
  var FIELDS = [
33230
33235
  "threadExternalId",
33231
33236
  "senderIdentityId",
@@ -33542,7 +33547,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
33542
33547
  reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
33543
33548
  }, "writeDerivedReactions");
33544
33549
 
33545
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/keys.js
33550
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/keys.js
33546
33551
  var keysOver = /* @__PURE__ */ __name((context) => {
33547
33552
  const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
33548
33553
  const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
@@ -33563,7 +33568,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
33563
33568
  };
33564
33569
  }, "keysOver");
33565
33570
 
33566
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
33571
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
33567
33572
  var accountGroupsOf = /* @__PURE__ */ __name((database) => {
33568
33573
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
33569
33574
  if (!row2)
@@ -33598,7 +33603,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
33598
33603
  database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
33599
33604
  }, "saveProfile");
33600
33605
 
33601
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
33606
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
33602
33607
  var BOT_KINDS = ["agent", "rule", "script", "integration"];
33603
33608
  var ownerPerson = /* @__PURE__ */ __name((database) => {
33604
33609
  const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
@@ -33655,7 +33660,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
33655
33660
  return { sql: bot("pb.name = ?"), params: [by.bot] };
33656
33661
  }, "proposedBySql");
33657
33662
 
33658
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
33663
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
33659
33664
  var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
33660
33665
  const owner = ownerPerson(context.database).id;
33661
33666
  const strays = context.database.prepare("SELECT DISTINCT l.person_id AS person FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN accounts a ON a.provider = i.provider AND a.external_id = i.external_id WHERE l.person_id <> ?").all(owner);
@@ -33676,7 +33681,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
33676
33681
  return personOf(context, ref3);
33677
33682
  }, "linkToOwner");
33678
33683
 
33679
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
33684
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
33680
33685
  var PROVIDERS_SETTING = "providers";
33681
33686
  var storedProvidersOf = /* @__PURE__ */ __name((database) => {
33682
33687
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
@@ -33711,7 +33716,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
33711
33716
  });
33712
33717
  }, "registerProvider");
33713
33718
 
33714
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
33719
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
33715
33720
  var DAY3 = 864e5;
33716
33721
  var RECENTLY_CLOSED_MS = 14 * DAY3;
33717
33722
  var TEXT_LIMIT = 20;
@@ -33807,14 +33812,14 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
33807
33812
  throw new CliError("not_found", `no task ${subject2.task}`);
33808
33813
  return sideOf(row2);
33809
33814
  }
33810
- const project = database.prepare("SELECT id FROM projects WHERE key = ?").get(inboxKey(subject2.account));
33811
- if (!project)
33815
+ const project2 = database.prepare("SELECT id FROM projects WHERE key = ?").get(inboxKey(subject2.account));
33816
+ if (!project2)
33812
33817
  return void 0;
33813
33818
  const { draft } = subject2;
33814
33819
  const source2 = draft.source === void 0 ? void 0 : sourceOf4(draft.source);
33815
33820
  const person2 = draft.person ?? source2?.person;
33816
33821
  return {
33817
- project: Number(project.id),
33822
+ project: Number(project2.id),
33818
33823
  title: draft.title,
33819
33824
  description: draft.description ?? "",
33820
33825
  ...draft.category === void 0 ? {} : { category: draft.category },
@@ -33910,7 +33915,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
33910
33915
  };
33911
33916
  }, "taskSimilarityOver");
33912
33917
 
33913
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
33918
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
33914
33919
  var SETTING3 = "taskCategories";
33915
33920
  var savedTaskCategories = /* @__PURE__ */ __name((database) => {
33916
33921
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
@@ -33929,7 +33934,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
33929
33934
  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);
33930
33935
  }, "saveTaskCategories");
33931
33936
 
33932
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
33937
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
33933
33938
  var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
33934
33939
  var ALLOWED = "taskAgentClose";
33935
33940
  var MIN = "taskAgentCloseMin";
@@ -33985,10 +33990,10 @@ var SUGGESTION_COLUMNS = [
33985
33990
  ];
33986
33991
  var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
33987
33992
 
33988
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
33993
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
33989
33994
  var MAIL_FINDINGS_KIND = "mail_findings";
33990
33995
 
33991
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/decisions.js
33996
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/decisions.js
33992
33997
  var TASK_CLOSE_KIND = "task_close";
33993
33998
  var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
33994
33999
  var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
@@ -34036,7 +34041,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
34036
34041
  }, "assertMayDecide");
34037
34042
  var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
34038
34043
 
34039
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
34044
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
34040
34045
  var PROFILE_PLACEHOLDER = "<profile>";
34041
34046
  var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
34042
34047
  var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
@@ -34089,7 +34094,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
34089
34094
  return `${WORDS2[summary.kind]} ${named3}${notes2 === "" ? "" : ` (${notes2})`}`;
34090
34095
  }, "refLabel");
34091
34096
 
34092
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
34097
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
34093
34098
  var EXCERPT_CHARS = 280;
34094
34099
  var TITLE_CHARS = 120;
34095
34100
  var MEMORY_TITLE_CHARS = 80;
@@ -34450,7 +34455,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
34450
34455
  var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
34451
34456
  var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
34452
34457
 
34453
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
34458
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
34454
34459
  var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
34455
34460
  ref: ref3,
34456
34461
  kind: read2.kind,
@@ -34486,7 +34491,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
34486
34491
  });
34487
34492
  }, "evidenceSourcesOf");
34488
34493
 
34489
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/attachments/limits.js
34494
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/attachments/limits.js
34490
34495
  var MAX_FILE_BYTES = 50 * 1024 * 1024;
34491
34496
  var MAX_TEXT_CHARS = 2e6;
34492
34497
  var ATTACHMENT_LIMIT_ENV = [
@@ -34512,7 +34517,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
34512
34517
  return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
34513
34518
  }, "pdfPreviewLimits");
34514
34519
 
34515
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/ulid.js
34520
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/ulid.js
34516
34521
  import { randomBytes } from "node:crypto";
34517
34522
  var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
34518
34523
  var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
@@ -34525,7 +34530,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
34525
34530
  return time3 + random;
34526
34531
  }, "ulid");
34527
34532
 
34528
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
34533
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
34529
34534
  var FOLDED_FIELDS = ["title", "site", "language", "author"];
34530
34535
  var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
34531
34536
  if (!meta && !sections?.length)
@@ -34546,7 +34551,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
34546
34551
  return typeof language === "string" && language !== "" ? language : null;
34547
34552
  }, "languageOf");
34548
34553
 
34549
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
34554
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
34550
34555
  var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
34551
34556
  var objectOf2 = /* @__PURE__ */ __name((value) => {
34552
34557
  if (isObject(value))
@@ -34789,7 +34794,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
34789
34794
  };
34790
34795
  }, "filesStoreOver");
34791
34796
 
34792
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
34797
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
34793
34798
  var IMPORTED_DOCUMENT_QUERY = defineQuery({
34794
34799
  entity: "document",
34795
34800
  backend: "sql",
@@ -34835,7 +34840,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
34835
34840
  return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
34836
34841
  }, "importedDocumentWhere");
34837
34842
 
34838
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
34843
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
34839
34844
  var NOTE_FORMATS = ["obsidian", "markdown"];
34840
34845
  var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
34841
34846
  var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
@@ -35361,7 +35366,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
35361
35366
  };
35362
35367
  }, "notesStoreOver");
35363
35368
 
35364
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
35369
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
35365
35370
  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";
35366
35371
  var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
35367
35372
  var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -35416,10 +35421,10 @@ var projectOf = /* @__PURE__ */ __name((database, row2) => {
35416
35421
  return { project: `project:${row2.project_id}`, projectName: named3?.name == null ? null : String(named3.name) };
35417
35422
  }, "projectOf");
35418
35423
  var projectId = /* @__PURE__ */ __name((database, reference2) => {
35419
- const project = requiredThing(database, reference2, "the project");
35420
- if (project.type !== "project")
35424
+ const project2 = requiredThing(database, reference2, "the project");
35425
+ if (project2.type !== "project")
35421
35426
  throw new CliError("validation_error", `${reference2} is not a project`);
35422
- return project.id;
35427
+ return project2.id;
35423
35428
  }, "projectId");
35424
35429
  var highestKey = /* @__PURE__ */ __name((table) => `ids.${table}.highest`, "highestKey");
35425
35430
  var nextId = /* @__PURE__ */ __name((database, table) => {
@@ -35515,10 +35520,10 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
35515
35520
  const id2 = write(database, () => {
35516
35521
  const { actor, model } = authorActor(context, input.author);
35517
35522
  const subject2 = input.subject === void 0 ? void 0 : requiredThing(database, input.subject, "the subject");
35518
- const project = input.project === void 0 ? null : projectId(database, input.project);
35523
+ const project2 = input.project === void 0 ? null : projectId(database, input.project);
35519
35524
  const replaced = input.supersedes === void 0 ? void 0 : Number(rowOf2(input.supersedes).id);
35520
35525
  const at = now2();
35521
- const made = Number(database.prepare("INSERT INTO memories (id, kind, body, subject_type, subject_id, author_type, author_id, model, confidence, status, last_verified_at, supersedes_id, scope, project_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(nextId(database, "memories"), kind4, body2, subject2?.type ?? null, subject2?.id ?? null, actor.type, actor.id, model, input.confidence ?? null, status, status === "confirmed" ? at : null, replaced ?? null, scope3, project, at, at)?.id);
35526
+ const made = Number(database.prepare("INSERT INTO memories (id, kind, body, subject_type, subject_id, author_type, author_id, model, confidence, status, last_verified_at, supersedes_id, scope, project_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(nextId(database, "memories"), kind4, body2, subject2?.type ?? null, subject2?.id ?? null, actor.type, actor.id, model, input.confidence ?? null, status, status === "confirmed" ? at : null, replaced ?? null, scope3, project2, at, at)?.id);
35522
35527
  linkEvidence(context, { type: "memory", id: made }, input.evidence, input.author === "owner" ? "owner" : "agent");
35523
35528
  if (replaced !== void 0)
35524
35529
  database.prepare("UPDATE memories SET status = 'superseded', updated_at = ? WHERE id = ?").run(at, replaced);
@@ -35537,14 +35542,14 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
35537
35542
  get: /* @__PURE__ */ __name(async (reference2) => memoryOf(rowOf2(reference2)), "get"),
35538
35543
  list: /* @__PURE__ */ __name(async (options = {}) => {
35539
35544
  const subject2 = options.subject === void 0 ? void 0 : requiredThing(database, options.subject);
35540
- const project = options.project === void 0 ? null : projectId(database, options.project);
35545
+ const project2 = options.project === void 0 ? null : projectId(database, options.project);
35541
35546
  const by = proposedBySql("m.author_type", "m.author_id", options.proposedBy);
35542
- return database.prepare(`${NAMED} WHERE m.deleted_at IS NULL AND (? IS NULL OR (m.subject_type = ? AND m.subject_id = ?)) AND (? IS NULL OR m.project_id = ?) AND (? IS NULL OR m.kind = ?) AND (? IS NULL OR m.status = ?) AND (? IS NULL OR m.scope = ?) AND ${by.sql} ORDER BY m.created_at DESC, m.id DESC LIMIT ?`).all(subject2?.type ?? null, subject2?.type ?? null, subject2?.id ?? null, project, project, options.kind ?? null, options.kind ?? null, options.status ?? null, options.status ?? null, options.scope ?? null, options.scope ?? null, ...by.params, Math.min(Math.max(options.limit ?? 100, 1), 500)).map(memoryOf);
35547
+ return database.prepare(`${NAMED} WHERE m.deleted_at IS NULL AND (? IS NULL OR (m.subject_type = ? AND m.subject_id = ?)) AND (? IS NULL OR m.project_id = ?) AND (? IS NULL OR m.kind = ?) AND (? IS NULL OR m.status = ?) AND (? IS NULL OR m.scope = ?) AND ${by.sql} ORDER BY m.created_at DESC, m.id DESC LIMIT ?`).all(subject2?.type ?? null, subject2?.type ?? null, subject2?.id ?? null, project2, project2, options.kind ?? null, options.kind ?? null, options.status ?? null, options.status ?? null, options.scope ?? null, options.scope ?? null, ...by.params, Math.min(Math.max(options.limit ?? 100, 1), 500)).map(memoryOf);
35543
35548
  }, "list"),
35544
35549
  update: /* @__PURE__ */ __name(async (reference2, change) => write(database, () => {
35545
35550
  const id2 = Number(rowOf2(reference2).id);
35546
- const project = change.project === null ? null : projectId(database, change.project);
35547
- database.prepare("UPDATE memories SET project_id = ?, updated_at = ? WHERE id = ?").run(project, now2(), id2);
35551
+ const project2 = change.project === null ? null : projectId(database, change.project);
35552
+ database.prepare("UPDATE memories SET project_id = ?, updated_at = ? WHERE id = ?").run(project2, now2(), id2);
35548
35553
  return memoryOf(rowOf2(`memory:${id2}`));
35549
35554
  }), "update"),
35550
35555
  confirm: /* @__PURE__ */ __name(async (reference2, by) => confirmNow(reference2, by), "confirm"),
@@ -35583,7 +35588,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
35583
35588
  };
35584
35589
  }, "memoriesStoreOver");
35585
35590
 
35586
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
35591
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
35587
35592
  var DEFAULT_FIRST_PASS_PER_CHAT = 0;
35588
35593
  var KEY = "taskFirstPassPerChat";
35589
35594
  var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
@@ -35603,7 +35608,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
35603
35608
  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);
35604
35609
  }, "saveFirstPassPerChat");
35605
35610
 
35606
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/external-links.js
35611
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/external-links.js
35607
35612
  var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
35608
35613
  var EXTERNAL_ID_CHARS = 200;
35609
35614
  var SOURCE_URL_CHARS = 2e3;
@@ -35630,7 +35635,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
35630
35635
  return text6;
35631
35636
  }, "sourceUrlOf");
35632
35637
 
35633
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
35638
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
35634
35639
  var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
35635
35640
  var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
35636
35641
  name,
@@ -35853,7 +35858,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
35853
35858
  return root === void 0 ? void 0 : { ...query, root };
35854
35859
  }, "withoutField");
35855
35860
 
35856
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
35861
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
35857
35862
  var authorNamed = /* @__PURE__ */ __name((database, row2) => {
35858
35863
  if (row2.author_type == null)
35859
35864
  return null;
@@ -35881,7 +35886,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
35881
35886
  return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
35882
35887
  }, "addComment");
35883
35888
 
35884
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
35889
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
35885
35890
  var TASK_RELATION_KINDS = [
35886
35891
  "blocked-by",
35887
35892
  "follow-up-of",
@@ -35995,11 +36000,11 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
35995
36000
  }));
35996
36001
  return { ready: !isClosedState(String(liveTask(database, rowId).status)) && blockers.length === 0, blockers };
35997
36002
  }), "taskReadiness"),
35998
- readyTasks: /* @__PURE__ */ __name(async (project, options = {}) => read(database, () => {
36003
+ readyTasks: /* @__PURE__ */ __name(async (project2, options = {}) => read(database, () => {
35999
36004
  const limit = options.limit ?? 50;
36000
36005
  if (!Number.isSafeInteger(limit) || limit < 1 || limit > 500)
36001
36006
  throw new CliError("validation_error", "ready tasks take 1\u2013500 rows");
36002
- const row2 = project.startsWith("project:") ? database.prepare("SELECT id FROM projects WHERE id=? AND account_id IS NULL AND deleted_at IS NULL").get(project.slice(8)) : database.prepare("SELECT id FROM projects WHERE key=? AND account_id IS NULL AND deleted_at IS NULL").get(project.trim().toUpperCase());
36007
+ const row2 = project2.startsWith("project:") ? database.prepare("SELECT id FROM projects WHERE id=? AND account_id IS NULL AND deleted_at IS NULL").get(project2.slice(8)) : database.prepare("SELECT id FROM projects WHERE key=? AND account_id IS NULL AND deleted_at IS NULL").get(project2.trim().toUpperCase());
36003
36008
  if (!row2)
36004
36009
  throw new CliError("not_found", "the owner project is unavailable");
36005
36010
  const rows = database.prepare("SELECT coalesce(t.package_id,t.key) AS id,t.key,substr(t.title,1,300) AS title FROM tasks t WHERE t.project_id=? AND t.status NOT IN ('done','dismissed') AND t.deleted_at IS NULL AND NOT EXISTS (SELECT 1 FROM links l LEFT JOIN tasks b ON b.id=l.to_id LEFT JOIN projects p ON p.id=b.project_id WHERE l.from_type='task' AND l.to_type='task' AND l.kind='blocked-by' AND l.from_id=t.id AND l.confirmed=1 AND l.anchor IS NULL AND (b.id IS NULL OR b.deleted_at IS NOT NULL OR p.deleted_at IS NOT NULL OR b.status!='done')) ORDER BY t.priority_score IS NULL,t.priority_score DESC,t.number,t.id LIMIT ?").all(Number(row2.id), limit + 1);
@@ -36011,7 +36016,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
36011
36016
  };
36012
36017
  }, "taskRelationsStoreOver");
36013
36018
 
36014
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
36019
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
36015
36020
  var TASK_ROLES = ["assignee", "reviewer", "watcher"];
36016
36021
  var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
36017
36022
  var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
@@ -36060,10 +36065,10 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
36060
36065
  throw new CliError("validation_error", `${reference2} is not a person`);
36061
36066
  return thing.id;
36062
36067
  }, "personOf");
36063
- const parentOf = /* @__PURE__ */ __name((task, project, reference2) => {
36068
+ const parentOf = /* @__PURE__ */ __name((task, project2, reference2) => {
36064
36069
  const parent2 = required3(reference2);
36065
36070
  const row2 = database.prepare("SELECT project_id FROM tasks WHERE id = ?").get(parent2);
36066
- if (Number(row2.project_id) !== project)
36071
+ if (Number(row2.project_id) !== project2)
36067
36072
  throw new CliError("validation_error", "a subtask's parent is in the same project");
36068
36073
  for (let at = parent2; at !== null; ) {
36069
36074
  if (at === task)
@@ -36074,8 +36079,8 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
36074
36079
  return parent2;
36075
36080
  }, "parentOf");
36076
36081
  const projectNamed = /* @__PURE__ */ __name((id2) => {
36077
- const project = database.prepare("SELECT key, name FROM projects WHERE id = ?").get(id2);
36078
- return { projectKey: String(project.key), projectName: String(project.name) };
36082
+ const project2 = database.prepare("SELECT key, name FROM projects WHERE id = ?").get(id2);
36083
+ return { projectKey: String(project2.key), projectName: String(project2.name) };
36079
36084
  }, "projectNamed");
36080
36085
  const detailsOf = /* @__PURE__ */ __name((row2) => {
36081
36086
  const id2 = Number(row2.id);
@@ -36322,14 +36327,14 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
36322
36327
  if (!WORK_TASK_TYPES.includes(input.type))
36323
36328
  throw new CliError("validation_error", `a task made here is one of ${WORK_TASK_TYPES.join(", ")}`);
36324
36329
  const made = write(database, () => {
36325
- const project = projectOf2(input.project);
36330
+ const project2 = projectOf2(input.project);
36326
36331
  const { actor } = authorActor(context, by);
36327
36332
  const at = now2();
36328
- const counted = database.prepare("UPDATE projects SET tasks_count = tasks_count + 1, updated_at = ? WHERE id = ? RETURNING key, tasks_count").get(at, project);
36333
+ const counted = database.prepare("UPDATE projects SET tasks_count = tasks_count + 1, updated_at = ? WHERE id = ? RETURNING key, tasks_count").get(at, project2);
36329
36334
  const number3 = Number(counted.tasks_count);
36330
36335
  if (!Number.isSafeInteger(number3) || number3 < 1)
36331
36336
  throw new CliError("configuration_error", "the project task counter exceeds the safe numbering range");
36332
- const id2 = Number(database.prepare("INSERT INTO tasks (project_id, number, key, title, title_folded, type, status, author_type, author_id, source, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, 'open', ?, ?, ?, ?, ?) RETURNING id").get(project, number3, `${String(counted.key)}-${number3}`, textOf2(input.title, "a task's title", 300), folded3(textOf2(input.title, "a task's title", 300)), input.type, actor.type, actor.id, by === "owner" ? "owner" : "agent", at, at)?.id);
36337
+ const id2 = Number(database.prepare("INSERT INTO tasks (project_id, number, key, title, title_folded, type, status, author_type, author_id, source, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, 'open', ?, ?, ?, ?, ?) RETURNING id").get(project2, number3, `${String(counted.key)}-${number3}`, textOf2(input.title, "a task's title", 300), folded3(textOf2(input.title, "a task's title", 300)), input.type, actor.type, actor.id, by === "owner" ? "owner" : "agent", at, at)?.id);
36333
36338
  recordTaskEvent(database, id2, actor, "created", null, at);
36334
36339
  const { title: _title, project: _project, type: _type, ...fields4 } = input;
36335
36340
  edit(id2, fields4, actor, true);
@@ -36413,13 +36418,13 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
36413
36418
  const row2 = taskRowOf(database, id2.startsWith("task:") ? id2.slice("task:".length) : id2);
36414
36419
  if (row2 === void 0)
36415
36420
  return false;
36416
- const project = database.prepare("SELECT p.key, p.name FROM tasks t JOIN projects p ON p.id = t.project_id WHERE t.id = ? AND t.deleted_at IS NULL AND p.deleted_at IS NULL").get(row2);
36417
- return project !== void 0 && String(project.key) !== inboxKey(String(project.name));
36421
+ const project2 = database.prepare("SELECT p.key, p.name FROM tasks t JOIN projects p ON p.id = t.project_id WHERE t.id = ? AND t.deleted_at IS NULL AND p.deleted_at IS NULL").get(row2);
36422
+ return project2 !== void 0 && String(project2.key) !== inboxKey(String(project2.name));
36418
36423
  }, "projectTask"),
36419
- find: /* @__PURE__ */ __name(async ({ project, type, status, assignee, where, limit = 100 }) => {
36424
+ find: /* @__PURE__ */ __name(async ({ project: project2, type, status, assignee, where, limit = 100 }) => {
36420
36425
  if (type !== void 0 && !TASK_TYPES.includes(type))
36421
36426
  throw new CliError("validation_error", `a task's type is one of ${TASK_TYPES.join(", ")}`);
36422
- const projectId2 = project === void 0 ? null : projectOf2(project);
36427
+ const projectId2 = project2 === void 0 ? null : projectOf2(project2);
36423
36428
  const person2 = assignee === void 0 ? null : personOf2(assignee);
36424
36429
  return database.prepare(`SELECT * FROM tasks t WHERE deleted_at IS NULL AND (? IS NULL OR project_id = ?) AND (? IS NULL OR type = ?) AND (? IS NULL OR status = ?) AND (? IS NULL OR EXISTS (SELECT 1 FROM task_assignments a WHERE a.task_id = t.id AND a.assignee_type = 'person' AND a.assignee_id = ?)) AND (${where?.sql || "1"}) ORDER BY priority_score IS NULL, priority_score DESC, created_at, id LIMIT ?`).all(projectId2, projectId2, type ?? null, type ?? null, status ?? null, status ?? null, person2, person2, ...where?.params ?? [], Math.min(Math.max(limit, 1), 500)).map(detailsOf);
36425
36430
  }, "find"),
@@ -36473,7 +36478,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
36473
36478
  const where = without(name);
36474
36479
  return database.prepare(`SELECT ${select3}, count(*) AS n FROM tasks t ${from2} WHERE ${where.sql} GROUP BY ${group}`).all(...where.params);
36475
36480
  }, "grouped");
36476
- const project = grouped("project", "p.id, p.key, p.name", "JOIN projects p ON p.id = t.project_id", "p.id").map((row2) => ({
36481
+ const project2 = grouped("project", "p.id, p.key, p.name", "JOIN projects p ON p.id = t.project_id", "p.id").map((row2) => ({
36477
36482
  value: String(row2.key),
36478
36483
  ref: `project:${row2.id}`,
36479
36484
  name: String(row2.name),
@@ -36500,7 +36505,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
36500
36505
  const agent = grouped("agent", "t.agent", "", "t.agent").map((row2) => ({ value: row2.agent == null ? "none" : String(row2.agent), count: Number(row2.n) })).sort((a, b) => b.count - a.count || a.value.localeCompare(b.value));
36501
36506
  return {
36502
36507
  total: countOf(boardWhere(query, zone, at)),
36503
- project,
36508
+ project: project2,
36504
36509
  assignee,
36505
36510
  priority: [...[...PRIORITY_LABELS].reverse(), "none"].map((value) => ({
36506
36511
  value,
@@ -36540,7 +36545,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
36540
36545
  };
36541
36546
  }, "workTasksOver");
36542
36547
 
36543
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
36548
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
36544
36549
  var taskCloseOver = /* @__PURE__ */ __name((context) => {
36545
36550
  const { database, now: now2 } = context;
36546
36551
  const liveRow = /* @__PURE__ */ __name((id2) => {
@@ -36589,7 +36594,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
36589
36594
  };
36590
36595
  }, "taskCloseOver");
36591
36596
 
36592
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
36597
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
36593
36598
  var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
36594
36599
  const { database, now: now2 } = context;
36595
36600
  const required3 = /* @__PURE__ */ __name((id2) => {
@@ -36714,10 +36719,10 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
36714
36719
  }, "reviewDuplicates"),
36715
36720
  followUp: /* @__PURE__ */ __name(async (task, candidates, by) => followUp(required3(task), candidates, by), "followUp"),
36716
36721
  pairs: /* @__PURE__ */ __name(async (account, { decision, limit, offset }) => read(database, () => {
36717
- const project = database.prepare("SELECT id FROM projects WHERE key = ?").get(inboxKey(account));
36718
- if (!project)
36722
+ const project2 = database.prepare("SELECT id FROM projects WHERE key = ?").get(inboxKey(account));
36723
+ if (!project2)
36719
36724
  return [];
36720
- return database.prepare("SELECT p.* FROM task_pairs p JOIN tasks a ON a.id = p.task_id JOIN tasks b ON b.id = p.other_id WHERE p.decision = ? AND a.project_id = ? AND b.project_id = ? AND a.deleted_at IS NULL AND b.deleted_at IS NULL ORDER BY p.created_at DESC, p.id DESC LIMIT ? OFFSET ?").all(decision, Number(project.id), Number(project.id), limit, offset).map(pairOf);
36725
+ return database.prepare("SELECT p.* FROM task_pairs p JOIN tasks a ON a.id = p.task_id JOIN tasks b ON b.id = p.other_id WHERE p.decision = ? AND a.project_id = ? AND b.project_id = ? AND a.deleted_at IS NULL AND b.deleted_at IS NULL ORDER BY p.created_at DESC, p.id DESC LIMIT ? OFFSET ?").all(decision, Number(project2.id), Number(project2.id), limit, offset).map(pairOf);
36721
36726
  }), "pairs"),
36722
36727
  recordPair: /* @__PURE__ */ __name(async ({ task, source: source2, other, decision, similarity: scored, by }) => {
36723
36728
  const otherRow = required3(other);
@@ -36807,7 +36812,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
36807
36812
  };
36808
36813
  }, "taskPairsOver");
36809
36814
 
36810
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
36815
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
36811
36816
  var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
36812
36817
  var TASK_STATS_SQL = {
36813
36818
  rows: /* @__PURE__ */ __name((board, filter) => `SELECT t.source_group, t.source_kind, t.project_id, t.status, t.created_at, t.closed_at FROM tasks t WHERE ${board ? BOARD_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
@@ -36819,10 +36824,10 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
36819
36824
  statRows: /* @__PURE__ */ __name(async (scope3, where) => {
36820
36825
  const filter = where === void 0 ? "" : ` AND (${where.sql})`;
36821
36826
  const board = !("account" in scope3);
36822
- const project = board ? void 0 : inbox(scope3.account);
36823
- if (!board && project === void 0)
36827
+ const project2 = board ? void 0 : inbox(scope3.account);
36828
+ if (!board && project2 === void 0)
36824
36829
  return [];
36825
- return database.prepare(TASK_STATS_SQL.rows(board, filter)).all(...project === void 0 ? [] : [project], ...where?.params ?? []).map((row2) => ({
36830
+ return database.prepare(TASK_STATS_SQL.rows(board, filter)).all(...project2 === void 0 ? [] : [project2], ...where?.params ?? []).map((row2) => ({
36826
36831
  group: row2.source_group == null ? null : String(row2.source_group),
36827
36832
  sourceKind: row2.source_kind == null ? null : String(row2.source_kind),
36828
36833
  projectId: Number(row2.project_id),
@@ -36846,7 +36851,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
36846
36851
  }, "statNames")
36847
36852
  }), "taskStatsOver");
36848
36853
 
36849
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
36854
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
36850
36855
  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";
36851
36856
  var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
36852
36857
  const key2 = inboxKey(account);
@@ -36924,10 +36929,10 @@ var taskStoreOver = /* @__PURE__ */ __name((context) => {
36924
36929
  params: [canonicalTagNamed(database, name)?.id ?? -1]
36925
36930
  })), "tagWhere"),
36926
36931
  query: /* @__PURE__ */ __name(async (account, where, { limit, offset }) => {
36927
- const project = inbox(account, false);
36928
- if (project === void 0)
36932
+ const project2 = inbox(account, false);
36933
+ if (project2 === void 0)
36929
36934
  return [];
36930
- return database.prepare(`SELECT ${COLUMNS3}, t.title, t.updated_at, ${SUGGESTION_COLUMNS.map((column2) => `t.${column2}`).join(", ")} FROM tasks t JOIN projects p ON p.id = t.project_id WHERE t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ? AND ${where?.sql ?? "1"} ORDER BY t.created_at, t.id LIMIT ? OFFSET ?`).all(project, ...where?.params ?? [], limit, offset).map((row2) => ({
36935
+ return database.prepare(`SELECT ${COLUMNS3}, t.title, t.updated_at, ${SUGGESTION_COLUMNS.map((column2) => `t.${column2}`).join(", ")} FROM tasks t JOIN projects p ON p.id = t.project_id WHERE t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ? AND ${where?.sql ?? "1"} ORDER BY t.created_at, t.id LIMIT ? OFFSET ?`).all(project2, ...where?.params ?? [], limit, offset).map((row2) => ({
36931
36936
  task: toTask(row2),
36932
36937
  title: String(row2.title),
36933
36938
  updatedAt: new Date(Number(row2.updated_at)),
@@ -36942,10 +36947,10 @@ var taskStoreOver = /* @__PURE__ */ __name((context) => {
36942
36947
  return found2 && toTask(found2);
36943
36948
  }, "get"),
36944
36949
  findBySource: /* @__PURE__ */ __name(async (account, source2, { linked = false } = {}) => {
36945
- const project = inbox(account, false);
36946
- if (project === void 0)
36950
+ const project2 = inbox(account, false);
36951
+ if (project2 === void 0)
36947
36952
  return [];
36948
- const own = select3("t.project_id = ? AND t.source_locator = ? ORDER BY t.created_at, t.id").all(project, source2).map(toTask);
36953
+ const own = select3("t.project_id = ? AND t.source_locator = ? ORDER BY t.created_at, t.id").all(project2, source2).map(toTask);
36949
36954
  if (!linked || own.length > 0)
36950
36955
  return own;
36951
36956
  let message2;
@@ -36954,17 +36959,17 @@ var taskStoreOver = /* @__PURE__ */ __name((context) => {
36954
36959
  } catch {
36955
36960
  message2 = void 0;
36956
36961
  }
36957
- return select3(`t.project_id = ? AND t.deleted_at IS NULL AND EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'task' AND l.from_id = t.id AND l.kind = ${linkKind("evidence")} AND ((l.to_type = ? AND l.to_id = ?) OR (l.to_id IS NULL AND l.target_text = ?))) ORDER BY t.created_at, t.id`).all(project, message2?.type ?? null, message2?.id ?? null, source2).map(toTask);
36962
+ return select3(`t.project_id = ? AND t.deleted_at IS NULL AND EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'task' AND l.from_id = t.id AND l.kind = ${linkKind("evidence")} AND ((l.to_type = ? AND l.to_id = ?) OR (l.to_id IS NULL AND l.target_text = ?))) ORDER BY t.created_at, t.id`).all(project2, message2?.type ?? null, message2?.id ?? null, source2).map(toTask);
36958
36963
  }, "findBySource"),
36959
36964
  insert: /* @__PURE__ */ __name(async (task) => {
36960
36965
  write(database, () => {
36961
- const project = inbox(task.account, true);
36962
- const counted = database.prepare("UPDATE projects SET tasks_count = tasks_count + 1, updated_at = ? WHERE id = ? RETURNING tasks_count").get(now2(), project);
36966
+ const project2 = inbox(task.account, true);
36967
+ const counted = database.prepare("UPDATE projects SET tasks_count = tasks_count + 1, updated_at = ? WHERE id = ? RETURNING tasks_count").get(now2(), project2);
36963
36968
  const number3 = Number(counted?.tasks_count);
36964
36969
  const key2 = typedKey(database, task.kind);
36965
36970
  const author = actorOfOrigin(database, task.origin);
36966
36971
  const closedBy = task.closedBy ? actorOfOrigin(database, task.closedBy) : void 0;
36967
- const made = database.prepare("INSERT INTO tasks (project_id, number, key, title, type, status, due_at, closed_at, closed_by_type, closed_by_id, close_reason, author_type, author_id, source, package_id, source_locator, source_kind, source_group, created_at, updated_at, title_folded, close_reason_folded, category) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(project, number3, key2, `${task.kind} \u2014 ${task.source}`, task.kind, task.state, time(task.dueAt), time(task.closedAt), closedBy?.type ?? null, closedBy?.id ?? null, task.reason ?? null, author.type, author.id, task.origin, task.id, task.source, task.sourceKind, task.group, task.createdAt.getTime(), now2(), folded3(`${task.kind} \u2014 ${task.source}`), folded3(task.reason), task.category ?? null);
36972
+ const made = database.prepare("INSERT INTO tasks (project_id, number, key, title, type, status, due_at, closed_at, closed_by_type, closed_by_id, close_reason, author_type, author_id, source, package_id, source_locator, source_kind, source_group, created_at, updated_at, title_folded, close_reason_folded, category) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(project2, number3, key2, `${task.kind} \u2014 ${task.source}`, task.kind, task.state, time(task.dueAt), time(task.closedAt), closedBy?.type ?? null, closedBy?.id ?? null, task.reason ?? null, author.type, author.id, task.origin, task.id, task.source, task.sourceKind, task.group, task.createdAt.getTime(), now2(), folded3(`${task.kind} \u2014 ${task.source}`), folded3(task.reason), task.category ?? null);
36968
36973
  recordTaskEvent(database, Number(made?.id), author, "created", null, task.createdAt.getTime());
36969
36974
  });
36970
36975
  }, "insert"),
@@ -37022,11 +37027,11 @@ var listTasks = /* @__PURE__ */ __name((filter, select3, toTask, inbox) => {
37022
37027
  const where = ["t.deleted_at IS NULL"];
37023
37028
  const values = [];
37024
37029
  if (filter.account !== void 0) {
37025
- const project = inbox(filter.account, false);
37026
- if (project === void 0)
37030
+ const project2 = inbox(filter.account, false);
37031
+ if (project2 === void 0)
37027
37032
  return [];
37028
37033
  where.push("t.project_id = ?");
37029
- values.push(project);
37034
+ values.push(project2);
37030
37035
  }
37031
37036
  if (filter.state !== void 0) {
37032
37037
  where.push("t.status = ?");
@@ -37053,7 +37058,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
37053
37058
  throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
37054
37059
  }, "oneOf");
37055
37060
 
37056
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/accounts.js
37061
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/accounts.js
37057
37062
  var accountAccountsOver = /* @__PURE__ */ __name((context) => {
37058
37063
  const { database } = context;
37059
37064
  const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
@@ -37098,7 +37103,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
37098
37103
  };
37099
37104
  }, "accountsStoreOver");
37100
37105
 
37101
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
37106
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
37102
37107
  var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
37103
37108
  var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
37104
37109
  const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
@@ -37122,7 +37127,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
37122
37127
  })), "keepDownloads");
37123
37128
  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");
37124
37129
 
37125
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/attachments.js
37130
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/attachments.js
37126
37131
  var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
37127
37132
  const { database } = context;
37128
37133
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -37179,7 +37184,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
37179
37184
  }, "keepAttachmentText")
37180
37185
  }), "attachmentsStoreOver");
37181
37186
 
37182
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
37187
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
37183
37188
  var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
37184
37189
  var pointerMover = /* @__PURE__ */ __name((context, type) => {
37185
37190
  const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
@@ -37359,7 +37364,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
37359
37364
  return done;
37360
37365
  }, "rekeyChats");
37361
37366
 
37362
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
37367
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
37363
37368
  var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
37364
37369
  var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
37365
37370
  var CHAT_LIST_KEY = "chat_list_complete";
@@ -37417,7 +37422,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
37417
37422
  return { ...coverage, oldestMessageAt: toIso(oldest) };
37418
37423
  }, "chatCoverage");
37419
37424
 
37420
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/chats.js
37425
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/chats.js
37421
37426
  var chatsStoreOver = /* @__PURE__ */ __name((context) => {
37422
37427
  const { database } = context;
37423
37428
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
@@ -37552,7 +37557,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
37552
37557
  };
37553
37558
  }, "chatsStoreOver");
37554
37559
 
37555
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
37560
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
37556
37561
  import { createHash as createHash7 } from "node:crypto";
37557
37562
  var BATCH_CONTEXT = 50;
37558
37563
  var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
@@ -37690,7 +37695,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
37690
37695
  var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
37691
37696
  ${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
37692
37697
 
37693
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
37698
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
37694
37699
  import { setTimeout } from "node:timers/promises";
37695
37700
  var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
37696
37701
  var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
@@ -37765,7 +37770,7 @@ var replaceConversations = /* @__PURE__ */ __name(async (context, chatKey, { sta
37765
37770
  orm.insert(conversationState).values({ chatId: chatKey, enabledAt: startedAt }).onConflictDoNothing().run();
37766
37771
  }));
37767
37772
  const chunkScope = orm.select({ accountId: chats.accountId, scope: sql`coalesce(${chats.scope}, ${accounts.scope})` }).from(chats).innerJoin(accounts, eq(accounts.id, chats.accountId)).where(eq(chats.id, chatKey)).get();
37768
- const project = context.database.prepare(`SELECT to_id FROM links WHERE from_type='chat' AND from_id=? AND to_type='project' AND kind=${linkKind("member-of")} AND confirmed=1 ORDER BY id LIMIT 1`).get(chatKey);
37773
+ const project2 = context.database.prepare(`SELECT to_id FROM links WHERE from_type='chat' AND from_id=? AND to_type='project' AND kind=${linkKind("member-of")} AND confirmed=1 ORDER BY id LIMIT 1`).get(chatKey);
37769
37774
  const insertLink2 = orm.insert(messageLinks).values({
37770
37775
  chatId: chatKey,
37771
37776
  messageId: sql.placeholder("messageId"),
@@ -37786,7 +37791,7 @@ var replaceConversations = /* @__PURE__ */ __name(async (context, chatKey, { sta
37786
37791
  startOffset: sql.placeholder("startOffset"),
37787
37792
  endOffset: sql.placeholder("endOffset"),
37788
37793
  contentHash: sql.placeholder("contentHash"),
37789
- projectId: project ? Number(project.to_id) : null,
37794
+ projectId: project2 ? Number(project2.to_id) : null,
37790
37795
  accountId: chunkScope?.accountId ?? null,
37791
37796
  scope: chunkScope?.scope ?? null,
37792
37797
  occurredAt: sql.placeholder("occurredAt"),
@@ -38002,7 +38007,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
38002
38007
  AND NOT EXISTS (SELECT 1 FROM messages d
38003
38008
  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");
38004
38009
 
38005
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/conversations.js
38010
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/conversations.js
38006
38011
  var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
38007
38012
  const { database } = context;
38008
38013
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -38109,7 +38114,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
38109
38114
  };
38110
38115
  }, "conversationsStoreOver");
38111
38116
 
38112
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/counters.js
38117
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/counters.js
38113
38118
  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";
38114
38119
  var accountCountersOver = /* @__PURE__ */ __name((context) => {
38115
38120
  const { database } = context;
@@ -38134,7 +38139,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38134
38139
  counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
38135
38140
  }), "countersStoreOver");
38136
38141
 
38137
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
38142
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
38138
38143
  var MENTION_STATUSES = ["found", "linked", "dismissed"];
38139
38144
  var MENTION_QUERY = defineQuery({
38140
38145
  entity: "mention",
@@ -38350,7 +38355,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
38350
38355
  return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
38351
38356
  }, "listPlaces");
38352
38357
 
38353
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/mentions.js
38358
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/mentions.js
38354
38359
  var accountMentionsOver = /* @__PURE__ */ __name((context) => {
38355
38360
  const { database } = context;
38356
38361
  const { findAccountPk: findAccountPk2 } = keysOver(context);
@@ -38385,7 +38390,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38385
38390
  places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
38386
38391
  }), "mentionsStoreOver");
38387
38392
 
38388
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
38393
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
38389
38394
  var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
38390
38395
  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");
38391
38396
  const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
@@ -38400,7 +38405,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
38400
38405
  }));
38401
38406
  }, "documentLinkMessages");
38402
38407
 
38403
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
38408
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
38404
38409
  var stemmerFor = stemmerCache();
38405
38410
  var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
38406
38411
  if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
@@ -38444,7 +38449,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
38444
38449
  });
38445
38450
  }, "laterSharingRare");
38446
38451
 
38447
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/messages.js
38452
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/messages.js
38448
38453
  var accountMessagesOver = /* @__PURE__ */ __name((context) => {
38449
38454
  const { database } = context;
38450
38455
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
@@ -38579,7 +38584,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38579
38584
  laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
38580
38585
  }), "messagesStoreOver");
38581
38586
 
38582
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
38587
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
38583
38588
  var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
38584
38589
  var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
38585
38590
  var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
@@ -38636,7 +38641,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
38636
38641
  });
38637
38642
  }, "personPreparation");
38638
38643
 
38639
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
38644
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
38640
38645
  var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
38641
38646
  const id2 = Number(uid);
38642
38647
  if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
@@ -38644,7 +38649,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
38644
38649
  return Boolean(database.prepare("SELECT 1 FROM persons p JOIN identity_links l ON l.person_id=p.id JOIN account_identities a ON a.identity_id=l.identity_id WHERE p.id=? AND a.account_id IN (SELECT value FROM json_each(?)) LIMIT 1").get(id2, JSON.stringify(accountIds)));
38645
38650
  }, "personSeenInAccounts");
38646
38651
 
38647
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
38652
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
38648
38653
  var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
38649
38654
  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);
38650
38655
  if (!row2)
@@ -38710,7 +38715,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
38710
38715
  return { id: id2, personId, removed: true };
38711
38716
  }, "removeNote");
38712
38717
 
38713
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/people.js
38718
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/people.js
38714
38719
  var accountPeopleOver = /* @__PURE__ */ __name((context) => {
38715
38720
  const { database } = context;
38716
38721
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
@@ -38795,13 +38800,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
38795
38800
  };
38796
38801
  }, "peopleStoreOver");
38797
38802
 
38798
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
38803
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
38799
38804
  import { createHash as createHash9 } from "node:crypto";
38800
38805
 
38801
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
38806
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
38802
38807
  import { createHash as createHash8 } from "node:crypto";
38803
38808
 
38804
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
38809
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
38805
38810
  var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
38806
38811
  var AUTHOR_MEASURES = [
38807
38812
  "messages",
@@ -38941,7 +38946,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
38941
38946
  var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
38942
38947
  var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
38943
38948
 
38944
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
38949
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
38945
38950
  var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
38946
38951
  var exhausted2 = /* @__PURE__ */ __name((budget) => {
38947
38952
  throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
@@ -39163,7 +39168,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
39163
39168
  };
39164
39169
  }, "rankReplyGraph");
39165
39170
 
39166
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
39171
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
39167
39172
  var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
39168
39173
  var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
39169
39174
  var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
@@ -39337,7 +39342,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
39337
39342
  return { items, evidence, summary, graph: graph.quality };
39338
39343
  }, "calculateAdminStatistics");
39339
39344
 
39340
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
39345
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
39341
39346
  var rankingContextRange = /* @__PURE__ */ __name((root) => {
39342
39347
  const dates = [];
39343
39348
  const visit = /* @__PURE__ */ __name((node, required3) => {
@@ -39359,7 +39364,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
39359
39364
  return dates[0].node.resolution.date;
39360
39365
  }, "rankingContextRange");
39361
39366
 
39362
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
39367
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
39363
39368
  var reactionCounts = /* @__PURE__ */ __name((stored3) => {
39364
39369
  let counts;
39365
39370
  try {
@@ -39654,7 +39659,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
39654
39659
  });
39655
39660
  }, "rankQuery");
39656
39661
 
39657
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
39662
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
39658
39663
  function fail4(message2, reason = "query.too-large") {
39659
39664
  throw new CliError("validation_error", message2, { reason, complete: false });
39660
39665
  }
@@ -39831,7 +39836,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
39831
39836
  return result;
39832
39837
  }), "adminStatisticsQuery");
39833
39838
 
39834
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
39839
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
39835
39840
  var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
39836
39841
  if (!execution.accounts.length)
39837
39842
  return { conversations: [], chats: [] };
@@ -39849,7 +39854,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
39849
39854
  return { conversations: conversations2, chats: chats2 };
39850
39855
  }, "conversationEligibility");
39851
39856
 
39852
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
39857
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
39853
39858
  import { createHash as createHash10 } from "node:crypto";
39854
39859
  var EVIDENCE_BYTES = 64 * 1024;
39855
39860
  var FINGERPRINT_BYTES = 8 * 1024 * 1024;
@@ -39999,7 +40004,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
39999
40004
  return result;
40000
40005
  }, "rankingEvidence");
40001
40006
 
40002
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
40007
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
40003
40008
  var FAR = Number.MAX_SAFE_INTEGER;
40004
40009
  var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
40005
40010
  const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
@@ -40093,7 +40098,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
40093
40098
  });
40094
40099
  }, "waitingChats");
40095
40100
 
40096
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/queries.js
40101
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/queries.js
40097
40102
  var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
40098
40103
  const mailIndexed = /* @__PURE__ */ __name((execution) => {
40099
40104
  if (execution.corpus === "mail")
@@ -40114,7 +40119,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
40114
40119
  };
40115
40120
  }, "queriesStoreOver");
40116
40121
 
40117
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
40122
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
40118
40123
  var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
40119
40124
  const { database, now: now2 } = context;
40120
40125
  const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
@@ -40153,10 +40158,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
40153
40158
  }));
40154
40159
  }, "chatEventsOf");
40155
40160
 
40156
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40161
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40157
40162
  import { createHash as createHash11 } from "node:crypto";
40158
40163
 
40159
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/calendar.js
40164
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/calendar.js
40160
40165
  var calendarKey = /* @__PURE__ */ __name((zone, by) => {
40161
40166
  const format = new Intl.DateTimeFormat("en-CA", {
40162
40167
  timeZone: zone,
@@ -40176,7 +40181,7 @@ var weekKey = /* @__PURE__ */ __name((day) => {
40176
40181
  return date3.toISOString().slice(0, 10);
40177
40182
  }, "weekKey");
40178
40183
 
40179
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/retention.js
40184
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/retention.js
40180
40185
  var RETENTION_TOLERANCE = 864e5;
40181
40186
  var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
40182
40187
  const { since, until, cutoff, checkpoints, within, limit, by } = options;
@@ -40230,7 +40235,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
40230
40235
  return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
40231
40236
  }, "retentionCohorts");
40232
40237
 
40233
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40238
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40234
40239
  var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
40235
40240
  var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
40236
40241
  validateRetentionOptions(options);
@@ -40361,7 +40366,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
40361
40366
  };
40362
40367
  }, "retentionQuery");
40363
40368
 
40364
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
40369
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
40365
40370
  var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
40366
40371
  var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
40367
40372
  ...isBot === void 0 ? {} : { bot: isBot },
@@ -40492,7 +40497,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
40492
40497
  lastCount: memberCountsOf(context, pk).at(-1) ?? null
40493
40498
  })), "trackedChats");
40494
40499
 
40495
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/roster.js
40500
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/roster.js
40496
40501
  var rosterStoreOver = /* @__PURE__ */ __name((context) => {
40497
40502
  const { database } = context;
40498
40503
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
@@ -40548,7 +40553,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
40548
40553
  };
40549
40554
  }, "rosterStoreOver");
40550
40555
 
40551
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
40556
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
40552
40557
  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");
40553
40558
  var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
40554
40559
  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 ?`);
@@ -40572,7 +40577,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
40572
40577
  }
40573
40578
  }, "backfillNormalized");
40574
40579
 
40575
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
40580
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
40576
40581
  var INDEX2 = "message_words";
40577
40582
  var searchIndexState2 = /* @__PURE__ */ __name((database) => {
40578
40583
  const row2 = indexRow(database, INDEX2);
@@ -40699,7 +40704,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
40699
40704
  });
40700
40705
  }, "resetSearchIndex");
40701
40706
 
40702
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
40707
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
40703
40708
  var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
40704
40709
  const filled2 = { stemmed: 0, drained: 0 };
40705
40710
  const before2 = stemsState(database);
@@ -40794,7 +40799,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
40794
40799
  return resetStems(database, { now: now2 });
40795
40800
  }, "followDefaultStemmers");
40796
40801
 
40797
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
40802
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
40798
40803
  var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
40799
40804
  var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
40800
40805
  const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
@@ -40816,7 +40821,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
40816
40821
  });
40817
40822
  }, "termCandidates");
40818
40823
 
40819
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/search-index.js
40824
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/search-index.js
40820
40825
  var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
40821
40826
  const { database } = context;
40822
40827
  const stemmerFor2 = stemmerCache();
@@ -40838,7 +40843,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
40838
40843
  };
40839
40844
  }, "searchIndexStoreOver");
40840
40845
 
40841
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
40846
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
40842
40847
  var HISTORY_KEPT = 1e3;
40843
40848
  var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
40844
40849
  var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
@@ -40907,7 +40912,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
40907
40912
  return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
40908
40913
  }, "clearHistory");
40909
40914
 
40910
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/searches.js
40915
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/searches.js
40911
40916
  var searchesStoreOver = /* @__PURE__ */ __name((context) => {
40912
40917
  const { database } = context;
40913
40918
  return {
@@ -40931,7 +40936,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
40931
40936
  };
40932
40937
  }, "searchesStoreOver");
40933
40938
 
40934
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
40939
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
40935
40940
  var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
40936
40941
  var ACTION_OUTCOMES = ["ok", "refused", "failed"];
40937
40942
  var CODE = /^[a-z][a-z0-9_]{0,63}$/;
@@ -40974,7 +40979,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
40974
40979
  };
40975
40980
  }, "agentActionsStoreOver");
40976
40981
 
40977
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
40982
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
40978
40983
  var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
40979
40984
  }) => {
40980
40985
  const { database, now: now2 } = context;
@@ -41033,7 +41038,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
41033
41038
  };
41034
41039
  }, "botUpdateStoreOver");
41035
41040
 
41036
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
41041
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
41037
41042
  var DAY4 = 864e5;
41038
41043
  var accountsOf = /* @__PURE__ */ __name((filter) => {
41039
41044
  if (filter.accountIds !== void 0 && filter.accountId !== void 0)
@@ -41142,7 +41147,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
41142
41147
  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);
41143
41148
  }, "listEvents");
41144
41149
 
41145
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
41150
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
41146
41151
  var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
41147
41152
  var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
41148
41153
  const unseenBefore = unreferenced(database, "identities");
@@ -41197,7 +41202,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
41197
41202
  return { entries: entryIds.length, events: goneEvents.length };
41198
41203
  }, "forgetCalendarRows");
41199
41204
 
41200
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
41205
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
41201
41206
  var calendarOf = /* @__PURE__ */ __name((row2) => ({
41202
41207
  id: Number(row2.id),
41203
41208
  accountId: Number(row2.account_id),
@@ -41784,7 +41789,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
41784
41789
  };
41785
41790
  }, "eventStoreOver");
41786
41791
 
41787
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
41792
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
41788
41793
  var CATALOG_QUERY = defineQuery({
41789
41794
  entity: "document",
41790
41795
  backend: "sql",
@@ -42026,7 +42031,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
42026
42031
  };
42027
42032
  }, "catalogStoreOver");
42028
42033
 
42029
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
42034
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
42030
42035
  var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
42031
42036
  var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
42032
42037
  CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
@@ -42039,7 +42044,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
42039
42044
  THEN 'source-modified' ELSE 'stored-update' END`;
42040
42045
  var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
42041
42046
 
42042
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
42047
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
42043
42048
  var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
42044
42049
  const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
42045
42050
  signal?.throwIfAborted();
@@ -42138,7 +42143,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
42138
42143
  });
42139
42144
  }, "readMeetingContextEvidence");
42140
42145
 
42141
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
42146
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
42142
42147
  var corpora = {
42143
42148
  message: {
42144
42149
  table: "messages",
@@ -42377,7 +42382,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
42377
42382
  }
42378
42383
  }), "contextRecordsOver");
42379
42384
 
42380
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
42385
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
42381
42386
  var NOTE_FIELDS = [
42382
42387
  "text",
42383
42388
  "exact",
@@ -42627,7 +42632,7 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
42627
42632
  FROM ${corpus.view} n${ranking ? " LEFT JOIN f ON f.id = n.id" : ""} WHERE ${where.sql} ORDER BY ${order} LIMIT ?`).all(...cteParams, ...leaves.flatMap(([, fragment]) => tests.size ? fragment.params : []), ...where.params, window);
42628
42633
  if (tests.size && rows.length > QUERY_LIMITS2.candidates)
42629
42634
  exhausted("candidates");
42630
- const evaluate = /* @__PURE__ */ __name((node, row2, text6) => {
42635
+ const evaluate2 = /* @__PURE__ */ __name((node, row2, text6) => {
42631
42636
  if (node.kind === "predicate") {
42632
42637
  const test = tests.get(node);
42633
42638
  return test ? test(text6) : Number(row2[`q${leaves.findIndex(([leaf3]) => leaf3 === node)}`]) === 1;
@@ -42635,7 +42640,7 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
42635
42640
  const must = node.clauses.filter(({ occur }) => occur === "must");
42636
42641
  const should = node.clauses.filter(({ occur }) => occur === "should");
42637
42642
  const not = node.clauses.filter(({ occur }) => occur === "must_not");
42638
- return (must.length ? must.every(({ node: node2 }) => evaluate(node2, row2, text6)) : should.length > 0 && should.some(({ node: node2 }) => evaluate(node2, row2, text6))) && not.every(({ node: node2 }) => !evaluate(node2, row2, text6));
42643
+ return (must.length ? must.every(({ node: node2 }) => evaluate2(node2, row2, text6)) : should.length > 0 && should.some(({ node: node2 }) => evaluate2(node2, row2, text6))) && not.every(({ node: node2 }) => !evaluate2(node2, row2, text6));
42639
42644
  }, "evaluate");
42640
42645
  const matched = tests.size ? rows.filter((row2) => {
42641
42646
  check3();
@@ -42643,7 +42648,7 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
42643
42648
  budget.work += text6.length;
42644
42649
  if (budget.work > QUERY_LIMITS2.work)
42645
42650
  exhausted("detector work");
42646
- return evaluate(query.root, row2, text6);
42651
+ return evaluate2(query.root, row2, text6);
42647
42652
  }) : rows;
42648
42653
  return matched.map((row2) => ({
42649
42654
  type: corpus.type,
@@ -42807,7 +42812,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
42807
42812
  };
42808
42813
  }, "noteSearchOver");
42809
42814
 
42810
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
42815
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
42811
42816
  var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
42812
42817
  var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
42813
42818
  var EVENT_CORPUS = {
@@ -42939,7 +42944,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
42939
42944
  };
42940
42945
  }, "eventSearchOver");
42941
42946
 
42942
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
42947
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
42943
42948
  var refuse = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
42944
42949
  throw new CliError(code, message2, { reason });
42945
42950
  }, "refuse");
@@ -43269,12 +43274,12 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
43269
43274
  }, "addInvoice"),
43270
43275
  invoice: /* @__PURE__ */ __name((reference2) => invoiceDetail(reference2), "invoice"),
43271
43276
  invoices: /* @__PURE__ */ __name((filter = {}) => {
43272
- const project = filter.project === void 0 ? null : projectId(database, filter.project);
43277
+ const project2 = filter.project === void 0 ? null : projectId(database, filter.project);
43273
43278
  const counterparty = partyThing(filter.counterparty, "the counterparty");
43274
43279
  const by = proposedBySql("i.author_type", "i.author_id", filter.proposedBy);
43275
43280
  const status = filter.status === void 0 ? null : oneOf4(filter.status, INVOICE_STATUSES, "a status");
43276
43281
  const review = filter.review === void 0 ? null : oneOf4(filter.review, FINANCE_REVIEWS, "a review");
43277
- return database.prepare(`${INVOICES} WHERE i.deleted_at IS NULL AND (? IS NULL OR i.direction = ?) AND (? IS NULL OR i.status = ?) AND (? IS NULL OR i.review = ?) AND (? IS NULL OR i.project_id = ?) AND (? IS NULL OR (i.counterparty_type = ? AND i.counterparty_id = ?)) ${filter.open ? "AND i.status IN ('issued', 'partly_paid') " : ""}AND ${by.sql} ORDER BY i.created_at DESC, i.id DESC LIMIT ?`).all(filter.direction ?? null, filter.direction ?? null, status, status, review, review, project, project, counterparty?.type ?? null, counterparty?.type ?? null, counterparty?.id ?? null, ...by.params, limitOf2(filter.limit)).map(invoiceOf2);
43282
+ return database.prepare(`${INVOICES} WHERE i.deleted_at IS NULL AND (? IS NULL OR i.direction = ?) AND (? IS NULL OR i.status = ?) AND (? IS NULL OR i.review = ?) AND (? IS NULL OR i.project_id = ?) AND (? IS NULL OR (i.counterparty_type = ? AND i.counterparty_id = ?)) ${filter.open ? "AND i.status IN ('issued', 'partly_paid') " : ""}AND ${by.sql} ORDER BY i.created_at DESC, i.id DESC LIMIT ?`).all(filter.direction ?? null, filter.direction ?? null, status, status, review, review, project2, project2, counterparty?.type ?? null, counterparty?.type ?? null, counterparty?.id ?? null, ...by.params, limitOf2(filter.limit)).map(invoiceOf2);
43278
43283
  }, "invoices"),
43279
43284
  issueInvoice: /* @__PURE__ */ __name((reference2, by) => {
43280
43285
  ownerOnly(by, "issues an invoice");
@@ -43329,11 +43334,11 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
43329
43334
  }, "addPayment"),
43330
43335
  payment: /* @__PURE__ */ __name((reference2) => paymentDetail(reference2), "payment"),
43331
43336
  payments: /* @__PURE__ */ __name((filter = {}) => {
43332
- const project = filter.project === void 0 ? null : projectId(database, filter.project);
43337
+ const project2 = filter.project === void 0 ? null : projectId(database, filter.project);
43333
43338
  const party2 = partyThing(filter.party, "the party");
43334
43339
  const by = proposedBySql("p.author_type", "p.author_id", filter.proposedBy);
43335
43340
  const review = filter.review === void 0 ? null : oneOf4(filter.review, FINANCE_REVIEWS, "a review");
43336
- return database.prepare(`${PAYMENTS} WHERE p.deleted_at IS NULL AND (? IS NULL OR p.direction = ?) AND (? IS NULL OR p.review = ?) AND (? IS NULL OR p.project_id = ?) AND (? IS NULL OR (p.payer_type = ? AND p.payer_id = ?) OR (p.payee_type = ? AND p.payee_id = ?)) AND ${by.sql} ORDER BY p.created_at DESC, p.id DESC LIMIT ?`).all(filter.direction ?? null, filter.direction ?? null, review, review, project, project, party2?.type ?? null, party2?.type ?? null, party2?.id ?? null, party2?.type ?? null, party2?.id ?? null, ...by.params, limitOf2(filter.limit)).map(paymentOf3);
43341
+ return database.prepare(`${PAYMENTS} WHERE p.deleted_at IS NULL AND (? IS NULL OR p.direction = ?) AND (? IS NULL OR p.review = ?) AND (? IS NULL OR p.project_id = ?) AND (? IS NULL OR (p.payer_type = ? AND p.payer_id = ?) OR (p.payee_type = ? AND p.payee_id = ?)) AND ${by.sql} ORDER BY p.created_at DESC, p.id DESC LIMIT ?`).all(filter.direction ?? null, filter.direction ?? null, review, review, project2, project2, party2?.type ?? null, party2?.type ?? null, party2?.id ?? null, party2?.type ?? null, party2?.id ?? null, ...by.params, limitOf2(filter.limit)).map(paymentOf3);
43337
43342
  }, "payments"),
43338
43343
  allocate: /* @__PURE__ */ __name(({ payment, invoice, amount, by }) => {
43339
43344
  const row2 = rowOf2(payment, "payment");
@@ -43374,8 +43379,8 @@ var financeOperationsOver = /* @__PURE__ */ __name((context) => {
43374
43379
  confirm: /* @__PURE__ */ __name((reference2, by, reason) => decide2(reference2, by, reason, true), "confirm"),
43375
43380
  reject: /* @__PURE__ */ __name((reference2, by, reason) => decide2(reference2, by, reason, false), "reject"),
43376
43381
  openTotals: /* @__PURE__ */ __name((filter = {}) => {
43377
- const project = filter.project === void 0 ? null : projectId(database, filter.project);
43378
- const rows = database.prepare(`SELECT i.direction, i.currency, sum(i.total - ${PAID}) AS open, count(*) AS n FROM invoices i WHERE i.review = 'confirmed' AND i.deleted_at IS NULL AND i.status IN ('issued', 'partly_paid') AND (? IS NULL OR i.project_id = ?) GROUP BY i.direction, i.currency ORDER BY i.currency`).all(project, project);
43382
+ const project2 = filter.project === void 0 ? null : projectId(database, filter.project);
43383
+ const rows = database.prepare(`SELECT i.direction, i.currency, sum(i.total - ${PAID}) AS open, count(*) AS n FROM invoices i WHERE i.review = 'confirmed' AND i.deleted_at IS NULL AND i.status IN ('issued', 'partly_paid') AND (? IS NULL OR i.project_id = ?) GROUP BY i.direction, i.currency ORDER BY i.currency`).all(project2, project2);
43379
43384
  const totals = /* @__PURE__ */ __name((direction) => rows.filter((row2) => row2.direction === direction).map((row2) => ({ ...moneyOf(Number(row2.open), String(row2.currency)), invoices: Number(row2.n) })), "totals");
43380
43385
  return { receivable: totals("receivable"), payable: totals("payable") };
43381
43386
  }, "openTotals")
@@ -43400,7 +43405,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
43400
43405
  };
43401
43406
  }, "financeStoreOver");
43402
43407
 
43403
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
43408
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
43404
43409
  var refuse2 = /* @__PURE__ */ __name((message2, reason) => {
43405
43410
  throw new CliError("validation_error", message2, { reason });
43406
43411
  }, "refuse");
@@ -43433,10 +43438,10 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
43433
43438
  return (entry2, by, outcome) => {
43434
43439
  const { payment } = entry2;
43435
43440
  const amount = entryAmount(payment);
43436
- const project = entry2.project ?? (payment.counterparty?.startsWith("project:") ? payment.counterparty : void 0);
43441
+ const project2 = entry2.project ?? (payment.counterparty?.startsWith("project:") ? payment.counterparty : void 0);
43437
43442
  const written2 = {
43438
43443
  by,
43439
- ...project === void 0 ? {} : { project },
43444
+ ...project2 === void 0 ? {} : { project: project2 },
43440
43445
  ...by === "owner" ? {} : { source: "agent", reason: entry2.statement ?? paymentTitle(entry2) },
43441
43446
  evidence: entry2.evidence
43442
43447
  };
@@ -43478,7 +43483,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
43478
43483
  };
43479
43484
  }, "paymentEntriesOver");
43480
43485
 
43481
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
43486
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
43482
43487
  var EVIDENCE_FINDINGS_KIND = "evidence_findings";
43483
43488
  var reference = /* @__PURE__ */ __name((raw) => {
43484
43489
  if (/^(document|note):[1-9]\d*$/.test(raw))
@@ -43504,7 +43509,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
43504
43509
  return valid;
43505
43510
  }, "validateEvidenceFindings");
43506
43511
 
43507
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/moment.js
43512
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/moment.js
43508
43513
  var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
43509
43514
  try {
43510
43515
  return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
@@ -43516,7 +43521,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
43516
43521
  }
43517
43522
  }, "calendarMoment");
43518
43523
 
43519
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
43524
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
43520
43525
  var NAMED3 = "SELECT f.*, b.name AS author_name, b.kind AS author_kind FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
43521
43526
  var iso9 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
43522
43527
  var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -43591,8 +43596,8 @@ var factOperationsOver = /* @__PURE__ */ __name((context) => {
43591
43596
  if (occurredAt !== null && !Number.isFinite(occurredAt))
43592
43597
  throw new CliError("validation_error", "occurredAt takes an ISO timestamp");
43593
43598
  const id2 = write(database, () => {
43594
- const project = input.project === void 0 ? void 0 : requiredThing(database, input.project, "the project");
43595
- if (project && project.type !== "project")
43599
+ const project2 = input.project === void 0 ? void 0 : requiredThing(database, input.project, "the project");
43600
+ if (project2 && project2.type !== "project")
43596
43601
  throw new CliError("validation_error", `${input.project} is not a project`);
43597
43602
  const subject2 = input.subject === void 0 ? void 0 : requiredThing(database, input.subject, "the subject");
43598
43603
  const replaced = input.supersedes === void 0 ? void 0 : rowOf2(input.supersedes);
@@ -43601,7 +43606,7 @@ var factOperationsOver = /* @__PURE__ */ __name((context) => {
43601
43606
  const owner = input.by === "owner";
43602
43607
  const { actor, model } = authorActor(context, input.by);
43603
43608
  const at = now2();
43604
- const made = Number(database.prepare("INSERT INTO facts (id, type, statement, status, project_id, subject_type, subject_id, occurred_at, supersedes_id, author_type, author_id, model, scope, source, metadata, created_at, updated_at) VALUES (?, ?, ?, 'proposed', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(nextId(database, "facts"), type, statement, project?.id ?? null, subject2?.type ?? null, subject2?.id ?? null, occurredAt, replaced === void 0 ? null : Number(replaced.id), actor.type, actor.id, model, scope3, owner ? "owner" : "agent", null, at, at)?.id);
43609
+ const made = Number(database.prepare("INSERT INTO facts (id, type, statement, status, project_id, subject_type, subject_id, occurred_at, supersedes_id, author_type, author_id, model, scope, source, metadata, created_at, updated_at) VALUES (?, ?, ?, 'proposed', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(nextId(database, "facts"), type, statement, project2?.id ?? null, subject2?.type ?? null, subject2?.id ?? null, occurredAt, replaced === void 0 ? null : Number(replaced.id), actor.type, actor.id, model, scope3, owner ? "owner" : "agent", null, at, at)?.id);
43605
43610
  linkEvidence(context, { type: "fact", id: made }, input.evidence ?? [], owner ? "owner" : "agent");
43606
43611
  if (input.createdFrom !== void 0) {
43607
43612
  const from2 = requiredThing(database, input.createdFrom, "the source");
@@ -43615,11 +43620,11 @@ var factOperationsOver = /* @__PURE__ */ __name((context) => {
43615
43620
  }, "add"),
43616
43621
  get: /* @__PURE__ */ __name((reference2) => factOf(rowOf2(reference2)), "get"),
43617
43622
  list: /* @__PURE__ */ __name((options = {}) => {
43618
- const project = options.project === void 0 ? void 0 : requiredThing(database, options.project, "the project");
43623
+ const project2 = options.project === void 0 ? void 0 : requiredThing(database, options.project, "the project");
43619
43624
  const subject2 = options.subject === void 0 ? void 0 : requiredThing(database, options.subject);
43620
43625
  const by = proposedBySql("f.author_type", "f.author_id", options.proposedBy);
43621
43626
  const order = options.order === "created" ? "f.created_at" : "coalesce(f.occurred_at, f.created_at)";
43622
- return database.prepare(`${NAMED3} WHERE f.deleted_at IS NULL AND (? IS NULL OR f.type = ?) AND (? IS NULL OR f.project_id = ?) AND (? IS NULL OR (f.subject_type = ? AND f.subject_id = ?)) AND (? IS NULL OR f.status = ?) AND ${by.sql} ORDER BY ${order} DESC, f.id DESC LIMIT ?`).all(options.type ?? null, options.type ?? null, project?.id ?? null, project?.id ?? null, subject2?.type ?? null, subject2?.type ?? null, subject2?.id ?? null, options.status ?? null, options.status ?? null, ...by.params, Math.min(Math.max(options.limit ?? 100, 1), 500)).map(factOf);
43627
+ return database.prepare(`${NAMED3} WHERE f.deleted_at IS NULL AND (? IS NULL OR f.type = ?) AND (? IS NULL OR f.project_id = ?) AND (? IS NULL OR (f.subject_type = ? AND f.subject_id = ?)) AND (? IS NULL OR f.status = ?) AND ${by.sql} ORDER BY ${order} DESC, f.id DESC LIMIT ?`).all(options.type ?? null, options.type ?? null, project2?.id ?? null, project2?.id ?? null, subject2?.type ?? null, subject2?.type ?? null, subject2?.id ?? null, options.status ?? null, options.status ?? null, ...by.params, Math.min(Math.max(options.limit ?? 100, 1), 500)).map(factOf);
43623
43628
  }, "list"),
43624
43629
  accept: /* @__PURE__ */ __name((reference2, by, reason) => {
43625
43630
  const row2 = rowOf2(reference2);
@@ -43725,7 +43730,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
43725
43730
  };
43726
43731
  }, "factsStoreOver");
43727
43732
 
43728
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
43733
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
43729
43734
  var invalid4 = /* @__PURE__ */ __name((message2) => {
43730
43735
  throw new CliError("validation_error", message2);
43731
43736
  }, "invalid");
@@ -43744,14 +43749,14 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
43744
43749
  for (const finding of input.findings) {
43745
43750
  let projectId2 = null;
43746
43751
  if (finding.project !== void 0) {
43747
- const project = requiredThing(database, finding.project, "the project");
43748
- if (project.type !== "project")
43752
+ const project2 = requiredThing(database, finding.project, "the project");
43753
+ if (project2.type !== "project")
43749
43754
  return invalid4("a finding needs an owner project");
43750
- const projectRow = database.prepare("SELECT id,key,name,description,type,scope,updated_at FROM projects WHERE id=? AND account_id IS NULL AND deleted_at IS NULL").get(project.id);
43755
+ const projectRow = database.prepare("SELECT id,key,name,description,type,scope,updated_at FROM projects WHERE id=? AND account_id IS NULL AND deleted_at IS NULL").get(project2.id);
43751
43756
  if (!projectRow)
43752
43757
  throw new CliError("not_found", "the owner project is unavailable");
43753
43758
  seen.set(finding.project, projectRow);
43754
- projectId2 = String(project.id);
43759
+ projectId2 = String(project2.id);
43755
43760
  }
43756
43761
  if (finding.subject !== void 0)
43757
43762
  seen.set(finding.subject, requiredThing(database, finding.subject, "the subject"));
@@ -43829,7 +43834,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
43829
43834
  return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
43830
43835
  }, "findingsCoreOver");
43831
43836
 
43832
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
43837
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
43833
43838
  var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
43834
43839
  var PROPOSAL_VERDICTS = ["useful", "not_useful"];
43835
43840
  var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
@@ -43917,11 +43922,11 @@ var proposalOperationsOver = /* @__PURE__ */ __name((context) => {
43917
43922
  }, "propose"),
43918
43923
  get: /* @__PURE__ */ __name((id2) => actionOf(rowOf2(id2)), "get"),
43919
43924
  pending: /* @__PURE__ */ __name(({ limit = 100 } = {}) => database.prepare(`${NAMED4} WHERE p.status = 'proposed' ORDER BY p.created_at, p.id LIMIT ?`).all(Math.min(Math.max(limit, 1), 500)).map(actionOf), "pending"),
43920
- list: /* @__PURE__ */ __name(({ status, limit = 100, kinds: kinds2, except, proposedBy, project } = {}) => {
43925
+ list: /* @__PURE__ */ __name(({ status, limit = 100, kinds: kinds2, except, proposedBy, project: project2 } = {}) => {
43921
43926
  if (status !== void 0 && !PROPOSAL_STATUSES.includes(status))
43922
43927
  throw new CliError("validation_error", `a status is one of ${PROPOSAL_STATUSES.join(", ")}`);
43923
43928
  const by = proposedBySql("p.proposed_by_type", "p.proposed_by_id", proposedBy);
43924
- return database.prepare(`${NAMED4} WHERE (? IS NULL OR ${STATUS} = ?) AND (? IS NULL OR p.kind IN (SELECT value FROM json_each(?))) AND p.kind NOT IN (SELECT value FROM json_each(?)) AND (? IS NULL OR (p.target_type = 'project' AND 'project:' || p.target_id = ?) OR json_extract(p.payload, '$.to') = ? OR json_extract(p.payload, '$.from') = ? OR json_extract(p.payload, '$.project') = ?) AND ${by.sql} ORDER BY p.created_at DESC, p.id DESC LIMIT ?`).all(status ?? null, status ?? null, kinds2 === void 0 ? null : 1, JSON.stringify(kinds2 ?? []), JSON.stringify(except ?? []), ...Array(5).fill(project ?? null), ...by.params, Math.min(Math.max(limit, 1), 500)).map(actionOf);
43929
+ return database.prepare(`${NAMED4} WHERE (? IS NULL OR ${STATUS} = ?) AND (? IS NULL OR p.kind IN (SELECT value FROM json_each(?))) AND p.kind NOT IN (SELECT value FROM json_each(?)) AND (? IS NULL OR (p.target_type = 'project' AND 'project:' || p.target_id = ?) OR json_extract(p.payload, '$.to') = ? OR json_extract(p.payload, '$.from') = ? OR json_extract(p.payload, '$.project') = ?) AND ${by.sql} ORDER BY p.created_at DESC, p.id DESC LIMIT ?`).all(status ?? null, status ?? null, kinds2 === void 0 ? null : 1, JSON.stringify(kinds2 ?? []), JSON.stringify(except ?? []), ...Array(5).fill(project2 ?? null), ...by.params, Math.min(Math.max(limit, 1), 500)).map(actionOf);
43925
43930
  }, "list"),
43926
43931
  approve: /* @__PURE__ */ __name((id2, result, by) => decide2(id2, "approved", result, by), "approve"),
43927
43932
  reject: /* @__PURE__ */ __name((id2, by, result) => decide2(id2, "rejected", result, by), "reject"),
@@ -43994,7 +43999,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
43994
43999
  };
43995
44000
  }, "proposedActionsStoreOver");
43996
44001
 
43997
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
44002
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
43998
44003
  var stale = /* @__PURE__ */ __name(() => {
43999
44004
  throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
44000
44005
  reason: "evidence-findings.stale"
@@ -44113,12 +44118,12 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
44113
44118
  }, "stage"),
44114
44119
  get: /* @__PURE__ */ __name(async (id2) => view(load(id2)), "get"),
44115
44120
  sources: /* @__PURE__ */ __name(async (id2) => sourcesOfReferences(database, view(load(id2)).input.findings.flatMap((finding) => finding.evidence.map((one2) => one2.reference))), "sources"),
44116
- list: /* @__PURE__ */ __name(async ({ project, limit = 20, offset = 0, status } = {}) => {
44121
+ list: /* @__PURE__ */ __name(async ({ project: project2, limit = 20, offset = 0, status } = {}) => {
44117
44122
  if (status !== void 0 && status !== "proposed" && status !== "reviewed")
44118
44123
  return invalid5("finding status is proposed or reviewed");
44119
44124
  if (!Number.isSafeInteger(limit) || limit < 1 || limit > 50 || !Number.isSafeInteger(offset) || offset < 0)
44120
44125
  return invalid5("findings lists take 1\u201350 items and a nonnegative offset");
44121
- const projectId2 = project === void 0 ? null : /^project:([1-9]\d*)$/.exec(project)?.[1];
44126
+ const projectId2 = project2 === void 0 ? null : /^project:([1-9]\d*)$/.exec(project2)?.[1];
44122
44127
  if (projectId2 === void 0)
44123
44128
  return invalid5("a findings list filters by a project reference");
44124
44129
  const ids = database.prepare("SELECT id FROM proposed_actions WHERE account_id IS NULL AND kind=? AND (? IS NULL OR (target_type='project' AND target_id=?) OR EXISTS (SELECT 1 FROM json_each(payload,'$.findings') f WHERE json_extract(f.value,'$.project')=?)) AND (? IS NULL OR status=?) ORDER BY id DESC LIMIT ? OFFSET ?").all(EVIDENCE_FINDINGS_KIND, projectId2, projectId2 === null ? null : Number(projectId2), projectId2 === null ? null : `project:${projectId2}`, status ?? null, status === "reviewed" ? "approved" : status ?? null, limit + 1, offset);
@@ -44175,7 +44180,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
44175
44180
  };
44176
44181
  }, "evidenceFindingsStoreOver");
44177
44182
 
44178
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
44183
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
44179
44184
  var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
44180
44185
  var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
44181
44186
  rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
@@ -44228,7 +44233,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
44228
44233
  }, "forPerson")
44229
44234
  }), "involvementStoreOver");
44230
44235
 
44231
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
44236
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
44232
44237
  import { createHash as createHash12 } from "node:crypto";
44233
44238
  var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
44234
44239
  var id = /* @__PURE__ */ __name((value) => {
@@ -44265,7 +44270,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
44265
44270
  linkMeetingProject: /* @__PURE__ */ __name(async (key2, meetingId, projectId2, options = {}) => {
44266
44271
  check2(options.signal);
44267
44272
  const meeting = id(meetingId);
44268
- const project = id(projectId2);
44273
+ const project2 = id(projectId2);
44269
44274
  const by = options.by ?? "owner";
44270
44275
  if (by !== "owner" && by !== "agent")
44271
44276
  throw new CliError("validation_error", "choose owner or agent provenance");
@@ -44275,9 +44280,9 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
44275
44280
  const accountId = account(key2);
44276
44281
  if (!database.prepare("SELECT 1 FROM meetings WHERE id=? AND account_id=? AND deleted_at IS NULL").get(meeting, accountId))
44277
44282
  throw new CliError("not_found", "the meeting is unavailable in this account");
44278
- if (!database.prepare("SELECT 1 FROM projects WHERE id=? AND account_id IS NULL AND deleted_at IS NULL").get(project))
44283
+ if (!database.prepare("SELECT 1 FROM projects WHERE id=? AND account_id IS NULL AND deleted_at IS NULL").get(project2))
44279
44284
  throw new CliError("not_found", "the owner project is unavailable");
44280
- const held = database.prepare(`SELECT ${fields3} FROM links WHERE from_type='meeting' AND from_id=? AND to_type='project' AND to_id=? AND kind='member-of' AND anchor IS NULL`).get(meeting, project);
44285
+ const held = database.prepare(`SELECT ${fields3} FROM links WHERE from_type='meeting' AND from_id=? AND to_type='project' AND to_id=? AND kind='member-of' AND anchor IS NULL`).get(meeting, project2);
44281
44286
  if (options.expectedFingerprint !== void 0 && (!held || linkOf2(held, accountId).fingerprint !== options.expectedFingerprint))
44282
44287
  throw new CliError("configuration_error", "meeting membership changed since review", {
44283
44288
  reason: "meeting-project.stale"
@@ -44290,8 +44295,8 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
44290
44295
  if (held)
44291
44296
  database.prepare("UPDATE links SET confirmed=1,source='owner',author='owner',updated_at=? WHERE id=?").run(at, Number(held.id));
44292
44297
  else
44293
- database.prepare("INSERT INTO links (from_type,from_id,to_type,to_id,kind,source,confirmed,evidence,author,created_at,updated_at) VALUES ('meeting',?,'project',?,'member-of',?,?,?,?,?,?)").run(meeting, project, by === "owner" ? "owner" : "suggested", by === "owner" ? 1 : 0, options.provenance ?? null, by === "owner" ? "owner" : null, at, at);
44294
- const row2 = database.prepare(`SELECT ${fields3} FROM links WHERE from_type='meeting' AND from_id=? AND to_type='project' AND to_id=? AND kind='member-of' AND anchor IS NULL`).get(meeting, project);
44298
+ database.prepare("INSERT INTO links (from_type,from_id,to_type,to_id,kind,source,confirmed,evidence,author,created_at,updated_at) VALUES ('meeting',?,'project',?,'member-of',?,?,?,?,?,?)").run(meeting, project2, by === "owner" ? "owner" : "suggested", by === "owner" ? 1 : 0, options.provenance ?? null, by === "owner" ? "owner" : null, at, at);
44299
+ const row2 = database.prepare(`SELECT ${fields3} FROM links WHERE from_type='meeting' AND from_id=? AND to_type='project' AND to_id=? AND kind='member-of' AND anchor IS NULL`).get(meeting, project2);
44295
44300
  check2(options.signal);
44296
44301
  return { link: linkOf2(row2, accountId), changed: true };
44297
44302
  });
@@ -44306,15 +44311,89 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
44306
44311
  if (options.confirmed !== void 0 && typeof options.confirmed !== "boolean")
44307
44312
  throw new CliError("validation_error", "confirmed must be boolean");
44308
44313
  const meeting = options.meetingId === void 0 ? null : id(options.meetingId);
44309
- const project = options.projectId === void 0 ? null : id(options.projectId);
44310
- const rows = database.prepare("SELECT l.id,l.from_id,l.to_id,l.source,l.confirmed,l.updated_at,length(l.evidence) AS evidenceLength,substr(l.evidence,1,2000) AS evidence FROM links l JOIN meetings m ON m.id=l.from_id JOIN projects p ON p.id=l.to_id WHERE l.from_type='meeting' AND l.to_type='project' AND l.kind='member-of' AND l.anchor IS NULL AND m.account_id=? AND m.deleted_at IS NULL AND p.account_id IS NULL AND p.deleted_at IS NULL AND (? IS NULL OR m.id=?) AND (? IS NULL OR p.id=?) AND (? IS NULL OR l.confirmed=?) ORDER BY l.id LIMIT ? OFFSET ?").all(accountId, meeting, meeting, project, project, options.confirmed === void 0 ? null : Number(options.confirmed), options.confirmed === void 0 ? null : Number(options.confirmed), limit + 1, offset);
44314
+ const project2 = options.projectId === void 0 ? null : id(options.projectId);
44315
+ const rows = database.prepare("SELECT l.id,l.from_id,l.to_id,l.source,l.confirmed,l.updated_at,length(l.evidence) AS evidenceLength,substr(l.evidence,1,2000) AS evidence FROM links l JOIN meetings m ON m.id=l.from_id JOIN projects p ON p.id=l.to_id WHERE l.from_type='meeting' AND l.to_type='project' AND l.kind='member-of' AND l.anchor IS NULL AND m.account_id=? AND m.deleted_at IS NULL AND p.account_id IS NULL AND p.deleted_at IS NULL AND (? IS NULL OR m.id=?) AND (? IS NULL OR p.id=?) AND (? IS NULL OR l.confirmed=?) ORDER BY l.id LIMIT ? OFFSET ?").all(accountId, meeting, meeting, project2, project2, options.confirmed === void 0 ? null : Number(options.confirmed), options.confirmed === void 0 ? null : Number(options.confirmed), limit + 1, offset);
44311
44316
  check2(options.signal);
44312
44317
  return { items: rows.slice(0, limit).map((row2) => linkOf2(row2, accountId)), hasMore: rows.length > limit };
44313
44318
  }, "meetingProjects")
44314
44319
  };
44315
44320
  }, "meetingProjectsStoreOver");
44316
44321
 
44317
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
44322
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
44323
+ var ORGANIZATIONS_QUERY = {
44324
+ entity: "organization",
44325
+ backend: "sql",
44326
+ fields: queryFieldsOf(organization, {
44327
+ native: ["id", "kind", "scope", "created_at"],
44328
+ examples: {
44329
+ id: "id:1",
44330
+ kind: "kind:company",
44331
+ name: "name:*acme*",
44332
+ scope: "scope:work",
44333
+ created_at: "created_at>=2026-01-01"
44334
+ }
44335
+ })
44336
+ };
44337
+ var PROJECTS_QUERY = {
44338
+ entity: "project",
44339
+ backend: "sql",
44340
+ fields: queryFieldsOf(project, {
44341
+ native: ["id", "key", "name", "kind", "type", "organization_id", "scope", "created_at"],
44342
+ examples: {
44343
+ id: "id:1",
44344
+ key: "key:SMP",
44345
+ name: "name:*tart*",
44346
+ kind: "kind:inbox",
44347
+ type: "type:work",
44348
+ organization_id: "organization_id:1",
44349
+ scope: "scope:work",
44350
+ created_at: "created_at>=2026-01-01"
44351
+ }
44352
+ })
44353
+ };
44354
+ var REMINDERS_QUERY = {
44355
+ entity: "reminder",
44356
+ backend: "sql",
44357
+ fields: queryFieldsOf(reminder, {
44358
+ native: ["id", "state", "due_at", "revision"],
44359
+ examples: { id: "id:1", state: "state:pending", due_at: "due_at>=2026-01-01", revision: "revision>1" }
44360
+ })
44361
+ };
44362
+
44363
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
44364
+ var organizationOf = /* @__PURE__ */ __name((row2) => ({
44365
+ id: String(row2.id),
44366
+ ref: `organization:${row2.id}`,
44367
+ kind: row2.kind,
44368
+ name: String(row2.name),
44369
+ scope: row2.scope,
44370
+ createdAt: new Date(Number(row2.created_at)).toISOString()
44371
+ }), "organizationOf");
44372
+ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
44373
+ organizations: /* @__PURE__ */ __name(async (query) => {
44374
+ if (query && walkQuery(query.root).some((node) => node.field === "name"))
44375
+ return database.prepare("SELECT * FROM organizations WHERE deleted_at IS NULL ORDER BY name, id").all().map(organizationOf).filter((one2) => evaluate(query, ORGANIZATIONS_QUERY.fields, { ...one2, created_at: one2.createdAt })).slice(0, 500);
44376
+ const where = query && queryFilter(query, {
44377
+ id: { type: "kw", sql: "CAST(id AS TEXT)" },
44378
+ kind: { type: "enum", sql: "kind" },
44379
+ scope: { type: "enum", sql: "scope" },
44380
+ created_at: { type: "time", sql: "created_at" }
44381
+ });
44382
+ return database.prepare(`SELECT * FROM organizations WHERE deleted_at IS NULL${where ? ` AND (${where.sql})` : ""} ORDER BY name, id LIMIT 500`).all(...where?.params ?? []).map(organizationOf);
44383
+ }, "organizations"),
44384
+ updateOrganization: /* @__PURE__ */ __name(async (organization2, { name }) => write(database, () => {
44385
+ const title = name.trim();
44386
+ if (!title || title.length > 200)
44387
+ throw new CliError("validation_error", "text takes 1\u2013200 characters");
44388
+ const thing = thingOf(database, organization2.includes(":") ? organization2 : `organization:${organization2}`);
44389
+ const row2 = thing?.type === "organization" && database.prepare("UPDATE organizations SET name = ?, updated_at = ? WHERE id = ? AND deleted_at IS NULL RETURNING *").get(title, now2(), thing.id);
44390
+ if (!row2)
44391
+ throw new CliError("not_found", `no organization ${organization2}`);
44392
+ return organizationOf(row2);
44393
+ }), "updateOrganization")
44394
+ }), "organizationsStoreOver");
44395
+
44396
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
44318
44397
  var relationOf = /* @__PURE__ */ __name((link3) => ({
44319
44398
  id: link3.id,
44320
44399
  from: link3.from,
@@ -44540,16 +44619,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
44540
44619
  provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
44541
44620
  }, "decidedOrigin");
44542
44621
 
44543
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
44622
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
44544
44623
  import { createHash as createHash15 } from "node:crypto";
44545
44624
 
44546
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
44625
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
44547
44626
  import { createHash as createHash14 } from "node:crypto";
44548
44627
 
44549
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
44628
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
44550
44629
  import { createHash as createHash13 } from "node:crypto";
44551
44630
 
44552
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
44631
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
44553
44632
  var consolidationId = /* @__PURE__ */ __name((value, field4) => {
44554
44633
  if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
44555
44634
  throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
@@ -44600,7 +44679,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
44600
44679
  return input;
44601
44680
  }, "consolidationApplyInput");
44602
44681
 
44603
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
44682
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
44604
44683
  var receiptOf = /* @__PURE__ */ __name((row2) => ({
44605
44684
  id: String(row2.id),
44606
44685
  sourceId: String(row2.source_id),
@@ -44675,7 +44754,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
44675
44754
  }, { beforeCommit: check3 });
44676
44755
  }, "applyTagConsolidation");
44677
44756
 
44678
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
44757
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
44679
44758
  var selections = [
44680
44759
  ["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
44681
44760
  ["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
@@ -44819,7 +44898,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
44819
44898
  };
44820
44899
  }, "previewRows");
44821
44900
 
44822
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
44901
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
44823
44902
  var kinds = ["project", "tag", "topic"];
44824
44903
  var cancelled2 = /* @__PURE__ */ __name((signal) => {
44825
44904
  if (signal?.aborted)
@@ -45083,7 +45162,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
45083
45162
  };
45084
45163
  }, "vocabularyStoreOver");
45085
45164
 
45086
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
45165
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
45087
45166
  var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
45088
45167
  var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
45089
45168
  var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
@@ -45235,14 +45314,6 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
45235
45314
  throw new CliError("not_found", "no annotation with that id");
45236
45315
  return found2;
45237
45316
  }, "annotation");
45238
- const organizationOf = /* @__PURE__ */ __name((row2) => ({
45239
- id: String(row2.id),
45240
- ref: `organization:${row2.id}`,
45241
- kind: row2.kind,
45242
- name: String(row2.name),
45243
- scope: row2.scope,
45244
- createdAt: iso11(row2.created_at)
45245
- }), "organizationOf");
45246
45317
  const projectOf2 = /* @__PURE__ */ __name((row2) => ({
45247
45318
  id: String(row2.id),
45248
45319
  ref: `project:${row2.id}`,
@@ -45294,7 +45365,7 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
45294
45365
  revision: Number(row2.revision),
45295
45366
  receipt: row2.receipt == null ? null : String(row2.receipt)
45296
45367
  }), "reminderOf");
45297
- const reminder = /* @__PURE__ */ __name((key2, id2) => {
45368
+ const reminder2 = /* @__PURE__ */ __name((key2, id2) => {
45298
45369
  const row2 = /^\d+$/.test(id2) ? database.prepare("SELECT * FROM reminders WHERE account_id=? AND id=?").get(account(key2), Number(id2)) : void 0;
45299
45370
  if (!row2)
45300
45371
  throw new CliError("not_found", "no reminder with that id in this account");
@@ -45316,6 +45387,7 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
45316
45387
  const tagsOf2 = /* @__PURE__ */ __name((list2) => [...new Set(list2.map(canonicalTagName))], "tagsOf");
45317
45388
  return {
45318
45389
  ...vocabularyStoreOver(context),
45390
+ ...organizationsStoreOver(context),
45319
45391
  ...meetingProjectsStoreOver(context),
45320
45392
  taskIds: /* @__PURE__ */ __name(async (key2, options = {}) => {
45321
45393
  const { limit, offset } = bounded2(options.limit, options.offset);
@@ -45431,21 +45503,12 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
45431
45503
  const row2 = database.prepare("INSERT INTO organizations (kind, name, scope, created_at, updated_at) VALUES (?, ?, ?, ?, ?) RETURNING *").get(oneOf6(kind4, ORGANIZATION_KINDS, "an organization's kind"), textOf3(name, 200), oneOf6(scope3, SCOPES, "a scope"), at, at);
45432
45504
  return organizationOf(row2);
45433
45505
  }, "addOrganization"),
45434
- organizations: /* @__PURE__ */ __name(async (query) => {
45435
- const where = query && queryFilter(query, {
45436
- id: { type: "kw", sql: "CAST(id AS TEXT)" },
45437
- kind: { type: "enum", sql: "kind" },
45438
- scope: { type: "enum", sql: "scope" },
45439
- created_at: { type: "time", sql: "created_at" }
45440
- });
45441
- return database.prepare(`SELECT * FROM organizations WHERE deleted_at IS NULL${where ? ` AND (${where.sql})` : ""} ORDER BY name, id LIMIT 500`).all(...where?.params ?? []).map(organizationOf);
45442
- }, "organizations"),
45443
- addProject: /* @__PURE__ */ __name(async ({ name, key: key2, type = "other", organization, scope: scope3 = "personal", description }) => write(database, () => {
45506
+ addProject: /* @__PURE__ */ __name(async ({ name, key: key2, type = "other", organization: organization2, scope: scope3 = "personal", description }) => write(database, () => {
45444
45507
  const title = textOf3(name, 200);
45445
- const organizationId = organization === void 0 ? null : (() => {
45446
- const thing = thingOf(database, organization);
45508
+ const organizationId = organization2 === void 0 ? null : (() => {
45509
+ const thing = thingOf(database, organization2);
45447
45510
  if (thing?.type !== "organization")
45448
- throw new CliError("not_found", `no organization ${organization}`);
45511
+ throw new CliError("not_found", `no organization ${organization2}`);
45449
45512
  return thing.id;
45450
45513
  })();
45451
45514
  const wanted = key2 === void 0 ? projectKey(title) : key2.trim().toUpperCase();
@@ -45586,7 +45649,7 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
45586
45649
  return reminderOf(existing);
45587
45650
  const at = now2();
45588
45651
  const made = database.prepare("INSERT INTO reminders (task_id, account_id, due_at, timezone, state, revision, created_at, updated_at) VALUES (?, ?, ?, ?, 'pending', 1, ?, ?) RETURNING id").get(row2, accountId, timestamp4, timezone, at, at);
45589
- return reminder(key2, String(made?.id));
45652
+ return reminder2(key2, String(made?.id));
45590
45653
  }, "schedule"),
45591
45654
  reminders: /* @__PURE__ */ __name(async (key2, query) => {
45592
45655
  const where = query && queryFilter(query, {
@@ -45598,16 +45661,16 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
45598
45661
  return database.prepare(`SELECT * FROM reminders WHERE account_id=?${where ? ` AND (${where.sql})` : ""} ORDER BY due_at, id LIMIT 500`).all(account(key2), ...where?.params ?? []).map(reminderOf);
45599
45662
  }, "reminders"),
45600
45663
  cancelReminder: /* @__PURE__ */ __name(async (key2, id2) => {
45601
- reminder(key2, id2);
45664
+ reminder2(key2, id2);
45602
45665
  database.prepare("UPDATE reminders SET state='cancelled', revision=revision+1, receipt=NULL, lease_until=NULL, updated_at=? WHERE account_id=? AND id=? AND state IN ('pending','leased')").run(now2(), account(key2), Number(id2));
45603
- return reminder(key2, id2);
45666
+ return reminder2(key2, id2);
45604
45667
  }, "cancelReminder"),
45605
45668
  snoozeReminder: /* @__PURE__ */ __name(async (key2, id2, dueAt, revision2) => {
45606
- const held = reminder(key2, id2);
45669
+ const held = reminder2(key2, id2);
45607
45670
  openTask(key2, held.task);
45608
45671
  if (!database.prepare("UPDATE reminders SET due_at=?, state='pending', revision=revision+1, receipt=NULL, lease_until=NULL, updated_at=? WHERE account_id=? AND id=? AND revision=? AND state<>'cancelled'").run(due(dueAt), now2(), account(key2), Number(id2), revision2).changes)
45609
45672
  throw new CliError("validation_error", "reminder changed or was cancelled");
45610
- return reminder(key2, id2);
45673
+ return reminder2(key2, id2);
45611
45674
  }, "snoozeReminder"),
45612
45675
  claimReminders: /* @__PURE__ */ __name(async (key2, options = {}) => {
45613
45676
  const { limit } = bounded2(options.limit), lease = options.leaseMs ?? 6e4;
@@ -45619,18 +45682,18 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
45619
45682
  for (const row2 of rows) {
45620
45683
  const receipt = ulid(at);
45621
45684
  if (database.prepare("UPDATE reminders SET state='leased', receipt=?, lease_until=?, updated_at=? WHERE account_id=? AND id=? AND (state='pending' OR (state='leased' AND lease_until<=?))").run(receipt, at + lease, at, accountId, Number(row2.id), at).changes)
45622
- claimed.push(reminder(key2, String(row2.id)));
45685
+ claimed.push(reminder2(key2, String(row2.id)));
45623
45686
  }
45624
45687
  return claimed;
45625
45688
  }, "claimReminders"),
45626
45689
  acknowledgeReminder: /* @__PURE__ */ __name(async (key2, id2, receipt) => {
45627
- const held = reminder(key2, id2);
45690
+ const held = reminder2(key2, id2);
45628
45691
  if (held.state === "delivered" && held.receipt === receipt)
45629
45692
  return held;
45630
45693
  openTask(key2, held.task);
45631
45694
  if (!database.prepare("UPDATE reminders SET state='delivered', lease_until=NULL, updated_at=? WHERE account_id=? AND id=? AND state='leased' AND receipt=? AND lease_until>?").run(now2(), account(key2), Number(id2), receipt, now2()).changes)
45632
45695
  throw new CliError("validation_error", "receipt is stale or the delivery lease expired");
45633
- return reminder(key2, id2);
45696
+ return reminder2(key2, id2);
45634
45697
  }, "acknowledgeReminder")
45635
45698
  };
45636
45699
  }, "knowledgeStoreOver");
@@ -45640,7 +45703,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
45640
45703
  return key2.padEnd(3, "X");
45641
45704
  }, "projectKey");
45642
45705
 
45643
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
45706
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
45644
45707
  var DAY5 = 864e5;
45645
45708
  var SETTING4 = "logs_pruned_at";
45646
45709
  var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
@@ -45667,7 +45730,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
45667
45730
  };
45668
45731
  }, "logPruner");
45669
45732
 
45670
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/mail/findings.js
45733
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/mail/findings.js
45671
45734
  var MAIL_FINDINGS_PER_RUN = 30;
45672
45735
  var MAIL_FINDINGS_PER_SENDER = 5;
45673
45736
  var invalid6 = /* @__PURE__ */ __name((message2) => {
@@ -46033,7 +46096,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
46033
46096
  }, "checkMailFindings");
46034
46097
  var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
46035
46098
 
46036
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/mail/score.js
46099
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/mail/score.js
46037
46100
  var import_disposable_email_domains_js = __toESM(require_dist(), 1);
46038
46101
  var import_tldts = __toESM(require_cjs(), 1);
46039
46102
  var WEIGHTS = {
@@ -46166,7 +46229,7 @@ var scoreGroup = /* @__PURE__ */ __name((items, context) => {
46166
46229
  return { score: kept.reduce((sum, signal) => sum + WEIGHTS[signal], 0), signals: kept };
46167
46230
  }, "scoreGroup");
46168
46231
 
46169
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
46232
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
46170
46233
  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";
46171
46234
  var orderOperationsOver = /* @__PURE__ */ __name((context) => {
46172
46235
  const { database, now: now2 } = context;
@@ -46266,7 +46329,7 @@ var orderOperationsOver = /* @__PURE__ */ __name((context) => {
46266
46329
  }, "add"),
46267
46330
  get: /* @__PURE__ */ __name((reference2) => orderOf(rowOf2(reference2)), "get"),
46268
46331
  list: /* @__PURE__ */ __name((filter = {}) => {
46269
- const project = filter.project === void 0 ? null : projectId(database, filter.project);
46332
+ const project2 = filter.project === void 0 ? null : projectId(database, filter.project);
46270
46333
  const customer = partyThing(filter.customer, "the customer");
46271
46334
  const by = proposedBySql("o.author_type", "o.author_id", filter.proposedBy);
46272
46335
  const status = filter.status === void 0 ? null : statusOf(filter.status);
@@ -46275,7 +46338,7 @@ var orderOperationsOver = /* @__PURE__ */ __name((context) => {
46275
46338
  const number3 = filter.number === void 0 ? null : filter.number.trim();
46276
46339
  const shop = filter.supplierName === void 0 ? null : fold(filter.supplierName);
46277
46340
  const limit = Math.min(Math.max(filter.limit ?? 100, 1), 500);
46278
- const rows = database.prepare(`${ORDERS} WHERE o.deleted_at IS NULL AND (? IS NULL OR o.status = ?) AND (? IS NULL OR o.purpose = ?) AND (? IS NULL OR o.review = ?) AND (? IS NULL OR o.project_id = ?) AND (? IS NULL OR o.number = ?) AND (? IS NULL OR (o.customer_type = ? AND o.customer_id = ?)) AND ${by.sql} ORDER BY o.created_at DESC, o.id DESC`).all(status, status, purpose, purpose, review, review, project, project, number3, number3, customer?.type ?? null, customer?.type ?? null, customer?.id ?? null, ...by.params);
46341
+ const rows = database.prepare(`${ORDERS} WHERE o.deleted_at IS NULL AND (? IS NULL OR o.status = ?) AND (? IS NULL OR o.purpose = ?) AND (? IS NULL OR o.review = ?) AND (? IS NULL OR o.project_id = ?) AND (? IS NULL OR o.number = ?) AND (? IS NULL OR (o.customer_type = ? AND o.customer_id = ?)) AND ${by.sql} ORDER BY o.created_at DESC, o.id DESC`).all(status, status, purpose, purpose, review, review, project2, project2, number3, number3, customer?.type ?? null, customer?.type ?? null, customer?.id ?? null, ...by.params);
46279
46342
  return rows.filter((row2) => shop === null || fold(String(row2.supplier_name)) === shop).slice(0, limit).map(orderOf);
46280
46343
  }, "list"),
46281
46344
  setStatus: /* @__PURE__ */ __name((reference2, { status, date: date3, by }) => {
@@ -46318,7 +46381,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
46318
46381
  };
46319
46382
  }, "ordersStoreOver");
46320
46383
 
46321
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
46384
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
46322
46385
  var stale2 = /* @__PURE__ */ __name(() => {
46323
46386
  throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
46324
46387
  reason: "mail-findings.stale"
@@ -46579,8 +46642,8 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
46579
46642
  case "fact":
46580
46643
  return core.create(finding, agent, "owner");
46581
46644
  case "task": {
46582
- const project = finding.project ?? `project:${inboxProject(context, `email:${account.account}`, true)}`;
46583
- return core.create({ ...finding, project }, agent, "owner");
46645
+ const project2 = finding.project ?? `project:${inboxProject(context, `email:${account.account}`, true)}`;
46646
+ return core.create({ ...finding, project: project2 }, agent, "owner");
46584
46647
  }
46585
46648
  case "task_update": {
46586
46649
  if (finding.change === "close")
@@ -46775,7 +46838,7 @@ ${evidence.join("\n")}`, agent);
46775
46838
  };
46776
46839
  }, "mailFindingsStoreOver");
46777
46840
 
46778
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
46841
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
46779
46842
  var stale3 = /* @__PURE__ */ __name(() => {
46780
46843
  throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
46781
46844
  reason: "meeting-findings.stale"
@@ -46943,7 +47006,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
46943
47006
  };
46944
47007
  }, "meetingFindingsStoreOver");
46945
47008
 
46946
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
47009
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
46947
47010
  var RANK_BATCH = 512;
46948
47011
  var LIVE3 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
46949
47012
  var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
@@ -47214,7 +47277,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
47214
47277
  }
47215
47278
  }), "meetingVectorsOver");
47216
47279
 
47217
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
47280
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
47218
47281
  var OTHER_SOURCES = ["document", "note", "email"];
47219
47282
  var TEXTS = {
47220
47283
  document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
@@ -47315,11 +47378,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
47315
47378
  };
47316
47379
  }, "sourceMentionStoreOver");
47317
47380
 
47318
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
47381
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
47319
47382
  import { mkdirSync, statSync, writeFileSync } from "node:fs";
47320
47383
  import { dirname } from "node:path";
47321
47384
 
47322
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
47385
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
47323
47386
  import { readFileSync as readFileSync3 } from "node:fs";
47324
47387
  var CLIENTS_SETTING = "clients";
47325
47388
  var coreVersion = (() => {
@@ -47377,7 +47440,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
47377
47440
  return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
47378
47441
  }, "refusalAdvice");
47379
47442
 
47380
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
47443
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
47381
47444
  var GENERATED = [
47382
47445
  {
47383
47446
  "name": "20261010184427_initial",
@@ -48380,7 +48443,7 @@ WHERE json_type(params, '$.selection') = 'object';`
48380
48443
  }
48381
48444
  ];
48382
48445
 
48383
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
48446
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
48384
48447
  var MANIFEST = [
48385
48448
  { name: "20261010184427_initial", version: 1, minCompatible: 1 },
48386
48449
  { name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
@@ -48472,7 +48535,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
48472
48535
  return migrations;
48473
48536
  }, "generatedMigrations");
48474
48537
 
48475
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/migrations.js
48538
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/migrations.js
48476
48539
  var MIGRATIONS = generatedMigrations();
48477
48540
  var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
48478
48541
  version INTEGER PRIMARY KEY,
@@ -48525,7 +48588,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
48525
48588
  }
48526
48589
  }, "migrate");
48527
48590
 
48528
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
48591
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
48529
48592
  var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
48530
48593
  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 ?");
48531
48594
  if (pending.get(0, 1) === void 0)
@@ -48547,7 +48610,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
48547
48610
  }
48548
48611
  }, "fillJoinKeys");
48549
48612
 
48550
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
48613
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
48551
48614
  var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
48552
48615
  refuseOwnerStoreInTests(path);
48553
48616
  const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
@@ -48561,8 +48624,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
48561
48624
  }, "openSqlite");
48562
48625
  var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
48563
48626
  quietSqliteWarning();
48564
- const { drizzle } = await import("./node-AQ7O3PGH.js");
48565
- const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-RKDBK624.js");
48627
+ const { drizzle } = await import("./node-QWBBKDHE.js");
48628
+ const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-GKJHUPHC.js");
48566
48629
  const client = await nodeClient(path, { readOnly });
48567
48630
  try {
48568
48631
  return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
@@ -48572,8 +48635,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
48572
48635
  }
48573
48636
  }, "openUnderNode");
48574
48637
  var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
48575
- const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-5X2NBSLA.js");
48576
- const { drizzle } = await import("./bun-O3KE32D7.js");
48638
+ const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-DSFSAFNQ.js");
48639
+ const { drizzle } = await import("./bun-V2HGEGFF.js");
48577
48640
  const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
48578
48641
  try {
48579
48642
  return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
@@ -48583,7 +48646,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
48583
48646
  }
48584
48647
  }, "openUnderBun");
48585
48648
 
48586
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
48649
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
48587
48650
  var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
48588
48651
  var paymentOf = /* @__PURE__ */ __name((metadata3) => {
48589
48652
  try {
@@ -48651,7 +48714,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
48651
48714
  });
48652
48715
  }, "movePaymentFacts");
48653
48716
 
48654
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
48717
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
48655
48718
  var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
48656
48719
  const ours = MIGRATIONS.at(-1)?.version ?? 0;
48657
48720
  if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
@@ -48666,7 +48729,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
48666
48729
  throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
48667
48730
  }, "assertReadCompatible");
48668
48731
 
48669
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
48732
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
48670
48733
  var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
48671
48734
  var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
48672
48735
  if (provenance2?.startsWith("rule:"))
@@ -48712,7 +48775,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
48712
48775
  });
48713
48776
  }, "moveSuggestedLinks");
48714
48777
 
48715
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
48778
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
48716
48779
  var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
48717
48780
  var TEST_PROVIDER = "chat";
48718
48781
  var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
@@ -48733,7 +48796,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
48733
48796
  }
48734
48797
  }, "purgeTestAccounts");
48735
48798
 
48736
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
48799
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
48737
48800
  var BACKFILL_ON_OPEN = 5e3;
48738
48801
  var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
48739
48802
  var createWritable = /* @__PURE__ */ __name((file) => {
@@ -48798,10 +48861,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
48798
48861
  }
48799
48862
  }, "openStoreContext");
48800
48863
 
48801
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
48864
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
48802
48865
  import { createHash as createHash16 } from "node:crypto";
48803
48866
 
48804
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
48867
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
48805
48868
  var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
48806
48869
  var ref = text4(2048);
48807
48870
  var timestamp2 = pipe(number(), safeInteger(), minValue(0));
@@ -48867,7 +48930,7 @@ var projectAnnotationsSchema = strictObject({
48867
48930
  }))
48868
48931
  });
48869
48932
 
48870
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
48933
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
48871
48934
  var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
48872
48935
  var invalid9 = /* @__PURE__ */ __name((field4) => {
48873
48936
  throw new CliError("validation_error", `invalid project annotations.${field4}`);
@@ -48971,7 +49034,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
48971
49034
  invalid9("external.unused");
48972
49035
  }, "validateProjectAnnotationsGraph");
48973
49036
 
48974
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
49037
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
48975
49038
  var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
48976
49039
  var ref2 = pipe(string(), minLength(1), maxLength(2048));
48977
49040
  var targetSchema = strictObject({
@@ -49077,7 +49140,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
49077
49140
  };
49078
49141
  }, "planBoundProjectAnnotations");
49079
49142
 
49080
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
49143
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
49081
49144
  import { createHash as createHash17 } from "node:crypto";
49082
49145
  var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
49083
49146
  var timestamp3 = pipe(number(), safeInteger(), minValue(0));
@@ -49171,7 +49234,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
49171
49234
  })).digest("hex");
49172
49235
  }, "projectAnnotationSnapshotFingerprint");
49173
49236
 
49174
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
49237
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
49175
49238
  var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
49176
49239
  if (!request || typeof request !== "object" || Array.isArray(request))
49177
49240
  throw new CliError("validation_error", "project annotation request is required");
@@ -49188,7 +49251,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
49188
49251
  return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
49189
49252
  }, "projectAnnotationRequest");
49190
49253
 
49191
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
49254
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
49192
49255
  var SnapshotBudget = class {
49193
49256
  static {
49194
49257
  __name(this, "SnapshotBudget");
@@ -49214,13 +49277,13 @@ var SnapshotBudget = class {
49214
49277
  }
49215
49278
  };
49216
49279
 
49217
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
49280
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
49218
49281
  import { createHash as createHash19 } from "node:crypto";
49219
49282
 
49220
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
49283
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
49221
49284
  var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
49222
49285
 
49223
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
49286
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
49224
49287
  import { createHash as createHash18 } from "node:crypto";
49225
49288
  var invalid11 = /* @__PURE__ */ __name(() => {
49226
49289
  throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
@@ -49363,7 +49426,7 @@ var ProjectSnapshotSources = class {
49363
49426
  }
49364
49427
  };
49365
49428
 
49366
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
49429
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
49367
49430
  var unsupported = /* @__PURE__ */ __name(() => {
49368
49431
  throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
49369
49432
  }, "unsupported");
@@ -49402,7 +49465,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
49402
49465
  throw new CliError("not_found", "the source project does not exist");
49403
49466
  if (descriptor.account_id !== null || descriptor.deleted_at !== null)
49404
49467
  return unsupported();
49405
- const project = rows("FROM projects WHERE id=?", [
49468
+ const project2 = rows("FROM projects WHERE id=?", [
49406
49469
  "id",
49407
49470
  "key",
49408
49471
  "name",
@@ -49416,7 +49479,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
49416
49479
  "created_at",
49417
49480
  "updated_at"
49418
49481
  ], [projectId2])[0];
49419
- if (!project)
49482
+ if (!project2)
49420
49483
  throw new CliError("not_found", "the source project does not exist");
49421
49484
  const aliases2 = rows("FROM aliases WHERE aliasable_type='project' AND aliasable_id=? ORDER BY id", ["name", "source", "display", "account_id", "created_at", "updated_at"], [projectId2]);
49422
49485
  if (aliases2.some((alias2) => alias2.account_id !== null))
@@ -49467,16 +49530,16 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
49467
49530
  version: 2,
49468
49531
  project: {
49469
49532
  ref: projectRef,
49470
- key: project.key,
49471
- name: project.name,
49472
- type: project.type,
49473
- scope: project.scope,
49474
- organization: project.organization_id === null ? null : sources.ref("organization", project.organization_id),
49475
- created_at: project.created_at,
49476
- description: project.description,
49477
- status: project.status,
49478
- owner: sources.ref(project.owner_type, project.owner_id),
49479
- updated_at: project.updated_at,
49533
+ key: project2.key,
49534
+ name: project2.name,
49535
+ type: project2.type,
49536
+ scope: project2.scope,
49537
+ organization: project2.organization_id === null ? null : sources.ref("organization", project2.organization_id),
49538
+ created_at: project2.created_at,
49539
+ description: project2.description,
49540
+ status: project2.status,
49541
+ owner: sources.ref(project2.owner_type, project2.owner_id),
49542
+ updated_at: project2.updated_at,
49480
49543
  account_scope: "owner"
49481
49544
  },
49482
49545
  coverage: {
@@ -49534,7 +49597,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
49534
49597
  return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
49535
49598
  }), "projectAnnotationSnapshot");
49536
49599
 
49537
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
49600
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
49538
49601
  var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
49539
49602
  const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
49540
49603
  const sources = new ProjectSnapshotSources(database, budget);
@@ -49556,20 +49619,20 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
49556
49619
  const aliases2 = database.prepare(`SELECT ${aliasFields.join(",")} ${aliasFrom} LIMIT 1001`).all();
49557
49620
  const names = new Set([manifest.project.key, manifest.project.name, ...manifest.aliases.map((a) => a.name)].map(normalizeVocabularyName));
49558
49621
  const namespace = /* @__PURE__ */ new Set();
49559
- for (const project of projects2) {
49560
- if (project.id === projectId2)
49622
+ for (const project2 of projects2) {
49623
+ if (project2.id === projectId2)
49561
49624
  continue;
49562
- const keyMatches = names.has(normalizeVocabularyName(String(project.key)));
49563
- const nameMatches = project.account_id === null && project.deleted_at === null && names.has(normalizeVocabularyName(String(project.name)));
49625
+ const keyMatches = names.has(normalizeVocabularyName(String(project2.key)));
49626
+ const nameMatches = project2.account_id === null && project2.deleted_at === null && names.has(normalizeVocabularyName(String(project2.name)));
49564
49627
  if (keyMatches || nameMatches)
49565
- namespace.add(`project:${project.id}`);
49628
+ namespace.add(`project:${project2.id}`);
49566
49629
  }
49567
49630
  for (const alias2 of aliases2) {
49568
49631
  if (alias2.aliasable_id === projectId2 || alias2.account_id !== null)
49569
49632
  continue;
49570
- const project = projects2.find((p) => p.id === alias2.aliasable_id && p.account_id === null && p.deleted_at === null);
49571
- if (project && names.has(normalizeVocabularyName(String(alias2.name))))
49572
- namespace.add(`project:${project.id}`);
49633
+ const project2 = projects2.find((p) => p.id === alias2.aliasable_id && p.account_id === null && p.deleted_at === null);
49634
+ if (project2 && names.has(normalizeVocabularyName(String(alias2.name))))
49635
+ namespace.add(`project:${project2.id}`);
49573
49636
  }
49574
49637
  const descriptor_conflicts = ["key", "name"].filter((field4) => current.project[field4] !== manifest.project[field4]);
49575
49638
  const target = {
@@ -49596,7 +49659,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
49596
49659
  };
49597
49660
  }), "previewAnnotationSnapshot");
49598
49661
 
49599
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
49662
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
49600
49663
  var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
49601
49664
  const mappings = { ...bindings };
49602
49665
  const resolve = /* @__PURE__ */ __name((ref3) => {
@@ -49607,8 +49670,8 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
49607
49670
  throw new CliError("validation_error", "project annotation binding became unavailable");
49608
49671
  return thing;
49609
49672
  }, "resolve");
49610
- const organization = resolve(snapshot2.project.organization), owner = resolve(snapshot2.project.owner);
49611
- database.prepare("UPDATE projects SET description=?,type=?,scope=?,organization_id=?,owner_type=?,owner_id=?,status=?,created_at=?,updated_at=? WHERE id=?").run(snapshot2.project.description, snapshot2.project.type, snapshot2.project.scope, organization?.id ?? null, owner?.type ?? null, owner?.id ?? null, snapshot2.project.status, snapshot2.project.created_at, snapshot2.project.updated_at, projectId2);
49673
+ const organization2 = resolve(snapshot2.project.organization), owner = resolve(snapshot2.project.owner);
49674
+ database.prepare("UPDATE projects SET description=?,type=?,scope=?,organization_id=?,owner_type=?,owner_id=?,status=?,created_at=?,updated_at=? WHERE id=?").run(snapshot2.project.description, snapshot2.project.type, snapshot2.project.scope, organization2?.id ?? null, owner?.type ?? null, owner?.id ?? null, snapshot2.project.status, snapshot2.project.created_at, snapshot2.project.updated_at, projectId2);
49612
49675
  for (const alias2 of snapshot2.aliases)
49613
49676
  database.prepare("INSERT INTO aliases(aliasable_type,aliasable_id,account_id,name,name_folded,display,source,created_at,updated_at) VALUES('project',?,NULL,?,?,?,?,?,?)").run(projectId2, alias2.name, fold(alias2.name), Number(alias2.display), alias2.source, alias2.created_at, alias2.updated_at);
49614
49677
  for (const fact of snapshot2.facts) {
@@ -49638,7 +49701,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
49638
49701
  return mappings;
49639
49702
  }, "restoreAnnotationRecords");
49640
49703
 
49641
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
49704
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
49642
49705
  var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
49643
49706
  async preview(request) {
49644
49707
  const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
@@ -49668,7 +49731,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
49668
49731
  }
49669
49732
  }), "projectAnnotationStoreOver");
49670
49733
 
49671
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/domain/records.js
49734
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/domain/records.js
49672
49735
  import { createHash as createHash20 } from "node:crypto";
49673
49736
  var RECORDS_SCHEMA_VERSION = 1;
49674
49737
  var RECORD_OPERATIONS = ["upsert", "delete"];
@@ -49900,7 +49963,7 @@ var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
49900
49963
  return isObject2(header) ? { ...header, records: records2 } : header;
49901
49964
  }, "envelopeOfJsonl");
49902
49965
 
49903
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
49966
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
49904
49967
  var PROJECTED = {
49905
49968
  invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
49906
49969
  payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
@@ -50005,7 +50068,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
50005
50068
  refusal(`a record has one ${role}`, "record.relation-ambiguous");
50006
50069
  return { related, shares, missing: [...missing4] };
50007
50070
  }, "relatedOf");
50008
- const project = /* @__PURE__ */ __name((row2, source2) => {
50071
+ const project2 = /* @__PURE__ */ __name((row2, source2) => {
50009
50072
  const type = row2.type;
50010
50073
  const { related, shares, missing: missing4 } = relatedOf(Number(row2.id), type);
50011
50074
  if (missing4.length > 0)
@@ -50089,7 +50152,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
50089
50152
  const rows = sql2("SELECT DISTINCT r.* FROM record_relations rr JOIN records r ON r.id = rr.record_id WHERE rr.target_id = ? AND r.entity_id IS NULL AND r.deleted_at IS NULL AND r.type IN ('invoice', 'payment')").all(queue.shift());
50090
50153
  for (const row2 of rows) {
50091
50154
  try {
50092
- const done = write(database, () => project(row2, source2));
50155
+ const done = write(database, () => project2(row2, source2));
50093
50156
  if (done.proposed) {
50094
50157
  proposed.push(done.proposed);
50095
50158
  queue.push(Number(row2.id));
@@ -50154,7 +50217,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
50154
50217
  let projected = false;
50155
50218
  let flagged = stored3?.entity_id != null && stored3.projected_fingerprint !== fingerprint2;
50156
50219
  if (isProjected(record4.type) && stored3?.entity_id == null) {
50157
- const done = project({ id: id2, type: record4.type, fields: fields4, account_id: accountId }, source2);
50220
+ const done = project2({ id: id2, type: record4.type, fields: fields4, account_id: accountId }, source2);
50158
50221
  if (done.proposed)
50159
50222
  proposed.push(done.proposed);
50160
50223
  projected = done.proposed !== void 0;
@@ -50313,7 +50376,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
50313
50376
  };
50314
50377
  }, "recordStoreOver");
50315
50378
 
50316
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
50379
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
50317
50380
  var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
50318
50381
  const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
50319
50382
  let merged = { from: from2, to };
@@ -50326,7 +50389,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
50326
50389
  }, "markRange");
50327
50390
  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");
50328
50391
 
50329
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
50392
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
50330
50393
  var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
50331
50394
  var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
50332
50395
  chatId: String(row2.key).slice(prefix.length),
@@ -50347,7 +50410,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
50347
50410
  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);
50348
50411
  }, "setTaskAnalysisMark");
50349
50412
 
50350
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
50413
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
50351
50414
  var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
50352
50415
  var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
50353
50416
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
@@ -50357,7 +50420,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
50357
50420
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf4(account), JSON.stringify(until), now2);
50358
50421
  }, "setTaskRulesStop");
50359
50422
 
50360
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sync.js
50423
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sync.js
50361
50424
  var syncStoreOver = /* @__PURE__ */ __name((context) => {
50362
50425
  const { database } = context;
50363
50426
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
@@ -50416,7 +50479,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
50416
50479
  };
50417
50480
  }, "syncStoreOver");
50418
50481
 
50419
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/tags.js
50482
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/tags.js
50420
50483
  var tagsStoreOver = /* @__PURE__ */ __name((context) => {
50421
50484
  const { database } = context;
50422
50485
  return {
@@ -50438,7 +50501,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
50438
50501
  };
50439
50502
  }, "tagsStoreOver");
50440
50503
 
50441
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
50504
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
50442
50505
  var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
50443
50506
  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
50444
50507
  WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
@@ -50565,7 +50628,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
50565
50628
  dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
50566
50629
  }, "savePictureChunks");
50567
50630
 
50568
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
50631
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
50569
50632
  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,
50570
50633
  EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
50571
50634
  FROM messages m
@@ -50654,7 +50717,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
50654
50717
  return plain2(best(found2));
50655
50718
  }, "nearestMessages");
50656
50719
 
50657
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/vectors.js
50720
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/vectors.js
50658
50721
  var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
50659
50722
  const { database } = context;
50660
50723
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -50912,7 +50975,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
50912
50975
  embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
50913
50976
  }), "vectorsStoreOver");
50914
50977
 
50915
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
50978
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
50916
50979
  import { existsSync, readFileSync as readFileSync4 } from "node:fs";
50917
50980
  import { dirname as dirname2, join as join2 } from "node:path";
50918
50981
  var BOOKKEEPING = ["schema_migrations", "store_settings"];
@@ -51000,10 +51063,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
51000
51063
  }
51001
51064
  }, "lastBackup");
51002
51065
 
51003
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/providers.js
51066
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/providers.js
51004
51067
  var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
51005
51068
 
51006
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
51069
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
51007
51070
  var COUNTED_TABLES = [
51008
51071
  "accounts",
51009
51072
  "chats",
@@ -51088,7 +51151,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
51088
51151
  };
51089
51152
  }, "storeContents");
51090
51153
 
51091
- // node_modules/.pnpm/@wirecat+cli-core@0.581.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_36341de5bb3d58122cbf3036ff7c0d66/node_modules/@wirecat/cli-core/dist/store/store.js
51154
+ // node_modules/.pnpm/@wirecat+cli-core@0.582.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_97f64d51523dd4ecc03951217aefe0ba/node_modules/@wirecat/cli-core/dist/store/store.js
51092
51155
  var openStore = /* @__PURE__ */ __name(async (options = {}) => {
51093
51156
  const context = await openStoreContext(options);
51094
51157
  try {
@@ -51434,6 +51497,9 @@ export {
51434
51497
  proposerOfAction,
51435
51498
  assertGenericAction,
51436
51499
  involvementStoreOver,
51500
+ ORGANIZATIONS_QUERY,
51501
+ PROJECTS_QUERY,
51502
+ REMINDERS_QUERY,
51437
51503
  ORGANIZATION_KINDS,
51438
51504
  PROJECT_TYPES,
51439
51505
  SCOPES,