@wirecat/cli-template 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/bin/release +10 -3
  3. package/dist/bin/clidev.js +2 -2
  4. package/dist/bundle/{all-profiles-CCT2XPJL.js → all-profiles-I2I5Y47S.js} +7 -7
  5. package/dist/bundle/{anthropic-QLLP7EE4.js → anthropic-6KWLOH3O.js} +4 -4
  6. package/dist/bundle/{app-server-ELI5TGL7.js → app-server-WDHIM77I.js} +42 -39
  7. package/dist/bundle/{bun-C7JS2V7G.js → bun-NQS22GBW.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-OM72TCYT.js → bun-sqlite-ZHYZDAFU.js} +3 -3
  9. package/dist/bundle/{chunk-6VCFDEHT.js → chunk-43KXTQB6.js} +1 -1
  10. package/dist/bundle/{chunk-RGKXMVOZ.js → chunk-4DHYD37E.js} +3 -3
  11. package/dist/bundle/{chunk-2Y5NBD7U.js → chunk-64DNKCG6.js} +4 -4
  12. package/dist/bundle/{chunk-XKL5FRH3.js → chunk-6HV2ZUJ7.js} +3 -3
  13. package/dist/bundle/{chunk-ASO23RNM.js → chunk-6K7LOCZA.js} +76 -24
  14. package/dist/bundle/{chunk-LN53L2V5.js → chunk-ALOTPATU.js} +11 -11
  15. package/dist/bundle/{chunk-EQDVQN4E.js → chunk-AQGUIORH.js} +224 -223
  16. package/dist/bundle/{chunk-QLBS6OC2.js → chunk-CAX65NS4.js} +400 -295
  17. package/dist/bundle/{chunk-RUHNHEAF.js → chunk-CZB5RLXN.js} +3 -3
  18. package/dist/bundle/{chunk-SQOXYNKF.js → chunk-E5O6R3NL.js} +1 -1
  19. package/dist/bundle/{chunk-GG5PXNMH.js → chunk-EMPBFRAG.js} +28 -25
  20. package/dist/bundle/{chunk-FF3AGTHY.js → chunk-ERHKHYWL.js} +6 -6
  21. package/dist/bundle/{chunk-S465TCR3.js → chunk-F2KGCZQP.js} +8 -8
  22. package/dist/bundle/{chunk-QJS4WWYK.js → chunk-FGQC6DQK.js} +63 -63
  23. package/dist/bundle/{chunk-AUVPTFUS.js → chunk-FPC4ESDC.js} +1 -1
  24. package/dist/bundle/{chunk-BXZRTMXA.js → chunk-G7JA7YXK.js} +5 -5
  25. package/dist/bundle/{chunk-BOCIYBBO.js → chunk-GBXTIWAE.js} +20 -20
  26. package/dist/bundle/{chunk-O6PBO4BU.js → chunk-HMP5CI4F.js} +4 -2
  27. package/dist/bundle/{chunk-R5IY4O25.js → chunk-I5HN34YA.js} +4 -4
  28. package/dist/bundle/{chunk-WRLOK7XC.js → chunk-IKFNRGSZ.js} +3 -3
  29. package/dist/bundle/{chunk-KRXN3FV3.js → chunk-IKGARE4J.js} +1 -1
  30. package/dist/bundle/{chunk-YIH3PYWJ.js → chunk-JECGG4TM.js} +1 -1
  31. package/dist/bundle/{chunk-MLSN3UP4.js → chunk-KMYKWHFH.js} +26 -26
  32. package/dist/bundle/{chunk-WKUJCPSP.js → chunk-KSABL7M2.js} +43 -43
  33. package/dist/bundle/{chunk-GUCMIUNB.js → chunk-KWQSDU3D.js} +2 -2
  34. package/dist/bundle/{chunk-6PHTRAZA.js → chunk-L4U3V7OU.js} +1 -1
  35. package/dist/bundle/{chunk-UW4PJZVJ.js → chunk-MJSZEF7M.js} +167 -156
  36. package/dist/bundle/{chunk-R5CPFSPI.js → chunk-MVWHCXYA.js} +7 -7
  37. package/dist/bundle/{chunk-XS56LIQ7.js → chunk-NVALUKZU.js} +4 -4
  38. package/dist/bundle/{chunk-AKUMR7PE.js → chunk-Q5J3LKRL.js} +2 -2
  39. package/dist/bundle/{chunk-33JGD2CR.js → chunk-QHXHJ3BK.js} +3 -3
  40. package/dist/bundle/{chunk-7OQF5ZMN.js → chunk-RKZJ7ZKU.js} +1 -1
  41. package/dist/bundle/{chunk-3VVIEZRY.js → chunk-RQPDYAHW.js} +2 -2
  42. package/dist/bundle/{chunk-HVAEHUSZ.js → chunk-RSCHWXF5.js} +2 -2
  43. package/dist/bundle/{chunk-WQBBSVZM.js → chunk-RYBCV3CX.js} +2 -2
  44. package/dist/bundle/{chunk-RT46AWIH.js → chunk-T6ZLWN7E.js} +1 -1
  45. package/dist/bundle/{chunk-QVPTZDRA.js → chunk-T7657XL5.js} +2 -2
  46. package/dist/bundle/{chunk-DVLM23HB.js → chunk-TH6AVNNH.js} +2 -2
  47. package/dist/bundle/{chunk-X44ZT64I.js → chunk-TMFSNTR2.js} +3 -3
  48. package/dist/bundle/{chunk-J2RUBXCI.js → chunk-UESBF7HN.js} +6 -6
  49. package/dist/bundle/{chunk-ZRNBKTPP.js → chunk-UGPJDNVX.js} +26 -26
  50. package/dist/bundle/{chunk-LFLN6PVS.js → chunk-UXLB5I2B.js} +4 -4
  51. package/dist/bundle/{chunk-ITPFCKCL.js → chunk-VDV3WS4O.js} +13 -13
  52. package/dist/bundle/{chunk-URPKIONS.js → chunk-VDXS7GR7.js} +8 -8
  53. package/dist/bundle/{chunk-E4KQOKQ5.js → chunk-YLN6DBJV.js} +1 -1
  54. package/dist/bundle/{chunk-SQKP6V4S.js → chunk-YMGJJG3W.js} +17 -13
  55. package/dist/bundle/clidev.js +3 -3
  56. package/dist/bundle/{command-contract-RV5ZOEAT.js → command-contract-JGOS34WS.js} +11 -11
  57. package/dist/bundle/{decode-V7HNHZBC.js → decode-HHZMCEZF.js} +3 -3
  58. package/dist/bundle/{echarts-Y42YP2OL.js → echarts-LYV2DLKU.js} +2 -2
  59. package/dist/bundle/{embed-JSQZL7JF.js → embed-BPN3SCZ7.js} +4 -4
  60. package/dist/bundle/{embedder-7BHRCXWL.js → embedder-NZAL7DVD.js} +7 -7
  61. package/dist/bundle/{first-run-BJ36KGST.js → first-run-OKN7MVLP.js} +8 -8
  62. package/dist/bundle/first-screen-6XGF2AKF.js +26 -0
  63. package/dist/bundle/{instructions-UWERND54.js → instructions-N2HYCEWN.js} +1 -1
  64. package/dist/bundle/{mcp-P4FSBSRS.js → mcp-OGWFYUDR.js} +2 -2
  65. package/dist/bundle/{node-PZDNPKN7.js → node-MIHFH7T4.js} +2 -2
  66. package/dist/bundle/{node-sqlite-4F5NLRNT.js → node-sqlite-FF2SFXPZ.js} +4 -4
  67. package/dist/bundle/{oauth-VDXNA3DK.js → oauth-72XUHG3K.js} +5 -5
  68. package/dist/bundle/{open-EUJRQQNS.js → open-HL6SSRKY.js} +3 -3
  69. package/dist/bundle/{openai-EIBV2K72.js → openai-DSWDZHQA.js} +12 -12
  70. package/dist/bundle/{process-XD5ZIFIL.js → process-5EQF2SZN.js} +1 -1
  71. package/dist/bundle/{program-TJTVMIOX.js → program-QPXFRATG.js} +386 -290
  72. package/dist/bundle/{prompt-LYUZNHDK.js → prompt-VVRJDKQK.js} +3 -3
  73. package/dist/bundle/{recognize-LQMHLOD5.js → recognize-T6RIVTQL.js} +2 -2
  74. package/dist/bundle/{remote-34HUWSZI.js → remote-7Z3C3FOG.js} +5 -5
  75. package/dist/bundle/{rerank-ONBASQ5Z.js → rerank-RUFDP7NP.js} +5 -5
  76. package/dist/bundle/{serve-UJ7FDYAM.js → serve-YZQDRGZW.js} +7 -7
  77. package/dist/bundle/server-NDSKEME6.js +52 -0
  78. package/dist/bundle/{server-GNT76BXM.js → server-WSFS656N.js} +28 -28
  79. package/dist/bundle/{state-IW5OO6IZ.js → state-GOQ4J5RS.js} +4 -4
  80. package/dist/bundle/{store-55UB27H2.js → store-KRGXTPKQ.js} +10 -10
  81. package/dist/bundle/store-maintenance-command-FNNZ5YCX.js +42 -0
  82. package/dist/version.d.ts +1 -1
  83. package/dist/version.js +1 -1
  84. package/docs/dev/skills/release/SKILL.md +3 -2
  85. package/kit/dist/new.js +2 -2
  86. package/package.json +4 -4
  87. package/pnpm-workspace.yaml +2 -0
  88. package/src/run-scope.test.ts +31 -0
  89. package/src/version.ts +1 -1
  90. package/dist/bundle/first-screen-5YHQVNY4.js +0 -26
  91. package/dist/bundle/server-J4YIXKMI.js +0 -52
  92. package/dist/bundle/store-maintenance-command-BLDKUZ3L.js +0 -42
@@ -12,7 +12,7 @@ import {
12
12
  fold,
13
13
  normalize,
14
14
  parseStemmers
15
- } from "./chunk-URPKIONS.js";
15
+ } from "./chunk-VDXS7GR7.js";
16
16
  import {
17
17
  CHAT_MESSAGES_READ,
18
18
  FACT_STATUSES,
@@ -112,22 +112,23 @@ import {
112
112
  validateQuery,
113
113
  walkQuery,
114
114
  zonedMoment
115
- } from "./chunk-QJS4WWYK.js";
115
+ } from "./chunk-FGQC6DQK.js";
116
116
  import {
117
117
  DEFAULT_TASK_CATEGORIES,
118
118
  sharedConfigPath,
119
119
  storedTaskCategories,
120
120
  taskCategoriesReader
121
- } from "./chunk-BXZRTMXA.js";
121
+ } from "./chunk-G7JA7YXK.js";
122
122
  import {
123
123
  quietSqliteWarning,
124
124
  storeCapable
125
- } from "./chunk-FF3AGTHY.js";
125
+ } from "./chunk-ERHKHYWL.js";
126
126
  import {
127
127
  PRAGMAS,
128
128
  TIME_LIMIT_FUNCTION,
129
- TimeLimitReached
130
- } from "./chunk-O6PBO4BU.js";
129
+ TimeLimitReached,
130
+ isQueryOnly
131
+ } from "./chunk-HMP5CI4F.js";
131
132
  import {
132
133
  SQLiteTable,
133
134
  TableAliasProxyHandler,
@@ -152,11 +153,11 @@ import {
152
153
  sql,
153
154
  sqliteTable,
154
155
  text
155
- } from "./chunk-6PHTRAZA.js";
156
+ } from "./chunk-L4U3V7OU.js";
156
157
  import {
157
158
  refuseOwnerStoreInTests,
158
159
  storePath
159
- } from "./chunk-AKUMR7PE.js";
160
+ } from "./chunk-Q5J3LKRL.js";
160
161
  import {
161
162
  CliError,
162
163
  array,
@@ -176,7 +177,7 @@ import {
176
177
  singleLine,
177
178
  strictObject,
178
179
  string
179
- } from "./chunk-MLSN3UP4.js";
180
+ } from "./chunk-KMYKWHFH.js";
180
181
  import {
181
182
  resolveFrom
182
183
  } from "./chunk-Y5E2WNWB.js";
@@ -9923,7 +9924,7 @@ var require_cjs = __commonJS({
9923
9924
  }
9924
9925
  });
9925
9926
 
9926
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/account-store.js
9927
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/account-store.js
9927
9928
  var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
9928
9929
  const methods = whole;
9929
9930
  return Object.fromEntries(Object.keys(keyed).map((name) => [
@@ -10051,7 +10052,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
10051
10052
  };
10052
10053
  }, "bindAccount");
10053
10054
 
10054
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/locator.js
10055
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/locator.js
10055
10056
  var SCHEME = "msg:";
10056
10057
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
10057
10058
  var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
@@ -10065,7 +10066,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
10065
10066
  return { provider, account, chat: chat2, message: message2 };
10066
10067
  }, "parseLocator");
10067
10068
 
10068
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/references.js
10069
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/references.js
10069
10070
  var SIMPLE_REFERENCES = [
10070
10071
  "note",
10071
10072
  "document",
@@ -10216,7 +10217,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
10216
10217
  return match !== null && byPrefix.has(match[1]);
10217
10218
  }, "looksLikeReference");
10218
10219
 
10219
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/providers.js
10220
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/providers.js
10220
10221
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
10221
10222
  var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
10222
10223
  var PROVIDERS = [
@@ -10332,7 +10333,7 @@ var providerNamed = /* @__PURE__ */ __name((word2) => {
10332
10333
  var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
10333
10334
  var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
10334
10335
 
10335
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/query.js
10336
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/query.js
10336
10337
  var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
10337
10338
  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");
10338
10339
  var fail = /* @__PURE__ */ __name((message2) => {
@@ -10355,7 +10356,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
10355
10356
  return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
10356
10357
  }, "sourceOf");
10357
10358
 
10358
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/account-list.js
10359
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/account-list.js
10359
10360
  var ACCOUNT_GROUPS = "accountGroups";
10360
10361
  var ACCOUNT_GROUPS_SETTING = "account_groups";
10361
10362
  var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
@@ -10543,7 +10544,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
10543
10544
  return { accounts: [...chosen.values()], skipped };
10544
10545
  }, "fitting");
10545
10546
 
10546
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
10547
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
10547
10548
  var IndexBuilderOn = class {
10548
10549
  static {
10549
10550
  __name(this, "IndexBuilderOn");
@@ -10738,7 +10739,7 @@ function alias(table, alias2) {
10738
10739
  }
10739
10740
  __name(alias, "alias");
10740
10741
 
10741
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
10742
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
10742
10743
  var ENTITY_TABLES = {
10743
10744
  account: "accounts",
10744
10745
  attachment: "attachments",
@@ -10784,7 +10785,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
10784
10785
  return { table, pointer, type, count, known: known2 };
10785
10786
  }).filter(({ count }) => count > 0)), "orphanPointers");
10786
10787
 
10787
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
10788
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
10788
10789
  var canonicalTags = sqliteTable("canonical_tags", {
10789
10790
  id: integer("id").primaryKey(),
10790
10791
  name: text("name").notNull().unique(),
@@ -10793,7 +10794,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
10793
10794
  updatedAt: integer("updated_at").notNull()
10794
10795
  });
10795
10796
 
10796
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
10797
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
10797
10798
  var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
10798
10799
  sourceKey: text("source_key").notNull(),
10799
10800
  collection: text("collection").notNull(),
@@ -10803,13 +10804,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
10803
10804
  createdAt: integer("created_at").notNull()
10804
10805
  }, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
10805
10806
 
10806
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
10807
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
10807
10808
  var documentIndexPending = sqliteTable("document_index_pending", {
10808
10809
  id: integer("id").notNull(),
10809
10810
  indexableType: text("indexable_type").notNull()
10810
10811
  }, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
10811
10812
 
10812
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
10813
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
10813
10814
  var tagRedirects = sqliteTable("tag_redirects", {
10814
10815
  sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
10815
10816
  survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
@@ -10835,7 +10836,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
10835
10836
  index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
10836
10837
  ]);
10837
10838
 
10838
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
10839
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
10839
10840
  var accounts = sqliteTable("accounts", {
10840
10841
  id: integer("id").primaryKey(),
10841
10842
  provider: text("provider").notNull(),
@@ -12265,6 +12266,21 @@ var pipelineStageChanges = sqliteTable("pipeline_stage_changes", {
12265
12266
  index("pipeline_stage_changes_by_from_stage_id").on(table.fromStageId),
12266
12267
  index("pipeline_stage_changes_by_to_stage_id").on(table.toStageId)
12267
12268
  ]);
12269
+ var crmFields = sqliteTable("crm_fields", {
12270
+ id: integer("id").primaryKey(),
12271
+ accountId: integer("account_id").notNull().references(() => accounts.id),
12272
+ kind: text("kind").notNull(),
12273
+ code: text("code").notNull(),
12274
+ label: text("label"),
12275
+ type: text("type").notNull(),
12276
+ multiple: integer("multiple").notNull(),
12277
+ filterable: integer("filterable").notNull(),
12278
+ options: text("options"),
12279
+ position: integer("position").notNull(),
12280
+ createdAt: integer("created_at").notNull(),
12281
+ updatedAt: integer("updated_at").notNull(),
12282
+ deletedAt: integer("deleted_at")
12283
+ }, (table) => [unique().on(table.accountId, table.kind, table.code)]);
12268
12284
  var records = sqliteTable("records", {
12269
12285
  id: integer("id").primaryKey(),
12270
12286
  accountId: integer("account_id").notNull().references(() => accounts.id),
@@ -12606,7 +12622,7 @@ var storeSettings = sqliteTable("store_settings", {
12606
12622
  at: integer("at").notNull()
12607
12623
  });
12608
12624
 
12609
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
12625
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
12610
12626
  var ARMS = [
12611
12627
  [
12612
12628
  "message",
@@ -12733,7 +12749,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
12733
12749
  return recomputed;
12734
12750
  }, "drainInvolvementQueue");
12735
12751
 
12736
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/mentions.js
12752
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/mentions.js
12737
12753
  import { domainToUnicode } from "node:url";
12738
12754
 
12739
12755
  // node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
@@ -22755,7 +22771,7 @@ var oa = /* @__PURE__ */ __name((e) => {
22755
22771
  }, "oa");
22756
22772
  var na = { parse: O, get: aa, isValid: oa };
22757
22773
 
22758
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
22774
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
22759
22775
  var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
22760
22776
  var ID = /^[\w-]{10,}$/;
22761
22777
  var trimUrl = /* @__PURE__ */ __name((url) => {
@@ -22796,7 +22812,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
22796
22812
  return { url, documentId: googleDocumentId(url) };
22797
22813
  }), "googleDocumentLinks");
22798
22814
 
22799
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
22815
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
22800
22816
  var PHONE_PLANS = [
22801
22817
  {
22802
22818
  country: "us",
@@ -23176,7 +23192,7 @@ var PHONE_PLANS = [
23176
23192
  }
23177
23193
  ];
23178
23194
 
23179
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/phones.js
23195
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/phones.js
23180
23196
  var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
23181
23197
  var DEFAULT_PHONE_COUNTRIES = ["ru"];
23182
23198
  var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
@@ -23217,7 +23233,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
23217
23233
  return void 0;
23218
23234
  }, "nationalPhone");
23219
23235
 
23220
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/places.js
23236
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/places.js
23221
23237
  var BEFORE = [
23222
23238
  [/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
23223
23239
  [/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
@@ -23477,7 +23493,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
23477
23493
  return found2.sort((a, b) => a.start - b.start);
23478
23494
  }, "findPlaces");
23479
23495
 
23480
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/mentions.js
23496
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/mentions.js
23481
23497
  var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
23482
23498
  var MENTION_VERSIONS = {
23483
23499
  phone: 1,
@@ -23667,7 +23683,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
23667
23683
  };
23668
23684
  }, "typedPhone");
23669
23685
 
23670
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/first-names.js
23686
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/first-names.js
23671
23687
  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";
23672
23688
  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";
23673
23689
  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";
@@ -23675,7 +23691,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
23675
23691
  var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
23676
23692
  var NAME_WORDS = WORDS.split(" ");
23677
23693
 
23678
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/person-names.js
23694
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/person-names.js
23679
23695
  var LATIN_TO_CYRILLIC = {
23680
23696
  shch: "\u0449",
23681
23697
  sch: "\u0449",
@@ -23883,7 +23899,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
23883
23899
  return found2;
23884
23900
  }, "findUnknownNames");
23885
23901
 
23886
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/attachments.js
23902
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/attachments.js
23887
23903
  var NOT_FILES = /* @__PURE__ */ new Set([
23888
23904
  "webpage",
23889
23905
  "share",
@@ -23923,7 +23939,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
23923
23939
  });
23924
23940
  }, "matchDownloads");
23925
23941
 
23926
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
23942
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
23927
23943
  var QUERY_VERSION = 1;
23928
23944
  var QUERY_LIMITS2 = {
23929
23945
  ...QUERY_LIMITS,
@@ -23959,7 +23975,7 @@ function exhausted(budget) {
23959
23975
  }
23960
23976
  __name(exhausted, "exhausted");
23961
23977
 
23962
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
23978
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
23963
23979
  var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
23964
23980
  var literal2 = /* @__PURE__ */ __name((c) => ({
23965
23981
  kind: "char",
@@ -24359,7 +24375,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
24359
24375
  return out;
24360
24376
  }, "foldRegex");
24361
24377
 
24362
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
24378
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
24363
24379
  var PRESET_VERSION = 1;
24364
24380
  var PRESETS = {
24365
24381
  password: {
@@ -24413,7 +24429,7 @@ var PRESETS = {
24413
24429
  }
24414
24430
  };
24415
24431
 
24416
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
24432
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
24417
24433
  var FIELD_VERSION = 2;
24418
24434
  var UNITS = {
24419
24435
  "": 1,
@@ -24874,12 +24890,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
24874
24890
  return validateFields(parsed3.output);
24875
24891
  }, "validateAst");
24876
24892
 
24877
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
24893
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
24878
24894
  var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
24879
24895
  var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
24880
24896
  var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
24881
24897
 
24882
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
24898
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
24883
24899
  var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
24884
24900
  var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
24885
24901
  var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
@@ -24903,7 +24919,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
24903
24919
  };
24904
24920
  }, "linkMatch");
24905
24921
 
24906
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
24922
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
24907
24923
  var SETTING = "phoneCountries";
24908
24924
  var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
24909
24925
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
@@ -24934,7 +24950,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
24934
24950
  return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
24935
24951
  }, "valueMatch");
24936
24952
 
24937
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
24953
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
24938
24954
  var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
24939
24955
  if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
24940
24956
  throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
@@ -24962,7 +24978,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
24962
24978
  return 2 * intersection2 / (aa2.size + bb.size);
24963
24979
  }, "vocabularySimilarity");
24964
24980
 
24965
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
24981
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
24966
24982
  import { createHash } from "node:crypto";
24967
24983
  var folded2 = /* @__PURE__ */ __name((name) => {
24968
24984
  try {
@@ -25028,7 +25044,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
25028
25044
  });
25029
25045
  }, "guardTagCreation");
25030
25046
 
25031
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
25047
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
25032
25048
  var invalid2 = /* @__PURE__ */ __name((message2) => {
25033
25049
  throw new CliError("validation_error", message2);
25034
25050
  }, "invalid");
@@ -25105,7 +25121,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
25105
25121
  };
25106
25122
  }, "createTagRedirectIndex");
25107
25123
 
25108
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
25124
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
25109
25125
  var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
25110
25126
  const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
25111
25127
  if (!row2)
@@ -25133,7 +25149,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
25133
25149
  return snapshot2;
25134
25150
  }, "tagRedirectSnapshot");
25135
25151
 
25136
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
25152
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
25137
25153
  import { createHash as createHash2 } from "node:crypto";
25138
25154
  var TASK_KEY_PREFIXES = {
25139
25155
  question: "Q",
@@ -25161,7 +25177,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
25161
25177
  return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
25162
25178
  }, "taskAccountOf");
25163
25179
 
25164
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
25180
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
25165
25181
  var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
25166
25182
  var REFERABLE = {
25167
25183
  note: { tombstone: true },
@@ -25329,7 +25345,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
25329
25345
  return row2 ? String(row2.id ?? row2.key) : void 0;
25330
25346
  }, "taskIdOf");
25331
25347
 
25332
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
25348
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
25333
25349
  var toMs = /* @__PURE__ */ __name((iso14) => {
25334
25350
  if (iso14 === null || iso14 === void 0)
25335
25351
  return null;
@@ -25343,7 +25359,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
25343
25359
  var DELIVERY = { delivered: 1, read: 2 };
25344
25360
  var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
25345
25361
 
25346
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
25362
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
25347
25363
  var TAG_KINDS = ["tag", "topic"];
25348
25364
  var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
25349
25365
  var TAG_TYPE = {
@@ -25546,7 +25562,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
25546
25562
  return result;
25547
25563
  }, "tagsOf");
25548
25564
 
25549
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
25565
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
25550
25566
  var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
25551
25567
  var SPEECH = speech("att");
25552
25568
  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");
@@ -25910,7 +25926,7 @@ var FIELD_COMPILERS = {
25910
25926
  subject
25911
25927
  };
25912
25928
 
25913
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
25929
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
25914
25930
  var placeOf = /* @__PURE__ */ __name((database) => {
25915
25931
  const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
25916
25932
  const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
@@ -25926,7 +25942,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
25926
25942
  };
25927
25943
  }, "placeOf");
25928
25944
 
25929
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
25945
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
25930
25946
  var DRAIN_ON_WRITE = 500;
25931
25947
  var METHOD = "rules";
25932
25948
  var telegramLink = /* @__PURE__ */ __name((database) => {
@@ -26089,7 +26105,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
26089
26105
  return queued.length;
26090
26106
  }, "drainMentions");
26091
26107
 
26092
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
26108
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
26093
26109
  var indexRow = /* @__PURE__ */ __name((database, name) => {
26094
26110
  const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
26095
26111
  if (!exists2)
@@ -26097,7 +26113,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
26097
26113
  return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
26098
26114
  }, "indexRow");
26099
26115
 
26100
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
26116
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
26101
26117
  var INDEX = "message_stems";
26102
26118
  var SETTING2 = "searchStemmers";
26103
26119
  var DRAIN_ON_WRITE2 = 500;
@@ -26219,7 +26235,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
26219
26235
  };
26220
26236
  }, "stemmerCache");
26221
26237
 
26222
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
26238
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
26223
26239
  var SQLITE_BUSY = 5;
26224
26240
  var pause = new Int32Array(new SharedArrayBuffer(4));
26225
26241
  var isBusy = /* @__PURE__ */ __name((error) => {
@@ -26314,7 +26330,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
26314
26330
  }
26315
26331
  }, "read");
26316
26332
 
26317
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
26333
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
26318
26334
  var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
26319
26335
  coalesce(CASE k.chunkable_type
26320
26336
  WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
@@ -26456,7 +26472,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
26456
26472
  }, "dropUnusedVectors");
26457
26473
  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");
26458
26474
 
26459
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
26475
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
26460
26476
  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({
26461
26477
  target: [accounts.provider, accounts.externalId],
26462
26478
  set: {
@@ -26528,6 +26544,7 @@ var purgeAccount = /* @__PURE__ */ __name(({ orm, database }, accountKey) => {
26528
26544
  orm.delete(accountIdentities).where(eq(accountIdentities.accountId, accountKey)).run();
26529
26545
  orm.update(projects).set({ accountId: null }).where(eq(projects.accountId, accountKey)).run();
26530
26546
  orm.run(sql`DELETE FROM files WHERE account_id = ${accountKey}`);
26547
+ orm.run(sql`DELETE FROM crm_fields WHERE account_id = ${accountKey}`);
26531
26548
  const recordsOf = sql`(SELECT id FROM records WHERE account_id = ${accountKey})`;
26532
26549
  orm.run(sql`DELETE FROM record_relations WHERE record_id IN ${recordsOf} OR target_id IN ${recordsOf}`);
26533
26550
  orm.run(sql`DELETE FROM records WHERE account_id = ${accountKey}`);
@@ -26565,7 +26582,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
26565
26582
  AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
26566
26583
  }, "dropOrphanPeople");
26567
26584
 
26568
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
26585
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
26569
26586
  var FOLDED = [
26570
26587
  { table: "tasks", column: "title" },
26571
26588
  { table: "tasks", column: "close_reason" },
@@ -26602,7 +26619,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
26602
26619
  return filled2;
26603
26620
  }, "fillFolded");
26604
26621
 
26605
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
26622
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
26606
26623
  var HISTORY_KEY = "$history";
26607
26624
  var objectOf = /* @__PURE__ */ __name((text6) => {
26608
26625
  if (typeof text6 !== "string")
@@ -26678,7 +26695,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
26678
26695
  return rest;
26679
26696
  }, "withoutHistory");
26680
26697
 
26681
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
26698
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
26682
26699
  import { createHash as createHash3 } from "node:crypto";
26683
26700
  var CHUNK_CHARS = 1200;
26684
26701
  var CHUNK_OVERLAP = 150;
@@ -26783,7 +26800,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
26783
26800
  return chunks2;
26784
26801
  }, "cutChunks");
26785
26802
 
26786
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/task-signature.js
26803
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/task-signature.js
26787
26804
  var DAY = 864e5;
26788
26805
  var CURRENCY = [
26789
26806
  [/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
@@ -26909,7 +26926,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
26909
26926
  return best?.day ?? null;
26910
26927
  }, "dueDayOf");
26911
26928
 
26912
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
26929
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
26913
26930
  var DAY2 = 864e5;
26914
26931
  var STOP_WORDS = new Set([
26915
26932
  // Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
@@ -27064,7 +27081,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
27064
27081
  ...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
27065
27082
  })).sort((a, b) => b.score - a.score), "rankCandidates");
27066
27083
 
27067
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
27084
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
27068
27085
  var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
27069
27086
  r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
27070
27087
  JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
@@ -27335,7 +27352,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
27335
27352
  };
27336
27353
  }, "readiness");
27337
27354
 
27338
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
27355
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
27339
27356
  var DOCUMENT_PICTURE = "document_picture";
27340
27357
  var SCAN_PAGE2 = 5e3;
27341
27358
  var idOf = /* @__PURE__ */ __name((ref3) => {
@@ -27398,7 +27415,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
27398
27415
  }, "nearestPictures")
27399
27416
  }), "documentPicturesOver");
27400
27417
 
27401
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
27418
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
27402
27419
  var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
27403
27420
  const literal4 = escaped2 ?? plain2 ?? "";
27404
27421
  return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
@@ -27463,7 +27480,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
27463
27480
  var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
27464
27481
  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");
27465
27482
 
27466
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
27483
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
27467
27484
  var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
27468
27485
  var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
27469
27486
  var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
@@ -27553,7 +27570,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
27553
27570
  });
27554
27571
  }, "linkMeeting");
27555
27572
 
27556
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
27573
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
27557
27574
  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), ''))";
27558
27575
  var UNSEARCHED_EVENT_TYPES = [
27559
27576
  "working-location",
@@ -27738,6 +27755,8 @@ var writer2 = /* @__PURE__ */ __name((database, corpus, stemmer) => {
27738
27755
  };
27739
27756
  }, "writer");
27740
27757
  var drainCorpus = /* @__PURE__ */ __name((database, corpus, stemmerFor2, { batch = 200, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
27758
+ if (isQueryOnly(database))
27759
+ return 0;
27741
27760
  if (corpus.type === "email" || corpus.type === "document")
27742
27761
  database.prepare(`UPDATE chunks SET account_id = (SELECT account_id FROM ${corpus.table} WHERE id = chunks.chunkable_id)
27743
27762
  WHERE chunkable_type = ? AND account_id IS NULL`).run(corpus.type);
@@ -27783,7 +27802,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
27783
27802
  return true;
27784
27803
  }, "resetNoteIndex");
27785
27804
 
27786
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
27805
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
27787
27806
  var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
27788
27807
  var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
27789
27808
  for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
@@ -27802,7 +27821,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
27802
27821
  }
27803
27822
  }, "resolvePersonLinks");
27804
27823
 
27805
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
27824
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
27806
27825
  var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
27807
27826
  var prepare = /* @__PURE__ */ __name((orm) => ({
27808
27827
  find: orm.select({
@@ -28027,7 +28046,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
28027
28046
  }, "meetingIdentityPk");
28028
28047
  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");
28029
28048
 
28030
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
28049
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
28031
28050
  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");
28032
28051
  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");
28033
28052
  var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
@@ -28307,7 +28326,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
28307
28326
  }
28308
28327
  }, "replaceAutoTags");
28309
28328
 
28310
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/counters.js
28329
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/counters.js
28311
28330
  var COUNTER_FIELDS = ["views", "reactions", "comments"];
28312
28331
  var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
28313
28332
  var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
@@ -28326,7 +28345,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
28326
28345
  return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
28327
28346
  }, "counterFreshness");
28328
28347
 
28329
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/context/evidence.js
28348
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/context/evidence.js
28330
28349
  import { createHash as createHash4 } from "node:crypto";
28331
28350
  var CONTEXT_MAX_READ_BYTES = 262144;
28332
28351
  var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
@@ -28424,7 +28443,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
28424
28443
  return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
28425
28444
  }, "contextEvidenceRequest");
28426
28445
 
28427
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
28446
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
28428
28447
  var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
28429
28448
  var ACTIVITY = `
28430
28449
  SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
@@ -28554,7 +28573,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
28554
28573
  threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
28555
28574
  }), "mailActivity");
28556
28575
 
28557
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
28576
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
28558
28577
  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");
28559
28578
  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;
28560
28579
  var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
@@ -28635,7 +28654,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
28635
28654
  return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
28636
28655
  }, "mailCore");
28637
28656
 
28638
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
28657
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
28639
28658
  var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
28640
28659
  var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
28641
28660
  k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
@@ -28745,7 +28764,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
28745
28764
  return emails3 + threads;
28746
28765
  }, "drainEmailIndex");
28747
28766
 
28748
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
28767
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
28749
28768
  var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
28750
28769
  SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
28751
28770
  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,
@@ -28843,7 +28862,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
28843
28862
  var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
28844
28863
  SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
28845
28864
 
28846
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
28865
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
28847
28866
  var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
28848
28867
  emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
28849
28868
  last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
@@ -28893,7 +28912,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
28893
28912
  return threads.length;
28894
28913
  }, "markEmailsRestored");
28895
28914
 
28896
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
28915
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
28897
28916
  var MAIL_PIECE_ROWS = `SELECT p.id, p.content_hash AS hash, p.type, p.owner, p.position, p.email_id AS email, v.vector
28898
28917
  FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
28899
28918
  WHERE p.account_id = ?
@@ -28953,7 +28972,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
28953
28972
  }, "indexedMailPieces");
28954
28973
  var nearestMailPieces = /* @__PURE__ */ __name((database, model, query, filter, depth) => (filter.threadExternalId === void 0 ? indexedMailPieces(database, model, query, filter, depth) : void 0) ?? scannedMailPieces(database, model, query, filter), "nearestMailPieces");
28955
28974
 
28956
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
28975
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
28957
28976
  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");
28958
28977
  var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
28959
28978
  var ruleOf = /* @__PURE__ */ __name((row2) => ({
@@ -29020,7 +29039,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
29020
29039
  }
29021
29040
  }), "mailRulesOver");
29022
29041
 
29023
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
29042
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
29024
29043
  var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
29025
29044
  database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
29026
29045
  VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
@@ -29028,7 +29047,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
29028
29047
  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);
29029
29048
  }, "reviewLink");
29030
29049
 
29031
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
29050
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
29032
29051
  function checkMeetingCancelled(signal) {
29033
29052
  if (!signal?.aborted)
29034
29053
  return;
@@ -29039,7 +29058,7 @@ function checkMeetingCancelled(signal) {
29039
29058
  }
29040
29059
  __name(checkMeetingCancelled, "checkMeetingCancelled");
29041
29060
 
29042
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
29061
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
29043
29062
  var meetingOf = /* @__PURE__ */ __name((row2) => ({
29044
29063
  id: Number(row2.id),
29045
29064
  accountId: Number(row2.account_id),
@@ -29089,7 +29108,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
29089
29108
  createdAt: Number(row2.created_at)
29090
29109
  }), "transcriptRowOf");
29091
29110
 
29092
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
29111
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
29093
29112
  var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
29094
29113
  var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
29095
29114
  var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
@@ -29256,7 +29275,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
29256
29275
  }
29257
29276
  }), "meetingReadsOver");
29258
29277
 
29259
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
29278
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
29260
29279
  var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
29261
29280
  const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
29262
29281
  const params = [input.accountId];
@@ -29299,7 +29318,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
29299
29318
  return { clauses, params };
29300
29319
  }, "meetingSelectionSql");
29301
29320
 
29302
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
29321
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
29303
29322
  var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
29304
29323
  async meetingChatLines(input) {
29305
29324
  checkMeetingCancelled(input.signal);
@@ -29327,7 +29346,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
29327
29346
  }
29328
29347
  }), "meetingChatLinesOver");
29329
29348
 
29330
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
29349
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
29331
29350
  var MESSAGE_FIELDS = {
29332
29351
  pk: messages.id,
29333
29352
  nativeId: messages.externalId,
@@ -29498,7 +29517,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
29498
29517
  storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
29499
29518
  }), "chatActivity");
29500
29519
 
29501
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
29520
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
29502
29521
  var HIT_FIELDS = {
29503
29522
  ...MESSAGE_FIELDS,
29504
29523
  chatTitle: sql`${chats.title}`.as("chat_title"),
@@ -29597,7 +29616,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
29597
29616
  };
29598
29617
  }, "directReplies");
29599
29618
 
29600
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
29619
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
29601
29620
  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");
29602
29621
  var required = /* @__PURE__ */ __name((context, ref3) => {
29603
29622
  const found2 = identityRow(context, ref3);
@@ -29728,7 +29747,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
29728
29747
  }, "mentioning");
29729
29748
  var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
29730
29749
 
29731
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
29750
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
29732
29751
  var missing2 = /* @__PURE__ */ __name(() => {
29733
29752
  throw new CliError("not_found", "Meeting, participant or selected target not found");
29734
29753
  }, "missing");
@@ -29850,7 +29869,7 @@ function meetingContextLinksOver(context) {
29850
29869
  }
29851
29870
  __name(meetingContextLinksOver, "meetingContextLinksOver");
29852
29871
 
29853
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
29872
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
29854
29873
  var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
29855
29874
  var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
29856
29875
  var summaryOf = /* @__PURE__ */ __name((row2) => ({
@@ -29879,7 +29898,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
29879
29898
  return row2 ? summaryText(summaryOf(row2)) : null;
29880
29899
  }, "indexedText");
29881
29900
 
29882
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
29901
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
29883
29902
  var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
29884
29903
  var meetingCurrentIndexRows = `
29885
29904
  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
@@ -29910,7 +29929,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
29910
29929
  }, "invalidateMeetingStems");
29911
29930
  var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
29912
29931
 
29913
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
29932
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
29914
29933
  function meetingHitIndexOver({ database, now: now2 }) {
29915
29934
  return {
29916
29935
  async indexSearch(original) {
@@ -29978,10 +29997,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
29978
29997
  }
29979
29998
  __name(meetingHitIndexOver, "meetingHitIndexOver");
29980
29999
 
29981
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30000
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
29982
30001
  import { createHash as createHash5 } from "node:crypto";
29983
30002
 
29984
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/trigrams.js
30003
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/trigrams.js
29985
30004
  var trigrams = /* @__PURE__ */ __name((term) => {
29986
30005
  const padded = ` ${term} `;
29987
30006
  const pieces = /* @__PURE__ */ new Set();
@@ -29990,7 +30009,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
29990
30009
  return [...pieces];
29991
30010
  }, "trigrams");
29992
30011
 
29993
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/correct.js
30012
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/correct.js
29994
30013
  var SHORTEST_CORRECTION = 3;
29995
30014
  var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
29996
30015
  var editDistance = /* @__PURE__ */ __name((a, b, max) => {
@@ -30037,7 +30056,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
30037
30056
  return corrections;
30038
30057
  }, "correctWords");
30039
30058
 
30040
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/garbled.js
30059
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/garbled.js
30041
30060
  var SHORTEST_GARBLED = 4;
30042
30061
  var MOST_WIDENED = 64;
30043
30062
  var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
@@ -30129,7 +30148,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
30129
30148
  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));
30130
30149
  }, "widenWords");
30131
30150
 
30132
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
30151
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
30133
30152
  import { readFileSync } from "node:fs";
30134
30153
  var loaded;
30135
30154
  var dictionary = /* @__PURE__ */ __name(() => {
@@ -30188,7 +30207,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
30188
30207
  return false;
30189
30208
  }, "knownRussianWord");
30190
30209
 
30191
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
30210
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
30192
30211
  var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
30193
30212
  var MOST_WORDS = 128;
30194
30213
  var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
@@ -30415,7 +30434,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
30415
30434
  return check3(tree);
30416
30435
  }, "matchMeetingText");
30417
30436
 
30418
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30437
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
30419
30438
  var fail3 = /* @__PURE__ */ __name((message2) => {
30420
30439
  throw new CliError("validation_error", message2);
30421
30440
  }, "fail");
@@ -30597,7 +30616,7 @@ function meetingHitSearchOver({ database }) {
30597
30616
  }
30598
30617
  __name(meetingHitSearchOver, "meetingHitSearchOver");
30599
30618
 
30600
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
30619
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
30601
30620
  var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
30602
30621
  async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
30603
30622
  positiveReadInteger(accountId, "accountId");
@@ -30629,7 +30648,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
30629
30648
  }
30630
30649
  }), "meetingLanguagesOver");
30631
30650
 
30632
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
30651
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
30633
30652
  import { createHash as createHash6 } from "node:crypto";
30634
30653
  var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
30635
30654
  if (value === void 0)
@@ -30719,7 +30738,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
30719
30738
  }
30720
30739
  }), "meetingParticipantSearchOver");
30721
30740
 
30722
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
30741
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
30723
30742
  var preparationQueries = {
30724
30743
  participants: {
30725
30744
  fields: "p.id, p.identity_id, p.display_name, l.person_id",
@@ -30769,7 +30788,7 @@ var preparationQueries = {
30769
30788
  }
30770
30789
  };
30771
30790
 
30772
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
30791
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
30773
30792
  var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
30774
30793
  async preparationContext(original) {
30775
30794
  const input = validateMeetingPreparationContext(original);
@@ -30810,7 +30829,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
30810
30829
  }
30811
30830
  }), "meetingPreparationContextOver");
30812
30831
 
30813
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
30832
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
30814
30833
  var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
30815
30834
  SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
30816
30835
  WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
@@ -30824,7 +30843,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
30824
30843
  JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
30825
30844
  )`, "preparationSubjects");
30826
30845
 
30827
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
30846
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
30828
30847
  var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
30829
30848
  async preparationKnowledge(original) {
30830
30849
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -30869,7 +30888,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
30869
30888
  }
30870
30889
  }), "meetingPreparationKnowledgeOver");
30871
30890
 
30872
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
30891
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
30873
30892
  var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
30874
30893
  async preparationNotes(original) {
30875
30894
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -30922,7 +30941,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
30922
30941
  }
30923
30942
  }), "meetingPreparationNotesOver");
30924
30943
 
30925
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
30944
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
30926
30945
  var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
30927
30946
  async relatedHistory(original) {
30928
30947
  const input = validateMeetingRelatedHistory(original);
@@ -30993,7 +31012,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
30993
31012
  }
30994
31013
  }), "meetingRelatedHistoryOver");
30995
31014
 
30996
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
31015
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
30997
31016
  var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
30998
31017
  var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
30999
31018
  var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
@@ -31074,7 +31093,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
31074
31093
  }
31075
31094
  }), "meetingReviewOver");
31076
31095
 
31077
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
31096
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
31078
31097
  var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
31079
31098
  var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
31080
31099
  if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
@@ -31128,7 +31147,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
31128
31147
  }
31129
31148
  }), "meetingSeriesHistoryOver");
31130
31149
 
31131
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
31150
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
31132
31151
  var MOST_ROWS = 5e5;
31133
31152
  var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
31134
31153
  EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
@@ -31197,7 +31216,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
31197
31216
  }
31198
31217
  }), "meetingStatsOver");
31199
31218
 
31200
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
31219
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
31201
31220
  var CURSOR_KEY = "meetings";
31202
31221
  var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
31203
31222
  id: Number(row2.id),
@@ -31766,7 +31785,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
31766
31785
  };
31767
31786
  }, "meetingStoreOver");
31768
31787
 
31769
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
31788
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
31770
31789
  var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
31771
31790
  const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
31772
31791
  return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
@@ -31792,7 +31811,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
31792
31811
  orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
31793
31812
  }, "release");
31794
31813
 
31795
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
31814
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
31796
31815
  var THREAD_COLUMNS = {
31797
31816
  subject: {
31798
31817
  where: /* @__PURE__ */ __name(({ value }) => ({
@@ -31809,7 +31828,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
31809
31828
  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);
31810
31829
  }, "threadRows");
31811
31830
 
31812
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
31831
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
31813
31832
  var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
31814
31833
  id: `email:${place.emailId}`,
31815
31834
  chatId: place.threadExternalId,
@@ -32347,7 +32366,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
32347
32366
  }
32348
32367
  }), "mailStoreOver");
32349
32368
 
32350
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/search/dictionary.js
32369
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/search/dictionary.js
32351
32370
  import { readFileSync as readFileSync2 } from "node:fs";
32352
32371
  var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
32353
32372
  var folded4 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
@@ -32437,7 +32456,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
32437
32456
  }, "knownWord");
32438
32457
  var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
32439
32458
 
32440
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
32459
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
32441
32460
  var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
32442
32461
  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");
32443
32462
  var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
@@ -32523,7 +32542,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
32523
32542
  return found2;
32524
32543
  }, "spokenTranscripts");
32525
32544
 
32526
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
32545
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
32527
32546
  var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
32528
32547
  const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
32529
32548
  if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
@@ -32570,7 +32589,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
32570
32589
  });
32571
32590
  }, "placeHits");
32572
32591
 
32573
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
32592
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
32574
32593
  var GROUPS = {
32575
32594
  chat: {
32576
32595
  key: "m.chat_id",
@@ -32592,7 +32611,7 @@ var GROUPS = {
32592
32611
  }
32593
32612
  };
32594
32613
 
32595
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
32614
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
32596
32615
  var MESSAGES2 = {
32597
32616
  rows: "messages",
32598
32617
  threads: "chats",
@@ -33075,7 +33094,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
33075
33094
  };
33076
33095
  }, "runCompiled");
33077
33096
 
33078
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
33097
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
33079
33098
  function invalidMetadata() {
33080
33099
  throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
33081
33100
  }
@@ -33177,7 +33196,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
33177
33196
  };
33178
33197
  }), "counterTargets");
33179
33198
 
33180
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
33199
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
33181
33200
  var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
33182
33201
  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,
33183
33202
  att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
@@ -33296,7 +33315,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
33296
33315
  }));
33297
33316
  }, "attachmentViews");
33298
33317
 
33299
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
33318
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
33300
33319
  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");
33301
33320
  var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
33302
33321
  const { orm, database, now: now2 } = context;
@@ -33334,7 +33353,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
33334
33353
  keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
33335
33354
  }, "intoVoiceAttachment");
33336
33355
 
33337
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
33356
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
33338
33357
  var FIELDS = [
33339
33358
  "threadExternalId",
33340
33359
  "senderIdentityId",
@@ -33651,7 +33670,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
33651
33670
  reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
33652
33671
  }, "writeDerivedReactions");
33653
33672
 
33654
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/keys.js
33673
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/keys.js
33655
33674
  var keysOver = /* @__PURE__ */ __name((context) => {
33656
33675
  const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
33657
33676
  const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
@@ -33672,7 +33691,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
33672
33691
  };
33673
33692
  }, "keysOver");
33674
33693
 
33675
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
33694
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
33676
33695
  var accountGroupsOf = /* @__PURE__ */ __name((database) => {
33677
33696
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
33678
33697
  if (!row2)
@@ -33707,7 +33726,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
33707
33726
  database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
33708
33727
  }, "saveProfile");
33709
33728
 
33710
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
33729
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
33711
33730
  var BOT_KINDS = ["agent", "rule", "script", "integration"];
33712
33731
  var ownerPerson = /* @__PURE__ */ __name((database) => {
33713
33732
  const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
@@ -33764,7 +33783,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
33764
33783
  return { sql: bot("pb.name = ?"), params: [by.bot] };
33765
33784
  }, "proposedBySql");
33766
33785
 
33767
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
33786
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
33768
33787
  var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
33769
33788
  const owner = ownerPerson(context.database).id;
33770
33789
  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);
@@ -33785,7 +33804,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
33785
33804
  return personOf(context, ref3);
33786
33805
  }, "linkToOwner");
33787
33806
 
33788
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
33807
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
33789
33808
  var PROVIDERS_SETTING = "providers";
33790
33809
  var storedProvidersOf = /* @__PURE__ */ __name((database) => {
33791
33810
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
@@ -33820,7 +33839,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
33820
33839
  });
33821
33840
  }, "registerProvider");
33822
33841
 
33823
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
33842
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
33824
33843
  var DAY3 = 864e5;
33825
33844
  var RECENTLY_CLOSED_MS = 14 * DAY3;
33826
33845
  var TEXT_LIMIT = 20;
@@ -34019,7 +34038,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
34019
34038
  };
34020
34039
  }, "taskSimilarityOver");
34021
34040
 
34022
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
34041
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
34023
34042
  var SETTING3 = "taskCategories";
34024
34043
  var savedTaskCategories = /* @__PURE__ */ __name((database) => {
34025
34044
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
@@ -34038,7 +34057,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
34038
34057
  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);
34039
34058
  }, "saveTaskCategories");
34040
34059
 
34041
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
34060
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
34042
34061
  var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
34043
34062
  var ALLOWED = "taskAgentClose";
34044
34063
  var MIN = "taskAgentCloseMin";
@@ -34094,10 +34113,10 @@ var SUGGESTION_COLUMNS = [
34094
34113
  ];
34095
34114
  var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
34096
34115
 
34097
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
34116
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
34098
34117
  var MAIL_FINDINGS_KIND = "mail_findings";
34099
34118
 
34100
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/decisions.js
34119
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/decisions.js
34101
34120
  var TASK_CLOSE_KIND = "task_close";
34102
34121
  var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
34103
34122
  var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
@@ -34145,7 +34164,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
34145
34164
  }, "assertMayDecide");
34146
34165
  var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
34147
34166
 
34148
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/deals.js
34167
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/deals.js
34149
34168
  var DEAL_KINDS = ["deal", "lead"];
34150
34169
  var DEAL_STATUSES = ["open", "won", "lost"];
34151
34170
  var STAGE_OUTCOMES = DEAL_STATUSES;
@@ -34155,10 +34174,10 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
34155
34174
  return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
34156
34175
  }, "dealLine");
34157
34176
 
34158
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
34177
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
34159
34178
  var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
34160
34179
 
34161
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
34180
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
34162
34181
  var EXCERPT_CHARS = 280;
34163
34182
  var TITLE_CHARS = 120;
34164
34183
  var MEMORY_TITLE_CHARS = 80;
@@ -34531,7 +34550,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
34531
34550
  var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
34532
34551
  var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
34533
34552
 
34534
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
34553
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
34535
34554
  var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
34536
34555
  ref: ref3,
34537
34556
  kind: read2.kind,
@@ -34567,7 +34586,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
34567
34586
  });
34568
34587
  }, "evidenceSourcesOf");
34569
34588
 
34570
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/attachments/limits.js
34589
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/attachments/limits.js
34571
34590
  var MAX_FILE_BYTES = 50 * 1024 * 1024;
34572
34591
  var MAX_TEXT_CHARS = 2e6;
34573
34592
  var ATTACHMENT_LIMIT_ENV = [
@@ -34593,7 +34612,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
34593
34612
  return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
34594
34613
  }, "pdfPreviewLimits");
34595
34614
 
34596
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/ulid.js
34615
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/ulid.js
34597
34616
  import { randomBytes } from "node:crypto";
34598
34617
  var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
34599
34618
  var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
@@ -34606,7 +34625,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
34606
34625
  return time3 + random;
34607
34626
  }, "ulid");
34608
34627
 
34609
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
34628
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
34610
34629
  var FOLDED_FIELDS = ["title", "site", "language", "author"];
34611
34630
  var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
34612
34631
  if (!meta && !sections?.length)
@@ -34627,7 +34646,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
34627
34646
  return typeof language === "string" && language !== "" ? language : null;
34628
34647
  }, "languageOf");
34629
34648
 
34630
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
34649
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
34631
34650
  var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
34632
34651
  var objectOf2 = /* @__PURE__ */ __name((value) => {
34633
34652
  if (isObject(value))
@@ -34870,7 +34889,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
34870
34889
  };
34871
34890
  }, "filesStoreOver");
34872
34891
 
34873
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
34892
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
34874
34893
  var IMPORTED_DOCUMENT_QUERY = defineQuery({
34875
34894
  entity: "document",
34876
34895
  backend: "sql",
@@ -34916,7 +34935,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
34916
34935
  return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
34917
34936
  }, "importedDocumentWhere");
34918
34937
 
34919
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
34938
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
34920
34939
  var NOTE_FORMATS = ["obsidian", "markdown"];
34921
34940
  var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
34922
34941
  var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
@@ -35442,7 +35461,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
35442
35461
  };
35443
35462
  }, "notesStoreOver");
35444
35463
 
35445
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
35464
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
35446
35465
  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";
35447
35466
  var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
35448
35467
  var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -35664,7 +35683,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
35664
35683
  };
35665
35684
  }, "memoriesStoreOver");
35666
35685
 
35667
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
35686
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
35668
35687
  var DEFAULT_FIRST_PASS_PER_CHAT = 0;
35669
35688
  var KEY = "taskFirstPassPerChat";
35670
35689
  var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
@@ -35684,7 +35703,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
35684
35703
  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);
35685
35704
  }, "saveFirstPassPerChat");
35686
35705
 
35687
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/external-links.js
35706
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/external-links.js
35688
35707
  var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
35689
35708
  var EXTERNAL_ID_CHARS = 200;
35690
35709
  var SOURCE_URL_CHARS = 2e3;
@@ -35711,7 +35730,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
35711
35730
  return text6;
35712
35731
  }, "sourceUrlOf");
35713
35732
 
35714
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
35733
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
35715
35734
  var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
35716
35735
  name,
35717
35736
  type,
@@ -35933,7 +35952,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
35933
35952
  return root === void 0 ? void 0 : { ...query, root };
35934
35953
  }, "withoutField");
35935
35954
 
35936
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
35955
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
35937
35956
  var authorNamed = /* @__PURE__ */ __name((database, row2) => {
35938
35957
  if (row2.author_type == null)
35939
35958
  return null;
@@ -35961,7 +35980,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
35961
35980
  return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
35962
35981
  }, "addComment");
35963
35982
 
35964
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
35983
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
35965
35984
  var TASK_RELATION_KINDS = [
35966
35985
  "blocked-by",
35967
35986
  "follow-up-of",
@@ -36091,7 +36110,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
36091
36110
  };
36092
36111
  }, "taskRelationsStoreOver");
36093
36112
 
36094
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
36113
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
36095
36114
  var TASK_ROLES = ["assignee", "reviewer", "watcher"];
36096
36115
  var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
36097
36116
  var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
@@ -36620,7 +36639,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
36620
36639
  };
36621
36640
  }, "workTasksOver");
36622
36641
 
36623
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
36642
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
36624
36643
  var taskCloseOver = /* @__PURE__ */ __name((context) => {
36625
36644
  const { database, now: now2 } = context;
36626
36645
  const liveRow = /* @__PURE__ */ __name((id2) => {
@@ -36669,7 +36688,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
36669
36688
  };
36670
36689
  }, "taskCloseOver");
36671
36690
 
36672
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
36691
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
36673
36692
  var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
36674
36693
  const { database, now: now2 } = context;
36675
36694
  const required3 = /* @__PURE__ */ __name((id2) => {
@@ -36887,7 +36906,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
36887
36906
  };
36888
36907
  }, "taskPairsOver");
36889
36908
 
36890
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
36909
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
36891
36910
  var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
36892
36911
  var TASK_STATS_SQL = {
36893
36912
  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"),
@@ -36926,7 +36945,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
36926
36945
  }, "statNames")
36927
36946
  }), "taskStatsOver");
36928
36947
 
36929
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
36948
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
36930
36949
  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";
36931
36950
  var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
36932
36951
  const key2 = inboxKey(account);
@@ -37133,7 +37152,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
37133
37152
  throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
37134
37153
  }, "oneOf");
37135
37154
 
37136
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/accounts.js
37155
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/accounts.js
37137
37156
  var accountAccountsOver = /* @__PURE__ */ __name((context) => {
37138
37157
  const { database } = context;
37139
37158
  const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
@@ -37178,7 +37197,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
37178
37197
  };
37179
37198
  }, "accountsStoreOver");
37180
37199
 
37181
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
37200
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
37182
37201
  var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
37183
37202
  var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
37184
37203
  const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
@@ -37202,7 +37221,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
37202
37221
  })), "keepDownloads");
37203
37222
  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");
37204
37223
 
37205
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/attachments.js
37224
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/attachments.js
37206
37225
  var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
37207
37226
  const { database } = context;
37208
37227
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -37259,7 +37278,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
37259
37278
  }, "keepAttachmentText")
37260
37279
  }), "attachmentsStoreOver");
37261
37280
 
37262
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
37281
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
37263
37282
  var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
37264
37283
  var pointerMover = /* @__PURE__ */ __name((context, type) => {
37265
37284
  const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
@@ -37439,7 +37458,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
37439
37458
  return done;
37440
37459
  }, "rekeyChats");
37441
37460
 
37442
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
37461
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
37443
37462
  var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
37444
37463
  var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
37445
37464
  var CHAT_LIST_KEY = "chat_list_complete";
@@ -37497,7 +37516,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
37497
37516
  return { ...coverage, oldestMessageAt: toIso(oldest) };
37498
37517
  }, "chatCoverage");
37499
37518
 
37500
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/chats.js
37519
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/chats.js
37501
37520
  var chatsStoreOver = /* @__PURE__ */ __name((context) => {
37502
37521
  const { database } = context;
37503
37522
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
@@ -37632,7 +37651,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
37632
37651
  };
37633
37652
  }, "chatsStoreOver");
37634
37653
 
37635
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
37654
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
37636
37655
  import { createHash as createHash7 } from "node:crypto";
37637
37656
  var BATCH_CONTEXT = 50;
37638
37657
  var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
@@ -37770,7 +37789,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
37770
37789
  var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
37771
37790
  ${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
37772
37791
 
37773
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
37792
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
37774
37793
  import { setTimeout } from "node:timers/promises";
37775
37794
  var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
37776
37795
  var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
@@ -38082,7 +38101,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
38082
38101
  AND NOT EXISTS (SELECT 1 FROM messages d
38083
38102
  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");
38084
38103
 
38085
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/conversations.js
38104
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/conversations.js
38086
38105
  var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
38087
38106
  const { database } = context;
38088
38107
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -38189,7 +38208,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
38189
38208
  };
38190
38209
  }, "conversationsStoreOver");
38191
38210
 
38192
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/counters.js
38211
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/counters.js
38193
38212
  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";
38194
38213
  var accountCountersOver = /* @__PURE__ */ __name((context) => {
38195
38214
  const { database } = context;
@@ -38214,7 +38233,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38214
38233
  counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
38215
38234
  }), "countersStoreOver");
38216
38235
 
38217
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
38236
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
38218
38237
  var MENTION_STATUSES = ["found", "linked", "dismissed"];
38219
38238
  var MENTION_QUERY = defineQuery({
38220
38239
  entity: "mention",
@@ -38430,7 +38449,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
38430
38449
  return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
38431
38450
  }, "listPlaces");
38432
38451
 
38433
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/mentions.js
38452
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/mentions.js
38434
38453
  var accountMentionsOver = /* @__PURE__ */ __name((context) => {
38435
38454
  const { database } = context;
38436
38455
  const { findAccountPk: findAccountPk2 } = keysOver(context);
@@ -38465,7 +38484,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38465
38484
  places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
38466
38485
  }), "mentionsStoreOver");
38467
38486
 
38468
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
38487
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
38469
38488
  var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
38470
38489
  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");
38471
38490
  const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
@@ -38480,7 +38499,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
38480
38499
  }));
38481
38500
  }, "documentLinkMessages");
38482
38501
 
38483
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
38502
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
38484
38503
  var stemmerFor = stemmerCache();
38485
38504
  var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
38486
38505
  if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
@@ -38524,7 +38543,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
38524
38543
  });
38525
38544
  }, "laterSharingRare");
38526
38545
 
38527
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/messages.js
38546
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/messages.js
38528
38547
  var accountMessagesOver = /* @__PURE__ */ __name((context) => {
38529
38548
  const { database } = context;
38530
38549
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
@@ -38659,7 +38678,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
38659
38678
  laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
38660
38679
  }), "messagesStoreOver");
38661
38680
 
38662
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
38681
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
38663
38682
  var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
38664
38683
  var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
38665
38684
  var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
@@ -38716,7 +38735,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
38716
38735
  });
38717
38736
  }, "personPreparation");
38718
38737
 
38719
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
38738
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
38720
38739
  var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
38721
38740
  const id2 = Number(uid);
38722
38741
  if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
@@ -38724,7 +38743,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
38724
38743
  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)));
38725
38744
  }, "personSeenInAccounts");
38726
38745
 
38727
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
38746
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
38728
38747
  var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
38729
38748
  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);
38730
38749
  if (!row2)
@@ -38790,7 +38809,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
38790
38809
  return { id: id2, personId, removed: true };
38791
38810
  }, "removeNote");
38792
38811
 
38793
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/people.js
38812
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/people.js
38794
38813
  var accountPeopleOver = /* @__PURE__ */ __name((context) => {
38795
38814
  const { database } = context;
38796
38815
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
@@ -38875,13 +38894,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
38875
38894
  };
38876
38895
  }, "peopleStoreOver");
38877
38896
 
38878
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
38897
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
38879
38898
  import { createHash as createHash9 } from "node:crypto";
38880
38899
 
38881
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
38900
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
38882
38901
  import { createHash as createHash8 } from "node:crypto";
38883
38902
 
38884
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
38903
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
38885
38904
  var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
38886
38905
  var AUTHOR_MEASURES = [
38887
38906
  "messages",
@@ -39021,7 +39040,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
39021
39040
  var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
39022
39041
  var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
39023
39042
 
39024
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
39043
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
39025
39044
  var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
39026
39045
  var exhausted2 = /* @__PURE__ */ __name((budget) => {
39027
39046
  throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
@@ -39243,7 +39262,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
39243
39262
  };
39244
39263
  }, "rankReplyGraph");
39245
39264
 
39246
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
39265
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
39247
39266
  var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
39248
39267
  var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
39249
39268
  var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
@@ -39417,7 +39436,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
39417
39436
  return { items, evidence, summary, graph: graph.quality };
39418
39437
  }, "calculateAdminStatistics");
39419
39438
 
39420
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
39439
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
39421
39440
  var rankingContextRange = /* @__PURE__ */ __name((root) => {
39422
39441
  const dates = [];
39423
39442
  const visit = /* @__PURE__ */ __name((node, required3) => {
@@ -39439,7 +39458,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
39439
39458
  return dates[0].node.resolution.date;
39440
39459
  }, "rankingContextRange");
39441
39460
 
39442
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
39461
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
39443
39462
  var reactionCounts = /* @__PURE__ */ __name((stored3) => {
39444
39463
  let counts;
39445
39464
  try {
@@ -39734,7 +39753,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
39734
39753
  });
39735
39754
  }, "rankQuery");
39736
39755
 
39737
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
39756
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
39738
39757
  function fail4(message2, reason = "query.too-large") {
39739
39758
  throw new CliError("validation_error", message2, { reason, complete: false });
39740
39759
  }
@@ -39911,7 +39930,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
39911
39930
  return result;
39912
39931
  }), "adminStatisticsQuery");
39913
39932
 
39914
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
39933
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
39915
39934
  var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
39916
39935
  if (!execution.accounts.length)
39917
39936
  return { conversations: [], chats: [] };
@@ -39929,7 +39948,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
39929
39948
  return { conversations: conversations2, chats: chats2 };
39930
39949
  }, "conversationEligibility");
39931
39950
 
39932
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
39951
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
39933
39952
  import { createHash as createHash10 } from "node:crypto";
39934
39953
  var EVIDENCE_BYTES = 64 * 1024;
39935
39954
  var FINGERPRINT_BYTES = 8 * 1024 * 1024;
@@ -40079,7 +40098,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
40079
40098
  return result;
40080
40099
  }, "rankingEvidence");
40081
40100
 
40082
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
40101
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
40083
40102
  var FAR = Number.MAX_SAFE_INTEGER;
40084
40103
  var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
40085
40104
  const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
@@ -40173,7 +40192,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
40173
40192
  });
40174
40193
  }, "waitingChats");
40175
40194
 
40176
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/queries.js
40195
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/queries.js
40177
40196
  var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
40178
40197
  const mailIndexed = /* @__PURE__ */ __name((execution) => {
40179
40198
  if (execution.corpus === "mail")
@@ -40194,7 +40213,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
40194
40213
  };
40195
40214
  }, "queriesStoreOver");
40196
40215
 
40197
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
40216
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
40198
40217
  var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
40199
40218
  const { database, now: now2 } = context;
40200
40219
  const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
@@ -40233,10 +40252,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
40233
40252
  }));
40234
40253
  }, "chatEventsOf");
40235
40254
 
40236
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40255
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40237
40256
  import { createHash as createHash11 } from "node:crypto";
40238
40257
 
40239
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/calendar.js
40258
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/calendar.js
40240
40259
  var calendarKey = /* @__PURE__ */ __name((zone, by) => {
40241
40260
  const format = new Intl.DateTimeFormat("en-CA", {
40242
40261
  timeZone: zone,
@@ -40256,7 +40275,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
40256
40275
  return date3.toISOString().slice(0, 10);
40257
40276
  }, "weekKey");
40258
40277
 
40259
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/retention.js
40278
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/retention.js
40260
40279
  var RETENTION_TOLERANCE = 864e5;
40261
40280
  var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
40262
40281
  const { since, until, cutoff, checkpoints, within, limit, by } = options;
@@ -40310,7 +40329,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
40310
40329
  return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
40311
40330
  }, "retentionCohorts");
40312
40331
 
40313
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40332
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
40314
40333
  var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
40315
40334
  var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
40316
40335
  validateRetentionOptions(options);
@@ -40441,7 +40460,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
40441
40460
  };
40442
40461
  }, "retentionQuery");
40443
40462
 
40444
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
40463
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
40445
40464
  var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
40446
40465
  var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
40447
40466
  ...isBot === void 0 ? {} : { bot: isBot },
@@ -40572,7 +40591,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
40572
40591
  lastCount: memberCountsOf(context, pk).at(-1) ?? null
40573
40592
  })), "trackedChats");
40574
40593
 
40575
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/roster.js
40594
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/roster.js
40576
40595
  var rosterStoreOver = /* @__PURE__ */ __name((context) => {
40577
40596
  const { database } = context;
40578
40597
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
@@ -40628,7 +40647,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
40628
40647
  };
40629
40648
  }, "rosterStoreOver");
40630
40649
 
40631
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
40650
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
40632
40651
  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");
40633
40652
  var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
40634
40653
  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 ?`);
@@ -40652,7 +40671,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
40652
40671
  }
40653
40672
  }, "backfillNormalized");
40654
40673
 
40655
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
40674
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
40656
40675
  var INDEX2 = "message_words";
40657
40676
  var searchIndexState2 = /* @__PURE__ */ __name((database) => {
40658
40677
  const row2 = indexRow(database, INDEX2);
@@ -40779,7 +40798,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
40779
40798
  });
40780
40799
  }, "resetSearchIndex");
40781
40800
 
40782
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
40801
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
40783
40802
  var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
40784
40803
  const filled2 = { stemmed: 0, drained: 0 };
40785
40804
  const before2 = stemsState(database);
@@ -40874,7 +40893,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
40874
40893
  return resetStems(database, { now: now2 });
40875
40894
  }, "followDefaultStemmers");
40876
40895
 
40877
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
40896
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
40878
40897
  var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
40879
40898
  var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
40880
40899
  const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
@@ -40896,7 +40915,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
40896
40915
  });
40897
40916
  }, "termCandidates");
40898
40917
 
40899
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/search-index.js
40918
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/search-index.js
40900
40919
  var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
40901
40920
  const { database } = context;
40902
40921
  const stemmerFor2 = stemmerCache();
@@ -40904,9 +40923,11 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
40904
40923
  knownTerms: /* @__PURE__ */ __name(async (terms2) => knownTerms(context, terms2), "knownTerms"),
40905
40924
  termCandidates: /* @__PURE__ */ __name(async (trigrams2, lengths) => termCandidates(context, trigrams2, lengths), "termCandidates"),
40906
40925
  searchIndexState: /* @__PURE__ */ __name(async () => searchIndexState2(database), "searchIndexState"),
40907
- fillSearchIndex: /* @__PURE__ */ __name(async ({ until } = {}) => fillSearchIndex(database, { now: context.now, ...until ? { until } : {} }), "fillSearchIndex"),
40926
+ fillSearchIndex: /* @__PURE__ */ __name(async ({ until } = {}) => isQueryOnly(database) ? { normalized: 0, indexed: 0, terms: 0 } : fillSearchIndex(database, { now: context.now, ...until ? { until } : {} }), "fillSearchIndex"),
40908
40927
  stemsState: /* @__PURE__ */ __name(async () => stemsState(database), "stemsState"),
40909
40928
  fillStems: /* @__PURE__ */ __name(async ({ until } = {}) => {
40929
+ if (isQueryOnly(database))
40930
+ return { stemmed: 0, drained: 0 };
40910
40931
  const filled2 = fillStems(database, { now: context.now, ...until ? { until } : {} });
40911
40932
  const transcripts = corpusIndexState(database, CORPORA.transcript);
40912
40933
  if (transcripts.wanted !== null && (transcripts.pending > 0 || transcripts.built !== transcripts.wanted))
@@ -40918,7 +40939,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
40918
40939
  };
40919
40940
  }, "searchIndexStoreOver");
40920
40941
 
40921
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
40942
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
40922
40943
  var HISTORY_KEPT = 1e3;
40923
40944
  var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
40924
40945
  var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
@@ -40987,7 +41008,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
40987
41008
  return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
40988
41009
  }, "clearHistory");
40989
41010
 
40990
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/searches.js
41011
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/searches.js
40991
41012
  var searchesStoreOver = /* @__PURE__ */ __name((context) => {
40992
41013
  const { database } = context;
40993
41014
  return {
@@ -41011,7 +41032,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
41011
41032
  };
41012
41033
  }, "searchesStoreOver");
41013
41034
 
41014
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
41035
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
41015
41036
  var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
41016
41037
  var ACTION_OUTCOMES = ["ok", "refused", "failed"];
41017
41038
  var CODE = /^[a-z][a-z0-9_]{0,63}$/;
@@ -41054,7 +41075,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
41054
41075
  };
41055
41076
  }, "agentActionsStoreOver");
41056
41077
 
41057
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
41078
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
41058
41079
  var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
41059
41080
  }) => {
41060
41081
  const { database, now: now2 } = context;
@@ -41113,7 +41134,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
41113
41134
  };
41114
41135
  }, "botUpdateStoreOver");
41115
41136
 
41116
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
41137
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
41117
41138
  var DAY4 = 864e5;
41118
41139
  var accountsOf = /* @__PURE__ */ __name((filter) => {
41119
41140
  if (filter.accountIds !== void 0 && filter.accountId !== void 0)
@@ -41222,7 +41243,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
41222
41243
  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);
41223
41244
  }, "listEvents");
41224
41245
 
41225
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
41246
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
41226
41247
  var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
41227
41248
  var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
41228
41249
  const unseenBefore = unreferenced(database, "identities");
@@ -41277,7 +41298,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
41277
41298
  return { entries: entryIds.length, events: goneEvents.length };
41278
41299
  }, "forgetCalendarRows");
41279
41300
 
41280
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
41301
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
41281
41302
  var calendarOf = /* @__PURE__ */ __name((row2) => ({
41282
41303
  id: Number(row2.id),
41283
41304
  accountId: Number(row2.account_id),
@@ -41864,7 +41885,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
41864
41885
  };
41865
41886
  }, "eventStoreOver");
41866
41887
 
41867
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
41888
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
41868
41889
  var CATALOG_QUERY = defineQuery({
41869
41890
  entity: "document",
41870
41891
  backend: "sql",
@@ -42106,7 +42127,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
42106
42127
  };
42107
42128
  }, "catalogStoreOver");
42108
42129
 
42109
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
42130
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
42110
42131
  var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
42111
42132
  var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
42112
42133
  CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
@@ -42119,7 +42140,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
42119
42140
  THEN 'source-modified' ELSE 'stored-update' END`;
42120
42141
  var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
42121
42142
 
42122
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
42143
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
42123
42144
  var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
42124
42145
  const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
42125
42146
  signal?.throwIfAborted();
@@ -42218,7 +42239,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
42218
42239
  });
42219
42240
  }, "readMeetingContextEvidence");
42220
42241
 
42221
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
42242
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
42222
42243
  var corpora = {
42223
42244
  message: {
42224
42245
  table: "messages",
@@ -42457,7 +42478,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
42457
42478
  }
42458
42479
  }), "contextRecordsOver");
42459
42480
 
42460
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/records.js
42481
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/records.js
42461
42482
  import { createHash as createHash12 } from "node:crypto";
42462
42483
  var RECORDS_SCHEMA_VERSION = 1;
42463
42484
  var RECORD_OPERATIONS = ["upsert", "delete"];
@@ -42546,7 +42567,7 @@ var recordFingerprint = /* @__PURE__ */ __name((fields4, relations) => createHas
42546
42567
  ]).sort((a, b) => a.join("\0").localeCompare(b.join("\0")))
42547
42568
  }))).digest("hex"), "recordFingerprint");
42548
42569
 
42549
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
42570
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
42550
42571
  var TABLES = { deal: "deals", lead: "leads" };
42551
42572
  var SOURCE = "crm";
42552
42573
  var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${key2.account}/${type}/${externalId}`, "crmIdentityId");
@@ -42624,6 +42645,45 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
42624
42645
  database.prepare("INSERT INTO pipeline_stages (pipeline_id, name, name_folded, position, outcome, external_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)").run(pipelineId, stage.name, stage.folded, stage.position, stage.outcome, stage.externalId, at, at);
42625
42646
  }
42626
42647
  }, "saveStages");
42648
+ const saveFields = /* @__PURE__ */ __name((key2, kind4, fields4) => write(database, () => {
42649
+ const accountId = account(key2);
42650
+ const at = now2();
42651
+ const skipped = [];
42652
+ const listed = /* @__PURE__ */ new Set();
42653
+ const upsert2 = database.prepare("INSERT INTO crm_fields (account_id, kind, code, label, type, multiple, filterable, options, position, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (account_id, kind, code) DO UPDATE SET label = excluded.label, type = excluded.type, multiple = excluded.multiple, filterable = excluded.filterable, options = excluded.options, position = excluded.position, updated_at = excluded.updated_at, deleted_at = NULL");
42654
+ for (const field4 of fields4) {
42655
+ const code = typeof field4.code === "string" ? field4.code.trim() : "";
42656
+ if (!code || listed.has(code)) {
42657
+ skipped.push({
42658
+ externalId: code,
42659
+ reason: "crm.item-invalid",
42660
+ message: code ? `${kind4} field ${code} is listed twice` : `a ${kind4} field has no code`
42661
+ });
42662
+ continue;
42663
+ }
42664
+ listed.add(code);
42665
+ const options = field4.options?.map((option) => ({ id: String(option.id), label: String(option.label) }));
42666
+ upsert2.run(accountId, kind4, code, textOf3(field4.label, 200), textOf3(field4.type, 80) ?? "string", field4.multiple ? 1 : 0, field4.filterable ? 1 : 0, options ? JSON.stringify(options) : null, listed.size, at, at);
42667
+ }
42668
+ const mark = database.prepare("UPDATE crm_fields SET deleted_at = ?, updated_at = ? WHERE id = ?");
42669
+ for (const row2 of database.prepare("SELECT id, code FROM crm_fields WHERE account_id = ? AND kind = ? AND deleted_at IS NULL").all(accountId, kind4))
42670
+ if (!listed.has(String(row2.code)))
42671
+ mark.run(at, at, Number(row2.id));
42672
+ return { saved: listed.size, skipped };
42673
+ }), "saveFields");
42674
+ const fieldsOf3 = /* @__PURE__ */ __name((key2, kind4) => {
42675
+ const accountId = findAccountPk(context, key2);
42676
+ if (accountId === void 0)
42677
+ return [];
42678
+ return database.prepare("SELECT * FROM crm_fields WHERE account_id = ? AND kind = ? AND deleted_at IS NULL ORDER BY position, id").all(accountId, kind4).map((row2) => ({
42679
+ code: String(row2.code),
42680
+ label: row2.label == null ? null : String(row2.label),
42681
+ type: String(row2.type),
42682
+ multiple: Number(row2.multiple) === 1,
42683
+ filterable: Number(row2.filterable) === 1,
42684
+ ...row2.options == null ? {} : { options: JSON.parse(String(row2.options)) }
42685
+ }));
42686
+ }, "fieldsOf");
42627
42687
  const personIdOf = /* @__PURE__ */ __name((key2, externalId) => {
42628
42688
  const row2 = database.prepare("SELECT l.person_id FROM identities i JOIN identity_links l ON l.identity_id = i.id WHERE i.provider = ? AND i.external_id = ?").get(key2.provider, crmIdentityId(key2, externalId));
42629
42689
  return row2 ? Number(row2.person_id) : null;
@@ -42655,6 +42715,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
42655
42715
  const metadata3 = {
42656
42716
  ...item.metadata ?? {},
42657
42717
  ...item.url ? { url: item.url } : {},
42718
+ ...item.assignee ? { assignee: crmIdentityId(key2, item.assignee, "user") } : {},
42658
42719
  ...item.closedReason && status !== "open" ? { closed_reason: textOf3(item.closedReason, 2e3) } : {}
42659
42720
  };
42660
42721
  const values = {
@@ -42761,6 +42822,8 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
42761
42822
  return { saved: contacts2.length, skipped: [] };
42762
42823
  }, "savePeople"),
42763
42824
  saveOrganizations: /* @__PURE__ */ __name(async (key2, organizations2) => saveOrganizations(key2, organizations2), "saveOrganizations"),
42825
+ saveFields: /* @__PURE__ */ __name(async (key2, kind4, fields4) => saveFields(key2, kind4, fields4), "saveFields"),
42826
+ fields: /* @__PURE__ */ __name(async (key2, kind4) => fieldsOf3(key2, kind4), "fields"),
42764
42827
  remove: /* @__PURE__ */ __name(async (key2, kind4, externalIds) => write(database, () => {
42765
42828
  const gone = new Set(externalIds);
42766
42829
  return markDeleted2(kind4, stored3(key2, kind4).filter((row2) => gone.has(String(row2.external_id))).map((row2) => Number(row2.id)));
@@ -42779,7 +42842,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
42779
42842
  };
42780
42843
  }, "crmCopiesOver");
42781
42844
 
42782
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
42845
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
42783
42846
  var refuse = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
42784
42847
  throw new CliError(code, message2, { reason });
42785
42848
  }, "refuse");
@@ -43240,7 +43303,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
43240
43303
  };
43241
43304
  }, "financeStoreOver");
43242
43305
 
43243
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
43306
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
43244
43307
  var TABLES2 = { deal: "deals", lead: "leads" };
43245
43308
  var itemsSql = /* @__PURE__ */ __name((kind4) => `SELECT d.*, s.name AS stage_name, s.pipeline_id, p.name AS pipeline_name, b.name AS author_name, b.kind AS author_kind, a.provider AS account_provider, a.external_id AS account_external_id FROM ${TABLES2[kind4]} d JOIN pipeline_stages s ON s.id = d.stage_id JOIN pipelines p ON p.id = s.pipeline_id LEFT JOIN bots b ON d.author_type = 'bot' AND b.id = d.author_id LEFT JOIN accounts a ON a.id = d.account_id`, "itemsSql");
43246
43309
  var MAX_STAGES = 30;
@@ -43256,6 +43319,16 @@ var jsonField = /* @__PURE__ */ __name((metadata3, key2) => {
43256
43319
  return null;
43257
43320
  }
43258
43321
  }, "jsonField");
43322
+ var isValue = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value) && "label" in value && "value" in value, "isValue");
43323
+ var providerMetadataOf = /* @__PURE__ */ __name((metadata3) => {
43324
+ if (metadata3 == null)
43325
+ return {};
43326
+ try {
43327
+ return Object.fromEntries(Object.entries(JSON.parse(String(metadata3))).filter(([, value]) => isValue(value)));
43328
+ } catch {
43329
+ return {};
43330
+ }
43331
+ }, "providerMetadataOf");
43259
43332
  var accountOf3 = /* @__PURE__ */ __name((provider, external) => provider == null ? null : { provider: String(provider), account: String(external) }, "accountOf");
43260
43333
  var dealOperationsOver = /* @__PURE__ */ __name((context) => {
43261
43334
  const { database, now: now2 } = context;
@@ -43293,6 +43366,8 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
43293
43366
  deal: row2.deal_id == null ? null : `deal:${row2.deal_id}`,
43294
43367
  account: accountOf3(row2.account_provider, row2.account_external_id),
43295
43368
  externalId: row2.external_id == null ? null : String(row2.external_id),
43369
+ assignee: jsonField(row2.metadata, "assignee"),
43370
+ providerMetadata: providerMetadataOf(row2.metadata),
43296
43371
  people: peopleOf(kind4, fields4.id),
43297
43372
  author: authorOf(row2),
43298
43373
  model: row2.model == null ? null : String(row2.model),
@@ -43568,7 +43643,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
43568
43643
  };
43569
43644
  }, "dealsStoreOver");
43570
43645
 
43571
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
43646
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
43572
43647
  var NOTE_FIELDS = [
43573
43648
  "text",
43574
43649
  "exact",
@@ -43998,7 +44073,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
43998
44073
  };
43999
44074
  }, "noteSearchOver");
44000
44075
 
44001
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
44076
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
44002
44077
  var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
44003
44078
  var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
44004
44079
  var EVENT_CORPUS = {
@@ -44130,7 +44205,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
44130
44205
  };
44131
44206
  }, "eventSearchOver");
44132
44207
 
44133
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
44208
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
44134
44209
  var refuse2 = /* @__PURE__ */ __name((message2, reason) => {
44135
44210
  throw new CliError("validation_error", message2, { reason });
44136
44211
  }, "refuse");
@@ -44208,7 +44283,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
44208
44283
  };
44209
44284
  }, "paymentEntriesOver");
44210
44285
 
44211
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
44286
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
44212
44287
  var EVIDENCE_FINDINGS_KIND = "evidence_findings";
44213
44288
  var reference = /* @__PURE__ */ __name((raw) => {
44214
44289
  if (/^(document|note):[1-9]\d*$/.test(raw))
@@ -44234,7 +44309,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
44234
44309
  return valid;
44235
44310
  }, "validateEvidenceFindings");
44236
44311
 
44237
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/moment.js
44312
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/domain/moment.js
44238
44313
  var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
44239
44314
  try {
44240
44315
  return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
@@ -44246,7 +44321,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
44246
44321
  }
44247
44322
  }, "calendarMoment");
44248
44323
 
44249
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
44324
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
44250
44325
  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";
44251
44326
  var iso10 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
44252
44327
  var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -44455,7 +44530,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
44455
44530
  };
44456
44531
  }, "factsStoreOver");
44457
44532
 
44458
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
44533
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
44459
44534
  var invalid4 = /* @__PURE__ */ __name((message2) => {
44460
44535
  throw new CliError("validation_error", message2);
44461
44536
  }, "invalid");
@@ -44559,7 +44634,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
44559
44634
  return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
44560
44635
  }, "findingsCoreOver");
44561
44636
 
44562
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
44637
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
44563
44638
  var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
44564
44639
  var PROPOSAL_VERDICTS = ["useful", "not_useful"];
44565
44640
  var iso11 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
@@ -44724,7 +44799,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
44724
44799
  };
44725
44800
  }, "proposedActionsStoreOver");
44726
44801
 
44727
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
44802
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
44728
44803
  var stale = /* @__PURE__ */ __name(() => {
44729
44804
  throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
44730
44805
  reason: "evidence-findings.stale"
@@ -44905,7 +44980,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
44905
44980
  };
44906
44981
  }, "evidenceFindingsStoreOver");
44907
44982
 
44908
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
44983
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
44909
44984
  var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
44910
44985
  var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
44911
44986
  rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
@@ -44958,7 +45033,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
44958
45033
  }, "forPerson")
44959
45034
  }), "involvementStoreOver");
44960
45035
 
44961
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
45036
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
44962
45037
  import { createHash as createHash13 } from "node:crypto";
44963
45038
  var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
44964
45039
  var id = /* @__PURE__ */ __name((value) => {
@@ -45044,7 +45119,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
45044
45119
  };
45045
45120
  }, "meetingProjectsStoreOver");
45046
45121
 
45047
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
45122
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
45048
45123
  var ORGANIZATIONS_QUERY = {
45049
45124
  entity: "organization",
45050
45125
  backend: "sql",
@@ -45085,7 +45160,7 @@ var REMINDERS_QUERY = {
45085
45160
  })
45086
45161
  };
45087
45162
 
45088
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
45163
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
45089
45164
  var organizationOf = /* @__PURE__ */ __name((row2) => ({
45090
45165
  id: String(row2.id),
45091
45166
  ref: `organization:${row2.id}`,
@@ -45118,7 +45193,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
45118
45193
  }), "updateOrganization")
45119
45194
  }), "organizationsStoreOver");
45120
45195
 
45121
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
45196
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
45122
45197
  var relationOf = /* @__PURE__ */ __name((link3) => ({
45123
45198
  id: link3.id,
45124
45199
  from: link3.from,
@@ -45344,16 +45419,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
45344
45419
  provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
45345
45420
  }, "decidedOrigin");
45346
45421
 
45347
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
45422
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
45348
45423
  import { createHash as createHash16 } from "node:crypto";
45349
45424
 
45350
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
45425
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
45351
45426
  import { createHash as createHash15 } from "node:crypto";
45352
45427
 
45353
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
45428
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
45354
45429
  import { createHash as createHash14 } from "node:crypto";
45355
45430
 
45356
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
45431
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
45357
45432
  var consolidationId = /* @__PURE__ */ __name((value, field4) => {
45358
45433
  if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
45359
45434
  throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
@@ -45404,7 +45479,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
45404
45479
  return input;
45405
45480
  }, "consolidationApplyInput");
45406
45481
 
45407
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
45482
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
45408
45483
  var receiptOf = /* @__PURE__ */ __name((row2) => ({
45409
45484
  id: String(row2.id),
45410
45485
  sourceId: String(row2.source_id),
@@ -45479,7 +45554,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
45479
45554
  }, { beforeCommit: check3 });
45480
45555
  }, "applyTagConsolidation");
45481
45556
 
45482
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
45557
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
45483
45558
  var selections = [
45484
45559
  ["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
45485
45560
  ["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
@@ -45623,7 +45698,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
45623
45698
  };
45624
45699
  }, "previewRows");
45625
45700
 
45626
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
45701
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
45627
45702
  var kinds = ["project", "tag", "topic"];
45628
45703
  var cancelled2 = /* @__PURE__ */ __name((signal) => {
45629
45704
  if (signal?.aborted)
@@ -45887,7 +45962,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
45887
45962
  };
45888
45963
  }, "vocabularyStoreOver");
45889
45964
 
45890
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
45965
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
45891
45966
  var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
45892
45967
  var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
45893
45968
  var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
@@ -46428,7 +46503,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
46428
46503
  return key2.padEnd(3, "X");
46429
46504
  }, "projectKey");
46430
46505
 
46431
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
46506
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
46432
46507
  var DAY5 = 864e5;
46433
46508
  var SETTING4 = "logs_pruned_at";
46434
46509
  var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
@@ -46455,7 +46530,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
46455
46530
  };
46456
46531
  }, "logPruner");
46457
46532
 
46458
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mail/findings.js
46533
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/mail/findings.js
46459
46534
  var MAIL_FINDINGS_PER_RUN = 30;
46460
46535
  var MAIL_FINDINGS_PER_SENDER = 5;
46461
46536
  var invalid6 = /* @__PURE__ */ __name((message2) => {
@@ -46814,7 +46889,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
46814
46889
  }, "checkMailFindings");
46815
46890
  var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
46816
46891
 
46817
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mail/score.js
46892
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/mail/score.js
46818
46893
  var import_disposable_email_domains_js = __toESM(require_dist(), 1);
46819
46894
  var import_tldts = __toESM(require_cjs(), 1);
46820
46895
  var FREE_MAIL = /* @__PURE__ */ new Set([
@@ -46844,7 +46919,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
46844
46919
  ]);
46845
46920
  var DAY_MS = 24 * 60 * 60 * 1e3;
46846
46921
 
46847
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
46922
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
46848
46923
  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";
46849
46924
  var orderOperationsOver = /* @__PURE__ */ __name((context) => {
46850
46925
  const { database, now: now2 } = context;
@@ -46996,7 +47071,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
46996
47071
  };
46997
47072
  }, "ordersStoreOver");
46998
47073
 
46999
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
47074
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
47000
47075
  var stale2 = /* @__PURE__ */ __name(() => {
47001
47076
  throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
47002
47077
  reason: "mail-findings.stale"
@@ -47453,7 +47528,7 @@ ${evidence.join("\n")}`, agent);
47453
47528
  };
47454
47529
  }, "mailFindingsStoreOver");
47455
47530
 
47456
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
47531
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
47457
47532
  var stale3 = /* @__PURE__ */ __name(() => {
47458
47533
  throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
47459
47534
  reason: "meeting-findings.stale"
@@ -47621,7 +47696,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
47621
47696
  };
47622
47697
  }, "meetingFindingsStoreOver");
47623
47698
 
47624
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
47699
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
47625
47700
  var RANK_BATCH = 512;
47626
47701
  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";
47627
47702
  var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
@@ -47892,7 +47967,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
47892
47967
  }
47893
47968
  }), "meetingVectorsOver");
47894
47969
 
47895
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
47970
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
47896
47971
  var OTHER_SOURCES = ["document", "note", "email"];
47897
47972
  var TEXTS = {
47898
47973
  document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
@@ -47993,11 +48068,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
47993
48068
  };
47994
48069
  }, "sourceMentionStoreOver");
47995
48070
 
47996
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
48071
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
47997
48072
  import { mkdirSync as mkdirSync2, statSync, writeFileSync as writeFileSync2 } from "node:fs";
47998
48073
  import { dirname as dirname2 } from "node:path";
47999
48074
 
48000
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
48075
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
48001
48076
  import { readFileSync as readFileSync3 } from "node:fs";
48002
48077
  var CLIENTS_SETTING = "clients";
48003
48078
  var coreVersion = (() => {
@@ -48055,7 +48130,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
48055
48130
  return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
48056
48131
  }, "refusalAdvice");
48057
48132
 
48058
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
48133
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
48059
48134
  var GENERATED = [
48060
48135
  {
48061
48136
  "name": "20261010184427_initial",
@@ -49113,10 +49188,16 @@ WHERE json_type(params, '$.selection') = 'object';`
49113
49188
  "DROP INDEX IF EXISTS `pipelines_by_account_id_external_id`;",
49114
49189
  "CREATE UNIQUE INDEX `pipelines_by_account_id_kind_external_id` ON `pipelines` (`account_id`,`kind`,`external_id`) WHERE account_id IS NOT NULL AND external_id IS NOT NULL;"
49115
49190
  ]
49191
+ },
49192
+ {
49193
+ "name": "20261106225547_version-54-crm-fields",
49194
+ "statements": [
49195
+ "CREATE TABLE `crm_fields` (\n `id` integer PRIMARY KEY,\n `account_id` integer NOT NULL,\n `kind` text NOT NULL,\n `code` text NOT NULL,\n `label` text,\n `type` text NOT NULL,\n `multiple` integer NOT NULL,\n `filterable` integer NOT NULL,\n `options` text,\n `position` integer NOT NULL,\n `created_at` integer NOT NULL,\n `updated_at` integer NOT NULL,\n `deleted_at` integer,\n CONSTRAINT `fk_crm_fields_account_id_accounts_id_fk` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`),\n CONSTRAINT `crm_fields_account_id_kind_code_unique` UNIQUE(`account_id`,`kind`,`code`)\n);"
49196
+ ]
49116
49197
  }
49117
49198
  ];
49118
49199
 
49119
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
49200
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
49120
49201
  import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
49121
49202
  import { basename, dirname, join as join2, parse } from "node:path";
49122
49203
  var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
@@ -49349,7 +49430,7 @@ var rollBack = /* @__PURE__ */ __name((database, path) => {
49349
49430
  return { ...result, foreignKeyViolations };
49350
49431
  }, "rollBack");
49351
49432
 
49352
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
49433
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
49353
49434
  var V31_TABLES = [
49354
49435
  "accounts",
49355
49436
  "account_identities",
@@ -49458,7 +49539,8 @@ var MANIFEST = [
49458
49539
  { name: "20261105144549_version-51-task-links", version: 51, minCompatible: 34 },
49459
49540
  { name: "20261106010504_version-52-deals", version: 52, minCompatible: 34 },
49460
49541
  { name: "20261106010507_version-52-deals-rules", version: 52, minCompatible: 34 },
49461
- { name: "20261106165009_version-53-crm-pipelines", version: 53, minCompatible: 34 }
49542
+ { name: "20261106165009_version-53-crm-pipelines", version: 53, minCompatible: 34 },
49543
+ { name: "20261106225547_version-54-crm-fields", version: 54, minCompatible: 34 }
49462
49544
  ];
49463
49545
  var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated = GENERATED) => {
49464
49546
  const migrations = [];
@@ -49494,7 +49576,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
49494
49576
  return migrations;
49495
49577
  }, "generatedMigrations");
49496
49578
 
49497
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/migrations.js
49579
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/migrations.js
49498
49580
  var MIGRATIONS = generatedMigrations();
49499
49581
  var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
49500
49582
  version INTEGER PRIMARY KEY,
@@ -49573,7 +49655,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
49573
49655
  }
49574
49656
  }, "migrate");
49575
49657
 
49576
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
49658
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
49577
49659
  var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
49578
49660
  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 ?");
49579
49661
  if (pending.get(0, 1) === void 0)
@@ -49595,7 +49677,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
49595
49677
  }
49596
49678
  }, "fillJoinKeys");
49597
49679
 
49598
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
49680
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
49599
49681
  var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
49600
49682
  refuseOwnerStoreInTests(path);
49601
49683
  const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
@@ -49609,8 +49691,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
49609
49691
  }, "openSqlite");
49610
49692
  var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
49611
49693
  quietSqliteWarning();
49612
- const { drizzle } = await import("./node-PZDNPKN7.js");
49613
- const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-4F5NLRNT.js");
49694
+ const { drizzle } = await import("./node-MIHFH7T4.js");
49695
+ const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-FF2SFXPZ.js");
49614
49696
  const client = await nodeClient(path, { readOnly });
49615
49697
  try {
49616
49698
  return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
@@ -49620,8 +49702,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
49620
49702
  }
49621
49703
  }, "openUnderNode");
49622
49704
  var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
49623
- const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-OM72TCYT.js");
49624
- const { drizzle } = await import("./bun-C7JS2V7G.js");
49705
+ const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-ZHYZDAFU.js");
49706
+ const { drizzle } = await import("./bun-NQS22GBW.js");
49625
49707
  const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
49626
49708
  try {
49627
49709
  return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
@@ -49631,7 +49713,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
49631
49713
  }
49632
49714
  }, "openUnderBun");
49633
49715
 
49634
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
49716
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
49635
49717
  var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
49636
49718
  var paymentOf = /* @__PURE__ */ __name((metadata3) => {
49637
49719
  try {
@@ -49699,8 +49781,8 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
49699
49781
  });
49700
49782
  }, "movePaymentFacts");
49701
49783
 
49702
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
49703
- var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
49784
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
49785
+ var readCompatibility = /* @__PURE__ */ __name((database, command) => {
49704
49786
  const ours = MIGRATIONS.at(-1)?.version ?? 0;
49705
49787
  if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
49706
49788
  throw new CliError("configuration_error", "The store has no schema history; initialize it explicitly before a read-only open");
@@ -49708,13 +49790,16 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
49708
49790
  const version = Number(row2?.version), minCompatible = Number(row2?.min_compatible);
49709
49791
  if (!Number.isSafeInteger(version) || !Number.isSafeInteger(minCompatible) || version < 1 || minCompatible < 1 || minCompatible > version)
49710
49792
  throw new CliError("configuration_error", "The store schema history is invalid; read-only opening cannot repair it");
49711
- if (version < ours)
49712
- throw new CliError("configuration_error", `The store needs schema ${ours} maintenance before a read-only open (found ${version})`);
49713
49793
  if (minCompatible > ours)
49714
49794
  throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
49795
+ return version < ours ? "older" : "current";
49796
+ }, "readCompatibility");
49797
+ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
49798
+ if (readCompatibility(database, command) === "older")
49799
+ throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
49715
49800
  }, "assertReadCompatible");
49716
49801
 
49717
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
49802
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
49718
49803
  var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
49719
49804
  var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
49720
49805
  if (provenance2?.startsWith("rule:"))
@@ -49760,7 +49845,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
49760
49845
  });
49761
49846
  }, "moveSuggestedLinks");
49762
49847
 
49763
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
49848
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
49764
49849
  var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
49765
49850
  var TEST_PROVIDER = "chat";
49766
49851
  var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
@@ -49781,7 +49866,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
49781
49866
  }
49782
49867
  }, "purgeTestAccounts");
49783
49868
 
49784
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
49869
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
49785
49870
  var BACKFILL_ON_OPEN = 5e3;
49786
49871
  var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
49787
49872
  var createWritable = /* @__PURE__ */ __name((file) => {
@@ -49794,8 +49879,30 @@ var createWritable = /* @__PURE__ */ __name((file) => {
49794
49879
  throw new CliError("permission_error", "the message store cannot be written from here; run where it is writable, or set MESSAGING_STORE", { reason: "store.not-writable" });
49795
49880
  }
49796
49881
  }, "createWritable");
49797
- var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Date.now, command, version, warn = /* @__PURE__ */ __name((line) => process.stderr.write(`${line}
49798
- `), "warn"), readOnly = false, decisions: decisions2 = DEFAULT_DECISION_POLICY } = {}) => {
49882
+ var openReadable = /* @__PURE__ */ __name(async (file, options) => {
49883
+ const first = await openSqlite(file, { readOnly: true });
49884
+ try {
49885
+ if (readCompatibility(first.database, options.command) === "current")
49886
+ return first;
49887
+ } catch (error) {
49888
+ first.database.close();
49889
+ throw error;
49890
+ }
49891
+ first.database.close();
49892
+ const writable = await openStoreContext({ ...options, path: file, readOnly: false });
49893
+ writable.database.close();
49894
+ const migrated = await openSqlite(file, { readOnly: true });
49895
+ try {
49896
+ assertReadCompatible(migrated.database, options.command);
49897
+ return migrated;
49898
+ } catch (error) {
49899
+ migrated.database.close();
49900
+ throw error;
49901
+ }
49902
+ }, "openReadable");
49903
+ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
49904
+ const { path, env, now: now2 = Date.now, command, version, warn = /* @__PURE__ */ __name((line) => process.stderr.write(`${line}
49905
+ `), "warn"), readOnly = false, decisions: decisions2 = DEFAULT_DECISION_POLICY } = options;
49799
49906
  if (typeof readOnly !== "boolean")
49800
49907
  throw new CliError("validation_error", "readOnly must be a boolean");
49801
49908
  await storeCapable();
@@ -49806,12 +49913,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
49806
49913
  throw new CliError("not_found", "The store does not exist as a file; read-only opening does not create it");
49807
49914
  } else
49808
49915
  createWritable(file);
49809
- const opened = await openSqlite(file, { readOnly });
49916
+ const opened = readOnly ? await openReadable(file, options) : await openSqlite(file, { readOnly });
49810
49917
  const database = opened.database;
49811
49918
  try {
49812
- if (readOnly)
49813
- assertReadCompatible(database, command);
49814
- else {
49919
+ if (!readOnly) {
49815
49920
  const notice = migrate(database, {
49816
49921
  now: now2,
49817
49922
  command,
@@ -49852,10 +49957,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
49852
49957
  }
49853
49958
  }, "openStoreContext");
49854
49959
 
49855
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
49960
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
49856
49961
  import { createHash as createHash17 } from "node:crypto";
49857
49962
 
49858
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
49963
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
49859
49964
  var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
49860
49965
  var ref = text4(2048);
49861
49966
  var timestamp2 = pipe(number(), safeInteger(), minValue(0));
@@ -49921,7 +50026,7 @@ var projectAnnotationsSchema = strictObject({
49921
50026
  }))
49922
50027
  });
49923
50028
 
49924
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
50029
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
49925
50030
  var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
49926
50031
  var invalid9 = /* @__PURE__ */ __name((field4) => {
49927
50032
  throw new CliError("validation_error", `invalid project annotations.${field4}`);
@@ -50025,7 +50130,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
50025
50130
  invalid9("external.unused");
50026
50131
  }, "validateProjectAnnotationsGraph");
50027
50132
 
50028
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
50133
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
50029
50134
  var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
50030
50135
  var ref2 = pipe(string(), minLength(1), maxLength(2048));
50031
50136
  var targetSchema = strictObject({
@@ -50131,7 +50236,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
50131
50236
  };
50132
50237
  }, "planBoundProjectAnnotations");
50133
50238
 
50134
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
50239
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
50135
50240
  import { createHash as createHash18 } from "node:crypto";
50136
50241
  var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
50137
50242
  var timestamp3 = pipe(number(), safeInteger(), minValue(0));
@@ -50225,7 +50330,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
50225
50330
  })).digest("hex");
50226
50331
  }, "projectAnnotationSnapshotFingerprint");
50227
50332
 
50228
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
50333
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
50229
50334
  var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
50230
50335
  if (!request || typeof request !== "object" || Array.isArray(request))
50231
50336
  throw new CliError("validation_error", "project annotation request is required");
@@ -50242,7 +50347,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
50242
50347
  return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
50243
50348
  }, "projectAnnotationRequest");
50244
50349
 
50245
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
50350
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
50246
50351
  var SnapshotBudget = class {
50247
50352
  static {
50248
50353
  __name(this, "SnapshotBudget");
@@ -50268,13 +50373,13 @@ var SnapshotBudget = class {
50268
50373
  }
50269
50374
  };
50270
50375
 
50271
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
50376
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
50272
50377
  import { createHash as createHash20 } from "node:crypto";
50273
50378
 
50274
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
50379
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
50275
50380
  var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
50276
50381
 
50277
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
50382
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
50278
50383
  import { createHash as createHash19 } from "node:crypto";
50279
50384
  var invalid11 = /* @__PURE__ */ __name(() => {
50280
50385
  throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
@@ -50417,7 +50522,7 @@ var ProjectSnapshotSources = class {
50417
50522
  }
50418
50523
  };
50419
50524
 
50420
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
50525
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
50421
50526
  var unsupported = /* @__PURE__ */ __name(() => {
50422
50527
  throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
50423
50528
  }, "unsupported");
@@ -50588,7 +50693,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
50588
50693
  return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
50589
50694
  }), "projectAnnotationSnapshot");
50590
50695
 
50591
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
50696
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
50592
50697
  var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
50593
50698
  const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
50594
50699
  const sources = new ProjectSnapshotSources(database, budget);
@@ -50650,7 +50755,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
50650
50755
  };
50651
50756
  }), "previewAnnotationSnapshot");
50652
50757
 
50653
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
50758
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
50654
50759
  var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
50655
50760
  const mappings = { ...bindings };
50656
50761
  const resolve = /* @__PURE__ */ __name((ref3) => {
@@ -50692,7 +50797,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
50692
50797
  return mappings;
50693
50798
  }, "restoreAnnotationRecords");
50694
50799
 
50695
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
50800
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
50696
50801
  var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
50697
50802
  async preview(request) {
50698
50803
  const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
@@ -50722,7 +50827,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
50722
50827
  }
50723
50828
  }), "projectAnnotationStoreOver");
50724
50829
 
50725
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
50830
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
50726
50831
  var PROJECTED = {
50727
50832
  invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
50728
50833
  payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
@@ -51135,7 +51240,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
51135
51240
  };
51136
51241
  }, "recordStoreOver");
51137
51242
 
51138
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
51243
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
51139
51244
  var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
51140
51245
  const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
51141
51246
  let merged = { from: from2, to };
@@ -51148,7 +51253,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
51148
51253
  }, "markRange");
51149
51254
  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");
51150
51255
 
51151
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
51256
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
51152
51257
  var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
51153
51258
  var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
51154
51259
  chatId: String(row2.key).slice(prefix.length),
@@ -51169,7 +51274,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
51169
51274
  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);
51170
51275
  }, "setTaskAnalysisMark");
51171
51276
 
51172
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
51277
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
51173
51278
  var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
51174
51279
  var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
51175
51280
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
@@ -51179,7 +51284,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
51179
51284
  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);
51180
51285
  }, "setTaskRulesStop");
51181
51286
 
51182
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sync.js
51287
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sync.js
51183
51288
  var syncStoreOver = /* @__PURE__ */ __name((context) => {
51184
51289
  const { database } = context;
51185
51290
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
@@ -51238,7 +51343,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
51238
51343
  };
51239
51344
  }, "syncStoreOver");
51240
51345
 
51241
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/tags.js
51346
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/tags.js
51242
51347
  var tagsStoreOver = /* @__PURE__ */ __name((context) => {
51243
51348
  const { database } = context;
51244
51349
  return {
@@ -51260,7 +51365,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
51260
51365
  };
51261
51366
  }, "tagsStoreOver");
51262
51367
 
51263
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
51368
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
51264
51369
  var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
51265
51370
  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
51266
51371
  WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
@@ -51387,7 +51492,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
51387
51492
  dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
51388
51493
  }, "savePictureChunks");
51389
51494
 
51390
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
51495
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
51391
51496
  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,
51392
51497
  EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
51393
51498
  FROM messages m
@@ -51476,7 +51581,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
51476
51581
  return plain2(best(found2));
51477
51582
  }, "nearestMessages");
51478
51583
 
51479
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/vectors.js
51584
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/vectors.js
51480
51585
  var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
51481
51586
  const { database } = context;
51482
51587
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -51734,7 +51839,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
51734
51839
  embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
51735
51840
  }), "vectorsStoreOver");
51736
51841
 
51737
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
51842
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
51738
51843
  import { existsSync, readFileSync as readFileSync4 } from "node:fs";
51739
51844
  import { dirname as dirname3, join as join3 } from "node:path";
51740
51845
  var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
@@ -51822,10 +51927,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
51822
51927
  }
51823
51928
  }, "lastBackup");
51824
51929
 
51825
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/providers.js
51930
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/providers.js
51826
51931
  var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
51827
51932
 
51828
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
51933
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
51829
51934
  var COUNTED_TABLES = [
51830
51935
  "accounts",
51831
51936
  "chats",
@@ -51910,7 +52015,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
51910
52015
  };
51911
52016
  }, "storeContents");
51912
52017
 
51913
- // node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/store.js
52018
+ // node_modules/.pnpm/@wirecat+cli-core@0.598.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_273187b89e8ba0142d0426b4a9bc937e/node_modules/@wirecat/cli-core/dist/store/store.js
51914
52019
  var openStore = /* @__PURE__ */ __name(async (options = {}) => {
51915
52020
  const context = await openStoreContext(options);
51916
52021
  try {