@wirecat/tg-cli 0.120.0 → 0.122.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 (94) hide show
  1. package/contracts/wirecat.json +25 -3
  2. package/dist/bin/tg.js +2 -2
  3. package/dist/bundle/{adapter-OJKHXGBC.js → adapter-ZI57T2L5.js} +53 -49
  4. package/dist/bundle/{all-profiles-URIWNL23.js → all-profiles-7VXJF42C.js} +6 -6
  5. package/dist/bundle/{anthropic-YUKNB63B.js → anthropic-DKRXIWVV.js} +13 -4
  6. package/dist/bundle/{app-server-H5QNHGH4.js → app-server-F5MKHZ7S.js} +43 -42
  7. package/dist/bundle/{bot-api-27GN4Y3D.js → bot-api-F24NWJT3.js} +47 -44
  8. package/dist/bundle/{bot-history-VVSWLVZM.js → bot-history-U3WM3A7S.js} +12 -12
  9. package/dist/bundle/{bun-PAAJX3GU.js → bun-OMTJAXGK.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-TPEBWFZH.js → bun-sqlite-HSYLO46A.js} +2 -2
  11. package/dist/bundle/{chunk-WLBPNLDF.js → chunk-27SVHRHV.js} +2 -2
  12. package/dist/bundle/{chunk-3FPFRDG2.js → chunk-2FXA32RJ.js} +6 -6
  13. package/dist/bundle/{chunk-4JATS2J5.js → chunk-2UHANFLM.js} +2 -2
  14. package/dist/bundle/{chunk-FPWXG53C.js → chunk-33ELXJRR.js} +37 -121
  15. package/dist/bundle/{chunk-KP26Y5OA.js → chunk-4MFMUBHH.js} +4901 -4827
  16. package/dist/bundle/{chunk-HDSKBXAF.js → chunk-4N2WJYLE.js} +2 -2
  17. package/dist/bundle/{chunk-7WS3ULOO.js → chunk-6DLRATDC.js} +1159 -801
  18. package/dist/bundle/{chunk-YQKEPT22.js → chunk-6LMEIELG.js} +1 -1
  19. package/dist/bundle/{chunk-DH7VKHTZ.js → chunk-7FWU4RON.js} +3 -3
  20. package/dist/bundle/{chunk-4OWY7QBE.js → chunk-7GCVON7M.js} +5 -5
  21. package/dist/bundle/{chunk-HIBYYKGO.js → chunk-7X6YLKTK.js} +1 -1
  22. package/dist/bundle/{chunk-D2WNQJUQ.js → chunk-ALW7ROTM.js} +1 -1
  23. package/dist/bundle/{chunk-6XHZV7AQ.js → chunk-ARKB3M5X.js} +3 -3
  24. package/dist/bundle/{chunk-KTV5Y5EX.js → chunk-C5CB6RIX.js} +1 -1
  25. package/dist/bundle/{chunk-7VNV426X.js → chunk-CB6AHU6H.js} +44 -22
  26. package/dist/bundle/{chunk-CGUDXNJE.js → chunk-CW3C7FSO.js} +1 -1
  27. package/dist/bundle/{chunk-3SANNNWS.js → chunk-D3ODL4P7.js} +2 -2
  28. package/dist/bundle/{chunk-34DSPJNN.js → chunk-DCGGZUNJ.js} +2 -2
  29. package/dist/bundle/{chunk-CYWV2RLN.js → chunk-DDSAJKPO.js} +4 -4
  30. package/dist/bundle/{chunk-KRCMKFUV.js → chunk-DTTONQW7.js} +1 -1
  31. package/dist/bundle/{chunk-PDYTNTQI.js → chunk-E3MFMMVY.js} +5 -5
  32. package/dist/bundle/{chunk-ZON7K5QE.js → chunk-FHWUOFWX.js} +2 -2
  33. package/dist/bundle/{chunk-ZRRZTPSB.js → chunk-FYHFAOPM.js} +2219 -1052
  34. package/dist/bundle/{chunk-H5XC2WYO.js → chunk-FZKHFTKH.js} +22 -22
  35. package/dist/bundle/{chunk-THJHYMFR.js → chunk-GJBGZQHN.js} +3626 -3596
  36. package/dist/bundle/{chunk-DDKFAUQD.js → chunk-GJFICFQB.js} +1 -1
  37. package/dist/bundle/{chunk-CLURRDNU.js → chunk-HAR76KJG.js} +4 -4
  38. package/dist/bundle/{chunk-JJY3TQTM.js → chunk-LQRZUNYF.js} +2 -2
  39. package/dist/bundle/{chunk-LLCGOZ44.js → chunk-MFWWZ6XL.js} +2 -2
  40. package/dist/bundle/{chunk-LS72R7DN.js → chunk-N7WDVH2O.js} +37 -35
  41. package/dist/bundle/chunk-NE3EGYPD.js +109 -0
  42. package/dist/bundle/{chunk-YBOVL25O.js → chunk-NU4RMUMQ.js} +16 -16
  43. package/dist/bundle/{chunk-JQLGS3SG.js → chunk-O5A4IS2D.js} +1 -1
  44. package/dist/bundle/{chunk-DE7QIEUP.js → chunk-PG3V225O.js} +30 -49
  45. package/dist/bundle/{chunk-WQ55F4Y3.js → chunk-QROAXWDU.js} +7 -7
  46. package/dist/bundle/{chunk-U2TPRUWK.js → chunk-R2IW6JBV.js} +81 -81
  47. package/dist/bundle/{chunk-CLTMVPGT.js → chunk-RFFU6KQ5.js} +12 -12
  48. package/dist/bundle/{chunk-DQTQO6PB.js → chunk-SODUFMDW.js} +1651 -948
  49. package/dist/bundle/{chunk-KW6JZGG3.js → chunk-TKJZENAZ.js} +1 -1
  50. package/dist/bundle/{chunk-B7B65ZLU.js → chunk-UGEYQWEO.js} +1 -1
  51. package/dist/bundle/chunk-V4BPS7MH.js +185 -0
  52. package/dist/bundle/{chunk-3GLLWDM6.js → chunk-VC6J7X76.js} +16 -16
  53. package/dist/bundle/{chunk-S6OC367D.js → chunk-VDFEWSCS.js} +2 -2
  54. package/dist/bundle/{chunk-KLHOQ6XQ.js → chunk-VQL4RVXZ.js} +3 -1
  55. package/dist/bundle/{chunk-JSEIT2WO.js → chunk-W34QQMBK.js} +1 -1
  56. package/dist/bundle/{chunk-MMPISXSU.js → chunk-Y52T5EMB.js} +1 -1
  57. package/dist/bundle/{chunk-MTD6WZKV.js → chunk-Y74WJL3M.js} +6 -6
  58. package/dist/bundle/chunk-YDMKP7PO.js +18 -0
  59. package/dist/bundle/{chunk-VUUR2SRS.js → chunk-YFEH7OWG.js} +33 -16
  60. package/dist/bundle/{chunk-YDROJG2Y.js → chunk-ZKHXWSKD.js} +4 -4
  61. package/dist/bundle/{chunk-7N4IUEX3.js → chunk-ZNPRTCUO.js} +6 -6
  62. package/dist/bundle/{command-contract-KW6FNOJO.js → command-contract-247AKZTE.js} +12 -12
  63. package/dist/bundle/command-server-entry-N32NX4QW.js +162 -0
  64. package/dist/bundle/{decode-RVWSCZW4.js → decode-ZKJWSFXF.js} +2 -2
  65. package/dist/bundle/{echarts-6VNUD3JF.js → echarts-QLVLIP73.js} +2 -2
  66. package/dist/bundle/{embed-LWLCQKIK.js → embed-LC6K7P3S.js} +3 -3
  67. package/dist/bundle/{embedder-CXKHLRJT.js → embedder-6C3OQBOV.js} +6 -6
  68. package/dist/bundle/{entry-HV4NSX3Z.js → entry-5H6LB3MP.js} +7 -4
  69. package/dist/bundle/{first-run-OPI6NIWQ.js → first-run-IOYQ4XQK.js} +5 -5
  70. package/dist/bundle/{first-screen-BVQLF4LN.js → first-screen-NVK7PFX4.js} +13 -13
  71. package/dist/bundle/{instructions-TK4HXL3A.js → instructions-SZUMEDY3.js} +1 -1
  72. package/dist/bundle/{node-WFPNBUCU.js → node-V76RRFIA.js} +2 -2
  73. package/dist/bundle/{node-sqlite-L5BRGJLK.js → node-sqlite-2DTVOT7L.js} +3 -3
  74. package/dist/bundle/{oauth-CGVWL35B.js → oauth-CT7EBDRY.js} +4 -4
  75. package/dist/bundle/{open-HLL55C5S.js → open-G3VHOOMV.js} +2 -2
  76. package/dist/bundle/{openai-YFCNXIJ4.js → openai-F4K7MVTZ.js} +13 -13
  77. package/dist/bundle/{process-4A5JP5LO.js → process-XH3KEHSF.js} +1 -1
  78. package/dist/bundle/{program-IFGQGSUF.js → program-FLGIHTHM.js} +63 -60
  79. package/dist/bundle/{prompt-B5FYE2DQ.js → prompt-JWQ6UQ6R.js} +2 -2
  80. package/dist/bundle/{recognize-ZHMHGIV3.js → recognize-Z26T3SYD.js} +1 -1
  81. package/dist/bundle/{remote-A3W5HE52.js → remote-7KHT6V3O.js} +4 -4
  82. package/dist/bundle/{rerank-HWJAQOZM.js → rerank-6QVI74QY.js} +4 -4
  83. package/dist/bundle/{serve-PP326Q2F.js → serve-WYDZTONY.js} +11 -11
  84. package/dist/bundle/server-UXQT7LZT.js +61 -0
  85. package/dist/bundle/{server-MV6CL63L.js → server-Y4J2NCFA.js} +32 -32
  86. package/dist/bundle/{state-Y3RJ7ZXB.js → state-YCXBKOD2.js} +3 -3
  87. package/dist/bundle/{store-EVNI2MHZ.js → store-QECSDJRP.js} +9 -9
  88. package/dist/bundle/store-maintenance-command-5YW6TRJA.js +49 -0
  89. package/dist/bundle/tg.js +4 -4
  90. package/dist/version.d.ts +1 -1
  91. package/dist/version.js +1 -1
  92. package/package.json +2 -2
  93. package/dist/bundle/server-TZGGOJ26.js +0 -60
  94. package/dist/bundle/store-maintenance-command-XPQE47RE.js +0 -49
@@ -7,21 +7,27 @@ import {
7
7
  capability,
8
8
  ceilingRefusal,
9
9
  chatIdIn,
10
- chatReferenceOf,
11
- ensureAccount,
12
10
  floodPathFor,
13
- foldName,
14
11
  guardFor,
15
12
  holdEnd,
16
- isId,
17
- pickPerson,
18
13
  profilesOnAccount,
19
14
  recipientsPathFor,
20
15
  refuseLacking,
21
16
  servicesFor,
22
17
  throughWrapper,
23
18
  withFileLockAsync
24
- } from "./chunk-7WS3ULOO.js";
19
+ } from "./chunk-6DLRATDC.js";
20
+ import {
21
+ servingProfiles
22
+ } from "./chunk-FHWUOFWX.js";
23
+ import {
24
+ chatReferenceOf,
25
+ ensureAccount,
26
+ foldName,
27
+ isId,
28
+ openStore,
29
+ pickPerson
30
+ } from "./chunk-FYHFAOPM.js";
25
31
  import {
26
32
  CEILING_KEY,
27
33
  WRITE_KEYS,
@@ -41,19 +47,13 @@ import {
41
47
  rememberAccount,
42
48
  rootOf2 as rootOf,
43
49
  skipFlagFor
44
- } from "./chunk-THJHYMFR.js";
50
+ } from "./chunk-GJBGZQHN.js";
45
51
  import {
46
52
  providerErrorKey
47
- } from "./chunk-3FPFRDG2.js";
48
- import {
49
- servingProfiles
50
- } from "./chunk-ZON7K5QE.js";
51
- import {
52
- openStore
53
- } from "./chunk-ZRRZTPSB.js";
53
+ } from "./chunk-2FXA32RJ.js";
54
54
  import {
55
55
  isCliFailure
56
- } from "./chunk-WLBPNLDF.js";
56
+ } from "./chunk-27SVHRHV.js";
57
57
  import {
58
58
  resolvePaths
59
59
  } from "./chunk-U6HEZPCR.js";
@@ -64,7 +64,7 @@ import {
64
64
  __name
65
65
  } from "./chunk-ZVVMGPBJ.js";
66
66
 
67
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
67
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
68
68
  import { openSync } from "node:fs";
69
69
  import { createInterface } from "node:readline";
70
70
  import { ReadStream } from "node:tty";
@@ -119,7 +119,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
119
119
  throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
120
120
  }, "terminalAsker");
121
121
 
122
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/sends/pace.js
122
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/sends/pace.js
123
123
  import { readFileSync, renameSync, writeFileSync } from "node:fs";
124
124
  import { join } from "node:path";
125
125
  var DEFAULT_PACE = { perMinute: 60, burst: 20 };
@@ -209,7 +209,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
209
209
  await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
210
210
  }, "waitForTurn");
211
211
 
212
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
212
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
213
213
  var pathOf = /* @__PURE__ */ __name((command) => {
214
214
  const words = [];
215
215
  for (let at = command; at?.parent; at = at.parent)
@@ -269,7 +269,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
269
269
  throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
270
270
  }, "refuseUnknownPermissionKeys");
271
271
 
272
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
272
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
273
273
  var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
274
274
  var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
275
275
  var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
@@ -366,7 +366,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
366
366
  });
367
367
  }, "flooded");
368
368
 
369
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
369
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
370
370
  var observed = /* @__PURE__ */ __name((messenger, events) => {
371
371
  const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
372
372
  const write = currentOperation();
@@ -465,7 +465,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
465
465
  counts[part] = (counts[part] ?? 0) + items.length;
466
466
  }, "byPart");
467
467
 
468
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
468
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
469
469
  var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
470
470
  var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
471
471
  let warned = false;
@@ -1041,7 +1041,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
1041
1041
  }
1042
1042
  }, "keep");
1043
1043
 
1044
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
1044
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
1045
1045
  var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
1046
1046
  let opened;
1047
1047
  return {