@wirecat/mail-cli 0.29.0 → 0.31.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 (105) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/bin/mail.js +2 -2
  3. package/dist/bundle/{all-profiles-Q4E2LPB4.js → all-profiles-XL62TNUO.js} +19 -29
  4. package/dist/bundle/{anthropic-S3N4JDJU.js → anthropic-3MSWVYCE.js} +2 -2
  5. package/dist/bundle/{app-server-E44CAPPI.js → app-server-RRNR5XFA.js} +45 -60
  6. package/dist/bundle/{bun-RDYA5FCZ.js → bun-E3F3PEQQ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-FPVHKI24.js → bun-sqlite-UOFN77LO.js} +3 -3
  8. package/dist/bundle/{chunk-KBTVVHFP.js → chunk-3CJ4C6BB.js} +12 -12
  9. package/dist/bundle/{chunk-KTLJ6F2B.js → chunk-3V6J7VPF.js} +3 -3
  10. package/dist/bundle/{chunk-44IAJV2T.js → chunk-4BW5JACS.js} +16 -16
  11. package/dist/bundle/{chunk-UQZJ2GFQ.js → chunk-4ME2NHNJ.js} +2 -2
  12. package/dist/bundle/{chunk-NUHUTJTM.js → chunk-5YRR52NH.js} +1 -1
  13. package/dist/bundle/{chunk-ZIFB6KGQ.js → chunk-6UOUDIXL.js} +1575 -945
  14. package/dist/bundle/{chunk-WZNQ2P7H.js → chunk-7E7YXQ52.js} +1307 -1307
  15. package/dist/bundle/{chunk-45ET53MO.js → chunk-BKRIIZPV.js} +2 -2
  16. package/dist/bundle/{chunk-TXDA437R.js → chunk-BNP7WLDQ.js} +1 -1
  17. package/dist/bundle/{chunk-W32UQL5I.js → chunk-BS6WYCNZ.js} +32 -22
  18. package/dist/bundle/{chunk-WSHPLO4Q.js → chunk-BXMLIKUM.js} +147 -391
  19. package/dist/bundle/{chunk-BPHLFSUO.js → chunk-D6D6JLXG.js} +16 -16
  20. package/dist/bundle/{chunk-YRER6N3Y.js → chunk-DCR3IWC7.js} +38 -47
  21. package/dist/bundle/{chunk-KSFPMRH6.js → chunk-DDCDOBZS.js} +1 -1
  22. package/dist/bundle/{chunk-DMW6J2P3.js → chunk-DPDS6IZJ.js} +1 -1
  23. package/dist/bundle/{chunk-5PDWUD3W.js → chunk-DWBY7DMF.js} +1 -1
  24. package/dist/bundle/{chunk-IZEK7JI7.js → chunk-DZSS2IUK.js} +18 -2
  25. package/dist/bundle/{chunk-UUM7AF32.js → chunk-E3IOR37T.js} +2 -2
  26. package/dist/bundle/{chunk-5ZJ6IHVE.js → chunk-EMVLCION.js} +1 -1
  27. package/dist/bundle/{chunk-IKTBM64M.js → chunk-EV5SR3OC.js} +7 -7
  28. package/dist/bundle/{chunk-D4QALV67.js → chunk-FRXDSR45.js} +1 -1
  29. package/dist/bundle/{chunk-BDWOTD7E.js → chunk-FYP2M6IT.js} +80 -80
  30. package/dist/bundle/{chunk-ATJANIQR.js → chunk-GWKGZOSO.js} +2 -2
  31. package/dist/bundle/{chunk-MVGFB7IS.js → chunk-GXBNTKJW.js} +2 -2
  32. package/dist/bundle/{chunk-Z5D6CRY6.js → chunk-GZLCZU5B.js} +322 -11
  33. package/dist/bundle/{chunk-ZPVVSA5R.js → chunk-H2QTUZ3C.js} +1 -1
  34. package/dist/bundle/{chunk-FHQ32JKS.js → chunk-HZCINHHS.js} +1 -1
  35. package/dist/bundle/{chunk-7AO73MJZ.js → chunk-HZL3X4XR.js} +15 -15
  36. package/dist/bundle/{chunk-HKC6ZJA5.js → chunk-I3BQ2QIY.js} +12 -12
  37. package/dist/bundle/{chunk-PCYTU7HS.js → chunk-I5Y6Y7Q5.js} +1 -1
  38. package/dist/bundle/{chunk-7E4KECG4.js → chunk-ITU6K7LU.js} +1 -1
  39. package/dist/bundle/{chunk-RGIEG4XK.js → chunk-JLIVJSCF.js} +1 -1
  40. package/dist/bundle/{chunk-3AH7UEM6.js → chunk-JYGFEMTR.js} +1 -1
  41. package/dist/bundle/{chunk-3RBUACSJ.js → chunk-KPFB2VUY.js} +762 -353
  42. package/dist/bundle/{chunk-FOZXPSHA.js → chunk-LGDJDD5J.js} +3 -3
  43. package/dist/bundle/{chunk-2MTIGJHQ.js → chunk-MS5XYEYW.js} +14 -9
  44. package/dist/bundle/{chunk-DIOHJT2W.js → chunk-NEJU74O4.js} +6 -6
  45. package/dist/bundle/{chunk-FDGCTY6J.js → chunk-NUN7DBR4.js} +9 -9
  46. package/dist/bundle/{chunk-6B2BBL35.js → chunk-NV3WPD3B.js} +5 -5
  47. package/dist/bundle/{chunk-NWA7JS74.js → chunk-NYQPKZWL.js} +633 -370
  48. package/dist/bundle/{chunk-RFM3AAK5.js → chunk-OP5ZLH53.js} +57 -54
  49. package/dist/bundle/{chunk-VXHL3XI6.js → chunk-OXHQNEXU.js} +98 -6
  50. package/dist/bundle/{chunk-ODPYXNHI.js → chunk-P6CYVOL6.js} +1 -1
  51. package/dist/bundle/{chunk-YAQGWHMH.js → chunk-PIXFZZUZ.js} +6 -6
  52. package/dist/bundle/{chunk-KNTAOY5J.js → chunk-PZL7DHVJ.js} +7 -7
  53. package/dist/bundle/{chunk-MT5KDBOM.js → chunk-QANXOKYQ.js} +5 -5
  54. package/dist/bundle/{chunk-UH7FYLFL.js → chunk-QSXJ2BVQ.js} +4 -4
  55. package/dist/bundle/{chunk-VERUQQZS.js → chunk-QVGCHTTU.js} +10 -10
  56. package/dist/bundle/{chunk-PYOM4J73.js → chunk-S2QO6KUI.js} +2 -2
  57. package/dist/bundle/{chunk-7ESXP4TG.js → chunk-SQA5JI7Q.js} +1 -1
  58. package/dist/bundle/{chunk-PIKOQWTL.js → chunk-T72DWT37.js} +4 -4
  59. package/dist/bundle/{chunk-YSR2XBDO.js → chunk-THZHNCJP.js} +3 -3
  60. package/dist/bundle/{chunk-XEMARUGS.js → chunk-TUXNILKR.js} +7 -7
  61. package/dist/bundle/{chunk-FM4B357N.js → chunk-UFMR2TB3.js} +2 -2
  62. package/dist/bundle/{chunk-OLTJB5PW.js → chunk-WZGFC7D5.js} +1 -1
  63. package/dist/bundle/{command-contract-TMLXLGVT.js → command-contract-YRNKDQDL.js} +15 -15
  64. package/dist/bundle/{command-server-entry-PFUR2W7X.js → command-server-entry-A3FCP24M.js} +21 -21
  65. package/dist/bundle/{decode-SIVT4JWX.js → decode-FI2ISRNZ.js} +2 -2
  66. package/dist/bundle/{dist-YWSF5MHP.js → dist-NLOOZJ64.js} +15 -11
  67. package/dist/bundle/{echarts-CABLIXX7.js → echarts-PMAJUJFE.js} +2 -2
  68. package/dist/bundle/{embed-OHENS6RB.js → embed-OIMT6SAX.js} +3 -3
  69. package/dist/bundle/{embedder-JINT4Y4O.js → embedder-Q5IF5WIM.js} +6 -6
  70. package/dist/bundle/{first-run-LU2MAK2B.js → first-run-4L53QWOT.js} +6 -6
  71. package/dist/bundle/first-screen-ZPQLAAIS.js +34 -0
  72. package/dist/bundle/{instructions-3D22PA4T.js → instructions-ZJGGGXOA.js} +1 -1
  73. package/dist/bundle/mail.js +2 -2
  74. package/dist/bundle/{node-42G4RGMW.js → node-DCSOHRD6.js} +2 -2
  75. package/dist/bundle/{node-sqlite-KQZM5M3N.js → node-sqlite-7F77K5JA.js} +4 -4
  76. package/dist/bundle/{oauth-7BNCNKQV.js → oauth-LVPMEN6M.js} +4 -4
  77. package/dist/bundle/{open-ULOQOP7K.js → open-XM5LWEN6.js} +2 -2
  78. package/dist/bundle/{openai-O5AH6VGT.js → openai-H2LCGK22.js} +12 -12
  79. package/dist/bundle/{process-6D767IDN.js → process-MFC5VSPT.js} +1 -1
  80. package/dist/bundle/{program-OE7MFRMJ.js → program-ZQ43ZYKZ.js} +1327 -1089
  81. package/dist/bundle/{prompt-WN7EBVKT.js → prompt-3LZAZNQ4.js} +2 -2
  82. package/dist/bundle/{recognize-IX33XEXZ.js → recognize-GYQMHFY2.js} +1 -1
  83. package/dist/bundle/{remote-22N3FQUC.js → remote-P2MD5G64.js} +6 -6
  84. package/dist/bundle/{rerank-IGX4EFA2.js → rerank-A5X6THV6.js} +4 -4
  85. package/dist/bundle/{serve-XWIRR2QZ.js → serve-IEC3EUKS.js} +6 -6
  86. package/dist/bundle/{server-DBS4WC6T.js → server-3REPXFNI.js} +43 -41
  87. package/dist/bundle/server-E2QTFURI.js +67 -0
  88. package/dist/bundle/{sqlite-runtime-WFBTXXXJ.js → sqlite-runtime-AOLQGC5J.js} +3 -3
  89. package/dist/bundle/{state-4J5ERHJA.js → state-D3P5IXXA.js} +3 -3
  90. package/dist/bundle/{store-YRBX7XLM.js → store-DIN6OY3K.js} +13 -13
  91. package/dist/bundle/{store-YSP2NPRJ.js → store-MZCQXBVW.js} +19 -15
  92. package/dist/bundle/store-maintenance-command-UMVFI6M6.js +58 -0
  93. package/dist/commands/rules.d.ts.map +1 -1
  94. package/dist/commands/rules.js +73 -22
  95. package/dist/commands/rules.js.map +1 -1
  96. package/dist/mail/rules/apply.d.ts.map +1 -1
  97. package/dist/mail/rules/apply.js +1 -9
  98. package/dist/mail/rules/apply.js.map +1 -1
  99. package/dist/version.d.ts +1 -1
  100. package/dist/version.js +1 -1
  101. package/package.json +2 -2
  102. package/dist/bundle/chunk-VFRI6RF7.js +0 -76
  103. package/dist/bundle/first-screen-KZNLKRRQ.js +0 -34
  104. package/dist/bundle/server-D5OTVERP.js +0 -68
  105. package/dist/bundle/store-maintenance-command-SH6IB7S6.js +0 -58
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  renderMessages
5
- } from "./chunk-3AH7UEM6.js";
5
+ } from "./chunk-JYGFEMTR.js";
6
6
  import {
7
7
  answerOf,
8
8
  messengerContext
9
- } from "./chunk-7AO73MJZ.js";
9
+ } from "./chunk-HZL3X4XR.js";
10
10
  import {
11
11
  FETCHING,
12
12
  RULES_VERSION,
@@ -31,17 +31,17 @@ import {
31
31
  typedQuery,
32
32
  withQuery,
33
33
  withTimeLimit
34
- } from "./chunk-NWA7JS74.js";
34
+ } from "./chunk-NYQPKZWL.js";
35
35
  import {
36
36
  holdLock,
37
37
  lockPath,
38
38
  releaseLock,
39
39
  servingProfiles,
40
40
  takeLock
41
- } from "./chunk-MVGFB7IS.js";
41
+ } from "./chunk-GXBNTKJW.js";
42
42
  import {
43
43
  readSecret
44
- } from "./chunk-PYOM4J73.js";
44
+ } from "./chunk-S2QO6KUI.js";
45
45
  import {
46
46
  Command,
47
47
  LOCAL_READ,
@@ -68,13 +68,13 @@ import {
68
68
  snakeKeys,
69
69
  storeTable,
70
70
  withoutProviderRefs
71
- } from "./chunk-WSHPLO4Q.js";
71
+ } from "./chunk-BXMLIKUM.js";
72
72
  import {
73
73
  levelFor
74
- } from "./chunk-2MTIGJHQ.js";
74
+ } from "./chunk-MS5XYEYW.js";
75
75
  import {
76
76
  holdersOf
77
- } from "./chunk-7ESXP4TG.js";
77
+ } from "./chunk-SQA5JI7Q.js";
78
78
  import {
79
79
  QUICK_HEALTH_CHECKS,
80
80
  fts5Tables,
@@ -82,7 +82,7 @@ import {
82
82
  lossUnknown,
83
83
  storeDamageReport,
84
84
  storeHealth
85
- } from "./chunk-44IAJV2T.js";
85
+ } from "./chunk-4BW5JACS.js";
86
86
  import {
87
87
  CORPORA,
88
88
  MIGRATIONS,
@@ -117,38 +117,38 @@ import {
117
117
  storeClients,
118
118
  storeContents,
119
119
  vectorIndexCounts
120
- } from "./chunk-ZIFB6KGQ.js";
120
+ } from "./chunk-6UOUDIXL.js";
121
121
  import {
122
122
  currentRun,
123
123
  readDamageMark,
124
124
  readHealthMark,
125
125
  readJournalMark,
126
126
  recordDeepCheck
127
- } from "./chunk-BDWOTD7E.js";
127
+ } from "./chunk-FYP2M6IT.js";
128
128
  import {
129
129
  formatLocator,
130
130
  parseLocator,
131
131
  queryFieldsOf
132
- } from "./chunk-3RBUACSJ.js";
132
+ } from "./chunk-KPFB2VUY.js";
133
133
  import {
134
134
  failureKey,
135
135
  isStoreDamage
136
- } from "./chunk-NUHUTJTM.js";
136
+ } from "./chunk-5YRR52NH.js";
137
137
  import {
138
138
  modelAddressAllowed,
139
139
  onThisComputer
140
- } from "./chunk-5PDWUD3W.js";
140
+ } from "./chunk-DWBY7DMF.js";
141
141
  import {
142
142
  readSharedSection,
143
143
  sharedConfigPath,
144
144
  writeSharedSection
145
- } from "./chunk-Z5D6CRY6.js";
145
+ } from "./chunk-GZLCZU5B.js";
146
146
  import {
147
147
  storePath
148
- } from "./chunk-TXDA437R.js";
148
+ } from "./chunk-BNP7WLDQ.js";
149
149
  import {
150
150
  openCache
151
- } from "./chunk-6B2BBL35.js";
151
+ } from "./chunk-NV3WPD3B.js";
152
152
  import {
153
153
  Credentials,
154
154
  isMovedRun,
@@ -5519,11 +5519,11 @@ var require_liquid_node = __commonJS({
5519
5519
  }
5520
5520
  });
5521
5521
 
5522
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5522
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5523
5523
  import { chmodSync, constants, copyFileSync, existsSync as existsSync10, mkdirSync, realpathSync as realpathSync3, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
5524
5524
  import { dirname as dirname3, resolve } from "node:path";
5525
5525
 
5526
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/sealed.js
5526
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sealed.js
5527
5527
  import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
5528
5528
  import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
5529
5529
  import { Transform } from "node:stream";
@@ -5630,7 +5630,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
5630
5630
  renameSync(pending, to);
5631
5631
  }, "unsealFile");
5632
5632
 
5633
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5633
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5634
5634
  var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
5635
5635
  var fileSchemaOf = /* @__PURE__ */ __name((database) => {
5636
5636
  const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
@@ -5654,7 +5654,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
5654
5654
  };
5655
5655
  }, "compatibilityOf");
5656
5656
 
5657
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/repair.js
5657
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/repair.js
5658
5658
  import { createHash as createHash2 } from "node:crypto";
5659
5659
  var COPY_MARK = "__repair_";
5660
5660
  var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
@@ -5908,19 +5908,19 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
5908
5908
  return found;
5909
5909
  }, "deleteCopy");
5910
5910
 
5911
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5911
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5912
5912
  import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
5913
5913
 
5914
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5914
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5915
5915
  import { existsSync as existsSync3 } from "node:fs";
5916
5916
 
5917
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/recover.js
5917
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/recover.js
5918
5918
  import { execFileSync, spawn } from "node:child_process";
5919
5919
  import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
5920
5920
  import { basename, dirname, join } from "node:path";
5921
5921
  import { Transform as Transform2 } from "node:stream";
5922
5922
 
5923
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/refill.js
5923
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/refill.js
5924
5924
  var REFILL_MARGIN_MS = 864e5;
5925
5925
  var TIME_KEYS = 1e12;
5926
5926
  var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
@@ -6000,7 +6000,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
6000
6000
  return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
6001
6001
  }, "forgetMail");
6002
6002
 
6003
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/store/recover.js
6003
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/recover.js
6004
6004
  var SQLITE3_MINIMUM = [3, 43, 0];
6005
6005
  var STORE_PARTS = ["", "-wal", "-shm"];
6006
6006
  var RECOVER_LOCK = ".recover-lock";
@@ -6528,7 +6528,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6528
6528
  }
6529
6529
  }, "recoverLocked");
6530
6530
 
6531
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6531
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6532
6532
  var COUNTED = [
6533
6533
  "accounts",
6534
6534
  "chats",
@@ -6684,7 +6684,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
6684
6684
  return recover;
6685
6685
  }, "storeRecoverCommand");
6686
6686
 
6687
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6687
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6688
6688
  var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
6689
6689
  var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
6690
6690
  var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
@@ -6730,7 +6730,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
6730
6730
  renderAnswer(this, outputFor(this), itemOf(answer));
6731
6731
  }), "storeInfoCommand");
6732
6732
 
6733
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6733
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6734
6734
  var ENCRYPT_OPTION = [
6735
6735
  "--encrypt",
6736
6736
  "compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
@@ -6749,7 +6749,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
6749
6749
  return password;
6750
6750
  }, "passwordOf");
6751
6751
 
6752
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/rules.js
6752
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/rules.js
6753
6753
  import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
6754
6754
  import { join as join2 } from "node:path";
6755
6755
  var REPLY_ACTIONS = ["reply", "task"];
@@ -6920,7 +6920,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
6920
6920
  }, "problem");
6921
6921
  var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
6922
6922
 
6923
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/state.js
6923
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/state.js
6924
6924
  import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
6925
6925
  import { join as join3 } from "node:path";
6926
6926
  var ANSWERED_KEPT = 1e3;
@@ -6973,7 +6973,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
6973
6973
  }, "recordReply");
6974
6974
  var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
6975
6975
 
6976
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/decide.js
6976
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/decide.js
6977
6977
  var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
6978
6978
  var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
6979
6979
  const { message, chat, owner, sender } = incoming;
@@ -7079,10 +7079,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
7079
7079
  return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
7080
7080
  }, "filled");
7081
7081
 
7082
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/template.js
7082
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/template.js
7083
7083
  var import_liquidjs2 = __toESM(require_liquid_node(), 1);
7084
7084
 
7085
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/render/liquid.js
7085
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/render/liquid.js
7086
7086
  var import_liquidjs = __toESM(require_liquid_node(), 1);
7087
7087
  var safeLiquid = /* @__PURE__ */ __name((limits) => {
7088
7088
  const engine = new import_liquidjs.Liquid({
@@ -7109,7 +7109,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
7109
7109
  return engine;
7110
7110
  }, "safeLiquid");
7111
7111
 
7112
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/template.js
7112
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/template.js
7113
7113
  var TEMPLATE_LIMITS = {
7114
7114
  parse: 32768,
7115
7115
  renders: 2e3,
@@ -7248,7 +7248,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
7248
7248
  }
7249
7249
  }, "renderReplyTemplate");
7250
7250
 
7251
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7251
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7252
7252
  var DRY_RUN_DAYS = 7;
7253
7253
  var PAGE = 500;
7254
7254
  var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
@@ -7362,7 +7362,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
7362
7362
  }
7363
7363
  }, "storedSince");
7364
7364
 
7365
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/models/ai.js
7365
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/models/ai.js
7366
7366
  var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
7367
7367
  var DEFAULT_BASE_URL = {
7368
7368
  anthropic: "https://api.anthropic.com",
@@ -7512,7 +7512,7 @@ var checkAi = /* @__PURE__ */ __name(async (deps) => {
7512
7512
  }
7513
7513
  }, "checkAi");
7514
7514
 
7515
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/models/purpose.js
7515
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/models/purpose.js
7516
7516
  var HOSTED = {
7517
7517
  openai: "https://api.openai.com/v1",
7518
7518
  anthropic: "https://api.anthropic.com"
@@ -7533,7 +7533,7 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
7533
7533
  return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
7534
7534
  }, "purposeModel");
7535
7535
 
7536
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/consents.js
7536
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/consents.js
7537
7537
  import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
7538
7538
  import { join as join4 } from "node:path";
7539
7539
  var shape = strictObject({
@@ -7558,7 +7558,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
7558
7558
  return consent.provider === provider && !consent.deniedChats.includes(chat);
7559
7559
  }, "mayModelReply");
7560
7560
 
7561
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7561
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7562
7562
  var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
7563
7563
  ai: true
7564
7564
  }) => async (rule2, message, chat, now) => {
@@ -7606,7 +7606,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
7606
7606
  return result2;
7607
7607
  }, "replyRenderer");
7608
7608
 
7609
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/replies/serve.js
7609
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/replies/serve.js
7610
7610
  var NOT_ALLOWED = "replies.send is not allow";
7611
7611
  var NO_RULES = "no rules";
7612
7612
  var ONLY_TASK = "opened a task, sent nothing";
@@ -7699,7 +7699,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
7699
7699
  return { skip: why };
7700
7700
  }, "replyTo");
7701
7701
 
7702
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7702
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7703
7703
  var START_SYNC_DELAY_MS = 3e4;
7704
7704
  var START_SYNC_BUDGET_MS = 5 * 6e4;
7705
7705
  var START_SYNC_WINDOW_MS = 7 * 864e5;
@@ -7776,7 +7776,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
7776
7776
  };
7777
7777
  }, "startSync");
7778
7778
 
7779
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7779
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7780
7780
  var FIRST_FETCH_MS = 6e4;
7781
7781
  var DAY_MS = 864e5;
7782
7782
  var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
@@ -7830,7 +7830,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
7830
7830
  };
7831
7831
  }, "memberFetches");
7832
7832
 
7833
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7833
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7834
7834
  var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
7835
7835
  var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
7836
7836
  if (context.format === "pretty") {
@@ -7863,7 +7863,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
7863
7863
  return context;
7864
7864
  }, "recordDiagnostics");
7865
7865
 
7866
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7866
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7867
7867
  import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
7868
7868
  import { dirname as dirname2, join as join5 } from "node:path";
7869
7869
  var OUTDATED_CHECK_MS = 6e4;
@@ -7949,7 +7949,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
7949
7949
  };
7950
7950
  }, "watchOutdated");
7951
7951
 
7952
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7952
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7953
7953
  var STEMS_EVERY_MS = 3e4;
7954
7954
  var STEMS_SLICE_MS = 2e3;
7955
7955
  var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
@@ -7989,7 +7989,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
7989
7989
  };
7990
7990
  }, "stemFills");
7991
7991
 
7992
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
7992
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
7993
7993
  var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
7994
7994
  var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
7995
7995
  kind: attachment.kind,
@@ -8085,7 +8085,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
8085
8085
  locale: messenger.app.locale
8086
8086
  }), "viewOf");
8087
8087
 
8088
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
8088
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
8089
8089
  var observed = /* @__PURE__ */ __name((value) => ({
8090
8090
  value: value.value,
8091
8091
  observed_at: value.observedAt,
@@ -8152,7 +8152,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
8152
8152
  }
8153
8153
  }, "watchEventItem");
8154
8154
 
8155
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8155
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8156
8156
  var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
8157
8157
  output: { entity: "watch_item" },
8158
8158
  effects: REMOTE_READ,
@@ -8307,7 +8307,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
8307
8307
  }
8308
8308
  }, "describe");
8309
8309
 
8310
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8310
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8311
8311
  var serveCommand = /* @__PURE__ */ __name((messenger) => {
8312
8312
  const command = annotate(new Command("serve"), {
8313
8313
  output: { entity: "serve_summary" },
@@ -8348,7 +8348,7 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
8348
8348
  });
8349
8349
  }, "onReady");
8350
8350
  const counts = {};
8351
- const rules = replying(context, messenger, Date.parse(startedAt));
8351
+ const rules = replying(context, messenger, Date.parse(startedAt), () => messenger.resolveSettings(this.optsWithGlobals(), { env: context.env }));
8352
8352
  const tasks = tasking(context, warn);
8353
8353
  const { handled, startSyncDelayMs, outdated: outdatedHook } = environmentOf(this);
8354
8354
  const count3 = /* @__PURE__ */ __name((event) => {
@@ -8490,7 +8490,7 @@ var NO_REPLIES = {
8490
8490
  }, "stop"),
8491
8491
  summary: /* @__PURE__ */ __name(() => ({}), "summary")
8492
8492
  };
8493
- var replying = /* @__PURE__ */ __name((context, messenger, since) => {
8493
+ var replying = /* @__PURE__ */ __name((context, messenger, since, reload) => {
8494
8494
  if (messenger.autoReplies === false)
8495
8495
  return NO_REPLIES;
8496
8496
  const controller = new AbortController();
@@ -8515,6 +8515,9 @@ var replying = /* @__PURE__ */ __name((context, messenger, since) => {
8515
8515
  if (connection === void 0 || controller.signal.aborted)
8516
8516
  return;
8517
8517
  const open = connection;
8518
+ const current = reload();
8519
+ settings.permissions = current.permissions;
8520
+ settings.permissionSources = current.permissionSources;
8518
8521
  const answer = await replyTo({
8519
8522
  rulesPath: repliesPathFor(app, profile, env),
8520
8523
  statePath: repliesStatePathFor(app, profile, env),
@@ -8590,7 +8593,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
8590
8593
  };
8591
8594
  }, "tasking");
8592
8595
 
8593
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8596
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8594
8597
  import { existsSync as existsSync9 } from "node:fs";
8595
8598
  var PATH = "store tables list";
8596
8599
  var STORE_TABLES_QUERY = {
@@ -8633,7 +8636,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
8633
8636
  return tables;
8634
8637
  }, "storeTablesCommand");
8635
8638
 
8636
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8639
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8637
8640
  var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
8638
8641
  var WORD_INDEX = "message_words";
8639
8642
  var schemaOf = /* @__PURE__ */ __name((database) => {
@@ -18,7 +18,7 @@ import {
18
18
  isJSONRPCRequest,
19
19
  isJSONRPCResultResponse,
20
20
  modernOnlyStrictRejection,
21
- process,
21
+ process as process2,
22
22
  requestMetaOf,
23
23
  serializeMessage,
24
24
  serverIdentityOf,
@@ -29,7 +29,7 @@ import {
29
29
  agentOf,
30
30
  clientHash,
31
31
  currentCaller
32
- } from "./chunk-XEMARUGS.js";
32
+ } from "./chunk-TUXNILKR.js";
33
33
  import {
34
34
  __name
35
35
  } from "./chunk-ZVVMGPBJ.js";
@@ -43,7 +43,7 @@ var StdioServerTransport = class {
43
43
  _readBuffer;
44
44
  _started = false;
45
45
  _closed = false;
46
- constructor(_stdin = process.stdin, _stdout = process.stdout, options) {
46
+ constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
47
47
  this._stdin = _stdin;
48
48
  this._stdout = _stdout;
49
49
  this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
@@ -541,7 +541,7 @@ function toError(value) {
541
541
  }
542
542
  __name(toError, "toError");
543
543
 
544
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/mcp/caller.js
544
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/mcp/caller.js
545
545
  var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
546
546
  const client = caller?.agent?.client?.name;
547
547
  if (client && client !== "unknown")
@@ -567,7 +567,7 @@ var callerOf = /* @__PURE__ */ __name((ctx, tool, source) => {
567
567
  const meta = ctx?.mcpReq?._meta;
568
568
  const requestId = ctx?.mcpReq?.id;
569
569
  const initialized = source.client?.();
570
- const proxied = initialized?.name === PROXY_CLIENT_NAME ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
570
+ const proxied = initialized?.name === PROXY_CLIENT_NAME && !ctx?.http ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
571
571
  if (proxied)
572
572
  return proxied;
573
573
  const client = clientFrom(meta?.[CLIENT_INFO_META_KEY]) ?? clientFrom(initialized);
@@ -629,11 +629,103 @@ var passedOn = /* @__PURE__ */ __name((value, tool) => {
629
629
  };
630
630
  }, "passedOn");
631
631
 
632
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
633
+ import { PassThrough, Writable } from "node:stream";
634
+ var lineReader = /* @__PURE__ */ __name((onMessage) => {
635
+ let rest = "";
636
+ return (chunk) => {
637
+ const lines = (rest + chunk.toString()).split("\n");
638
+ rest = lines.pop() ?? "";
639
+ for (const line of lines) {
640
+ try {
641
+ const message = JSON.parse(line);
642
+ if (message !== null && typeof message === "object")
643
+ onMessage(message);
644
+ } catch {
645
+ }
646
+ }
647
+ };
648
+ }, "lineReader");
649
+ var answeredWire = /* @__PURE__ */ __name((source, sink) => {
650
+ const asked = /* @__PURE__ */ new Set();
651
+ let settle;
652
+ const input = new PassThrough();
653
+ const answeredOne = /* @__PURE__ */ __name((id) => {
654
+ asked.delete(JSON.stringify(id));
655
+ if (asked.size === 0)
656
+ settle?.();
657
+ }, "answeredOne");
658
+ const onData = lineReader(({ jsonrpc, id, method, params }) => {
659
+ if (jsonrpc !== "2.0" || typeof method !== "string")
660
+ return;
661
+ if (method === "notifications/cancelled")
662
+ answeredOne(params?.requestId);
663
+ else if (id !== void 0)
664
+ asked.add(JSON.stringify(id));
665
+ });
666
+ const output = new Writable({
667
+ write: /* @__PURE__ */ __name((chunk, _encoding, done) => {
668
+ noteAnswer(chunk);
669
+ sink.write(chunk, done);
670
+ }, "write")
671
+ });
672
+ const noteAnswer = lineReader(({ id, method }) => {
673
+ if (id !== void 0 && method === void 0)
674
+ answeredOne(id);
675
+ });
676
+ const forward = /* @__PURE__ */ __name((chunk) => {
677
+ onData(chunk);
678
+ input.write(chunk);
679
+ }, "forward");
680
+ source.on("data", forward);
681
+ const ended = new Promise((resolve) => {
682
+ source.once("end", resolve);
683
+ source.once("close", resolve);
684
+ });
685
+ return {
686
+ input,
687
+ output,
688
+ /**
689
+ * Until the client's stdin ended and everything it asked was answered, or until a stop: `signal` for a session
690
+ * relayed on other streams, SIGINT or SIGTERM for this process's own. A stop never waits for answers.
691
+ */
692
+ finished: /* @__PURE__ */ __name((signal) => new Promise((resolve) => {
693
+ const stop = /* @__PURE__ */ __name(() => {
694
+ process.off("SIGINT", stop);
695
+ process.off("SIGTERM", stop);
696
+ resolve();
697
+ }, "stop");
698
+ if (signal) {
699
+ if (signal.aborted)
700
+ return resolve();
701
+ signal.addEventListener("abort", stop, { once: true });
702
+ } else {
703
+ process.once("SIGINT", stop);
704
+ process.once("SIGTERM", stop);
705
+ }
706
+ ended.then(() => {
707
+ if (asked.size === 0)
708
+ stop();
709
+ else
710
+ settle = stop;
711
+ });
712
+ }), "finished"),
713
+ /** Lets go of the real stdin, so it no longer holds the process open. */
714
+ release: /* @__PURE__ */ __name(() => {
715
+ source.off("data", forward);
716
+ if (source.listenerCount("data") === 0)
717
+ source.pause();
718
+ input.end();
719
+ }, "release")
720
+ };
721
+ }, "answeredWire");
722
+
632
723
  export {
633
724
  StdioServerTransport,
634
725
  serveStdio,
635
726
  callingAgent,
636
727
  CALLER_META_KEY,
637
728
  PROXY_CLIENT_NAME,
638
- callerOf
729
+ callerOf,
730
+ answeredWire
639
731
  };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
8
8
  var fields = /* @__PURE__ */ new WeakMap();
9
9
  var readsStdin = /* @__PURE__ */ __name((command, field) => {
10
10
  fields.set(command, field);
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  LEVELS
5
- } from "./chunk-2MTIGJHQ.js";
5
+ } from "./chunk-MS5XYEYW.js";
6
6
  import {
7
7
  WORD_BODY,
8
8
  e164Of
9
- } from "./chunk-WZNQ2P7H.js";
9
+ } from "./chunk-7E7YXQ52.js";
10
10
  import {
11
11
  resolvePaths,
12
12
  writeSecurely
@@ -38,7 +38,7 @@ import {
38
38
  __name
39
39
  } from "./chunk-ZVVMGPBJ.js";
40
40
 
41
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/vcard.js
41
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/vcard.js
42
42
  import { createHash } from "node:crypto";
43
43
  var MAX_ID = 512;
44
44
  var AS_WORD = new RegExp(`^${WORD_BODY}$`);
@@ -269,7 +269,7 @@ var envelopeOfVcard = /* @__PURE__ */ __name((text, { provider, account, batchId
269
269
  };
270
270
  }, "envelopeOfVcard");
271
271
 
272
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/domain/formatting.js
272
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/formatting.js
273
273
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
274
274
  var validateFormattedText = /* @__PURE__ */ __name((formatted) => {
275
275
  const { text, spans } = formatted;
@@ -329,7 +329,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted) => {
329
329
  };
330
330
  }, "visibleFormattedText");
331
331
 
332
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/moderation/check.js
332
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/moderation/check.js
333
333
  var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
334
334
  var LINK = /https?:\/\/\S+/i;
335
335
  var STRENGTH = { report: 0, delete: 1, remove: 2 };
@@ -517,7 +517,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
517
517
  }, "nextPoint");
518
518
  var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
519
519
 
520
- // node_modules/.pnpm/@wirecat+cli-core@0.657.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_6ef853dd58e888f20a16b5fe978b097f/node_modules/@wirecat/cli-core/dist/moderation/rules.js
520
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/moderation/rules.js
521
521
  import { existsSync, readFileSync } from "node:fs";
522
522
  import { join } from "node:path";
523
523
  var RULE_ACTIONS = ["report", "delete", "remove"];