@wirecat/tg-cli 0.110.0 → 0.111.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 (91) hide show
  1. package/dist/bin/tg.js +2 -2
  2. package/dist/bundle/{adapter-JWUCHTXU.js → adapter-WFC2JAD4.js} +38 -38
  3. package/dist/bundle/{all-profiles-OMRCKP54.js → all-profiles-FEUSGHT7.js} +5 -5
  4. package/dist/bundle/{anthropic-WXFHH74P.js → anthropic-O646SJIJ.js} +3 -3
  5. package/dist/bundle/{app-server-ILIPNO6T.js → app-server-7P23Y45A.js} +35 -35
  6. package/dist/bundle/{bot-api-KV765AZK.js → bot-api-WTJCL6VF.js} +39 -39
  7. package/dist/bundle/{bot-history-3P6EIM5L.js → bot-history-5J2Q4SPC.js} +10 -10
  8. package/dist/bundle/{bun-MJOYPPEN.js → bun-KUKVEKDW.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-GFRVRRDZ.js → bun-sqlite-2G5TXHYE.js} +2 -2
  10. package/dist/bundle/{chunk-4BMXELWN.js → chunk-2K6IGVSI.js} +4 -4
  11. package/dist/bundle/{chunk-3L2JTAVD.js → chunk-2ZH3PUQX.js} +1 -1
  12. package/dist/bundle/{chunk-6WTLP2SI.js → chunk-33HEHPIK.js} +7 -7
  13. package/dist/bundle/{chunk-4YOPRYEY.js → chunk-3BD24JYK.js} +96 -92
  14. package/dist/bundle/{chunk-54CWOD7V.js → chunk-3WUTBGZE.js} +4 -4
  15. package/dist/bundle/{chunk-XLNYDJKG.js → chunk-43ZFY6TW.js} +1 -1
  16. package/dist/bundle/{chunk-Q35J5LCO.js → chunk-5FJQG5UZ.js} +9 -8
  17. package/dist/bundle/{chunk-3XTMVGTS.js → chunk-5ZPLOYTP.js} +205 -204
  18. package/dist/bundle/{chunk-YWSNUUW5.js → chunk-7665YBJ7.js} +5 -5
  19. package/dist/bundle/{chunk-VM7I5VKX.js → chunk-7GQLD5TJ.js} +1 -1
  20. package/dist/bundle/{chunk-NFBOZT7H.js → chunk-AUWYMMYL.js} +3 -3
  21. package/dist/bundle/{chunk-TJA3BWY3.js → chunk-BNQOUCL2.js} +1 -1
  22. package/dist/bundle/{chunk-L3YDXUDK.js → chunk-CJUSP5X2.js} +2 -2
  23. package/dist/bundle/{chunk-TDQVVXPF.js → chunk-COHMFCHD.js} +11 -11
  24. package/dist/bundle/{chunk-BYOEVYY2.js → chunk-DEG4JJHG.js} +267 -258
  25. package/dist/bundle/{chunk-YPLL3Q3M.js → chunk-DREEXESG.js} +86 -50
  26. package/dist/bundle/{chunk-4GOF43MW.js → chunk-HN6ZMUAS.js} +1 -1
  27. package/dist/bundle/{chunk-SD5J5T7M.js → chunk-ITSSCYLP.js} +9 -9
  28. package/dist/bundle/{chunk-AXNBGLO5.js → chunk-J2Z5E7TO.js} +1 -1
  29. package/dist/bundle/{chunk-6KESAYMZ.js → chunk-J4QVXR5I.js} +2 -2
  30. package/dist/bundle/{chunk-KLOFBUXA.js → chunk-K457FHD4.js} +31 -21
  31. package/dist/bundle/{chunk-RXWG7OWT.js → chunk-KE47Y4PW.js} +839 -440
  32. package/dist/bundle/{chunk-QRH2AWBZ.js → chunk-KLHLWKWC.js} +59 -47
  33. package/dist/bundle/{chunk-GPIORQAD.js → chunk-LLAZSGS7.js} +20 -20
  34. package/dist/bundle/{chunk-F7RWNBC2.js → chunk-MSGYLWCH.js} +1 -1
  35. package/dist/bundle/{chunk-YPEAEEHF.js → chunk-NIKYFRDQ.js} +1 -1
  36. package/dist/bundle/{chunk-4I6HTOCM.js → chunk-NQAV7U7C.js} +1 -1
  37. package/dist/bundle/{chunk-HCAYTAJN.js → chunk-OYVDWHP5.js} +1 -1
  38. package/dist/bundle/{chunk-RARYRHQA.js → chunk-PNUHAHTF.js} +1 -1
  39. package/dist/bundle/{chunk-MZRD776E.js → chunk-PQGWEFJ2.js} +2 -2
  40. package/dist/bundle/{chunk-NDT22GBK.js → chunk-QAC6Z675.js} +1 -1
  41. package/dist/bundle/{chunk-5CMOXHQS.js → chunk-QEAMO2TS.js} +6 -6
  42. package/dist/bundle/{chunk-7LZBMZQM.js → chunk-QLLPZWYZ.js} +3 -3
  43. package/dist/bundle/{chunk-3KOF5T4N.js → chunk-QVM2HKJP.js} +4 -4
  44. package/dist/bundle/{chunk-32HEOKI2.js → chunk-T6DSAROY.js} +11 -9
  45. package/dist/bundle/{chunk-SLAPUEMZ.js → chunk-TWZTQHP6.js} +5 -5
  46. package/dist/bundle/{chunk-W3B6EEZU.js → chunk-UDYCZ5KB.js} +1 -1
  47. package/dist/bundle/{chunk-M3XIME74.js → chunk-UFIUMPXP.js} +3 -3
  48. package/dist/bundle/{chunk-AZYVTDAE.js → chunk-UMUJHC4M.js} +2 -2
  49. package/dist/bundle/{chunk-7ABA4EXC.js → chunk-UPRYEDAV.js} +2 -2
  50. package/dist/bundle/{chunk-FYAHTTOB.js → chunk-VIEVOF3O.js} +8 -8
  51. package/dist/bundle/{chunk-VOBMR7E5.js → chunk-WDRNVSWF.js} +42 -42
  52. package/dist/bundle/{chunk-2YWQEG2P.js → chunk-XIRASTVS.js} +10 -10
  53. package/dist/bundle/{chunk-F24EAGOU.js → chunk-XXOJ7PQY.js} +26 -26
  54. package/dist/bundle/{chunk-MXIBRT6W.js → chunk-YFK3DNNP.js} +4 -4
  55. package/dist/bundle/{chunk-RSZEEWOW.js → chunk-YG4BO7N3.js} +1 -1
  56. package/dist/bundle/{chunk-5ASW5BNM.js → chunk-ZCHC7TYO.js} +11 -11
  57. package/dist/bundle/{chunk-JDOSIWPN.js → chunk-ZCV4UEVH.js} +2 -2
  58. package/dist/bundle/{command-contract-TNSW7W6G.js → command-contract-JCRVVL7P.js} +12 -12
  59. package/dist/bundle/{decode-3KBXZCFM.js → decode-QJNVAAKJ.js} +2 -2
  60. package/dist/bundle/{echarts-24TVPFGC.js → echarts-2EDY7OUX.js} +2 -2
  61. package/dist/bundle/{embed-3BDPZ4Q7.js → embed-PZSXOQJO.js} +3 -3
  62. package/dist/bundle/{embedder-EMVDEZFR.js → embedder-O4EGMMUU.js} +6 -6
  63. package/dist/bundle/{entry-NQD6Z2BM.js → entry-DVLMQM6J.js} +3 -3
  64. package/dist/bundle/{first-run-ZBIO6C67.js → first-run-J67KTUWA.js} +5 -5
  65. package/dist/bundle/{first-screen-4HRCG7OX.js → first-screen-PYEE5NMQ.js} +13 -13
  66. package/dist/bundle/{identity-EDGOOTOM.js → identity-DSYY4FLQ.js} +1 -1
  67. package/dist/bundle/{instructions-N2WVMNFZ.js → instructions-O535XB2L.js} +1 -1
  68. package/dist/bundle/{node-VBZAZHUS.js → node-S3VEQNTE.js} +2 -2
  69. package/dist/bundle/{node-sqlite-C3V64OAL.js → node-sqlite-3DNWF2BW.js} +2 -2
  70. package/dist/bundle/{oauth-NZXELYDA.js → oauth-IU2RAZ3D.js} +4 -4
  71. package/dist/bundle/{open-2XRUGMV7.js → open-M2IPPXMI.js} +1 -1
  72. package/dist/bundle/{openai-OLGTN3ZB.js → openai-GDI7HISL.js} +10 -10
  73. package/dist/bundle/{process-CASPZ2DH.js → process-3IGMEATV.js} +1 -1
  74. package/dist/bundle/{program-QPQDSGYA.js → program-P7YPHVLD.js} +41 -41
  75. package/dist/bundle/{prompt-ESZL7SGX.js → prompt-S6R7IHDK.js} +2 -2
  76. package/dist/bundle/{recognize-LQ7QOG4T.js → recognize-PFZRQ3P4.js} +1 -1
  77. package/dist/bundle/{remote-34XP4EDN.js → remote-Q37V7LUX.js} +4 -4
  78. package/dist/bundle/{rerank-7F6NLBCW.js → rerank-V5YQQQAM.js} +4 -4
  79. package/dist/bundle/{serve-M6TTKXI4.js → serve-5CAD2UVG.js} +6 -6
  80. package/dist/bundle/{server-GLZ5M7PE.js → server-R6YAO2SG.js} +27 -27
  81. package/dist/bundle/server-RUQLAWWS.js +56 -0
  82. package/dist/bundle/{state-UKKPLMHS.js → state-Y3A2NEM3.js} +3 -3
  83. package/dist/bundle/{store-J2MBIDJK.js → store-H5K32CNI.js} +7 -7
  84. package/dist/bundle/store-maintenance-command-QZDC4WKW.js +45 -0
  85. package/dist/bundle/tg.js +2 -2
  86. package/dist/version.d.ts +1 -1
  87. package/dist/version.js +1 -1
  88. package/package.json +2 -2
  89. package/skills/tg-cli/SKILL.md +14 -9
  90. package/dist/bundle/server-KOW7OKE2.js +0 -56
  91. package/dist/bundle/store-maintenance-command-64B57C3U.js +0 -45
@@ -8,10 +8,10 @@ import {
8
8
  openRemote,
9
9
  remoteKey,
10
10
  remoteModel
11
- } from "./chunk-AZYVTDAE.js";
12
- import "./chunk-YWSNUUW5.js";
13
- import "./chunk-NFBOZT7H.js";
14
- import "./chunk-VM7I5VKX.js";
11
+ } from "./chunk-UMUJHC4M.js";
12
+ import "./chunk-7665YBJ7.js";
13
+ import "./chunk-AUWYMMYL.js";
14
+ import "./chunk-7GQLD5TJ.js";
15
15
  import "./chunk-BWRCPMMC.js";
16
16
  import "./chunk-EO563SUX.js";
17
17
  import "./chunk-Y5E2WNWB.js";
@@ -4,9 +4,9 @@ import {
4
4
  defaultThreads,
5
5
  loadModel,
6
6
  truncated
7
- } from "./chunk-YWSNUUW5.js";
8
- import "./chunk-NFBOZT7H.js";
9
- import "./chunk-VM7I5VKX.js";
7
+ } from "./chunk-7665YBJ7.js";
8
+ import "./chunk-AUWYMMYL.js";
9
+ import "./chunk-7GQLD5TJ.js";
10
10
  import "./chunk-BWRCPMMC.js";
11
11
  import "./chunk-EO563SUX.js";
12
12
  import "./chunk-Y5E2WNWB.js";
@@ -14,7 +14,7 @@ import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/embeddings/rerank.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/node_modules/@wirecat/cli-core/dist/embeddings/rerank.js
18
18
  var openReranker = /* @__PURE__ */ __name(async (model, directory, { threads = defaultThreads() } = {}) => {
19
19
  const { ort, tokenizer, session } = await loadModel(model, directory, threads);
20
20
  const typeIds = session.inputNames.includes("token_type_ids");
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  listen
5
- } from "./chunk-W3B6EEZU.js";
5
+ } from "./chunk-UDYCZ5KB.js";
6
6
  import {
7
7
  ownerLogin
8
- } from "./chunk-6KESAYMZ.js";
8
+ } from "./chunk-J4QVXR5I.js";
9
9
  import {
10
10
  WebStandardStreamableHTTPServerTransport,
11
11
  createMcpHandler,
@@ -20,9 +20,9 @@ import {
20
20
  calledTools,
21
21
  httpActivityFile,
22
22
  httpLock
23
- } from "./chunk-MXIBRT6W.js";
24
- import "./chunk-7ABA4EXC.js";
25
- import "./chunk-RARYRHQA.js";
23
+ } from "./chunk-YFK3DNNP.js";
24
+ import "./chunk-UPRYEDAV.js";
25
+ import "./chunk-PNUHAHTF.js";
26
26
  import "./chunk-BWRCPMMC.js";
27
27
  import {
28
28
  CliError
@@ -32,7 +32,7 @@ import {
32
32
  __name
33
33
  } from "./chunk-ZVVMGPBJ.js";
34
34
 
35
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/mcp/http/serve.js
35
+ // node_modules/.pnpm/@wirecat+cli-core@0.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/node_modules/@wirecat/cli-core/dist/mcp/http/serve.js
36
36
  import { randomUUID } from "node:crypto";
37
37
  var MCP_PATH = "/mcp";
38
38
  var AS_METADATA = "/.well-known/oauth-authorization-server";
@@ -2,60 +2,60 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  botInstructions
5
- } from "./chunk-AXNBGLO5.js";
5
+ } from "./chunk-J2Z5E7TO.js";
6
6
  import {
7
7
  answered,
8
8
  normal,
9
9
  registerCommands,
10
10
  runCommandForAgent,
11
11
  toolsFromCommands
12
- } from "./chunk-TDQVVXPF.js";
12
+ } from "./chunk-COHMFCHD.js";
13
13
  import {
14
14
  agentJson,
15
15
  skillResource
16
- } from "./chunk-32HEOKI2.js";
16
+ } from "./chunk-T6DSAROY.js";
17
17
  import {
18
18
  callerOf,
19
19
  serveStdio
20
- } from "./chunk-L3YDXUDK.js";
20
+ } from "./chunk-CJUSP5X2.js";
21
21
  import {
22
22
  McpServer
23
23
  } from "./chunk-5D4AEUVA.js";
24
24
  import {
25
25
  wholeList
26
- } from "./chunk-3XTMVGTS.js";
27
- import "./chunk-5ASW5BNM.js";
28
- import "./chunk-3KOF5T4N.js";
29
- import "./chunk-4YOPRYEY.js";
26
+ } from "./chunk-5ZPLOYTP.js";
27
+ import "./chunk-ZCHC7TYO.js";
28
+ import "./chunk-QVM2HKJP.js";
29
+ import "./chunk-3BD24JYK.js";
30
30
  import {
31
31
  changesMessenger,
32
32
  flatten,
33
33
  itemOf
34
- } from "./chunk-QRH2AWBZ.js";
35
- import "./chunk-7LZBMZQM.js";
36
- import "./chunk-Q35J5LCO.js";
34
+ } from "./chunk-KLHLWKWC.js";
35
+ import "./chunk-QLLPZWYZ.js";
36
+ import "./chunk-5FJQG5UZ.js";
37
37
  import "./chunk-ABVHA4K6.js";
38
38
  import "./chunk-UIPT6IAU.js";
39
- import "./chunk-JDOSIWPN.js";
39
+ import "./chunk-ZCV4UEVH.js";
40
40
  import {
41
41
  MESSENGER_CHANGE_REFUSAL,
42
42
  readOnlyLockOf,
43
43
  readOnlyRefusal
44
- } from "./chunk-XLNYDJKG.js";
45
- import "./chunk-RARYRHQA.js";
46
- import "./chunk-NDT22GBK.js";
47
- import "./chunk-AZYVTDAE.js";
48
- import "./chunk-YWSNUUW5.js";
49
- import "./chunk-NFBOZT7H.js";
50
- import "./chunk-RXWG7OWT.js";
51
- import "./chunk-YPLL3Q3M.js";
52
- import "./chunk-6WTLP2SI.js";
53
- import "./chunk-54CWOD7V.js";
44
+ } from "./chunk-43ZFY6TW.js";
45
+ import "./chunk-PNUHAHTF.js";
46
+ import "./chunk-QAC6Z675.js";
47
+ import "./chunk-UMUJHC4M.js";
48
+ import "./chunk-7665YBJ7.js";
49
+ import "./chunk-AUWYMMYL.js";
50
+ import "./chunk-KE47Y4PW.js";
51
+ import "./chunk-DREEXESG.js";
52
+ import "./chunk-33HEHPIK.js";
53
+ import "./chunk-3WUTBGZE.js";
54
54
  import "./chunk-NPGVOZVK.js";
55
- import "./chunk-VM7I5VKX.js";
56
- import "./chunk-SLAPUEMZ.js";
57
- import "./chunk-4GOF43MW.js";
58
- import "./chunk-3L2JTAVD.js";
55
+ import "./chunk-7GQLD5TJ.js";
56
+ import "./chunk-TWZTQHP6.js";
57
+ import "./chunk-HN6ZMUAS.js";
58
+ import "./chunk-2ZH3PUQX.js";
59
59
  import {
60
60
  mcpErrorResult
61
61
  } from "./chunk-BWRCPMMC.js";
@@ -67,7 +67,7 @@ import {
67
67
  __name
68
68
  } from "./chunk-ZVVMGPBJ.js";
69
69
 
70
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/mcp/bot/server.js
70
+ // node_modules/.pnpm/@wirecat+cli-core@0.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/node_modules/@wirecat/cli-core/dist/mcp/bot/server.js
71
71
  import { randomUUID } from "node:crypto";
72
72
  var body = /* @__PURE__ */ __name((command, value) => Array.isArray(value) ? wholeList(`bot ${command}`, value) : value !== null && typeof value === "object" && ("item" in value || "items" in value) ? value : itemOf(value !== null && typeof value === "object" ? value : { value }), "body");
73
73
  var createBotServer = /* @__PURE__ */ __name((options) => {
@@ -0,0 +1,56 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ PER_RUN,
5
+ createServer,
6
+ envelope,
7
+ serveOverHttpUntilStopped,
8
+ serveOverStdio
9
+ } from "./chunk-XXOJ7PQY.js";
10
+ import "./chunk-COHMFCHD.js";
11
+ import "./chunk-K457FHD4.js";
12
+ import "./chunk-T6DSAROY.js";
13
+ import "./chunk-NQAV7U7C.js";
14
+ import "./chunk-CJUSP5X2.js";
15
+ import "./chunk-5D4AEUVA.js";
16
+ import "./chunk-LLAZSGS7.js";
17
+ import "./chunk-5ZPLOYTP.js";
18
+ import "./chunk-ZCHC7TYO.js";
19
+ import "./chunk-QVM2HKJP.js";
20
+ import "./chunk-2K6IGVSI.js";
21
+ import "./chunk-3BD24JYK.js";
22
+ import "./chunk-KLHLWKWC.js";
23
+ import "./chunk-QLLPZWYZ.js";
24
+ import "./chunk-5FJQG5UZ.js";
25
+ import "./chunk-ABVHA4K6.js";
26
+ import "./chunk-UIPT6IAU.js";
27
+ import "./chunk-ZCV4UEVH.js";
28
+ import "./chunk-43ZFY6TW.js";
29
+ import "./chunk-YFK3DNNP.js";
30
+ import "./chunk-UPRYEDAV.js";
31
+ import "./chunk-PNUHAHTF.js";
32
+ import "./chunk-BNQOUCL2.js";
33
+ import "./chunk-QAC6Z675.js";
34
+ import "./chunk-UMUJHC4M.js";
35
+ import "./chunk-7665YBJ7.js";
36
+ import "./chunk-AUWYMMYL.js";
37
+ import "./chunk-KE47Y4PW.js";
38
+ import "./chunk-DREEXESG.js";
39
+ import "./chunk-33HEHPIK.js";
40
+ import "./chunk-3WUTBGZE.js";
41
+ import "./chunk-NPGVOZVK.js";
42
+ import "./chunk-7GQLD5TJ.js";
43
+ import "./chunk-TWZTQHP6.js";
44
+ import "./chunk-HN6ZMUAS.js";
45
+ import "./chunk-2ZH3PUQX.js";
46
+ import "./chunk-BWRCPMMC.js";
47
+ import "./chunk-EO563SUX.js";
48
+ import "./chunk-Y5E2WNWB.js";
49
+ import "./chunk-ZVVMGPBJ.js";
50
+ export {
51
+ PER_RUN,
52
+ createServer,
53
+ envelope,
54
+ serveOverHttpUntilStopped,
55
+ serveOverStdio
56
+ };
@@ -12,9 +12,9 @@ import {
12
12
  readHttpLock,
13
13
  readStored,
14
14
  signedInClients
15
- } from "./chunk-MXIBRT6W.js";
16
- import "./chunk-7ABA4EXC.js";
17
- import "./chunk-RARYRHQA.js";
15
+ } from "./chunk-YFK3DNNP.js";
16
+ import "./chunk-UPRYEDAV.js";
17
+ import "./chunk-PNUHAHTF.js";
18
18
  import "./chunk-BWRCPMMC.js";
19
19
  import "./chunk-EO563SUX.js";
20
20
  import "./chunk-Y5E2WNWB.js";
@@ -53,14 +53,14 @@ import {
53
53
  threadConversation,
54
54
  titlePart,
55
55
  vectorIndexCounts
56
- } from "./chunk-RXWG7OWT.js";
57
- import "./chunk-YPLL3Q3M.js";
58
- import "./chunk-6WTLP2SI.js";
59
- import "./chunk-54CWOD7V.js";
56
+ } from "./chunk-KE47Y4PW.js";
57
+ import "./chunk-DREEXESG.js";
58
+ import "./chunk-33HEHPIK.js";
59
+ import "./chunk-3WUTBGZE.js";
60
60
  import "./chunk-NPGVOZVK.js";
61
- import "./chunk-VM7I5VKX.js";
62
- import "./chunk-SLAPUEMZ.js";
63
- import "./chunk-4GOF43MW.js";
61
+ import "./chunk-7GQLD5TJ.js";
62
+ import "./chunk-TWZTQHP6.js";
63
+ import "./chunk-HN6ZMUAS.js";
64
64
  import "./chunk-BWRCPMMC.js";
65
65
  import "./chunk-EO563SUX.js";
66
66
  import "./chunk-Y5E2WNWB.js";
@@ -0,0 +1,45 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ buildStems,
5
+ storeMaintenanceCommands,
6
+ storeSummary
7
+ } from "./chunk-WDRNVSWF.js";
8
+ import "./chunk-LLAZSGS7.js";
9
+ import "./chunk-5ZPLOYTP.js";
10
+ import "./chunk-ZCHC7TYO.js";
11
+ import "./chunk-QVM2HKJP.js";
12
+ import "./chunk-2ABQZVK4.js";
13
+ import "./chunk-KLHLWKWC.js";
14
+ import "./chunk-QLLPZWYZ.js";
15
+ import "./chunk-5FJQG5UZ.js";
16
+ import "./chunk-ABVHA4K6.js";
17
+ import "./chunk-UIPT6IAU.js";
18
+ import "./chunk-ZCV4UEVH.js";
19
+ import "./chunk-43ZFY6TW.js";
20
+ import "./chunk-UPRYEDAV.js";
21
+ import "./chunk-PNUHAHTF.js";
22
+ import "./chunk-YG4BO7N3.js";
23
+ import "./chunk-QAC6Z675.js";
24
+ import "./chunk-UMUJHC4M.js";
25
+ import "./chunk-7665YBJ7.js";
26
+ import "./chunk-AUWYMMYL.js";
27
+ import "./chunk-KE47Y4PW.js";
28
+ import "./chunk-DREEXESG.js";
29
+ import "./chunk-33HEHPIK.js";
30
+ import "./chunk-3WUTBGZE.js";
31
+ import "./chunk-NPGVOZVK.js";
32
+ import "./chunk-7GQLD5TJ.js";
33
+ import "./chunk-TWZTQHP6.js";
34
+ import "./chunk-HN6ZMUAS.js";
35
+ import "./chunk-PQGWEFJ2.js";
36
+ import "./chunk-2ZH3PUQX.js";
37
+ import "./chunk-BWRCPMMC.js";
38
+ import "./chunk-EO563SUX.js";
39
+ import "./chunk-Y5E2WNWB.js";
40
+ import "./chunk-ZVVMGPBJ.js";
41
+ export {
42
+ buildStems,
43
+ storeMaintenanceCommands,
44
+ storeSummary
45
+ };
package/dist/bundle/tg.js CHANGED
@@ -15,12 +15,12 @@ import {
15
15
  // dist/bin/tg.js
16
16
  import { enableCompileCache } from "node:module";
17
17
  enableCompileCache();
18
- var [{ startCli }, { TG }] = await Promise.all([import("./entry-NQD6Z2BM.js"), import("./identity-EDGOOTOM.js")]);
18
+ var [{ startCli }, { TG }] = await Promise.all([import("./entry-DVLMQM6J.js"), import("./identity-DSYY4FLQ.js")]);
19
19
  await startCli({
20
20
  app: TG,
21
21
  sqlite: true,
22
22
  // A static import would load the whole program, and its SQLite, before ensureSqlite could swap it.
23
- run: /* @__PURE__ */ __name(async ({ args }) => (await import("./program-QPQDSGYA.js")).run(args), "run"),
23
+ run: /* @__PURE__ */ __name(async ({ args }) => (await import("./program-P7YPHVLD.js")).run(args), "run"),
24
24
  fail: /* @__PURE__ */ __name((error, { tty }) => {
25
25
  const object = errorObjectOf(error);
26
26
  process.stderr.write(`${renderError(object, { cli: TG.command, interactive: tty })}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.110.0";
1
+ export declare const VERSION = "0.111.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.110.0";
1
+ export const VERSION = "0.111.0";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/tg-cli",
3
- "version": "0.110.0",
3
+ "version": "0.111.0",
4
4
  "description": "A local command line interface for a personal Telegram account, built for agents and scripts",
5
5
  "mcpName": "dev.wirecat/tg-cli",
6
6
  "license": "Apache-2.0",
@@ -71,7 +71,7 @@
71
71
  "dependencies": {
72
72
  "@mtcute/node": "0.32.7",
73
73
  "@wirecat/cli-base": "0.68.1",
74
- "@wirecat/cli-core": "0.511.0",
74
+ "@wirecat/cli-core": "0.517.0",
75
75
  "commander": "15.0.0",
76
76
  "undici": "8.12.3",
77
77
  "valibot": "1.5.0"
@@ -48,7 +48,9 @@ MCP uses `tg_tools_search`, then `tg_read` or `tg_write` with `{command, argumen
48
48
  Use the CLI path such as `stats messages show`.
49
49
  Bots use `tg_bot_tools_search/read/write` with commands without `bot`; arguments are the command's options in
50
50
  snake_case. There are no forms;
51
- profile permissions decide access and `ask` permits the requested MCP write. CLI confirmation remains.
51
+ profile permissions decide access. Over MCP, `ask` does not ask: it permits the write the owner requested, and only
52
+ the MCP client can ask first. Tell the owner to turn on approval for `tg_write` in their client, or to set `readonly`
53
+ for a profile that should not write. On the command line `ask` still asks.
52
54
 
53
55
  ## Installation readiness
54
56
 
@@ -172,9 +174,10 @@ summary; news digests remain separate future work. Permission: `messages.evidenc
172
174
  deduplication contract applies to the same chat, topic, content and `--operation-id`.
173
175
  Never automatically repeat an unknown write based only on its error code.
174
176
 
175
- 5. **Start a search with `tg personal search all`**: messages and notes on this machine, plus Telegram's own
176
- search of messages, in one answer; each hit typed (`message`, `note`, `document`). The query goes to Telegram
177
- unless you add `--offline` (or `--backend archive`); use that when the owner wants nothing to leave the machine. Imported Drive documents retain their Google link and edit time; `--source drive:<profile>` selects a registered Drive profile. `tg personal chats documents list CHAT_ID` shows documents linked in stored messages. Mail is memo's (`memo search mail`). Narrow with `tg personal search messages`, `search notes`,
177
+ 5. **Start a search with `tg personal search messages`**: the messages kept on this machine plus Telegram's own
178
+ search. Add `--backend archive` when the owner wants nothing to leave the machine. **Use `tg personal search all`
179
+ only when the owner asks to include their notes or imported Drive documents**: it adds both to the messages, in one
180
+ answer, each hit typed (`message`, `note`, `document`). Imported Drive documents retain their Google link and edit time; `--source drive:<profile>` selects a registered Drive profile. `tg personal chats documents list CHAT_ID` shows documents linked in stored messages. Mail is memo's (`memo search mail`). Narrow with `tg personal search messages`, `search notes`,
178
181
  `search conversations` (by meaning) or `search topics`; every search lives under `tg personal search`.
179
182
  For a natural question or uncertain wording, use `tg personal search messages '<question>' --discover`
180
183
  or MCP `discover: true`. It searches the local archive without model downloads, keeps hard filters
@@ -323,9 +326,9 @@ tg personal messages context -1001234567890 4242 --before-n 3 --after-n 3 --json
323
326
  tg personal messages download -1001234567890 4242 --output-dir /tmp/tg --json # the message's file; answers its path
324
327
  tg personal messages download -1001234567890 --all --output-dir /tmp/tg --jsonl --timeout 10m # every file of the chat; run it again to continue
325
328
  tg personal messages transcribe -1001234567890 4242 --json # a voice note as text; can take up to a minute; never download a model yourself
326
- tg personal search all "invoice march" --json # messages and notes kept here, plus Telegram's own search
327
- tg personal search all "invoice march" --offline --json # this machine only; the query is not sent to Telegram
328
- tg personal search messages "invoice march" --json # Telegram messages only, and Telegram's own search
329
+ tg personal search messages "invoice march" --json # messages kept here, plus Telegram's own search
330
+ tg personal search messages "invoice march" --backend archive --json # this machine only; the query is not sent to Telegram
331
+ tg personal search all "invoice march" --json # only when the owner asks: adds their notes and Drive documents
329
332
  tg personal conversations links rebuild --chat -1001234567890 --json # the threads inside a group, from what was kept; then list | show
330
333
  tg skill show link-conversations # only when the owner asks you to untangle a chat's threads yourself
331
334
  tg personal search conversations "<question>" --json # by meaning, after the owner ran tg personal conversations embed --chat <chat>
@@ -335,7 +338,8 @@ tg personal watch --jsonl # new messages as {"type":"it
335
338
  An agent without a terminal (Claude Desktop, Cursor) uses the MCP server instead: `tg personal mcp serve`. The
336
339
  profile's `permissions` decide which commands may run, through `tg_tools_search`, `tg_read` and
337
340
  `tg_write`. Discovery keeps denied commands and their arguments, marking current unavailability
338
- with a reason and permission key. There is no confirmation form. `tg personal mcp config` prints the entry with full paths.
341
+ with a reason and permission key. There is no confirmation form: approval for a write is the MCP client's, so ask
342
+ the owner to turn it on. `tg personal mcp config` prints the entry with full paths.
339
343
 
340
344
  `tg <bot> bot me` reads the bot identity (id, name and username); it needs a token and refuses `--offline`. MCP offers `tg_bot_read` (`command: "me"`).
341
345
  Bot commands print data only on stdout with `--json`, in the same message shape as the account. Bot exit codes:
@@ -384,7 +388,8 @@ Never ask the owner to paste a credential into argv, print one, or fall back to
384
388
  Use `tg personal stats chats show <chat> --offline --json` for stored group/channel activity. The online command also
385
389
  requests joins/leaves; MCP and offline results omit `members`. Incomplete counts are lower bounds.
386
390
  `tg personal mcp serve --http --public-url https://<name>.ts.net` serves behind your tunnel with its own owner-code login;
387
- MCP has no server forms. `deny`/`readonly` block writes; `ask`/`allow` permit the requested write.
391
+ MCP has no server forms. `deny`/`readonly` block writes; `ask`/`allow` permit the requested write without asking,
392
+ so the client's approval is the only prompt.
388
393
  Repeat `--permission key=level` to tighten permissions for the server; it never loosens them. Never change permissions to bypass a refusal.
389
394
  `tg personal mcp revoke` forgets browser logins for the profile.
390
395
 
@@ -1,56 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- PER_RUN,
5
- createServer,
6
- envelope,
7
- serveOverHttpUntilStopped,
8
- serveOverStdio
9
- } from "./chunk-F24EAGOU.js";
10
- import "./chunk-TDQVVXPF.js";
11
- import "./chunk-KLOFBUXA.js";
12
- import "./chunk-32HEOKI2.js";
13
- import "./chunk-4I6HTOCM.js";
14
- import "./chunk-L3YDXUDK.js";
15
- import "./chunk-5D4AEUVA.js";
16
- import "./chunk-GPIORQAD.js";
17
- import "./chunk-3XTMVGTS.js";
18
- import "./chunk-5ASW5BNM.js";
19
- import "./chunk-3KOF5T4N.js";
20
- import "./chunk-4BMXELWN.js";
21
- import "./chunk-4YOPRYEY.js";
22
- import "./chunk-QRH2AWBZ.js";
23
- import "./chunk-7LZBMZQM.js";
24
- import "./chunk-Q35J5LCO.js";
25
- import "./chunk-ABVHA4K6.js";
26
- import "./chunk-UIPT6IAU.js";
27
- import "./chunk-JDOSIWPN.js";
28
- import "./chunk-XLNYDJKG.js";
29
- import "./chunk-MXIBRT6W.js";
30
- import "./chunk-7ABA4EXC.js";
31
- import "./chunk-RARYRHQA.js";
32
- import "./chunk-TJA3BWY3.js";
33
- import "./chunk-NDT22GBK.js";
34
- import "./chunk-AZYVTDAE.js";
35
- import "./chunk-YWSNUUW5.js";
36
- import "./chunk-NFBOZT7H.js";
37
- import "./chunk-RXWG7OWT.js";
38
- import "./chunk-YPLL3Q3M.js";
39
- import "./chunk-6WTLP2SI.js";
40
- import "./chunk-54CWOD7V.js";
41
- import "./chunk-NPGVOZVK.js";
42
- import "./chunk-VM7I5VKX.js";
43
- import "./chunk-SLAPUEMZ.js";
44
- import "./chunk-4GOF43MW.js";
45
- import "./chunk-3L2JTAVD.js";
46
- import "./chunk-BWRCPMMC.js";
47
- import "./chunk-EO563SUX.js";
48
- import "./chunk-Y5E2WNWB.js";
49
- import "./chunk-ZVVMGPBJ.js";
50
- export {
51
- PER_RUN,
52
- createServer,
53
- envelope,
54
- serveOverHttpUntilStopped,
55
- serveOverStdio
56
- };
@@ -1,45 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- buildStems,
5
- storeMaintenanceCommands,
6
- storeSummary
7
- } from "./chunk-VOBMR7E5.js";
8
- import "./chunk-GPIORQAD.js";
9
- import "./chunk-3XTMVGTS.js";
10
- import "./chunk-5ASW5BNM.js";
11
- import "./chunk-3KOF5T4N.js";
12
- import "./chunk-2ABQZVK4.js";
13
- import "./chunk-QRH2AWBZ.js";
14
- import "./chunk-7LZBMZQM.js";
15
- import "./chunk-Q35J5LCO.js";
16
- import "./chunk-ABVHA4K6.js";
17
- import "./chunk-UIPT6IAU.js";
18
- import "./chunk-JDOSIWPN.js";
19
- import "./chunk-XLNYDJKG.js";
20
- import "./chunk-7ABA4EXC.js";
21
- import "./chunk-RARYRHQA.js";
22
- import "./chunk-RSZEEWOW.js";
23
- import "./chunk-NDT22GBK.js";
24
- import "./chunk-AZYVTDAE.js";
25
- import "./chunk-YWSNUUW5.js";
26
- import "./chunk-NFBOZT7H.js";
27
- import "./chunk-RXWG7OWT.js";
28
- import "./chunk-YPLL3Q3M.js";
29
- import "./chunk-6WTLP2SI.js";
30
- import "./chunk-54CWOD7V.js";
31
- import "./chunk-NPGVOZVK.js";
32
- import "./chunk-VM7I5VKX.js";
33
- import "./chunk-SLAPUEMZ.js";
34
- import "./chunk-4GOF43MW.js";
35
- import "./chunk-MZRD776E.js";
36
- import "./chunk-3L2JTAVD.js";
37
- import "./chunk-BWRCPMMC.js";
38
- import "./chunk-EO563SUX.js";
39
- import "./chunk-Y5E2WNWB.js";
40
- import "./chunk-ZVVMGPBJ.js";
41
- export {
42
- buildStems,
43
- storeMaintenanceCommands,
44
- storeSummary
45
- };