@wirecat/mail-cli 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +10 -7
  3. package/dist/bin/mail.js +2 -2
  4. package/dist/bundle/{all-profiles-7WILOT5E.js → all-profiles-55XPXQHY.js} +5 -5
  5. package/dist/bundle/{anthropic-NHWLIMEZ.js → anthropic-K5B6I4LB.js} +3 -3
  6. package/dist/bundle/{app-server-XDMYCJLV.js → app-server-VWWLQLTZ.js} +39 -39
  7. package/dist/bundle/{bun-GTG5IYLQ.js → bun-EO7AI6YP.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-KGH5F33G.js → bun-sqlite-F24A4IOP.js} +2 -2
  9. package/dist/bundle/{chunk-DDMJ3RVO.js → chunk-2ADB5DSG.js} +2 -2
  10. package/dist/bundle/{chunk-76IKLP2M.js → chunk-2LP46EUH.js} +96 -91
  11. package/dist/bundle/{chunk-EKE3R36Y.js → chunk-2NZGUKYK.js} +6 -6
  12. package/dist/bundle/{chunk-SVNTRF5O.js → chunk-4KLJN3LK.js} +11 -11
  13. package/dist/bundle/{chunk-7REG25RM.js → chunk-5RUTHKXZ.js} +3 -3
  14. package/dist/bundle/{chunk-WJ3LUWRN.js → chunk-6BNMEOVS.js} +3 -3
  15. package/dist/bundle/{chunk-S2GSU4MT.js → chunk-6BR6JMCR.js} +9 -9
  16. package/dist/bundle/{chunk-5FLW25US.js → chunk-7IYDIU4P.js} +5 -5
  17. package/dist/bundle/{chunk-D7UZXUSB.js → chunk-7QQ4EMYF.js} +2 -2
  18. package/dist/bundle/{chunk-UZR3IKS7.js → chunk-7X64JS6S.js} +1 -1
  19. package/dist/bundle/{chunk-Z6F7EXT2.js → chunk-ANRI6EZY.js} +7 -7
  20. package/dist/bundle/{chunk-YQAUH3PN.js → chunk-BHKI5OCD.js} +1 -1
  21. package/dist/bundle/{chunk-H66ZMBDD.js → chunk-CADRRSQK.js} +1 -1
  22. package/dist/bundle/{chunk-BKZEYTLU.js → chunk-CCNHVZ3G.js} +412 -324
  23. package/dist/bundle/{chunk-AJIT2T3F.js → chunk-CSI73XJ5.js} +6 -6
  24. package/dist/bundle/{chunk-7LKJDJNS.js → chunk-EDKV6D6T.js} +1 -1
  25. package/dist/bundle/{chunk-Y6KUKIQZ.js → chunk-EOEYP7CJ.js} +2 -2
  26. package/dist/bundle/{chunk-H5BW7454.js → chunk-F6JTOQIK.js} +5 -4
  27. package/dist/bundle/{chunk-6HIW7IJL.js → chunk-F7KAJNNK.js} +4 -4
  28. package/dist/bundle/{chunk-ETPT7TPW.js → chunk-FFKNUVVD.js} +1 -1
  29. package/dist/bundle/{chunk-QUGFBY7O.js → chunk-H7K2DN3R.js} +7 -7
  30. package/dist/bundle/{chunk-VBLFQJY3.js → chunk-HJEMHZRU.js} +1 -1
  31. package/dist/bundle/{chunk-R5JD4GMA.js → chunk-HORM6VRV.js} +1 -1
  32. package/dist/bundle/{chunk-GQKYSGIA.js → chunk-HUB42T2Z.js} +46 -46
  33. package/dist/bundle/{chunk-QJHCKFFC.js → chunk-ID24SLH3.js} +16 -16
  34. package/dist/bundle/{chunk-BUOSCMCD.js → chunk-IIO6NXCA.js} +2 -2
  35. package/dist/bundle/{chunk-AROBJF5P.js → chunk-JKHI3PH7.js} +1 -1
  36. package/dist/bundle/{chunk-THVLMTH7.js → chunk-JZFIHVRB.js} +26 -26
  37. package/dist/bundle/{chunk-VWO3XXSF.js → chunk-LKDK5YMI.js} +1 -1
  38. package/dist/bundle/{chunk-MDVXIPA3.js → chunk-M4NTQ247.js} +10 -10
  39. package/dist/bundle/{chunk-H7NUGJPV.js → chunk-MGBGE2Y4.js} +2 -2
  40. package/dist/bundle/{chunk-Y5WA7AOA.js → chunk-NL5LNYGX.js} +21 -21
  41. package/dist/bundle/{chunk-GPAAQ6LY.js → chunk-OM4ZBLT7.js} +13 -13
  42. package/dist/bundle/{chunk-QUSZWBZF.js → chunk-ORYYYM5Y.js} +32 -22
  43. package/dist/bundle/{chunk-VRQRBVKT.js → chunk-QYWDC7NP.js} +43 -43
  44. package/dist/bundle/{chunk-4I3YT5KK.js → chunk-RLSGMMGC.js} +4 -4
  45. package/dist/bundle/{chunk-77VHMI3A.js → chunk-SWRNMYDL.js} +1 -1
  46. package/dist/bundle/{chunk-BPF7IXJT.js → chunk-SY3SP7EI.js} +5 -5
  47. package/dist/bundle/{chunk-TMVIQJCG.js → chunk-UJYCKCFR.js} +2 -2
  48. package/dist/bundle/{chunk-HJRUFT5Y.js → chunk-UO7X2VW4.js} +5 -5
  49. package/dist/bundle/{chunk-5JOKRFWE.js → chunk-UZDHK26H.js} +1 -1
  50. package/dist/bundle/{chunk-ZKH5CHGI.js → chunk-VP5GCMHM.js} +5 -5
  51. package/dist/bundle/{chunk-2X4WYZPA.js → chunk-VWHRIGYJ.js} +2 -2
  52. package/dist/bundle/{chunk-7QEE5I7H.js → chunk-VWXCEEUH.js} +2 -2
  53. package/dist/bundle/{chunk-CT7NG7BI.js → chunk-WFBTPZK3.js} +3 -3
  54. package/dist/bundle/{chunk-STC45HZX.js → chunk-X7AXH2IC.js} +196 -196
  55. package/dist/bundle/{chunk-MABCR67K.js → chunk-XJ5TBPCK.js} +2 -2
  56. package/dist/bundle/{chunk-H7XOHNRY.js → chunk-YSSMDVT3.js} +1 -1
  57. package/dist/bundle/{chunk-ZNYJG4AY.js → chunk-YYTWV5GU.js} +42 -42
  58. package/dist/bundle/{chunk-QLYHLW54.js → chunk-ZAR67WKR.js} +5 -5
  59. package/dist/bundle/{command-contract-Y42ULKE5.js → command-contract-L65UZ7AF.js} +13 -13
  60. package/dist/bundle/{decode-L4X542L3.js → decode-ON4KBMEX.js} +2 -2
  61. package/dist/bundle/{dist-WKIRHOLK.js → dist-FMN7UZ7R.js} +14 -14
  62. package/dist/bundle/{echarts-G6QLXR4X.js → echarts-XPA226QR.js} +2 -2
  63. package/dist/bundle/{embed-E33ZBHQR.js → embed-QERDAB73.js} +3 -3
  64. package/dist/bundle/{embedder-EMBCIVGF.js → embedder-I76YT3E5.js} +6 -6
  65. package/dist/bundle/{first-run-WF2HF5FI.js → first-run-KZJFR55N.js} +5 -5
  66. package/dist/bundle/{first-screen-DZFOUUZC.js → first-screen-EORANEAK.js} +14 -14
  67. package/dist/bundle/{instructions-DUH7265J.js → instructions-NN3BCFIM.js} +1 -1
  68. package/dist/bundle/mail.js +2 -2
  69. package/dist/bundle/{node-73PKCCE7.js → node-2S75QJ6B.js} +2 -2
  70. package/dist/bundle/{node-sqlite-FDD5N6GC.js → node-sqlite-RC7WM3EG.js} +2 -2
  71. package/dist/bundle/{oauth-ND3K2F7B.js → oauth-FUHLZCKV.js} +4 -4
  72. package/dist/bundle/{open-FZYY6TKE.js → open-JOKT7LKY.js} +1 -1
  73. package/dist/bundle/{openai-BXOF6XIM.js → openai-U3IMQ6UI.js} +10 -10
  74. package/dist/bundle/{process-TXIK4VJP.js → process-LKODK722.js} +1 -1
  75. package/dist/bundle/{program-2SUR4WOS.js → program-RMLIQXCA.js} +944 -613
  76. package/dist/bundle/{prompt-I5GCP73M.js → prompt-23VYMNNB.js} +2 -2
  77. package/dist/bundle/{recognize-ILYEKXVB.js → recognize-TXO3462R.js} +1 -1
  78. package/dist/bundle/{remote-SSPZEAJ7.js → remote-5F4ZOASM.js} +4 -4
  79. package/dist/bundle/{rerank-NAO5RMGB.js → rerank-TXSDPEFE.js} +4 -4
  80. package/dist/bundle/{serve-UDXIEQKC.js → serve-TWYECYWM.js} +6 -6
  81. package/dist/bundle/server-2GEAXKX2.js +63 -0
  82. package/dist/bundle/{server-KTPELKAN.js → server-3S3BKE6D.js} +31 -31
  83. package/dist/bundle/{sqlite-runtime-AONFLND6.js → sqlite-runtime-BEOBGC6K.js} +2 -2
  84. package/dist/bundle/{state-I4PLX3UB.js → state-ERWIUTQQ.js} +3 -3
  85. package/dist/bundle/{store-ZPPRXGPY.js → store-2JO4JGQL.js} +11 -9
  86. package/dist/bundle/{store-OHQH3MGN.js → store-4RY5UMOP.js} +11 -11
  87. package/dist/bundle/store-maintenance-command-T7D4OTN7.js +52 -0
  88. package/dist/commands/read.d.ts +3 -0
  89. package/dist/commands/read.d.ts.map +1 -0
  90. package/dist/commands/read.js +33 -0
  91. package/dist/commands/read.js.map +1 -0
  92. package/dist/identity.js +1 -1
  93. package/dist/identity.js.map +1 -1
  94. package/dist/program.d.ts.map +1 -1
  95. package/dist/program.js +10 -1
  96. package/dist/program.js.map +1 -1
  97. package/dist/version.d.ts +1 -1
  98. package/dist/version.js +1 -1
  99. package/package.json +3 -3
  100. package/skills/mail-cli/SKILL.md +6 -2
  101. package/dist/bundle/server-UZFSEKNJ.js +0 -63
  102. package/dist/bundle/store-maintenance-command-QOYXEBT6.js +0 -52
@@ -31,7 +31,7 @@ import {
31
31
  rankingWords,
32
32
  useStoredProviders,
33
33
  validCounter
34
- } from "./chunk-BPF7IXJT.js";
34
+ } from "./chunk-SY3SP7EI.js";
35
35
  import {
36
36
  FACT_STATUSES,
37
37
  FACT_TYPES,
@@ -54,7 +54,7 @@ import {
54
54
  matches,
55
55
  priorityBand,
56
56
  priorityLabel
57
- } from "./chunk-EKE3R36Y.js";
57
+ } from "./chunk-2NZGUKYK.js";
58
58
  import {
59
59
  CHAT_MESSAGES_READ,
60
60
  MEETING_FINDINGS_KIND,
@@ -93,7 +93,7 @@ import {
93
93
  validateQuery,
94
94
  walkQuery,
95
95
  zonedMoment
96
- } from "./chunk-ZNYJG4AY.js";
96
+ } from "./chunk-YYTWV5GU.js";
97
97
  import {
98
98
  DEFAULT_STEMMERS,
99
99
  DEFAULT_STEMMERS_VERSION,
@@ -106,18 +106,18 @@ import {
106
106
  fold,
107
107
  normalize,
108
108
  parseStemmers
109
- } from "./chunk-Z6F7EXT2.js";
109
+ } from "./chunk-ANRI6EZY.js";
110
110
  import {
111
111
  DEFAULT_TASK_CATEGORIES,
112
112
  sharedConfigPath,
113
113
  storedTaskCategories,
114
114
  taskCategoriesReader
115
- } from "./chunk-6HIW7IJL.js";
115
+ } from "./chunk-F7KAJNNK.js";
116
116
  import {
117
117
  PRAGMAS,
118
118
  quietSqliteWarning,
119
119
  storeCapable
120
- } from "./chunk-HJRUFT5Y.js";
120
+ } from "./chunk-UO7X2VW4.js";
121
121
  import {
122
122
  SQLiteTable,
123
123
  TableAliasProxyHandler,
@@ -142,10 +142,10 @@ import {
142
142
  sql,
143
143
  sqliteTable,
144
144
  text
145
- } from "./chunk-UZR3IKS7.js";
145
+ } from "./chunk-7X64JS6S.js";
146
146
  import {
147
147
  storePath
148
- } from "./chunk-5JOKRFWE.js";
148
+ } from "./chunk-UZDHK26H.js";
149
149
  import {
150
150
  array,
151
151
  boolean,
@@ -174,7 +174,7 @@ import {
174
174
  __name
175
175
  } from "./chunk-ZVVMGPBJ.js";
176
176
 
177
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/account-store.js
177
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/account-store.js
178
178
  var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
179
179
  const methods = whole;
180
180
  return Object.fromEntries(Object.keys(keyed).map((name) => [
@@ -302,7 +302,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
302
302
  };
303
303
  }, "bindAccount");
304
304
 
305
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/query.js
305
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/query.js
306
306
  var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
307
307
  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");
308
308
  var fail = /* @__PURE__ */ __name((message2) => {
@@ -325,7 +325,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
325
325
  return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
326
326
  }, "sourceOf");
327
327
 
328
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/account-list.js
328
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/account-list.js
329
329
  var ACCOUNT_GROUPS = "accountGroups";
330
330
  var ACCOUNT_GROUPS_SETTING = "account_groups";
331
331
  var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
@@ -512,7 +512,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf = (kind3)
512
512
  return { accounts: [...chosen.values()], skipped };
513
513
  }, "fitting");
514
514
 
515
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
515
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
516
516
  var IndexBuilderOn = class {
517
517
  static {
518
518
  __name(this, "IndexBuilderOn");
@@ -707,7 +707,7 @@ function alias(table, alias2) {
707
707
  }
708
708
  __name(alias, "alias");
709
709
 
710
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
710
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
711
711
  var ENTITY_TABLES = {
712
712
  account: "accounts",
713
713
  attachment: "attachments",
@@ -747,7 +747,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
747
747
  return { table, pointer, type, count, known: known2 };
748
748
  }).filter(({ count }) => count > 0)), "orphanPointers");
749
749
 
750
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
750
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
751
751
  var canonicalTags = sqliteTable("canonical_tags", {
752
752
  id: integer("id").primaryKey(),
753
753
  name: text("name").notNull().unique(),
@@ -756,7 +756,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
756
756
  updatedAt: integer("updated_at").notNull()
757
757
  });
758
758
 
759
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
759
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
760
760
  var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
761
761
  sourceKey: text("source_key").notNull(),
762
762
  collection: text("collection").notNull(),
@@ -766,13 +766,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
766
766
  createdAt: integer("created_at").notNull()
767
767
  }, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
768
768
 
769
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
769
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
770
770
  var documentIndexPending = sqliteTable("document_index_pending", {
771
771
  id: integer("id").notNull(),
772
772
  indexableType: text("indexable_type").notNull()
773
773
  }, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
774
774
 
775
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
775
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
776
776
  var tagRedirects = sqliteTable("tag_redirects", {
777
777
  sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
778
778
  survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
@@ -798,7 +798,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
798
798
  index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
799
799
  ]);
800
800
 
801
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
801
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
802
802
  var accounts = sqliteTable("accounts", {
803
803
  id: integer("id").primaryKey(),
804
804
  provider: text("provider").notNull(),
@@ -1512,11 +1512,13 @@ var memories = sqliteTable("memories", {
1512
1512
  scope: text("scope").notNull(),
1513
1513
  createdAt: integer("created_at").notNull(),
1514
1514
  updatedAt: integer("updated_at").notNull(),
1515
- deletedAt: integer("deleted_at")
1515
+ deletedAt: integer("deleted_at"),
1516
+ projectId: integer("project_id").references(() => projects.id)
1516
1517
  }, (table) => [
1517
1518
  index("memories_by_subject_type_subject_id").on(table.subjectType, table.subjectId),
1518
1519
  index("memories_by_author_type_author_id").on(table.authorType, table.authorId),
1519
- index("memories_by_supersedes_id").on(table.supersedesId)
1520
+ index("memories_by_supersedes_id").on(table.supersedesId),
1521
+ index("memories_by_project_id").on(table.projectId)
1520
1522
  ]);
1521
1523
  var memoryIndexPending = sqliteTable("memory_index_pending", {
1522
1524
  id: integer("id").notNull(),
@@ -2297,7 +2299,7 @@ var storeSettings = sqliteTable("store_settings", {
2297
2299
  at: integer("at").notNull()
2298
2300
  });
2299
2301
 
2300
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
2302
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
2301
2303
  var ARMS = [
2302
2304
  [
2303
2305
  "message",
@@ -2424,7 +2426,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
2424
2426
  return recomputed;
2425
2427
  }, "drainInvolvementQueue");
2426
2428
 
2427
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/mentions.js
2429
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/mentions.js
2428
2430
  import { domainToUnicode } from "node:url";
2429
2431
 
2430
2432
  // node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
@@ -12446,7 +12448,7 @@ var oa = /* @__PURE__ */ __name((e) => {
12446
12448
  }, "oa");
12447
12449
  var na = { parse: O, get: aa, isValid: oa };
12448
12450
 
12449
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
12451
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
12450
12452
  var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
12451
12453
  var ID = /^[\w-]{10,}$/;
12452
12454
  var trimUrl = /* @__PURE__ */ __name((url) => {
@@ -12487,7 +12489,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text5) => [...text5.matchAll(L
12487
12489
  return { url, documentId: googleDocumentId(url) };
12488
12490
  }), "googleDocumentLinks");
12489
12491
 
12490
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
12492
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
12491
12493
  var PHONE_PLANS = [
12492
12494
  {
12493
12495
  country: "us",
@@ -12867,7 +12869,7 @@ var PHONE_PLANS = [
12867
12869
  }
12868
12870
  ];
12869
12871
 
12870
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/phones.js
12872
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/phones.js
12871
12873
  var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
12872
12874
  var DEFAULT_PHONE_COUNTRIES = ["ru"];
12873
12875
  var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
@@ -12908,7 +12910,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
12908
12910
  return void 0;
12909
12911
  }, "nationalPhone");
12910
12912
 
12911
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/places.js
12913
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/places.js
12912
12914
  var BEFORE = [
12913
12915
  [/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
12914
12916
  [/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
@@ -13168,7 +13170,7 @@ var findPlaces = /* @__PURE__ */ __name((text5) => {
13168
13170
  return found2.sort((a, b) => a.start - b.start);
13169
13171
  }, "findPlaces");
13170
13172
 
13171
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/mentions.js
13173
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/mentions.js
13172
13174
  var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
13173
13175
  var MENTION_VERSIONS = {
13174
13176
  phone: 1,
@@ -13358,7 +13360,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
13358
13360
  };
13359
13361
  }, "typedPhone");
13360
13362
 
13361
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/first-names.js
13363
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/first-names.js
13362
13364
  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";
13363
13365
  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";
13364
13366
  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";
@@ -13366,7 +13368,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
13366
13368
  var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
13367
13369
  var NAME_WORDS = WORDS.split(" ");
13368
13370
 
13369
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/person-names.js
13371
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/person-names.js
13370
13372
  var LATIN_TO_CYRILLIC = {
13371
13373
  shch: "\u0449",
13372
13374
  sch: "\u0449",
@@ -13574,7 +13576,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text5, stem, taken) => {
13574
13576
  return found2;
13575
13577
  }, "findUnknownNames");
13576
13578
 
13577
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/attachments.js
13579
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/attachments.js
13578
13580
  var NOT_FILES = /* @__PURE__ */ new Set([
13579
13581
  "webpage",
13580
13582
  "share",
@@ -13606,7 +13608,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
13606
13608
  });
13607
13609
  }, "matchDownloads");
13608
13610
 
13609
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
13611
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
13610
13612
  var QUERY_VERSION = 1;
13611
13613
  var QUERY_LIMITS2 = {
13612
13614
  ...QUERY_LIMITS,
@@ -13637,7 +13639,7 @@ function exhausted(budget) {
13637
13639
  }
13638
13640
  __name(exhausted, "exhausted");
13639
13641
 
13640
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
13642
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
13641
13643
  var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
13642
13644
  var literal2 = /* @__PURE__ */ __name((c) => ({
13643
13645
  kind: "char",
@@ -14037,7 +14039,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
14037
14039
  return out;
14038
14040
  }, "foldRegex");
14039
14041
 
14040
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
14042
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
14041
14043
  var PRESET_VERSION = 1;
14042
14044
  var PRESETS = {
14043
14045
  password: {
@@ -14091,7 +14093,7 @@ var PRESETS = {
14091
14093
  }
14092
14094
  };
14093
14095
 
14094
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
14096
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
14095
14097
  var FIELD_VERSION = 2;
14096
14098
  var UNITS = {
14097
14099
  "": 1,
@@ -14214,6 +14216,17 @@ var QUERY_FIELDS = [
14214
14216
  normalization: "the same as mailbox:; mail only",
14215
14217
  support: "A1"
14216
14218
  },
14219
+ {
14220
+ name: "list",
14221
+ example: "list:github.com",
14222
+ index: "emails.headers list-id",
14223
+ aliases: [],
14224
+ type: "kw",
14225
+ operators: terms,
14226
+ normalization: "the List-Id of a mailing list, lower case; a domain matches every list under it; mail only",
14227
+ support: "A1",
14228
+ validate: filled
14229
+ },
14217
14230
  {
14218
14231
  name: "is",
14219
14232
  example: "is:unread",
@@ -14540,12 +14553,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
14540
14553
  return validateFields(parsed2.output);
14541
14554
  }, "validateAst");
14542
14555
 
14543
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
14556
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
14544
14557
  var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
14545
14558
  var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
14546
14559
  var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
14547
14560
 
14548
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
14561
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
14549
14562
  var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
14550
14563
  var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
14551
14564
  var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
@@ -14569,7 +14582,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
14569
14582
  };
14570
14583
  }, "linkMatch");
14571
14584
 
14572
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
14585
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
14573
14586
  var SETTING = "phoneCountries";
14574
14587
  var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
14575
14588
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
@@ -14600,7 +14613,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
14600
14613
  return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
14601
14614
  }, "valueMatch");
14602
14615
 
14603
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
14616
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
14604
14617
  var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
14605
14618
  if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
14606
14619
  throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
@@ -14628,7 +14641,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
14628
14641
  return 2 * intersection2 / (aa2.size + bb.size);
14629
14642
  }, "vocabularySimilarity");
14630
14643
 
14631
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
14644
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
14632
14645
  import { createHash } from "node:crypto";
14633
14646
  var folded2 = /* @__PURE__ */ __name((name) => {
14634
14647
  try {
@@ -14694,7 +14707,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
14694
14707
  });
14695
14708
  }, "guardTagCreation");
14696
14709
 
14697
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
14710
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
14698
14711
  var invalid = /* @__PURE__ */ __name((message2) => {
14699
14712
  throw new CliError("validation_error", message2);
14700
14713
  }, "invalid");
@@ -14771,7 +14784,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
14771
14784
  };
14772
14785
  }, "createTagRedirectIndex");
14773
14786
 
14774
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
14787
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
14775
14788
  var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
14776
14789
  const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
14777
14790
  if (!row2)
@@ -14799,7 +14812,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
14799
14812
  return snapshot2;
14800
14813
  }, "tagRedirectSnapshot");
14801
14814
 
14802
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
14815
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
14803
14816
  import { createHash as createHash2 } from "node:crypto";
14804
14817
  var TASK_KEY_PREFIXES = {
14805
14818
  question: "Q",
@@ -14827,7 +14840,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
14827
14840
  return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
14828
14841
  }, "taskAccountOf");
14829
14842
 
14830
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
14843
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
14831
14844
  var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
14832
14845
  var REFERABLE = {
14833
14846
  note: { tombstone: true },
@@ -14985,7 +14998,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
14985
14998
  }, "taskIdOf");
14986
14999
  var canonicalThingReference = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith("meeting:") ? canonicalMeetingReference(reference2) : canonicalReference(reference2), "canonicalThingReference");
14987
15000
 
14988
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
15001
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
14989
15002
  var toMs = /* @__PURE__ */ __name((iso11) => {
14990
15003
  if (iso11 === null || iso11 === void 0)
14991
15004
  return null;
@@ -14999,7 +15012,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
14999
15012
  var DELIVERY = { delivered: 1, read: 2 };
15000
15013
  var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
15001
15014
 
15002
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
15015
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
15003
15016
  var TAG_KINDS = ["tag", "topic"];
15004
15017
  var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
15005
15018
  var TAG_TYPE = {
@@ -15202,7 +15215,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
15202
15215
  return result;
15203
15216
  }, "tagsOf");
15204
15217
 
15205
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
15218
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
15206
15219
  var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
15207
15220
  var SPEECH = speech("att");
15208
15221
  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");
@@ -15501,6 +15514,11 @@ var mailbox = /* @__PURE__ */ __name(({ value }, { mail }) => always(mail ? boun
15501
15514
  value,
15502
15515
  fold(value)
15503
15516
  ) : bound("0")), "mailbox");
15517
+ var list = /* @__PURE__ */ __name(({ value }, { mail }) => {
15518
+ const wanted = value.trim().toLowerCase();
15519
+ return always(mail ? bound(`m.id IN (SELECT id FROM (SELECT id, coalesce(json_extract(headers, '$."list-id"'),
15520
+ json_extract(metadata, '$.listId')) AS list_id FROM emails) WHERE list_id = ? OR list_id LIKE '%.' || ? ESCAPE '\\')`, wanted, wanted.replace(/[\\%_]/g, "\\$&")) : bound("0"));
15521
+ }, "list");
15504
15522
  var is2 = /* @__PURE__ */ __name(({ value }, { mail }) => {
15505
15523
  const state = value.toLowerCase();
15506
15524
  return always(state === "starred" ? bound(mail ? "m.flagged = 1" : "m.starred = 1") : !mail ? bound("0") : bound("m.read = ?", state === "read" ? 1 : 0));
@@ -15553,11 +15571,12 @@ var FIELD_COMPILERS = {
15553
15571
  source: notesOnly,
15554
15572
  mailbox,
15555
15573
  label: mailbox,
15574
+ list,
15556
15575
  is: is2,
15557
15576
  subject
15558
15577
  };
15559
15578
 
15560
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
15579
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
15561
15580
  var placeOf = /* @__PURE__ */ __name((database) => {
15562
15581
  const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
15563
15582
  const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
@@ -15573,7 +15592,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
15573
15592
  };
15574
15593
  }, "placeOf");
15575
15594
 
15576
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
15595
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
15577
15596
  var DRAIN_ON_WRITE = 500;
15578
15597
  var METHOD = "rules";
15579
15598
  var telegramLink = /* @__PURE__ */ __name((database) => {
@@ -15736,7 +15755,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
15736
15755
  return queued.length;
15737
15756
  }, "drainMentions");
15738
15757
 
15739
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
15758
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
15740
15759
  var indexRow = /* @__PURE__ */ __name((database, name) => {
15741
15760
  const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
15742
15761
  if (!exists2)
@@ -15744,7 +15763,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
15744
15763
  return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
15745
15764
  }, "indexRow");
15746
15765
 
15747
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
15766
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
15748
15767
  var INDEX = "message_stems";
15749
15768
  var SETTING2 = "searchStemmers";
15750
15769
  var DRAIN_ON_WRITE2 = 500;
@@ -15866,7 +15885,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
15866
15885
  };
15867
15886
  }, "stemmerCache");
15868
15887
 
15869
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
15888
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
15870
15889
  var SQLITE_BUSY = 5;
15871
15890
  var pause = new Int32Array(new SharedArrayBuffer(4));
15872
15891
  var isBusy = /* @__PURE__ */ __name((error) => {
@@ -15961,7 +15980,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
15961
15980
  }
15962
15981
  }, "read");
15963
15982
 
15964
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
15983
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
15965
15984
  var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
15966
15985
  coalesce(CASE k.chunkable_type
15967
15986
  WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
@@ -16103,7 +16122,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
16103
16122
  }, "dropUnusedVectors");
16104
16123
  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");
16105
16124
 
16106
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
16125
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
16107
16126
  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({
16108
16127
  target: [accounts.provider, accounts.externalId],
16109
16128
  set: {
@@ -16209,7 +16228,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
16209
16228
  AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
16210
16229
  }, "dropOrphanPeople");
16211
16230
 
16212
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
16231
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
16213
16232
  var FOLDED = [
16214
16233
  { table: "tasks", column: "title" },
16215
16234
  { table: "tasks", column: "close_reason" },
@@ -16246,7 +16265,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
16246
16265
  return filled2;
16247
16266
  }, "fillFolded");
16248
16267
 
16249
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
16268
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
16250
16269
  import { createHash as createHash3 } from "node:crypto";
16251
16270
  var CHUNK_CHARS = 1200;
16252
16271
  var CHUNK_OVERLAP = 150;
@@ -16351,7 +16370,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
16351
16370
  return chunks2;
16352
16371
  }, "cutChunks");
16353
16372
 
16354
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/task-signature.js
16373
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/task-signature.js
16355
16374
  var DAY = 864e5;
16356
16375
  var CURRENCY = [
16357
16376
  [/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
@@ -16468,7 +16487,7 @@ var dueDayOf = /* @__PURE__ */ __name((text5, createdMs) => {
16468
16487
  return best?.day ?? null;
16469
16488
  }, "dueDayOf");
16470
16489
 
16471
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
16490
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
16472
16491
  var DAY2 = 864e5;
16473
16492
  var STOP_WORDS = new Set([
16474
16493
  // Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
@@ -16623,7 +16642,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
16623
16642
  ...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
16624
16643
  })).sort((a, b) => b.score - a.score), "rankCandidates");
16625
16644
 
16626
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
16645
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
16627
16646
  var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
16628
16647
  r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
16629
16648
  JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
@@ -16754,7 +16773,7 @@ var dot = /* @__PURE__ */ __name((query, blob2) => {
16754
16773
  }, "dot");
16755
16774
  var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
16756
16775
  const { orm } = context;
16757
- const { chatKey, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId, before: before2, personId } = filter;
16776
+ const { chatKey, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, before: before2, personId } = filter;
16758
16777
  const rows = /* @__PURE__ */ __name((page3) => orm.all(
16759
16778
  // CROSS JOIN keeps the chunks first, so each page walks their key; led by the vectors, SQLite re-read and
16760
16779
  // sorted every one of them per page — 1.3 s against 140 ms at 42k chunks (bench/embeddings/README.md).
@@ -16767,7 +16786,7 @@ var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
16767
16786
  JOIN embeddings v ON v.model = ${model} AND v.content_hash = k.content_hash
16768
16787
  WHERE k.chunkable_type = 'conversation' AND ch.account_id = ${accountPk2}
16769
16788
  ${scope3 === void 0 ? sql`` : sql`AND k.scope=${scope3}`}
16770
- ${projectId === void 0 ? sql`` : sql`AND k.project_id=${projectId}`}
16789
+ ${projectId2 === void 0 ? sql`` : sql`AND k.project_id=${projectId2}`}
16771
16790
  ${before2 === void 0 ? sql`` : sql`AND k.occurred_at < ${before2}`}
16772
16791
  ${personId === void 0 ? sql`` : sql`AND EXISTS (SELECT 1 FROM conversation_messages pcm JOIN messages pm ON pm.id=pcm.message_id JOIN identity_links pil ON pil.identity_id=pm.sender_identity_id WHERE pcm.conversation_id=c.id AND pil.person_id=${personId})`}
16773
16792
  ${chatKey === void 0 ? sql`AND ch.searchable = 1` : sql`AND c.chat_id = ${chatKey}`}
@@ -16796,7 +16815,7 @@ var nearestChunks = /* @__PURE__ */ __name((context, accountPk2, filter) => {
16796
16815
  }, "keepBest");
16797
16816
  const ranked = /* @__PURE__ */ __name((found2) => found2.sort((a, b) => b.score - a.score).slice(0, limit), "ranked");
16798
16817
  const plain2 = /* @__PURE__ */ __name((found2) => found2.map(({ id: _, ...chunk }) => chunk), "plain");
16799
- const indexable = personId === void 0 && projectId === void 0 && scope3 === void 0 && conversations2 === void 0;
16818
+ const indexable = personId === void 0 && projectId2 === void 0 && scope3 === void 0 && conversations2 === void 0;
16800
16819
  const indexed = indexable && searchIndex(context.database, model, {
16801
16820
  kind: "conversation",
16802
16821
  account: accountPk2,
@@ -16894,7 +16913,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
16894
16913
  };
16895
16914
  }, "readiness");
16896
16915
 
16897
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
16916
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
16898
16917
  var DOCUMENT_PICTURE = "document_picture";
16899
16918
  var SCAN_PAGE2 = 5e3;
16900
16919
  var idOf = /* @__PURE__ */ __name((ref3) => {
@@ -16957,7 +16976,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
16957
16976
  }, "nearestPictures")
16958
16977
  }), "documentPicturesOver");
16959
16978
 
16960
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
16979
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
16961
16980
  var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
16962
16981
  const literal4 = escaped2 ?? plain2 ?? "";
16963
16982
  return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
@@ -17022,7 +17041,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
17022
17041
  var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
17023
17042
  var bound2 = /* @__PURE__ */ __name(({ sql: text5, params }) => sql.join(text5.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
17024
17043
 
17025
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
17044
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
17026
17045
  var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
17027
17046
  var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
17028
17047
  var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
@@ -17112,7 +17131,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
17112
17131
  });
17113
17132
  }, "linkMeeting");
17114
17133
 
17115
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
17134
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
17116
17135
  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), ''))";
17117
17136
  var UNSEARCHED_EVENT_TYPES = [
17118
17137
  "working-location",
@@ -17342,7 +17361,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
17342
17361
  return true;
17343
17362
  }, "resetNoteIndex");
17344
17363
 
17345
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
17364
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
17346
17365
  var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
17347
17366
  var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
17348
17367
  for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
@@ -17361,7 +17380,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
17361
17380
  }
17362
17381
  }, "resolvePersonLinks");
17363
17382
 
17364
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
17383
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
17365
17384
  var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
17366
17385
  var prepare = /* @__PURE__ */ __name((orm) => ({
17367
17386
  find: orm.select({
@@ -17586,7 +17605,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
17586
17605
  }, "meetingIdentityPk");
17587
17606
  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");
17588
17607
 
17589
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
17608
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
17590
17609
  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");
17591
17610
  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");
17592
17611
  var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
@@ -17866,7 +17885,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
17866
17885
  }
17867
17886
  }, "replaceAutoTags");
17868
17887
 
17869
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
17888
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
17870
17889
  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");
17871
17890
  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;
17872
17891
  var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
@@ -17947,7 +17966,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
17947
17966
  return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
17948
17967
  }, "mailCore");
17949
17968
 
17950
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
17969
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
17951
17970
  var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
17952
17971
  var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
17953
17972
  k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
@@ -18057,7 +18076,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
18057
18076
  return emails3 + threads;
18058
18077
  }, "drainEmailIndex");
18059
18078
 
18060
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
18079
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
18061
18080
  var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
18062
18081
  SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
18063
18082
  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,
@@ -18103,7 +18122,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
18103
18122
  leave.run(emailId, Number(box.id), emailId, Number(box.id));
18104
18123
  }, "forgetLocations");
18105
18124
 
18106
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
18125
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
18107
18126
  var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
18108
18127
  emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
18109
18128
  last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
@@ -18153,7 +18172,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
18153
18172
  return threads.length;
18154
18173
  }, "markEmailsRestored");
18155
18174
 
18156
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
18175
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
18157
18176
  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");
18158
18177
  var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
18159
18178
  var ruleOf = /* @__PURE__ */ __name((row2) => ({
@@ -18220,7 +18239,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
18220
18239
  }
18221
18240
  }), "mailRulesOver");
18222
18241
 
18223
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
18242
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
18224
18243
  var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
18225
18244
  database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
18226
18245
  VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
@@ -18228,7 +18247,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
18228
18247
  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);
18229
18248
  }, "reviewLink");
18230
18249
 
18231
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
18250
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
18232
18251
  function checkMeetingCancelled(signal) {
18233
18252
  if (!signal?.aborted)
18234
18253
  return;
@@ -18239,7 +18258,7 @@ function checkMeetingCancelled(signal) {
18239
18258
  }
18240
18259
  __name(checkMeetingCancelled, "checkMeetingCancelled");
18241
18260
 
18242
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
18261
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
18243
18262
  var meetingOf = /* @__PURE__ */ __name((row2) => ({
18244
18263
  id: Number(row2.id),
18245
18264
  accountId: Number(row2.account_id),
@@ -18289,7 +18308,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
18289
18308
  createdAt: Number(row2.created_at)
18290
18309
  }), "transcriptRowOf");
18291
18310
 
18292
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
18311
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
18293
18312
  var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
18294
18313
  var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
18295
18314
  var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
@@ -18456,7 +18475,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
18456
18475
  }
18457
18476
  }), "meetingReadsOver");
18458
18477
 
18459
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
18478
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
18460
18479
  var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
18461
18480
  const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
18462
18481
  const params = [input.accountId];
@@ -18499,7 +18518,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
18499
18518
  return { clauses, params };
18500
18519
  }, "meetingSelectionSql");
18501
18520
 
18502
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
18521
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
18503
18522
  var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
18504
18523
  async meetingChatLines(input) {
18505
18524
  checkMeetingCancelled(input.signal);
@@ -18527,7 +18546,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
18527
18546
  }
18528
18547
  }), "meetingChatLinesOver");
18529
18548
 
18530
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
18549
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
18531
18550
  var MESSAGE_FIELDS = {
18532
18551
  pk: messages.id,
18533
18552
  nativeId: messages.externalId,
@@ -18694,7 +18713,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
18694
18713
  storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
18695
18714
  }), "chatActivity");
18696
18715
 
18697
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
18716
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
18698
18717
  var HIT_FIELDS = {
18699
18718
  ...MESSAGE_FIELDS,
18700
18719
  chatTitle: sql`${chats.title}`.as("chat_title"),
@@ -18793,7 +18812,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
18793
18812
  };
18794
18813
  }, "directReplies");
18795
18814
 
18796
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
18815
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
18797
18816
  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");
18798
18817
  var required = /* @__PURE__ */ __name((context, ref3) => {
18799
18818
  const found2 = identityRow(context, ref3);
@@ -18924,7 +18943,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
18924
18943
  }, "mentioning");
18925
18944
  var escaped = /* @__PURE__ */ __name((text5) => text5.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
18926
18945
 
18927
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
18946
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
18928
18947
  var missing2 = /* @__PURE__ */ __name(() => {
18929
18948
  throw new CliError("not_found", "Meeting, participant or selected target not found");
18930
18949
  }, "missing");
@@ -19046,7 +19065,7 @@ function meetingContextLinksOver(context) {
19046
19065
  }
19047
19066
  __name(meetingContextLinksOver, "meetingContextLinksOver");
19048
19067
 
19049
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
19068
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
19050
19069
  var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
19051
19070
  var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
19052
19071
  var summaryOf = /* @__PURE__ */ __name((row2) => ({
@@ -19075,7 +19094,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
19075
19094
  return row2 ? summaryText(summaryOf(row2)) : null;
19076
19095
  }, "indexedText");
19077
19096
 
19078
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
19097
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
19079
19098
  var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
19080
19099
  var meetingCurrentIndexRows = `
19081
19100
  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
@@ -19106,7 +19125,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
19106
19125
  }, "invalidateMeetingStems");
19107
19126
  var meetingStemmableText = /* @__PURE__ */ __name((text5) => text5.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
19108
19127
 
19109
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
19128
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
19110
19129
  function meetingHitIndexOver({ database, now: now2 }) {
19111
19130
  return {
19112
19131
  async indexSearch(original) {
@@ -19174,10 +19193,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
19174
19193
  }
19175
19194
  __name(meetingHitIndexOver, "meetingHitIndexOver");
19176
19195
 
19177
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
19196
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
19178
19197
  import { createHash as createHash4 } from "node:crypto";
19179
19198
 
19180
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/trigrams.js
19199
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/trigrams.js
19181
19200
  var trigrams = /* @__PURE__ */ __name((term) => {
19182
19201
  const padded = ` ${term} `;
19183
19202
  const pieces = /* @__PURE__ */ new Set();
@@ -19186,7 +19205,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
19186
19205
  return [...pieces];
19187
19206
  }, "trigrams");
19188
19207
 
19189
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/correct.js
19208
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/correct.js
19190
19209
  var SHORTEST_CORRECTION = 3;
19191
19210
  var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
19192
19211
  var editDistance = /* @__PURE__ */ __name((a, b, max) => {
@@ -19233,7 +19252,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
19233
19252
  return corrections;
19234
19253
  }, "correctWords");
19235
19254
 
19236
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/garbled.js
19255
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/garbled.js
19237
19256
  var SHORTEST_GARBLED = 4;
19238
19257
  var MOST_WIDENED = 64;
19239
19258
  var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
@@ -19325,7 +19344,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
19325
19344
  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((word) => word.term));
19326
19345
  }, "widenWords");
19327
19346
 
19328
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
19347
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
19329
19348
  import { readFileSync } from "node:fs";
19330
19349
  var loaded;
19331
19350
  var dictionary = /* @__PURE__ */ __name(() => {
@@ -19384,7 +19403,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
19384
19403
  return false;
19385
19404
  }, "knownRussianWord");
19386
19405
 
19387
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
19406
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
19388
19407
  var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
19389
19408
  var MOST_WORDS = 128;
19390
19409
  var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
@@ -19611,7 +19630,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text5, stemmer) => {
19611
19630
  return check3(tree);
19612
19631
  }, "matchMeetingText");
19613
19632
 
19614
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
19633
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
19615
19634
  var fail3 = /* @__PURE__ */ __name((message2) => {
19616
19635
  throw new CliError("validation_error", message2);
19617
19636
  }, "fail");
@@ -19788,7 +19807,7 @@ function meetingHitSearchOver({ database }) {
19788
19807
  }
19789
19808
  __name(meetingHitSearchOver, "meetingHitSearchOver");
19790
19809
 
19791
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
19810
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
19792
19811
  import { createHash as createHash5 } from "node:crypto";
19793
19812
  var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
19794
19813
  if (value === void 0)
@@ -19878,7 +19897,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
19878
19897
  }
19879
19898
  }), "meetingParticipantSearchOver");
19880
19899
 
19881
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
19900
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
19882
19901
  var preparationQueries = {
19883
19902
  participants: {
19884
19903
  fields: "p.id, p.identity_id, p.display_name, l.person_id",
@@ -19928,7 +19947,7 @@ var preparationQueries = {
19928
19947
  }
19929
19948
  };
19930
19949
 
19931
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
19950
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
19932
19951
  var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
19933
19952
  async preparationContext(original) {
19934
19953
  const input = validateMeetingPreparationContext(original);
@@ -19969,7 +19988,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
19969
19988
  }
19970
19989
  }), "meetingPreparationContextOver");
19971
19990
 
19972
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
19991
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
19973
19992
  var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
19974
19993
  SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
19975
19994
  WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
@@ -19983,7 +20002,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
19983
20002
  JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
19984
20003
  )`, "preparationSubjects");
19985
20004
 
19986
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
20005
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
19987
20006
  var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
19988
20007
  async preparationKnowledge(original) {
19989
20008
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -20028,7 +20047,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
20028
20047
  }
20029
20048
  }), "meetingPreparationKnowledgeOver");
20030
20049
 
20031
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
20050
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
20032
20051
  var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
20033
20052
  async preparationNotes(original) {
20034
20053
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -20081,7 +20100,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
20081
20100
  }
20082
20101
  }), "meetingPreparationNotesOver");
20083
20102
 
20084
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
20103
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
20085
20104
  var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
20086
20105
  async relatedHistory(original) {
20087
20106
  const input = validateMeetingRelatedHistory(original);
@@ -20152,7 +20171,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
20152
20171
  }
20153
20172
  }), "meetingRelatedHistoryOver");
20154
20173
 
20155
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
20174
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
20156
20175
  var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
20157
20176
  var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
20158
20177
  var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
@@ -20233,7 +20252,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
20233
20252
  }
20234
20253
  }), "meetingReviewOver");
20235
20254
 
20236
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
20255
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
20237
20256
  var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
20238
20257
  var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
20239
20258
  if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
@@ -20287,7 +20306,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
20287
20306
  }
20288
20307
  }), "meetingSeriesHistoryOver");
20289
20308
 
20290
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
20309
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
20291
20310
  var MOST_ROWS = 5e5;
20292
20311
  var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
20293
20312
  async meetingStats(input) {
@@ -20334,7 +20353,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
20334
20353
  }
20335
20354
  }), "meetingStatsOver");
20336
20355
 
20337
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
20356
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
20338
20357
  var CURSOR_KEY = "meetings";
20339
20358
  var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
20340
20359
  id: Number(row2.id),
@@ -20886,7 +20905,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
20886
20905
  };
20887
20906
  }, "meetingStoreOver");
20888
20907
 
20889
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
20908
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
20890
20909
  var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
20891
20910
  const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
20892
20911
  return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
@@ -20912,7 +20931,24 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
20912
20931
  orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
20913
20932
  }, "release");
20914
20933
 
20915
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
20934
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
20935
+ var THREAD_COLUMNS = {
20936
+ subject: {
20937
+ where: /* @__PURE__ */ __name(({ value }) => ({
20938
+ sql: "instr(' ' || coalesce(email_threads.subject_folded, lower(email_threads.subject)), ' ' || ?) > 0",
20939
+ params: [fold(value).replace(/\*+$/, "")]
20940
+ }), "where")
20941
+ },
20942
+ emails_count: { type: "num", sql: "email_threads.emails_count" },
20943
+ last_email_at: { type: "time", sql: "email_threads.last_email_at" }
20944
+ };
20945
+ var threadRows = /* @__PURE__ */ __name((database, filter) => {
20946
+ const [limit, offset] = page(filter);
20947
+ return database.prepare(`SELECT * FROM email_threads WHERE (? IS NULL OR account_id = ?) AND (? OR deleted_at IS NULL)
20948
+ 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);
20949
+ }, "threadRows");
20950
+
20951
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
20916
20952
  var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
20917
20953
  id: `email:${place.emailId}`,
20918
20954
  chatId: place.threadExternalId,
@@ -21261,9 +21297,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
21261
21297
  return ids.map((id2) => threadDetails(database, id2));
21262
21298
  },
21263
21299
  async threads(filter = {}) {
21264
- const [limit, offset] = page(filter);
21265
- return database.prepare(`SELECT * FROM email_threads WHERE (? IS NULL OR account_id = ?) AND (? OR deleted_at IS NULL)
21266
- ORDER BY coalesce(last_email_at, 0) DESC, id DESC LIMIT ? OFFSET ?`).all(filter.accountId ?? null, filter.accountId ?? null, filter.includeDeleted ? 1 : 0, limit, offset).map(threadOf);
21300
+ return threadRows(database, filter).map(threadOf);
21267
21301
  },
21268
21302
  async thread(id2) {
21269
21303
  return threadDetails(database, id2);
@@ -21469,7 +21503,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
21469
21503
  }
21470
21504
  }), "mailStoreOver");
21471
21505
 
21472
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/search/dictionary.js
21506
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/search/dictionary.js
21473
21507
  import { readFileSync as readFileSync2 } from "node:fs";
21474
21508
  var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
21475
21509
  var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
@@ -21559,7 +21593,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
21559
21593
  }, "knownWord");
21560
21594
  var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
21561
21595
 
21562
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
21596
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
21563
21597
  var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
21564
21598
  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");
21565
21599
  var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
@@ -21645,7 +21679,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
21645
21679
  return found2;
21646
21680
  }, "spokenTranscripts");
21647
21681
 
21648
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
21682
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
21649
21683
  var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
21650
21684
  const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
21651
21685
  if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
@@ -21692,7 +21726,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
21692
21726
  });
21693
21727
  }, "placeHits");
21694
21728
 
21695
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
21729
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
21696
21730
  var MESSAGES2 = {
21697
21731
  rows: "messages",
21698
21732
  threads: "chats",
@@ -22166,7 +22200,7 @@ var runQuery = /* @__PURE__ */ __name(async (context, execution, by) => {
22166
22200
  };
22167
22201
  }, "runQuery");
22168
22202
 
22169
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
22203
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
22170
22204
  function invalidMetadata() {
22171
22205
  throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
22172
22206
  }
@@ -22268,7 +22302,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
22268
22302
  };
22269
22303
  }), "counterTargets");
22270
22304
 
22271
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
22305
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
22272
22306
  var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
22273
22307
  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,
22274
22308
  att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
@@ -22387,7 +22421,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
22387
22421
  }));
22388
22422
  }, "attachmentViews");
22389
22423
 
22390
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
22424
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
22391
22425
  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");
22392
22426
  var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text5, source2) => {
22393
22427
  const { orm, database, now: now2 } = context;
@@ -22425,7 +22459,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
22425
22459
  keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
22426
22460
  }, "intoVoiceAttachment");
22427
22461
 
22428
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
22462
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
22429
22463
  var FIELDS = [
22430
22464
  "threadExternalId",
22431
22465
  "senderIdentityId",
@@ -22742,7 +22776,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
22742
22776
  reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
22743
22777
  }, "writeDerivedReactions");
22744
22778
 
22745
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/keys.js
22779
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/keys.js
22746
22780
  var keysOver = /* @__PURE__ */ __name((context) => {
22747
22781
  const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
22748
22782
  const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
@@ -22763,7 +22797,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
22763
22797
  };
22764
22798
  }, "keysOver");
22765
22799
 
22766
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
22800
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
22767
22801
  var accountGroupsOf = /* @__PURE__ */ __name((database) => {
22768
22802
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
22769
22803
  if (!row2)
@@ -22798,7 +22832,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
22798
22832
  database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
22799
22833
  }, "saveProfile");
22800
22834
 
22801
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
22835
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
22802
22836
  var BOT_KINDS = ["agent", "script", "integration"];
22803
22837
  var ownerPerson = /* @__PURE__ */ __name((database) => {
22804
22838
  const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
@@ -22834,7 +22868,7 @@ var originOfActor = /* @__PURE__ */ __name((database, type, id2) => {
22834
22868
  return database.prepare("SELECT name FROM bots WHERE id = ?").get(Number(id2))?.name === "rule" ? "rule" : "agent";
22835
22869
  }, "originOfActor");
22836
22870
 
22837
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
22871
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
22838
22872
  var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
22839
22873
  const owner = ownerPerson(context.database).id;
22840
22874
  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);
@@ -22855,7 +22889,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
22855
22889
  return personOf(context, ref3);
22856
22890
  }, "linkToOwner");
22857
22891
 
22858
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
22892
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
22859
22893
  var PROVIDERS_SETTING = "providers";
22860
22894
  var storedProvidersOf = /* @__PURE__ */ __name((database) => {
22861
22895
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
@@ -22890,7 +22924,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
22890
22924
  });
22891
22925
  }, "registerProvider");
22892
22926
 
22893
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
22927
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
22894
22928
  var DAY3 = 864e5;
22895
22929
  var RECENTLY_CLOSED_MS = 14 * DAY3;
22896
22930
  var TEXT_LIMIT = 20;
@@ -22914,7 +22948,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
22914
22948
  ...own || row2.person == null ? {} : { person: `person:${row2.person}` }
22915
22949
  };
22916
22950
  }, "messageOf");
22917
- const sourceOf3 = /* @__PURE__ */ __name((locator2) => {
22951
+ const sourceOf4 = /* @__PURE__ */ __name((locator2) => {
22918
22952
  if (typeof locator2 !== "string" || !isLocator(locator2))
22919
22953
  return void 0;
22920
22954
  let thing;
@@ -22935,7 +22969,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
22935
22969
  return { ...side, linked };
22936
22970
  }, "linkedOf");
22937
22971
  const sideOf = /* @__PURE__ */ __name((row2) => {
22938
- const source2 = sourceOf3(row2.source_locator);
22972
+ const source2 = sourceOf4(row2.source_locator);
22939
22973
  const person2 = source2?.person;
22940
22974
  return {
22941
22975
  row: Number(row2.id),
@@ -22990,7 +23024,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
22990
23024
  if (!project)
22991
23025
  return void 0;
22992
23026
  const { draft } = subject2;
22993
- const source2 = draft.source === void 0 ? void 0 : sourceOf3(draft.source);
23027
+ const source2 = draft.source === void 0 ? void 0 : sourceOf4(draft.source);
22994
23028
  const person2 = draft.person ?? source2?.person;
22995
23029
  return {
22996
23030
  project: Number(project.id),
@@ -23089,15 +23123,15 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
23089
23123
  };
23090
23124
  }, "taskSimilarityOver");
23091
23125
 
23092
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
23126
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
23093
23127
  var SETTING3 = "taskCategories";
23094
23128
  var savedTaskCategories = /* @__PURE__ */ __name((database) => {
23095
23129
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
23096
23130
  return row2 ? storedTaskCategories(String(row2.value)) : void 0;
23097
23131
  }, "savedTaskCategories");
23098
23132
  var storeTaskCategories = /* @__PURE__ */ __name((database) => savedTaskCategories(database) ?? DEFAULT_TASK_CATEGORIES, "storeTaskCategories");
23099
- var unlistedTaskCategories = /* @__PURE__ */ __name((database, list) => {
23100
- const listed = new Set(list.map(({ name }) => name));
23133
+ var unlistedTaskCategories = /* @__PURE__ */ __name((database, list2) => {
23134
+ const listed = new Set(list2.map(({ name }) => name));
23101
23135
  return database.prepare("SELECT category, COUNT(*) AS total, SUM(status NOT IN ('done', 'dismissed')) AS open FROM tasks WHERE category IS NOT NULL AND deleted_at IS NULL GROUP BY category ORDER BY category").all().map((row2) => ({ name: String(row2.category), open: Number(row2.open), total: Number(row2.total) })).filter(({ name }) => !listed.has(name));
23102
23136
  }, "unlistedTaskCategories");
23103
23137
  var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) => {
@@ -23108,7 +23142,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
23108
23142
  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);
23109
23143
  }, "saveTaskCategories");
23110
23144
 
23111
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
23145
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
23112
23146
  var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
23113
23147
  var ALLOWED = "taskAgentClose";
23114
23148
  var MIN = "taskAgentCloseMin";
@@ -23164,7 +23198,7 @@ var SUGGESTION_COLUMNS = [
23164
23198
  ];
23165
23199
  var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
23166
23200
 
23167
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
23201
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
23168
23202
  var EXCERPT_CHARS = 280;
23169
23203
  var excerptOf = /* @__PURE__ */ __name((text5) => {
23170
23204
  if (text5 == null)
@@ -23189,8 +23223,7 @@ var KIND = {
23189
23223
  meeting_transcript: "meeting",
23190
23224
  meeting_transcript_row: "meeting"
23191
23225
  };
23192
- var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => database.prepare(`SELECT to_type, to_id FROM links WHERE from_type = ? AND from_id = ? AND kind = ${linkKind("evidence")} AND to_id IS NOT NULL ORDER BY id`).all(from2.type, from2.id).map((link3) => {
23193
- const thing = storedThing(link3.to_type, link3.to_id);
23226
+ var sourceOf3 = /* @__PURE__ */ __name((database, thing) => {
23194
23227
  const state = stateOfThing(database, thing);
23195
23228
  const read2 = READS2[thing.type];
23196
23229
  const row2 = read2 === void 0 || state === "unavailable" ? void 0 : database.prepare(read2).get(thing.id);
@@ -23205,9 +23238,32 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => database.pre
23205
23238
  tool: textOf(row2?.tool),
23206
23239
  missing: gone
23207
23240
  };
23208
- }), "evidenceSourcesOf");
23241
+ }, "sourceOf");
23242
+ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => database.prepare(`SELECT to_type, to_id FROM links WHERE from_type = ? AND from_id = ? AND kind = ${linkKind("evidence")} AND to_id IS NOT NULL ORDER BY id`).all(from2.type, from2.id).map((link3) => sourceOf3(database, storedThing(link3.to_type, link3.to_id))), "evidenceSourcesOf");
23243
+ var thingNamed = /* @__PURE__ */ __name((database, reference2) => {
23244
+ try {
23245
+ return thingOf(database, canonicalThingReference(reference2));
23246
+ } catch {
23247
+ return void 0;
23248
+ }
23249
+ }, "thingNamed");
23250
+ var sourcesOfReferences = /* @__PURE__ */ __name((database, references) => [...new Set(references)].map((reference2) => {
23251
+ const thing = thingNamed(database, reference2);
23252
+ if (thing)
23253
+ return { ...sourceOf3(database, thing), ref: reference2 };
23254
+ return {
23255
+ ref: reference2,
23256
+ kind: reference2.startsWith("msg:") ? "message" : reference2.split(":")[0] || "unknown",
23257
+ title: null,
23258
+ sender: null,
23259
+ at: null,
23260
+ excerpt: null,
23261
+ tool: null,
23262
+ missing: true
23263
+ };
23264
+ }), "sourcesOfReferences");
23209
23265
 
23210
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/attachments/limits.js
23266
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/attachments/limits.js
23211
23267
  var MAX_FILE_BYTES = 50 * 1024 * 1024;
23212
23268
  var MAX_TEXT_CHARS = 2e6;
23213
23269
  var ATTACHMENT_LIMIT_ENV = [
@@ -23233,7 +23289,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
23233
23289
  return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
23234
23290
  }, "pdfPreviewLimits");
23235
23291
 
23236
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/ulid.js
23292
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/ulid.js
23237
23293
  import { randomBytes } from "node:crypto";
23238
23294
  var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
23239
23295
  var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
@@ -23246,7 +23302,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
23246
23302
  return time3 + random;
23247
23303
  }, "ulid");
23248
23304
 
23249
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
23305
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
23250
23306
  var FOLDED_FIELDS = ["title", "site", "language", "author"];
23251
23307
  var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
23252
23308
  if (!meta && !sections?.length)
@@ -23267,7 +23323,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
23267
23323
  return typeof language === "string" && language !== "" ? language : null;
23268
23324
  }, "languageOf");
23269
23325
 
23270
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
23326
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
23271
23327
  var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
23272
23328
  var objectOf = /* @__PURE__ */ __name((value) => {
23273
23329
  if (isObject(value))
@@ -23510,7 +23566,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
23510
23566
  };
23511
23567
  }, "filesStoreOver");
23512
23568
 
23513
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
23569
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
23514
23570
  var IMPORTED_DOCUMENT_QUERY = defineQuery({
23515
23571
  entity: "document",
23516
23572
  backend: "sql",
@@ -23556,7 +23612,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
23556
23612
  return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
23557
23613
  }, "importedDocumentWhere");
23558
23614
 
23559
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
23615
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
23560
23616
  var NOTE_FORMATS = ["obsidian", "markdown"];
23561
23617
  var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
23562
23618
  var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
@@ -24066,7 +24122,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
24066
24122
  };
24067
24123
  }, "notesStoreOver");
24068
24124
 
24069
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
24125
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
24070
24126
  var NAMED = "SELECT m.*, b.name AS author_name FROM memories m LEFT JOIN bots b ON m.author_type = 'bot' AND b.id = m.author_id";
24071
24127
  var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
24072
24128
  var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -24113,6 +24169,18 @@ var subjectOf = /* @__PURE__ */ __name((database, row2) => {
24113
24169
  subjectIsOwner: Number(named2?.owner) === 1
24114
24170
  };
24115
24171
  }, "subjectOf");
24172
+ var projectOf = /* @__PURE__ */ __name((database, row2) => {
24173
+ if (row2.project_id == null)
24174
+ return { project: null, projectName: null };
24175
+ const named2 = database.prepare(SUBJECT_NAMES.project).get(Number(row2.project_id));
24176
+ return { project: `project:${row2.project_id}`, projectName: named2?.name == null ? null : String(named2.name) };
24177
+ }, "projectOf");
24178
+ var projectId = /* @__PURE__ */ __name((database, reference2) => {
24179
+ const project = requiredThing(database, reference2, "the project");
24180
+ if (project.type !== "project")
24181
+ throw new CliError("validation_error", `${reference2} is not a project`);
24182
+ return project.id;
24183
+ }, "projectId");
24116
24184
  var highestKey = /* @__PURE__ */ __name((table) => `ids.${table}.highest`, "highestKey");
24117
24185
  var nextId = /* @__PURE__ */ __name((database, table) => {
24118
24186
  const kept = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(highestKey(table));
@@ -24152,6 +24220,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
24152
24220
  kind: row2.kind,
24153
24221
  body: String(row2.body),
24154
24222
  ...subjectOf(database, row2),
24223
+ ...projectOf(database, row2),
24155
24224
  author: authorOf(row2),
24156
24225
  model: row2.model == null ? null : String(row2.model),
24157
24226
  confidence: row2.confidence == null ? null : Number(row2.confidence),
@@ -24199,9 +24268,10 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
24199
24268
  const id2 = write(database, () => {
24200
24269
  const { actor, model } = authorActor(context, input.author);
24201
24270
  const subject2 = input.subject === void 0 ? void 0 : requiredThing(database, input.subject, "the subject");
24271
+ const project = input.project === void 0 ? null : projectId(database, input.project);
24202
24272
  const replaced = input.supersedes === void 0 ? void 0 : Number(rowOf(input.supersedes).id);
24203
24273
  const at = now2();
24204
- const made = Number(database.prepare("INSERT INTO memories (id, kind, body, subject_type, subject_id, author_type, author_id, model, confidence, status, last_verified_at, supersedes_id, scope, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(nextId(database, "memories"), kind3, body2, subject2?.type ?? null, subject2?.id ?? null, actor.type, actor.id, model, input.confidence ?? null, status, status === "confirmed" ? at : null, replaced ?? null, scope3, at, at)?.id);
24274
+ const made = Number(database.prepare("INSERT INTO memories (id, kind, body, subject_type, subject_id, author_type, author_id, model, confidence, status, last_verified_at, supersedes_id, scope, project_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(nextId(database, "memories"), kind3, body2, subject2?.type ?? null, subject2?.id ?? null, actor.type, actor.id, model, input.confidence ?? null, status, status === "confirmed" ? at : null, replaced ?? null, scope3, project, at, at)?.id);
24205
24275
  linkEvidence(context, { type: "memory", id: made }, input.evidence, input.author === "owner" ? "owner" : "agent");
24206
24276
  if (replaced !== void 0)
24207
24277
  database.prepare("UPDATE memories SET status = 'superseded', updated_at = ? WHERE id = ?").run(at, replaced);
@@ -24212,8 +24282,15 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
24212
24282
  get: /* @__PURE__ */ __name(async (reference2) => memoryOf(rowOf(reference2)), "get"),
24213
24283
  list: /* @__PURE__ */ __name(async (options = {}) => {
24214
24284
  const subject2 = options.subject === void 0 ? void 0 : requiredThing(database, options.subject);
24215
- return database.prepare(`${NAMED} WHERE m.deleted_at IS NULL AND (? IS NULL OR (m.subject_type = ? AND m.subject_id = ?)) AND (? IS NULL OR m.kind = ?) AND (? IS NULL OR m.status = ?) AND (? IS NULL OR m.scope = ?) ORDER BY m.created_at DESC, m.id DESC LIMIT ?`).all(subject2?.type ?? null, subject2?.type ?? null, subject2?.id ?? null, options.kind ?? null, options.kind ?? null, options.status ?? null, options.status ?? null, options.scope ?? null, options.scope ?? null, Math.min(Math.max(options.limit ?? 100, 1), 500)).map(memoryOf);
24285
+ const project = options.project === void 0 ? null : projectId(database, options.project);
24286
+ return database.prepare(`${NAMED} WHERE m.deleted_at IS NULL AND (? IS NULL OR (m.subject_type = ? AND m.subject_id = ?)) AND (? IS NULL OR m.project_id = ?) AND (? IS NULL OR m.kind = ?) AND (? IS NULL OR m.status = ?) AND (? IS NULL OR m.scope = ?) ORDER BY m.created_at DESC, m.id DESC LIMIT ?`).all(subject2?.type ?? null, subject2?.type ?? null, subject2?.id ?? null, project, project, options.kind ?? null, options.kind ?? null, options.status ?? null, options.status ?? null, options.scope ?? null, options.scope ?? null, Math.min(Math.max(options.limit ?? 100, 1), 500)).map(memoryOf);
24216
24287
  }, "list"),
24288
+ update: /* @__PURE__ */ __name(async (reference2, change) => write(database, () => {
24289
+ const id2 = Number(rowOf(reference2).id);
24290
+ const project = change.project === null ? null : projectId(database, change.project);
24291
+ database.prepare("UPDATE memories SET project_id = ?, updated_at = ? WHERE id = ?").run(project, now2(), id2);
24292
+ return memoryOf(rowOf(`memory:${id2}`));
24293
+ }), "update"),
24217
24294
  confirm: /* @__PURE__ */ __name(async (reference2) => setStatus(reference2, "confirmed", true), "confirm"),
24218
24295
  markStale: /* @__PURE__ */ __name(async (reference2) => setStatus(reference2, "stale", false), "markStale"),
24219
24296
  remove: /* @__PURE__ */ __name(async (reference2) => {
@@ -24241,7 +24318,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
24241
24318
  };
24242
24319
  }, "memoriesStoreOver");
24243
24320
 
24244
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
24321
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
24245
24322
  var DEFAULT_FIRST_PASS_PER_CHAT = 0;
24246
24323
  var KEY = "taskFirstPassPerChat";
24247
24324
  var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
@@ -24261,7 +24338,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
24261
24338
  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);
24262
24339
  }, "saveFirstPassPerChat");
24263
24340
 
24264
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
24341
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
24265
24342
  var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
24266
24343
  var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
24267
24344
  name,
@@ -24435,7 +24512,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
24435
24512
  return root === void 0 ? void 0 : { ...query, root };
24436
24513
  }, "withoutField");
24437
24514
 
24438
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
24515
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
24439
24516
  var TASK_RELATION_KINDS = [
24440
24517
  "blocked-by",
24441
24518
  "follow-up-of",
@@ -24565,7 +24642,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
24565
24642
  };
24566
24643
  }, "taskRelationsStoreOver");
24567
24644
 
24568
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
24645
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
24569
24646
  var TASK_ROLES = ["assignee", "reviewer", "watcher"];
24570
24647
  var TASK_EVENT_KINDS = [
24571
24648
  "created",
@@ -24615,7 +24692,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
24615
24692
  throw new CliError("not_found", `no task ${id2}`);
24616
24693
  return row2;
24617
24694
  }, "required");
24618
- const projectOf = /* @__PURE__ */ __name((reference2) => {
24695
+ const projectOf2 = /* @__PURE__ */ __name((reference2) => {
24619
24696
  if (reference2.startsWith("project:")) {
24620
24697
  const thing = requiredThing(database, reference2, "the project");
24621
24698
  if (thing.type !== "project")
@@ -24830,7 +24907,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
24830
24907
  if (!WORK_TASK_TYPES.includes(input.type))
24831
24908
  throw new CliError("validation_error", `a task made here is one of ${WORK_TASK_TYPES.join(", ")}`);
24832
24909
  const made = write(database, () => {
24833
- const project = projectOf(input.project);
24910
+ const project = projectOf2(input.project);
24834
24911
  const { actor } = authorActor(context, by);
24835
24912
  const at = now2();
24836
24913
  const counted = database.prepare("UPDATE projects SET tasks_count = tasks_count + 1, updated_at = ? WHERE id = ? RETURNING key, tasks_count").get(at, project);
@@ -24921,9 +24998,9 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
24921
24998
  find: /* @__PURE__ */ __name(async ({ project, type, status, assignee, where, limit = 100 }) => {
24922
24999
  if (type !== void 0 && !TASK_TYPES.includes(type))
24923
25000
  throw new CliError("validation_error", `a task's type is one of ${TASK_TYPES.join(", ")}`);
24924
- const projectId = project === void 0 ? null : projectOf(project);
25001
+ const projectId2 = project === void 0 ? null : projectOf2(project);
24925
25002
  const person2 = assignee === void 0 ? null : personOf2(assignee);
24926
- return database.prepare(`SELECT * FROM tasks t WHERE deleted_at IS NULL AND (? IS NULL OR project_id = ?) AND (? IS NULL OR type = ?) AND (? IS NULL OR status = ?) AND (? IS NULL OR EXISTS (SELECT 1 FROM task_assignments a WHERE a.task_id = t.id AND a.assignee_type = 'person' AND a.assignee_id = ?)) AND (${where?.sql || "1"}) ORDER BY priority_score IS NULL, priority_score DESC, created_at, id LIMIT ?`).all(projectId, projectId, type ?? null, type ?? null, status ?? null, status ?? null, person2, person2, ...where?.params ?? [], Math.min(Math.max(limit, 1), 500)).map(detailsOf);
25003
+ return database.prepare(`SELECT * FROM tasks t WHERE deleted_at IS NULL AND (? IS NULL OR project_id = ?) AND (? IS NULL OR type = ?) AND (? IS NULL OR status = ?) AND (? IS NULL OR EXISTS (SELECT 1 FROM task_assignments a WHERE a.task_id = t.id AND a.assignee_type = 'person' AND a.assignee_id = ?)) AND (${where?.sql || "1"}) ORDER BY priority_score IS NULL, priority_score DESC, created_at, id LIMIT ?`).all(projectId2, projectId2, type ?? null, type ?? null, status ?? null, status ?? null, person2, person2, ...where?.params ?? [], Math.min(Math.max(limit, 1), 500)).map(detailsOf);
24927
25004
  }, "find"),
24928
25005
  claim: /* @__PURE__ */ __name(async (id2, holder, until) => {
24929
25006
  const task = required3(id2);
@@ -25026,7 +25103,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
25026
25103
  };
25027
25104
  }, "workTasksOver");
25028
25105
 
25029
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
25106
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
25030
25107
  var taskCloseOver = /* @__PURE__ */ __name((context) => {
25031
25108
  const { database, now: now2 } = context;
25032
25109
  const liveRow = /* @__PURE__ */ __name((id2) => {
@@ -25075,7 +25152,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
25075
25152
  };
25076
25153
  }, "taskCloseOver");
25077
25154
 
25078
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
25155
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
25079
25156
  var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
25080
25157
  var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
25081
25158
  const { database, now: now2 } = context;
@@ -25294,7 +25371,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
25294
25371
  };
25295
25372
  }, "taskPairsOver");
25296
25373
 
25297
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
25374
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
25298
25375
  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";
25299
25376
  var taskStoreOver = /* @__PURE__ */ __name((context) => {
25300
25377
  const { database, now: now2 } = context;
@@ -25499,7 +25576,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
25499
25576
  throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
25500
25577
  }, "oneOf");
25501
25578
 
25502
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/accounts.js
25579
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/accounts.js
25503
25580
  var accountAccountsOver = /* @__PURE__ */ __name((context) => {
25504
25581
  const { database } = context;
25505
25582
  const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
@@ -25544,7 +25621,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
25544
25621
  };
25545
25622
  }, "accountsStoreOver");
25546
25623
 
25547
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
25624
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
25548
25625
  var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
25549
25626
  var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
25550
25627
  const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
@@ -25568,7 +25645,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
25568
25645
  })), "keepDownloads");
25569
25646
  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");
25570
25647
 
25571
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/attachments.js
25648
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/attachments.js
25572
25649
  var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
25573
25650
  const { database } = context;
25574
25651
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -25625,7 +25702,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
25625
25702
  }, "keepAttachmentText")
25626
25703
  }), "attachmentsStoreOver");
25627
25704
 
25628
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
25705
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
25629
25706
  var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
25630
25707
  var pointerMover = /* @__PURE__ */ __name((context, type) => {
25631
25708
  const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
@@ -25805,7 +25882,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
25805
25882
  return done;
25806
25883
  }, "rekeyChats");
25807
25884
 
25808
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
25885
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
25809
25886
  var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
25810
25887
  var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
25811
25888
  var CHAT_LIST_KEY = "chat_list_complete";
@@ -25837,15 +25914,15 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
25837
25914
  });
25838
25915
  }, "chatCompleteness");
25839
25916
 
25840
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/chats.js
25917
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/chats.js
25841
25918
  var chatsStoreOver = /* @__PURE__ */ __name((context) => {
25842
25919
  const { database } = context;
25843
25920
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
25844
25921
  return {
25845
- saveChats: /* @__PURE__ */ __name(async (key2, list) => write(database, () => {
25922
+ saveChats: /* @__PURE__ */ __name(async (key2, list2) => write(database, () => {
25846
25923
  const accountKey = accountPk2(key2);
25847
25924
  revisedBy(context, "chats", () => {
25848
- for (const chat2 of list)
25925
+ for (const chat2 of list2)
25849
25926
  upsertChat(context, accountKey, chat2);
25850
25927
  });
25851
25928
  }), "saveChats"),
@@ -25944,7 +26021,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
25944
26021
  };
25945
26022
  }, "chatsStoreOver");
25946
26023
 
25947
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
26024
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
25948
26025
  import { createHash as createHash6 } from "node:crypto";
25949
26026
  var BATCH_CONTEXT = 50;
25950
26027
  var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
@@ -26082,7 +26159,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
26082
26159
  var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
26083
26160
  ${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
26084
26161
 
26085
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
26162
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
26086
26163
  import { setTimeout } from "node:timers/promises";
26087
26164
  var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
26088
26165
  var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
@@ -26394,7 +26471,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
26394
26471
  AND NOT EXISTS (SELECT 1 FROM messages d
26395
26472
  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");
26396
26473
 
26397
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/conversations.js
26474
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/conversations.js
26398
26475
  var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
26399
26476
  const { database } = context;
26400
26477
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -26501,7 +26578,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
26501
26578
  };
26502
26579
  }, "conversationsStoreOver");
26503
26580
 
26504
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/counters.js
26581
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/counters.js
26505
26582
  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";
26506
26583
  var accountCountersOver = /* @__PURE__ */ __name((context) => {
26507
26584
  const { database } = context;
@@ -26526,7 +26603,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
26526
26603
  counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
26527
26604
  }), "countersStoreOver");
26528
26605
 
26529
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
26606
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
26530
26607
  var MENTION_STATUSES = ["found", "linked", "dismissed"];
26531
26608
  var MENTION_QUERY = defineQuery({
26532
26609
  entity: "mention",
@@ -26742,7 +26819,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
26742
26819
  return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
26743
26820
  }, "listPlaces");
26744
26821
 
26745
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/mentions.js
26822
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/mentions.js
26746
26823
  var accountMentionsOver = /* @__PURE__ */ __name((context) => {
26747
26824
  const { database } = context;
26748
26825
  const { findAccountPk: findAccountPk2 } = keysOver(context);
@@ -26777,7 +26854,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
26777
26854
  places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
26778
26855
  }), "mentionsStoreOver");
26779
26856
 
26780
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
26857
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
26781
26858
  var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
26782
26859
  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");
26783
26860
  const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
@@ -26792,7 +26869,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
26792
26869
  }));
26793
26870
  }, "documentLinkMessages");
26794
26871
 
26795
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
26872
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
26796
26873
  var stemmerFor = stemmerCache();
26797
26874
  var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
26798
26875
  if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
@@ -26836,7 +26913,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
26836
26913
  });
26837
26914
  }, "laterSharingRare");
26838
26915
 
26839
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/messages.js
26916
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/messages.js
26840
26917
  var accountMessagesOver = /* @__PURE__ */ __name((context) => {
26841
26918
  const { database } = context;
26842
26919
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
@@ -26971,7 +27048,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
26971
27048
  laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
26972
27049
  }), "messagesStoreOver");
26973
27050
 
26974
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
27051
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
26975
27052
  var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
26976
27053
  var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
26977
27054
  var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
@@ -27028,7 +27105,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
27028
27105
  });
27029
27106
  }, "personPreparation");
27030
27107
 
27031
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
27108
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
27032
27109
  var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
27033
27110
  const id2 = Number(uid);
27034
27111
  if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
@@ -27036,7 +27113,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
27036
27113
  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)));
27037
27114
  }, "personSeenInAccounts");
27038
27115
 
27039
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
27116
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
27040
27117
  var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
27041
27118
  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);
27042
27119
  if (!row2)
@@ -27102,7 +27179,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
27102
27179
  return { id: id2, personId, removed: true };
27103
27180
  }, "removeNote");
27104
27181
 
27105
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/people.js
27182
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/people.js
27106
27183
  var accountPeopleOver = /* @__PURE__ */ __name((context) => {
27107
27184
  const { database } = context;
27108
27185
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
@@ -27177,13 +27254,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
27177
27254
  };
27178
27255
  }, "peopleStoreOver");
27179
27256
 
27180
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
27257
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
27181
27258
  import { createHash as createHash8 } from "node:crypto";
27182
27259
 
27183
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
27260
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
27184
27261
  import { createHash as createHash7 } from "node:crypto";
27185
27262
 
27186
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
27263
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
27187
27264
  var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
27188
27265
  var exhausted2 = /* @__PURE__ */ __name((budget) => {
27189
27266
  throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
@@ -27405,7 +27482,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
27405
27482
  };
27406
27483
  }, "rankReplyGraph");
27407
27484
 
27408
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
27485
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
27409
27486
  var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
27410
27487
  var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
27411
27488
  var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
@@ -27483,9 +27560,9 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
27483
27560
  const answer = answers.get(node.pk);
27484
27561
  if (!answer)
27485
27562
  continue;
27486
- const key2 = personKey(answer), list = grouped.get(key2) ?? [];
27487
- list.push({ pk: answer.pk, related: node.pk, contribution: answer.timestamp - node.timestamp });
27488
- grouped.set(key2, list);
27563
+ const key2 = personKey(answer), list2 = grouped.get(key2) ?? [];
27564
+ list2.push({ pk: answer.pk, related: node.pk, contribution: answer.timestamp - node.timestamp });
27565
+ grouped.set(key2, list2);
27489
27566
  }
27490
27567
  for (const person2 of options.answerers) {
27491
27568
  const rows = grouped.get(personKey({ account: person2, sender: person2.id })) ?? [];
@@ -27503,9 +27580,9 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
27503
27580
  const grouped = /* @__PURE__ */ new Map();
27504
27581
  for (const node of eligible) {
27505
27582
  const key2 = JSON.stringify([personKey(node), node.chatId]);
27506
- const list = grouped.get(key2) ?? [];
27507
- list.push(node);
27508
- grouped.set(key2, list);
27583
+ const list2 = grouped.get(key2) ?? [];
27584
+ list2.push(node);
27585
+ grouped.set(key2, list2);
27509
27586
  }
27510
27587
  for (const stay of stays) {
27511
27588
  check3();
@@ -27550,9 +27627,9 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
27550
27627
  const node = byPk.get(child);
27551
27628
  if (!node || node.timestamp > options.cutoff)
27552
27629
  continue;
27553
- const list = replies.get(parent2) ?? [];
27554
- list.push({ pk: child, related: parent2, contribution: 1 });
27555
- replies.set(parent2, list);
27630
+ const list2 = replies.get(parent2) ?? [];
27631
+ list2.push({ pk: child, related: parent2, contribution: 1 });
27632
+ replies.set(parent2, list2);
27556
27633
  }
27557
27634
  for (const node of nodes.filter((one) => one.selected && one.chatKind === "channel" && one.graph?.reply === null && !one.graph.discussionSource && one.timestamp <= options.cutoff)) {
27558
27635
  check3();
@@ -27579,7 +27656,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
27579
27656
  return { items, evidence, summary, graph: graph.quality };
27580
27657
  }, "calculateAdminStatistics");
27581
27658
 
27582
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
27659
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
27583
27660
  var rankingContextRange = /* @__PURE__ */ __name((root) => {
27584
27661
  const dates = [];
27585
27662
  const visit = /* @__PURE__ */ __name((node, required3) => {
@@ -27601,7 +27678,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
27601
27678
  return dates[0].node.resolution.date;
27602
27679
  }, "rankingContextRange");
27603
27680
 
27604
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
27681
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
27605
27682
  var reactionCounts = /* @__PURE__ */ __name((stored3) => {
27606
27683
  let counts;
27607
27684
  try {
@@ -27896,7 +27973,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
27896
27973
  });
27897
27974
  }, "rankQuery");
27898
27975
 
27899
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
27976
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
27900
27977
  function fail4(message2, reason = "query.too-large") {
27901
27978
  throw new CliError("validation_error", message2, { reason, complete: false });
27902
27979
  }
@@ -28073,7 +28150,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
28073
28150
  return result;
28074
28151
  }), "adminStatisticsQuery");
28075
28152
 
28076
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
28153
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
28077
28154
  var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
28078
28155
  if (!execution.accounts.length)
28079
28156
  return { conversations: [], chats: [] };
@@ -28091,7 +28168,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
28091
28168
  return { conversations: conversations2, chats: chats2 };
28092
28169
  }, "conversationEligibility");
28093
28170
 
28094
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
28171
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
28095
28172
  import { createHash as createHash9 } from "node:crypto";
28096
28173
  var EVIDENCE_BYTES = 64 * 1024;
28097
28174
  var FINGERPRINT_BYTES = 8 * 1024 * 1024;
@@ -28241,7 +28318,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
28241
28318
  return result;
28242
28319
  }, "rankingEvidence");
28243
28320
 
28244
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/queries.js
28321
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/queries.js
28245
28322
  var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
28246
28323
  const mailIndexed = /* @__PURE__ */ __name((execution) => {
28247
28324
  if (execution.corpus === "mail")
@@ -28260,7 +28337,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
28260
28337
  };
28261
28338
  }, "queriesStoreOver");
28262
28339
 
28263
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
28340
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
28264
28341
  var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
28265
28342
  const { database, now: now2 } = context;
28266
28343
  const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
@@ -28299,10 +28376,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
28299
28376
  }));
28300
28377
  }, "chatEventsOf");
28301
28378
 
28302
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
28379
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
28303
28380
  import { createHash as createHash10 } from "node:crypto";
28304
28381
 
28305
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/calendar.js
28382
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/calendar.js
28306
28383
  var calendarKey = /* @__PURE__ */ __name((zone, by) => {
28307
28384
  const format = new Intl.DateTimeFormat("en-CA", {
28308
28385
  timeZone: zone,
@@ -28317,7 +28394,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
28317
28394
  };
28318
28395
  }, "calendarKey");
28319
28396
 
28320
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/retention.js
28397
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/retention.js
28321
28398
  var RETENTION_TOLERANCE = 864e5;
28322
28399
  var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
28323
28400
  const { since, until, cutoff, checkpoints, within, limit, by } = options;
@@ -28371,7 +28448,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
28371
28448
  return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
28372
28449
  }, "retentionCohorts");
28373
28450
 
28374
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
28451
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
28375
28452
  var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
28376
28453
  var week = /* @__PURE__ */ __name((day) => {
28377
28454
  const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
@@ -28507,7 +28584,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
28507
28584
  };
28508
28585
  }, "retentionQuery");
28509
28586
 
28510
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
28587
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
28511
28588
  var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
28512
28589
  var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
28513
28590
  ...isBot === void 0 ? {} : { bot: isBot },
@@ -28638,7 +28715,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
28638
28715
  lastCount: memberCountsOf(context, pk).at(-1) ?? null
28639
28716
  })), "trackedChats");
28640
28717
 
28641
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/roster.js
28718
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/roster.js
28642
28719
  var rosterStoreOver = /* @__PURE__ */ __name((context) => {
28643
28720
  const { database } = context;
28644
28721
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
@@ -28694,7 +28771,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
28694
28771
  };
28695
28772
  }, "rosterStoreOver");
28696
28773
 
28697
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
28774
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
28698
28775
  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");
28699
28776
  var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
28700
28777
  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 ?`);
@@ -28718,7 +28795,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
28718
28795
  }
28719
28796
  }, "backfillNormalized");
28720
28797
 
28721
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
28798
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
28722
28799
  var INDEX2 = "message_words";
28723
28800
  var searchIndexState2 = /* @__PURE__ */ __name((database) => {
28724
28801
  const row2 = indexRow(database, INDEX2);
@@ -28845,7 +28922,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
28845
28922
  });
28846
28923
  }, "resetSearchIndex");
28847
28924
 
28848
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
28925
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
28849
28926
  var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
28850
28927
  const filled2 = { stemmed: 0, drained: 0 };
28851
28928
  const before2 = stemsState(database);
@@ -28940,7 +29017,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
28940
29017
  return resetStems(database, { now: now2 });
28941
29018
  }, "followDefaultStemmers");
28942
29019
 
28943
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
29020
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
28944
29021
  var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
28945
29022
  var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
28946
29023
  const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
@@ -28962,7 +29039,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
28962
29039
  });
28963
29040
  }, "termCandidates");
28964
29041
 
28965
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/search-index.js
29042
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/search-index.js
28966
29043
  var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
28967
29044
  const { database } = context;
28968
29045
  const stemmerFor2 = stemmerCache();
@@ -28984,7 +29061,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
28984
29061
  };
28985
29062
  }, "searchIndexStoreOver");
28986
29063
 
28987
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
29064
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
28988
29065
  var HISTORY_KEPT = 1e3;
28989
29066
  var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
28990
29067
  var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
@@ -29053,7 +29130,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
29053
29130
  return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
29054
29131
  }, "clearHistory");
29055
29132
 
29056
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/searches.js
29133
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/searches.js
29057
29134
  var searchesStoreOver = /* @__PURE__ */ __name((context) => {
29058
29135
  const { database } = context;
29059
29136
  return {
@@ -29077,7 +29154,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
29077
29154
  };
29078
29155
  }, "searchesStoreOver");
29079
29156
 
29080
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
29157
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
29081
29158
  var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
29082
29159
  var ACTION_OUTCOMES = ["ok", "refused", "failed"];
29083
29160
  var CODE = /^[a-z][a-z0-9_]{0,63}$/;
@@ -29120,7 +29197,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
29120
29197
  };
29121
29198
  }, "agentActionsStoreOver");
29122
29199
 
29123
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
29200
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
29124
29201
  var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
29125
29202
  }) => {
29126
29203
  const { database, now: now2 } = context;
@@ -29179,7 +29256,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
29179
29256
  };
29180
29257
  }, "botUpdateStoreOver");
29181
29258
 
29182
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
29259
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
29183
29260
  var DAY4 = 864e5;
29184
29261
  var listEvents = /* @__PURE__ */ __name((database, filter) => {
29185
29262
  const clauses = ["e.deleted_at IS NULL"];
@@ -29264,7 +29341,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
29264
29341
  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);
29265
29342
  }, "listEvents");
29266
29343
 
29267
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
29344
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
29268
29345
  var calendarOf = /* @__PURE__ */ __name((row2) => ({
29269
29346
  id: Number(row2.id),
29270
29347
  accountId: Number(row2.account_id),
@@ -29844,7 +29921,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
29844
29921
  };
29845
29922
  }, "eventStoreOver");
29846
29923
 
29847
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
29924
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
29848
29925
  var CATALOG_QUERY = defineQuery({
29849
29926
  entity: "document",
29850
29927
  backend: "sql",
@@ -30086,7 +30163,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
30086
30163
  };
30087
30164
  }, "catalogStoreOver");
30088
30165
 
30089
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/context/evidence.js
30166
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/context/evidence.js
30090
30167
  import { createHash as createHash11 } from "node:crypto";
30091
30168
  var CONTEXT_MAX_READ_BYTES = 262144;
30092
30169
  var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
@@ -30184,7 +30261,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
30184
30261
  return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
30185
30262
  }, "contextEvidenceRequest");
30186
30263
 
30187
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
30264
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
30188
30265
  var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
30189
30266
  var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
30190
30267
  CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
@@ -30197,7 +30274,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
30197
30274
  THEN 'source-modified' ELSE 'stored-update' END`;
30198
30275
  var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
30199
30276
 
30200
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
30277
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
30201
30278
  var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
30202
30279
  const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
30203
30280
  signal?.throwIfAborted();
@@ -30296,7 +30373,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
30296
30373
  });
30297
30374
  }, "readMeetingContextEvidence");
30298
30375
 
30299
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
30376
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
30300
30377
  var corpora = {
30301
30378
  message: {
30302
30379
  table: "messages",
@@ -30525,7 +30602,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
30525
30602
  }
30526
30603
  }), "contextRecordsOver");
30527
30604
 
30528
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
30605
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
30529
30606
  var NOTE_FIELDS = [
30530
30607
  "text",
30531
30608
  "exact",
@@ -30955,7 +31032,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
30955
31032
  };
30956
31033
  }, "noteSearchOver");
30957
31034
 
30958
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
31035
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
30959
31036
  var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
30960
31037
  var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
30961
31038
  var EVENT_CORPUS = {
@@ -31087,7 +31164,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
31087
31164
  };
31088
31165
  }, "eventSearchOver");
31089
31166
 
31090
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
31167
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
31091
31168
  var EVIDENCE_FINDINGS_KIND = "evidence_findings";
31092
31169
  var reference = /* @__PURE__ */ __name((raw) => {
31093
31170
  if (/^document:[1-9]\d*$/.test(raw))
@@ -31100,7 +31177,7 @@ var reference = /* @__PURE__ */ __name((raw) => {
31100
31177
  }, "reference");
31101
31178
  var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "evidence findings", singular: "evidence finding", cited: "reference", reference }), "validateEvidenceFindings");
31102
31179
 
31103
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/moment.js
31180
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/domain/moment.js
31104
31181
  var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
31105
31182
  try {
31106
31183
  return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
@@ -31112,7 +31189,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
31112
31189
  }
31113
31190
  }, "calendarMoment");
31114
31191
 
31115
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
31192
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
31116
31193
  var NAMED3 = "SELECT f.*, b.name AS author_name FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
31117
31194
  var iso8 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
31118
31195
  var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -31128,7 +31205,7 @@ var factOperationsOver = /* @__PURE__ */ __name((context) => {
31128
31205
  type: row2.type,
31129
31206
  statement: String(row2.statement),
31130
31207
  status: row2.status,
31131
- project: row2.project_id == null ? null : `project:${row2.project_id}`,
31208
+ ...projectOf(database, row2),
31132
31209
  ...subjectOf(database, row2),
31133
31210
  occurredAt: row2.occurred_at == null ? null : iso8(row2.occurred_at),
31134
31211
  supersedes: row2.supersedes_id == null ? null : `fact:${row2.supersedes_id}`,
@@ -31261,7 +31338,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
31261
31338
  };
31262
31339
  }, "factsStoreOver");
31263
31340
 
31264
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
31341
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
31265
31342
  var invalid2 = /* @__PURE__ */ __name((message2) => {
31266
31343
  throw new CliError("validation_error", message2);
31267
31344
  }, "invalid");
@@ -31351,12 +31428,13 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
31351
31428
  return { snapshot: snapshot2, snapshotParts, previous, outcomes };
31352
31429
  }, "findingsCoreOver");
31353
31430
 
31354
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
31431
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
31355
31432
  var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
31356
31433
  var PROPOSAL_VERDICTS = ["useful", "not_useful"];
31357
31434
  var iso9 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
31358
- var NAMED4 = "SELECT p.*, b.name AS proposer_name FROM proposed_actions p LEFT JOIN bots b ON p.proposed_by_type = 'bot' AND b.id = p.proposed_by_id";
31359
31435
  var json2 = /* @__PURE__ */ __name((value) => value == null ? null : JSON.parse(String(value)), "json");
31436
+ var STATUS = `CASE WHEN p.status = 'approved' AND p.kind IN ('${MEETING_FINDINGS_KIND}', '${EVIDENCE_FINDINGS_KIND}') AND json_array_length(p.result, '$.accepted') = 0 THEN 'rejected' ELSE p.status END`;
31437
+ var NAMED4 = `SELECT p.*, ${STATUS} AS shown_status, b.name AS proposer_name FROM proposed_actions p LEFT JOIN bots b ON p.proposed_by_type = 'bot' AND b.id = p.proposed_by_id`;
31360
31438
  var proposalOperationsOver = /* @__PURE__ */ __name((context) => {
31361
31439
  const { database, now: now2 } = context;
31362
31440
  const actionOf = /* @__PURE__ */ __name((row2) => {
@@ -31368,7 +31446,7 @@ var proposalOperationsOver = /* @__PURE__ */ __name((context) => {
31368
31446
  target: row2.target_type == null ? null : referenceOfThing(database, storedThing(row2.target_type, row2.target_id)) ?? null,
31369
31447
  payload: json2(row2.payload),
31370
31448
  reason: row2.reason == null ? null : String(row2.reason),
31371
- status: row2.status,
31449
+ status: row2.shown_status,
31372
31450
  proposedBy: {
31373
31451
  type: row2.proposed_by_type,
31374
31452
  id: String(row2.proposed_by_id),
@@ -31432,7 +31510,7 @@ var proposalOperationsOver = /* @__PURE__ */ __name((context) => {
31432
31510
  list: /* @__PURE__ */ __name(({ status, limit = 100 } = {}) => {
31433
31511
  if (status !== void 0 && !PROPOSAL_STATUSES.includes(status))
31434
31512
  throw new CliError("validation_error", `a status is one of ${PROPOSAL_STATUSES.join(", ")}`);
31435
- return database.prepare(`${NAMED4} WHERE (? IS NULL OR p.status = ?) ORDER BY p.created_at DESC, p.id DESC LIMIT ?`).all(status ?? null, status ?? null, Math.min(Math.max(limit, 1), 500)).map(actionOf);
31513
+ return database.prepare(`${NAMED4} WHERE (? IS NULL OR ${STATUS} = ?) ORDER BY p.created_at DESC, p.id DESC LIMIT ?`).all(status ?? null, status ?? null, Math.min(Math.max(limit, 1), 500)).map(actionOf);
31436
31514
  }, "list"),
31437
31515
  approve: /* @__PURE__ */ __name((id2, result, by) => decide2(id2, "approved", result, by), "approve"),
31438
31516
  reject: /* @__PURE__ */ __name((id2) => decide2(id2, "rejected"), "reject"),
@@ -31497,7 +31575,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
31497
31575
  };
31498
31576
  }, "proposedActionsStoreOver");
31499
31577
 
31500
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
31578
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
31501
31579
  var stale = /* @__PURE__ */ __name(() => {
31502
31580
  throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
31503
31581
  reason: "evidence-findings.stale"
@@ -31523,7 +31601,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
31523
31601
  }, "load");
31524
31602
  const view = /* @__PURE__ */ __name((proposal) => {
31525
31603
  const input = proposal.payload;
31526
- if (!input || !proposal.target || !["proposed", "approved"].includes(proposal.status))
31604
+ if (!input || !proposal.target || !["proposed", "approved", "rejected"].includes(proposal.status))
31527
31605
  return invalid3("invalid stored findings batch");
31528
31606
  return {
31529
31607
  id: proposal.id,
@@ -31608,15 +31686,16 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
31608
31686
  });
31609
31687
  }, "stage"),
31610
31688
  get: /* @__PURE__ */ __name(async (id2) => view(load(id2)), "get"),
31689
+ sources: /* @__PURE__ */ __name(async (id2) => sourcesOfReferences(database, view(load(id2)).input.findings.flatMap((finding) => finding.evidence.map((one) => one.reference))), "sources"),
31611
31690
  list: /* @__PURE__ */ __name(async ({ project, limit = 20, offset = 0, status } = {}) => {
31612
31691
  if (status !== void 0 && status !== "proposed" && status !== "reviewed")
31613
31692
  return invalid3("finding status is proposed or reviewed");
31614
31693
  if (!Number.isSafeInteger(limit) || limit < 1 || limit > 50 || !Number.isSafeInteger(offset) || offset < 0)
31615
31694
  return invalid3("findings lists take 1\u201350 items and a nonnegative offset");
31616
- const projectId = project === void 0 ? null : /^project:([1-9]\d*)$/.exec(project)?.[1];
31617
- if (projectId === void 0)
31695
+ const projectId2 = project === void 0 ? null : /^project:([1-9]\d*)$/.exec(project)?.[1];
31696
+ if (projectId2 === void 0)
31618
31697
  return invalid3("a findings list filters by a project reference");
31619
- const ids = database.prepare("SELECT id FROM proposed_actions WHERE account_id IS NULL AND kind=? AND (? IS NULL OR (target_type='project' AND target_id=?)) AND (? IS NULL OR status=?) ORDER BY id DESC LIMIT ? OFFSET ?").all(EVIDENCE_FINDINGS_KIND, projectId, projectId === null ? null : Number(projectId), status ?? null, status === "reviewed" ? "approved" : status ?? null, limit + 1, offset);
31698
+ const ids = database.prepare("SELECT id FROM proposed_actions WHERE account_id IS NULL AND kind=? AND (? IS NULL OR (target_type='project' AND target_id=?)) AND (? IS NULL OR status=?) ORDER BY id DESC LIMIT ? OFFSET ?").all(EVIDENCE_FINDINGS_KIND, projectId2, projectId2 === null ? null : Number(projectId2), status ?? null, status === "reviewed" ? "approved" : status ?? null, limit + 1, offset);
31620
31699
  return { items: ids.slice(0, limit).map((row2) => view(load(String(row2.id)))), hasMore: ids.length > limit };
31621
31700
  }, "list"),
31622
31701
  review: /* @__PURE__ */ __name(async (id2, decision) => write(database, () => {
@@ -31663,7 +31742,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
31663
31742
  };
31664
31743
  }, "evidenceFindingsStoreOver");
31665
31744
 
31666
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
31745
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
31667
31746
  var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
31668
31747
  var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
31669
31748
  rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
@@ -31716,7 +31795,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
31716
31795
  }, "forPerson")
31717
31796
  }), "involvementStoreOver");
31718
31797
 
31719
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
31798
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
31720
31799
  import { createHash as createHash12 } from "node:crypto";
31721
31800
  var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
31722
31801
  var id = /* @__PURE__ */ __name((value) => {
@@ -31750,10 +31829,10 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
31750
31829
  };
31751
31830
  }, "linkOf");
31752
31831
  return {
31753
- linkMeetingProject: /* @__PURE__ */ __name(async (key2, meetingId, projectId, options = {}) => {
31832
+ linkMeetingProject: /* @__PURE__ */ __name(async (key2, meetingId, projectId2, options = {}) => {
31754
31833
  check2(options.signal);
31755
31834
  const meeting = id(meetingId);
31756
- const project = id(projectId);
31835
+ const project = id(projectId2);
31757
31836
  const by = options.by ?? "owner";
31758
31837
  if (by !== "owner" && by !== "agent")
31759
31838
  throw new CliError("validation_error", "choose owner or agent provenance");
@@ -31802,16 +31881,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
31802
31881
  };
31803
31882
  }, "meetingProjectsStoreOver");
31804
31883
 
31805
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
31884
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
31806
31885
  import { createHash as createHash15 } from "node:crypto";
31807
31886
 
31808
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
31887
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
31809
31888
  import { createHash as createHash14 } from "node:crypto";
31810
31889
 
31811
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
31890
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
31812
31891
  import { createHash as createHash13 } from "node:crypto";
31813
31892
 
31814
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
31893
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
31815
31894
  var consolidationId = /* @__PURE__ */ __name((value, field4) => {
31816
31895
  if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
31817
31896
  throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
@@ -31862,7 +31941,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
31862
31941
  return input;
31863
31942
  }, "consolidationApplyInput");
31864
31943
 
31865
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
31944
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
31866
31945
  var receiptOf = /* @__PURE__ */ __name((row2) => ({
31867
31946
  id: String(row2.id),
31868
31947
  sourceId: String(row2.source_id),
@@ -31937,7 +32016,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
31937
32016
  }, { beforeCommit: check3 });
31938
32017
  }, "applyTagConsolidation");
31939
32018
 
31940
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
32019
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
31941
32020
  var selections = [
31942
32021
  ["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
31943
32022
  ["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
@@ -32081,7 +32160,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
32081
32160
  };
32082
32161
  }, "previewRows");
32083
32162
 
32084
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
32163
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
32085
32164
  var kinds = ["project", "tag", "topic"];
32086
32165
  var cancelled2 = /* @__PURE__ */ __name((signal) => {
32087
32166
  if (signal?.aborted)
@@ -32345,7 +32424,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
32345
32424
  };
32346
32425
  }, "vocabularyStoreOver");
32347
32426
 
32348
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
32427
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
32349
32428
  var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
32350
32429
  var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
32351
32430
  var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
@@ -32504,7 +32583,7 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
32504
32583
  scope: row2.scope,
32505
32584
  createdAt: iso10(row2.created_at)
32506
32585
  }), "organizationOf");
32507
- const projectOf = /* @__PURE__ */ __name((row2) => ({
32586
+ const projectOf2 = /* @__PURE__ */ __name((row2) => ({
32508
32587
  id: String(row2.id),
32509
32588
  ref: `project:${row2.id}`,
32510
32589
  key: String(row2.key),
@@ -32575,7 +32654,7 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
32575
32654
  return row2;
32576
32655
  }, "openTask");
32577
32656
  const canonicalTagName = /* @__PURE__ */ __name((name) => canonicalTagNamed(database, name)?.name ?? normalizeTag(name), "canonicalTagName");
32578
- const tagsOf2 = /* @__PURE__ */ __name((list) => [...new Set(list.map(canonicalTagName))], "tagsOf");
32657
+ const tagsOf2 = /* @__PURE__ */ __name((list2) => [...new Set(list2.map(canonicalTagName))], "tagsOf");
32579
32658
  return {
32580
32659
  ...vocabularyStoreOver(context),
32581
32660
  ...meetingProjectsStoreOver(context),
@@ -32739,7 +32818,7 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
32739
32818
  }
32740
32819
  const at = now2();
32741
32820
  const row2 = database.prepare("INSERT INTO projects (key, name, name_folded, description, type, organization_id, scope, tasks_count, status, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, 0, 'active', ?, ?) RETURNING *").get(chosen, title, fold(title), description === void 0 ? null : textOf4(description, 2e3), oneOf5(type, PROJECT_TYPES, "a project's type"), organizationId, oneOf5(scope3, SCOPES, "a scope"), at, at);
32742
- return projectOf(row2);
32821
+ return projectOf2(row2);
32743
32822
  }), "addProject"),
32744
32823
  projects: /* @__PURE__ */ __name(async (query) => {
32745
32824
  const asksKind = query !== void 0 && walkQuery(query.root).some((node) => node.field === "kind");
@@ -32753,7 +32832,7 @@ var knowledgeStoreOver = /* @__PURE__ */ __name((context) => {
32753
32832
  scope: { type: "enum", sql: "scope" },
32754
32833
  created_at: { type: "time", sql: "created_at" }
32755
32834
  });
32756
- return database.prepare(`SELECT * FROM projects WHERE deleted_at IS NULL${asksKind ? "" : ` AND length(key) <> ${INBOX_KEY_LENGTH}`}${where ? ` AND (${where.sql})` : ""} ORDER BY name, id LIMIT 500`).all(...where?.params ?? []).map(projectOf);
32835
+ return database.prepare(`SELECT * FROM projects WHERE deleted_at IS NULL${asksKind ? "" : ` AND length(key) <> ${INBOX_KEY_LENGTH}`}${where ? ` AND (${where.sql})` : ""} ORDER BY name, id LIMIT 500`).all(...where?.params ?? []).map(projectOf2);
32757
32836
  }, "projects"),
32758
32837
  relate: /* @__PURE__ */ __name(async (key2, input) => {
32759
32838
  const from2 = related(key2, input.from, true);
@@ -32867,7 +32946,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
32867
32946
  return key2.padEnd(3, "X");
32868
32947
  }, "projectKey");
32869
32948
 
32870
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
32949
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
32871
32950
  var DAY5 = 864e5;
32872
32951
  var SETTING4 = "logs_pruned_at";
32873
32952
  var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
@@ -32894,7 +32973,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
32894
32973
  };
32895
32974
  }, "logPruner");
32896
32975
 
32897
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
32976
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
32898
32977
  var stale2 = /* @__PURE__ */ __name(() => {
32899
32978
  throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
32900
32979
  reason: "meeting-findings.stale"
@@ -32926,7 +33005,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
32926
33005
  }, "load");
32927
33006
  const view = /* @__PURE__ */ __name((proposal) => {
32928
33007
  const input = proposal.payload;
32929
- if (!input || !proposal.account || !["proposed", "approved"].includes(proposal.status))
33008
+ if (!input || !proposal.account || !["proposed", "approved", "rejected"].includes(proposal.status))
32930
33009
  return invalid4("invalid stored findings batch");
32931
33010
  return {
32932
33011
  id: proposal.id,
@@ -32947,11 +33026,11 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
32947
33026
  const core = findingsCoreOver(context, MEETING_FINDINGS_KIND);
32948
33027
  const snapshot2 = /* @__PURE__ */ __name((account, input) => {
32949
33028
  let readBytes = 0;
32950
- return core.snapshot(input, (evidence, finding, projectId, seen) => {
33029
+ return core.snapshot(input, (evidence, finding, projectId2, seen) => {
32951
33030
  const parsed2 = parseMeetingReference(evidence.reference);
32952
33031
  if (parsed2.accountId !== account)
32953
33032
  throw new CliError("not_found", "the cited cue belongs to another account");
32954
- const membership = database.prepare("SELECT id,updated_at,confirmed,source FROM links WHERE from_type='meeting' AND from_id=? AND to_type='project' AND to_id=? AND kind='member-of' AND anchor IS NULL AND confirmed=1").get(parsed2.meetingId, projectId);
33033
+ const membership = database.prepare("SELECT id,updated_at,confirmed,source FROM links WHERE from_type='meeting' AND from_id=? AND to_type='project' AND to_id=? AND kind='member-of' AND anchor IS NULL AND confirmed=1").get(parsed2.meetingId, projectId2);
32955
33034
  if (!membership)
32956
33035
  return invalid4("each cited meeting needs confirmed membership in the finding's project");
32957
33036
  seen.set(`${finding.project}/${parsed2.meetingId}`, membership);
@@ -33063,7 +33142,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
33063
33142
  };
33064
33143
  }, "meetingFindingsStoreOver");
33065
33144
 
33066
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
33145
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
33067
33146
  var RANK_BATCH = 512;
33068
33147
  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";
33069
33148
  var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
@@ -33334,7 +33413,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
33334
33413
  }
33335
33414
  }), "meetingVectorsOver");
33336
33415
 
33337
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
33416
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
33338
33417
  var OTHER_SOURCES = ["document", "note", "email"];
33339
33418
  var TEXTS = {
33340
33419
  document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
@@ -33435,11 +33514,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
33435
33514
  };
33436
33515
  }, "sourceMentionStoreOver");
33437
33516
 
33438
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
33517
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
33439
33518
  import { mkdirSync, statSync, writeFileSync } from "node:fs";
33440
33519
  import { dirname } from "node:path";
33441
33520
 
33442
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
33521
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
33443
33522
  import { readFileSync as readFileSync3 } from "node:fs";
33444
33523
  var CLIENTS_SETTING = "clients";
33445
33524
  var coreVersion = (() => {
@@ -33497,7 +33576,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
33497
33576
  return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
33498
33577
  }, "refusalAdvice");
33499
33578
 
33500
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
33579
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
33501
33580
  var GENERATED = [
33502
33581
  {
33503
33582
  "name": "20261010184427_initial",
@@ -34383,10 +34462,17 @@ WHERE json_type(params, '$.selection') = 'object';`
34383
34462
  "CREATE TRIGGER tasks_revision_tagging_ai AFTER INSERT ON taggings WHEN new.taggable_type = 'task' BEGIN\n UPDATE tasks SET revision = revision + 1 WHERE id = new.taggable_id;\nEND;",
34384
34463
  "CREATE TRIGGER tasks_revision_tagging_ad AFTER DELETE ON taggings WHEN old.taggable_type = 'task' BEGIN\n UPDATE tasks SET revision = revision + 1 WHERE id = old.taggable_id;\nEND;"
34385
34464
  ]
34465
+ },
34466
+ {
34467
+ "name": "20261101011859_version-43-memory-project",
34468
+ "statements": [
34469
+ "ALTER TABLE `memories` ADD `project_id` integer REFERENCES projects(id);",
34470
+ "CREATE INDEX `memories_by_project_id` ON `memories` (`project_id`);"
34471
+ ]
34386
34472
  }
34387
34473
  ];
34388
34474
 
34389
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
34475
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
34390
34476
  var MANIFEST = [
34391
34477
  { name: "20261010184427_initial", version: 1, minCompatible: 1 },
34392
34478
  { name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
@@ -34442,7 +34528,8 @@ var MANIFEST = [
34442
34528
  { name: "20261030114008_version-39-email-locations", version: 39, minCompatible: 34 },
34443
34529
  { name: "20261030225520_version-40-note-trigrams", version: 40, minCompatible: 34 },
34444
34530
  { name: "20261031230945_version-41-task-fields", version: 41, minCompatible: 34 },
34445
- { name: "20261101002523_version-42-task-revision", version: 42, minCompatible: 34 }
34531
+ { name: "20261101002523_version-42-task-revision", version: 42, minCompatible: 34 },
34532
+ { name: "20261101011859_version-43-memory-project", version: 43, minCompatible: 34 }
34446
34533
  ];
34447
34534
  var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated = GENERATED) => {
34448
34535
  const migrations = [];
@@ -34466,7 +34553,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
34466
34553
  return migrations;
34467
34554
  }, "generatedMigrations");
34468
34555
 
34469
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/migrations.js
34556
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/migrations.js
34470
34557
  var MIGRATIONS = generatedMigrations();
34471
34558
  var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
34472
34559
  version INTEGER PRIMARY KEY,
@@ -34519,7 +34606,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
34519
34606
  }
34520
34607
  }, "migrate");
34521
34608
 
34522
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
34609
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
34523
34610
  var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
34524
34611
  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 ?");
34525
34612
  if (pending.get(0, 1) === void 0)
@@ -34541,7 +34628,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
34541
34628
  }
34542
34629
  }, "fillJoinKeys");
34543
34630
 
34544
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
34631
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
34545
34632
  var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
34546
34633
  const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
34547
34634
  try {
@@ -34554,8 +34641,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
34554
34641
  }, "openSqlite");
34555
34642
  var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
34556
34643
  quietSqliteWarning();
34557
- const { drizzle } = await import("./node-73PKCCE7.js");
34558
- const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-FDD5N6GC.js");
34644
+ const { drizzle } = await import("./node-2S75QJ6B.js");
34645
+ const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-RC7WM3EG.js");
34559
34646
  const client = await nodeClient(path, { readOnly });
34560
34647
  try {
34561
34648
  return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
@@ -34565,8 +34652,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
34565
34652
  }
34566
34653
  }, "openUnderNode");
34567
34654
  var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
34568
- const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-KGH5F33G.js");
34569
- const { drizzle } = await import("./bun-GTG5IYLQ.js");
34655
+ const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-F24A4IOP.js");
34656
+ const { drizzle } = await import("./bun-EO7AI6YP.js");
34570
34657
  const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
34571
34658
  try {
34572
34659
  return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
@@ -34576,7 +34663,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
34576
34663
  }
34577
34664
  }, "openUnderBun");
34578
34665
 
34579
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
34666
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
34580
34667
  var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
34581
34668
  const ours = MIGRATIONS.at(-1)?.version ?? 0;
34582
34669
  if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
@@ -34591,7 +34678,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
34591
34678
  throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
34592
34679
  }, "assertReadCompatible");
34593
34680
 
34594
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
34681
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
34595
34682
  var BACKFILL_ON_OPEN = 5e3;
34596
34683
  var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
34597
34684
  var createWritable = /* @__PURE__ */ __name((file) => {
@@ -34647,13 +34734,13 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
34647
34734
  }
34648
34735
  }, "openStoreContext");
34649
34736
 
34650
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
34737
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
34651
34738
  import { createHash as createHash17 } from "node:crypto";
34652
34739
 
34653
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
34740
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
34654
34741
  import { createHash as createHash16 } from "node:crypto";
34655
34742
 
34656
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
34743
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
34657
34744
  var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
34658
34745
  var ref = text3(2048);
34659
34746
  var timestamp2 = pipe(number(), safeInteger(), minValue(0));
@@ -34719,7 +34806,7 @@ var projectAnnotationsSchema = strictObject({
34719
34806
  }))
34720
34807
  });
34721
34808
 
34722
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
34809
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
34723
34810
  var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
34724
34811
  var invalid5 = /* @__PURE__ */ __name((field4) => {
34725
34812
  throw new CliError("validation_error", `invalid project annotations.${field4}`);
@@ -34852,7 +34939,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
34852
34939
  return createHash16("sha256").update(JSON.stringify(normalized)).digest("hex");
34853
34940
  }, "projectAnnotationsFingerprint");
34854
34941
 
34855
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
34942
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
34856
34943
  var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
34857
34944
  var ref2 = pipe(string(), minLength(1), maxLength(2048));
34858
34945
  var targetSchema = strictObject({
@@ -34959,7 +35046,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
34959
35046
  }, "planBoundProjectAnnotations");
34960
35047
  var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
34961
35048
 
34962
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
35049
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
34963
35050
  import { createHash as createHash18 } from "node:crypto";
34964
35051
  var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
34965
35052
  var timestamp3 = pipe(number(), safeInteger(), minValue(0));
@@ -35053,7 +35140,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
35053
35140
  })).digest("hex");
35054
35141
  }, "projectAnnotationSnapshotFingerprint");
35055
35142
 
35056
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
35143
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
35057
35144
  var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
35058
35145
  if (!request || typeof request !== "object" || Array.isArray(request))
35059
35146
  throw new CliError("validation_error", "project annotation request is required");
@@ -35070,7 +35157,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
35070
35157
  return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
35071
35158
  }, "projectAnnotationRequest");
35072
35159
 
35073
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
35160
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
35074
35161
  var SnapshotBudget = class {
35075
35162
  static {
35076
35163
  __name(this, "SnapshotBudget");
@@ -35096,13 +35183,13 @@ var SnapshotBudget = class {
35096
35183
  }
35097
35184
  };
35098
35185
 
35099
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
35186
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
35100
35187
  import { createHash as createHash20 } from "node:crypto";
35101
35188
 
35102
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
35189
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
35103
35190
  var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
35104
35191
 
35105
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
35192
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
35106
35193
  import { createHash as createHash19 } from "node:crypto";
35107
35194
  var invalid7 = /* @__PURE__ */ __name(() => {
35108
35195
  throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
@@ -35245,7 +35332,7 @@ var ProjectSnapshotSources = class {
35245
35332
  }
35246
35333
  };
35247
35334
 
35248
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
35335
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
35249
35336
  var unsupported = /* @__PURE__ */ __name(() => {
35250
35337
  throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
35251
35338
  }, "unsupported");
@@ -35271,7 +35358,7 @@ var provenance = /* @__PURE__ */ __name((raw) => {
35271
35358
  return unsupported();
35272
35359
  return text5 ?? null;
35273
35360
  }, "provenance");
35274
- var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, budget) => read(database, () => {
35361
+ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, budget) => read(database, () => {
35275
35362
  if (database.prepare("SELECT max(version) AS version FROM schema_migrations").get()?.version !== MIGRATIONS.at(-1)?.version)
35276
35363
  throw new CliError("configuration_error", "project snapshots require the SDK's current store schema without source migration");
35277
35364
  const sources = new ProjectSnapshotSources(database, budget);
@@ -35279,7 +35366,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
35279
35366
  budget.rows(database, from2, fields4, params);
35280
35367
  return database.prepare(`SELECT ${fields4.join(",")} ${from2} LIMIT 1001`).all(...params);
35281
35368
  }, "rows");
35282
- const descriptor = database.prepare("SELECT account_id,deleted_at FROM projects WHERE id=?").get(projectId);
35369
+ const descriptor = database.prepare("SELECT account_id,deleted_at FROM projects WHERE id=?").get(projectId2);
35283
35370
  if (!descriptor)
35284
35371
  throw new CliError("not_found", "the source project does not exist");
35285
35372
  if (descriptor.account_id !== null || descriptor.deleted_at !== null)
@@ -35297,13 +35384,13 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
35297
35384
  "status",
35298
35385
  "created_at",
35299
35386
  "updated_at"
35300
- ], [projectId])[0];
35387
+ ], [projectId2])[0];
35301
35388
  if (!project)
35302
35389
  throw new CliError("not_found", "the source project does not exist");
35303
- const aliases2 = rows("FROM aliases WHERE aliasable_type='project' AND aliasable_id=? ORDER BY id", ["name", "source", "display", "account_id", "created_at", "updated_at"], [projectId]);
35390
+ const aliases2 = rows("FROM aliases WHERE aliasable_type='project' AND aliasable_id=? ORDER BY id", ["name", "source", "display", "account_id", "created_at", "updated_at"], [projectId2]);
35304
35391
  if (aliases2.some((alias2) => alias2.account_id !== null))
35305
35392
  return unsupported();
35306
- if (database.prepare("SELECT 1 FROM facts WHERE project_id=? AND (metadata IS NOT NULL OR deleted_at IS NOT NULL) LIMIT 1").get(projectId))
35393
+ if (database.prepare("SELECT 1 FROM facts WHERE project_id=? AND (metadata IS NOT NULL OR deleted_at IS NOT NULL) LIMIT 1").get(projectId2))
35307
35394
  return unsupported();
35308
35395
  const facts2 = rows("FROM facts WHERE project_id=? ORDER BY id", [
35309
35396
  "id",
@@ -35323,7 +35410,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
35323
35410
  "source",
35324
35411
  "created_at",
35325
35412
  "updated_at"
35326
- ], [projectId]);
35413
+ ], [projectId2]);
35327
35414
  const links2 = rows("FROM links WHERE (from_type='project' AND from_id=?) OR (to_type='project' AND to_id=?) OR (from_type='fact' AND from_id IN (SELECT id FROM facts WHERE project_id=?)) OR (to_type='fact' AND to_id IN (SELECT id FROM facts WHERE project_id=?)) ORDER BY id", [
35328
35415
  "id",
35329
35416
  "from_type",
@@ -35341,8 +35428,8 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
35341
35428
  "author",
35342
35429
  "created_at",
35343
35430
  "updated_at"
35344
- ], [projectId, projectId, projectId, projectId]);
35345
- const projectRef = `project:${projectId}`;
35431
+ ], [projectId2, projectId2, projectId2, projectId2]);
35432
+ const projectRef = `project:${projectId2}`;
35346
35433
  const owned = /* @__PURE__ */ new Set([projectRef, ...facts2.map((row2) => `fact:${row2.id}`)]);
35347
35434
  const data = {
35348
35435
  format: "wirecat.project-annotations",
@@ -35416,9 +35503,9 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
35416
35503
  return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
35417
35504
  }), "projectAnnotationSnapshot");
35418
35505
 
35419
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
35420
- var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, manifest, bindings, budget) => read(database, () => {
35421
- const current = projectAnnotationSnapshot(database, projectId, budget).snapshot;
35506
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
35507
+ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
35508
+ const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
35422
35509
  const sources = new ProjectSnapshotSources(database, budget);
35423
35510
  for (const ref3 of new Set(Object.values(bindings))) {
35424
35511
  if (ref3 === current.project.ref)
@@ -35439,7 +35526,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, man
35439
35526
  const names = new Set([manifest.project.key, manifest.project.name, ...manifest.aliases.map((a) => a.name)].map(normalizeVocabularyName));
35440
35527
  const namespace = /* @__PURE__ */ new Set();
35441
35528
  for (const project of projects2) {
35442
- if (project.id === projectId)
35529
+ if (project.id === projectId2)
35443
35530
  continue;
35444
35531
  const keyMatches = names.has(normalizeVocabularyName(String(project.key)));
35445
35532
  const nameMatches = project.account_id === null && project.deleted_at === null && names.has(normalizeVocabularyName(String(project.name)));
@@ -35447,7 +35534,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, man
35447
35534
  namespace.add(`project:${project.id}`);
35448
35535
  }
35449
35536
  for (const alias2 of aliases2) {
35450
- if (alias2.aliasable_id === projectId || alias2.account_id !== null)
35537
+ if (alias2.aliasable_id === projectId2 || alias2.account_id !== null)
35451
35538
  continue;
35452
35539
  const project = projects2.find((p) => p.id === alias2.aliasable_id && p.account_id === null && p.deleted_at === null);
35453
35540
  if (project && names.has(normalizeVocabularyName(String(alias2.name))))
@@ -35478,8 +35565,8 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, man
35478
35565
  };
35479
35566
  }), "previewAnnotationSnapshot");
35480
35567
 
35481
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
35482
- var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snapshot2, bindings) => {
35568
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
35569
+ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
35483
35570
  const mappings = { ...bindings };
35484
35571
  const resolve = /* @__PURE__ */ __name((ref3) => {
35485
35572
  if (ref3 === null)
@@ -35490,14 +35577,14 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snap
35490
35577
  return thing;
35491
35578
  }, "resolve");
35492
35579
  const organization = resolve(snapshot2.project.organization), owner = resolve(snapshot2.project.owner);
35493
- database.prepare("UPDATE projects SET description=?,type=?,scope=?,organization_id=?,owner_type=?,owner_id=?,status=?,created_at=?,updated_at=? WHERE id=?").run(snapshot2.project.description, snapshot2.project.type, snapshot2.project.scope, organization?.id ?? null, owner?.type ?? null, owner?.id ?? null, snapshot2.project.status, snapshot2.project.created_at, snapshot2.project.updated_at, projectId);
35580
+ database.prepare("UPDATE projects SET description=?,type=?,scope=?,organization_id=?,owner_type=?,owner_id=?,status=?,created_at=?,updated_at=? WHERE id=?").run(snapshot2.project.description, snapshot2.project.type, snapshot2.project.scope, organization?.id ?? null, owner?.type ?? null, owner?.id ?? null, snapshot2.project.status, snapshot2.project.created_at, snapshot2.project.updated_at, projectId2);
35494
35581
  for (const alias2 of snapshot2.aliases)
35495
- database.prepare("INSERT INTO aliases(aliasable_type,aliasable_id,account_id,name,name_folded,display,source,created_at,updated_at) VALUES('project',?,NULL,?,?,?,?,?,?)").run(projectId, alias2.name, fold(alias2.name), Number(alias2.display), alias2.source, alias2.created_at, alias2.updated_at);
35582
+ database.prepare("INSERT INTO aliases(aliasable_type,aliasable_id,account_id,name,name_folded,display,source,created_at,updated_at) VALUES('project',?,NULL,?,?,?,?,?,?)").run(projectId2, alias2.name, fold(alias2.name), Number(alias2.display), alias2.source, alias2.created_at, alias2.updated_at);
35496
35583
  for (const fact of snapshot2.facts) {
35497
35584
  const author = resolve(fact.author), confirmed = resolve(fact.confirmed_by);
35498
35585
  if (!author)
35499
35586
  throw new CliError("validation_error", "project annotation author is required");
35500
- const row2 = database.prepare("INSERT INTO facts(id,type,statement,status,project_id,subject_type,subject_id,occurred_at,supersedes_id,author_type,author_id,model,confirmed_by_type,confirmed_by_id,scope,source,created_at,updated_at) VALUES(?,?,?,?,?,NULL,NULL,?,NULL,?,?,?,?,?,?,?,?,?) RETURNING id").get(nextId(database, "facts"), fact.type, fact.statement, fact.status, projectId, fact.occurred_at, author.type, author.id, fact.model, confirmed?.type ?? null, confirmed?.id ?? null, fact.scope, fact.source, fact.created_at, fact.updated_at);
35587
+ const row2 = database.prepare("INSERT INTO facts(id,type,statement,status,project_id,subject_type,subject_id,occurred_at,supersedes_id,author_type,author_id,model,confirmed_by_type,confirmed_by_id,scope,source,created_at,updated_at) VALUES(?,?,?,?,?,NULL,NULL,?,NULL,?,?,?,?,?,?,?,?,?) RETURNING id").get(nextId(database, "facts"), fact.type, fact.statement, fact.status, projectId2, fact.occurred_at, author.type, author.id, fact.model, confirmed?.type ?? null, confirmed?.id ?? null, fact.scope, fact.source, fact.created_at, fact.updated_at);
35501
35588
  if (!row2)
35502
35589
  throw new CliError("configuration_error", "project annotation fact insertion failed");
35503
35590
  mappings[fact.ref] = `fact:${row2.id}`;
@@ -35520,21 +35607,21 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snap
35520
35607
  return mappings;
35521
35608
  }, "restoreAnnotationRecords");
35522
35609
 
35523
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
35610
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
35524
35611
  var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
35525
35612
  async preview(request) {
35526
- const { snapshot: snapshot2, projectId } = projectAnnotationRequest(request);
35527
- return previewAnnotationSnapshot(database, projectId, snapshot2, request.bindings, new SnapshotBudget(request.maxReadBytes ?? 4 * 1024 * 1024));
35613
+ const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
35614
+ return previewAnnotationSnapshot(database, projectId2, snapshot2, request.bindings, new SnapshotBudget(request.maxReadBytes ?? 4 * 1024 * 1024));
35528
35615
  },
35529
35616
  async restore(request) {
35530
- const { snapshot: snapshot2, projectId } = projectAnnotationRequest(request, true);
35617
+ const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request, true);
35531
35618
  const budget = new SnapshotBudget(request.maxReadBytes ?? 4 * 1024 * 1024);
35532
35619
  try {
35533
35620
  return write(database, () => {
35534
- const preview = previewAnnotationSnapshot(database, projectId, snapshot2, request.bindings, budget);
35621
+ const preview = previewAnnotationSnapshot(database, projectId2, snapshot2, request.bindings, budget);
35535
35622
  if (!preview.ready || preview.fingerprint !== request.fingerprint)
35536
35623
  throw new CliError("validation_error", "project annotation preview is stale or has conflicts; preview again");
35537
- const mappings = restoreAnnotationRecords(database, projectId, snapshot2, request.bindings);
35624
+ const mappings = restoreAnnotationRecords(database, projectId2, snapshot2, request.bindings);
35538
35625
  return {
35539
35626
  project: request.project,
35540
35627
  fingerprint: preview.fingerprint,
@@ -35550,7 +35637,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
35550
35637
  }
35551
35638
  }), "projectAnnotationStoreOver");
35552
35639
 
35553
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
35640
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
35554
35641
  var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
35555
35642
  const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
35556
35643
  let merged = { from: from2, to };
@@ -35563,7 +35650,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
35563
35650
  }, "markRange");
35564
35651
  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");
35565
35652
 
35566
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
35653
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
35567
35654
  var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
35568
35655
  var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
35569
35656
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
@@ -35573,7 +35660,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
35573
35660
  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);
35574
35661
  }, "setTaskRulesStop");
35575
35662
 
35576
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sync.js
35663
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sync.js
35577
35664
  var syncStoreOver = /* @__PURE__ */ __name((context) => {
35578
35665
  const { database } = context;
35579
35666
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
@@ -35629,21 +35716,21 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
35629
35716
  };
35630
35717
  }, "syncStoreOver");
35631
35718
 
35632
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/tags.js
35719
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/tags.js
35633
35720
  var tagsStoreOver = /* @__PURE__ */ __name((context) => {
35634
35721
  const { database } = context;
35635
35722
  return {
35636
- addTags: /* @__PURE__ */ __name(async (key2, target, list) => {
35723
+ addTags: /* @__PURE__ */ __name(async (key2, target, list2) => {
35637
35724
  let added = [];
35638
35725
  write(database, () => {
35639
- added = addTags(context, targetThing(context, key2, target), list);
35726
+ added = addTags(context, targetThing(context, key2, target), list2);
35640
35727
  });
35641
35728
  return added;
35642
35729
  }, "addTags"),
35643
- removeTags: /* @__PURE__ */ __name(async (key2, target, list, source2) => {
35730
+ removeTags: /* @__PURE__ */ __name(async (key2, target, list2, source2) => {
35644
35731
  let removed = [];
35645
35732
  write(database, () => {
35646
- removed = removeTags(context, targetThing(context, key2, target), list, source2);
35733
+ removed = removeTags(context, targetThing(context, key2, target), list2, source2);
35647
35734
  });
35648
35735
  return removed;
35649
35736
  }, "removeTags"),
@@ -35651,7 +35738,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
35651
35738
  };
35652
35739
  }, "tagsStoreOver");
35653
35740
 
35654
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
35741
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
35655
35742
  var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
35656
35743
  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
35657
35744
  WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
@@ -35778,7 +35865,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
35778
35865
  dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
35779
35866
  }, "savePictureChunks");
35780
35867
 
35781
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
35868
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
35782
35869
  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,
35783
35870
  EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
35784
35871
  FROM messages m
@@ -35867,7 +35954,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
35867
35954
  return plain2(best(found2));
35868
35955
  }, "nearestMessages");
35869
35956
 
35870
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/vectors.js
35957
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/vectors.js
35871
35958
  var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
35872
35959
  const { database } = context;
35873
35960
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -36026,12 +36113,12 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
36026
36113
  });
36027
36114
  return cleared;
36028
36115
  }, "clearVectors"),
36029
- nearestConversations: /* @__PURE__ */ __name(async (key2, { chatId, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId, personId, before: before2 }) => {
36116
+ nearestConversations: /* @__PURE__ */ __name(async (key2, { chatId, model, since, limit, query, exclude, conversations: conversations2, scope: scope3, projectId: projectId2, personId, before: before2 }) => {
36030
36117
  const accountPk2 = findAccountPk2(key2);
36031
36118
  if (accountPk2 === void 0)
36032
36119
  return [];
36033
36120
  const chatKey = chatId === void 0 ? void 0 : chatKeyOf(key2, chatId);
36034
- const mailToo = key2.provider === "email" && conversations2 === void 0 && scope3 === void 0 && projectId === void 0 && personId === void 0 && before2 === void 0;
36121
+ const mailToo = key2.provider === "email" && conversations2 === void 0 && scope3 === void 0 && projectId2 === void 0 && personId === void 0 && before2 === void 0;
36035
36122
  const mailHits = /* @__PURE__ */ __name(async () => mailToo ? (await mail().nearest(model, query, {
36036
36123
  accountId: accountPk2,
36037
36124
  limit,
@@ -36054,7 +36141,7 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
36054
36141
  query,
36055
36142
  ...conversations2 === void 0 ? {} : { conversations: conversations2 },
36056
36143
  ...scope3 === void 0 ? {} : { scope: scope3 },
36057
- ...projectId === void 0 ? {} : { projectId: Number(projectId) },
36144
+ ...projectId2 === void 0 ? {} : { projectId: Number(projectId2) },
36058
36145
  ...personId === void 0 ? {} : { personId: Number(personId) },
36059
36146
  ...before2 === void 0 ? {} : { before: Date.parse(before2) }
36060
36147
  });
@@ -36125,7 +36212,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
36125
36212
  embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
36126
36213
  }), "vectorsStoreOver");
36127
36214
 
36128
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
36215
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
36129
36216
  import { existsSync, readFileSync as readFileSync4 } from "node:fs";
36130
36217
  import { dirname as dirname2, join as join2 } from "node:path";
36131
36218
  var BOOKKEEPING = ["schema_migrations", "store_settings"];
@@ -36213,10 +36300,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
36213
36300
  }
36214
36301
  }, "lastBackup");
36215
36302
 
36216
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/providers.js
36303
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/providers.js
36217
36304
  var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
36218
36305
 
36219
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
36306
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
36220
36307
  var COUNTED_TABLES = [
36221
36308
  "accounts",
36222
36309
  "chats",
@@ -36301,7 +36388,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
36301
36388
  };
36302
36389
  }, "storeContents");
36303
36390
 
36304
- // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/store.js
36391
+ // node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/store/store.js
36305
36392
  var openStore = /* @__PURE__ */ __name(async (options = {}) => {
36306
36393
  const context = await openStoreContext(options);
36307
36394
  try {
@@ -36554,6 +36641,7 @@ export {
36554
36641
  titlePart,
36555
36642
  AGENDA_COLUMNS,
36556
36643
  correctWords,
36644
+ THREAD_COLUMNS,
36557
36645
  threadConversation,
36558
36646
  messageOfEmail,
36559
36647
  resetAttachmentWords,