@wirecat/tg-cli 0.129.0 → 0.130.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.
package/dist/bin/tg.js CHANGED
@@ -9,7 +9,7 @@ if (
9
9
  (words[0] === "--version" || words[0] === "-V") &&
10
10
  !Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
11
11
  ) {
12
- process.stdout.write("0.129.0\n")
12
+ process.stdout.write("0.130.0\n")
13
13
  } else {
14
14
  // Before the bundle compiles: the bundle's own call comes after its chunks.
15
15
  module.enableCompileCache()
@@ -28,7 +28,7 @@ if (
28
28
  : next(specifier, context),
29
29
  })
30
30
  }
31
- const chunks = ["../bundle/adapter-2XFPXBTA.js","../bundle/all-profiles-GXFPZLYU.js","../bundle/anthropic-FHS5XNK5.js","../bundle/app-server-IZMFSFP2.js","../bundle/bot-api-LQP75V5I.js","../bundle/bot-history-EJQOD4AQ.js","../bundle/bun-GBAZFRCV.js","../bundle/bun-sqlite-JB4BX6X7.js","../bundle/command-contract-G752BLKA.js","../bundle/command-server-entry-YR6ONDWO.js","../bundle/decode-VUKGWFSW.js","../bundle/dispatch-ST5FK2KI.js","../bundle/dist-I7OZPHAZ.js","../bundle/echarts-GOV5M733.js","../bundle/embed-2IVIYNAJ.js","../bundle/embedder-2HU7JYZK.js","../bundle/entry-CSTCXYI5.js","../bundle/failure-GMUQKQ5K.js","../bundle/first-run-3IZGXZT5.js","../bundle/first-screen-7QSNCZIK.js","../bundle/instructions-YSXV6FAC.js","../bundle/mcp-VFIOZDVY.js","../bundle/node-FMQWCZRS.js","../bundle/node-P4E63KXA.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-YN5OKOC6.js","../bundle/oauth-EW7PTZVT.js","../bundle/open-Q2RDY344.js","../bundle/openai-STON6G3O.js","../bundle/process-OQUC2TW3.js","../bundle/program-7JJHTZ25.js","../bundle/prompt-WHVF7UTW.js","../bundle/proxy-transport-A4MRO3PF.js","../bundle/recognize-YDQWMXNI.js","../bundle/remote-477LQHP6.js","../bundle/rerank-4YPB26FG.js","../bundle/serve-FXJNUOTS.js","../bundle/server-2S6HFBGR.js","../bundle/server-UOSUTZNE.js","../bundle/state-I2GGYGRL.js","../bundle/store-VQXIB6KV.js","../bundle/store-maintenance-command-LW2MMDLY.js"]
31
+ const chunks = ["../bundle/adapter-2XFPXBTA.js","../bundle/all-profiles-GXFPZLYU.js","../bundle/anthropic-FHS5XNK5.js","../bundle/app-server-IZMFSFP2.js","../bundle/bot-api-V3ZJ75KE.js","../bundle/bot-history-EJQOD4AQ.js","../bundle/bun-GBAZFRCV.js","../bundle/bun-sqlite-JB4BX6X7.js","../bundle/command-contract-G752BLKA.js","../bundle/command-server-entry-YR6ONDWO.js","../bundle/decode-VUKGWFSW.js","../bundle/dispatch-ST5FK2KI.js","../bundle/dist-I7OZPHAZ.js","../bundle/echarts-GOV5M733.js","../bundle/embed-2IVIYNAJ.js","../bundle/embedder-2HU7JYZK.js","../bundle/entry-CSTCXYI5.js","../bundle/failure-GMUQKQ5K.js","../bundle/first-run-3IZGXZT5.js","../bundle/first-screen-7QSNCZIK.js","../bundle/instructions-YSXV6FAC.js","../bundle/mcp-VFIOZDVY.js","../bundle/node-FMQWCZRS.js","../bundle/node-P4E63KXA.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-YN5OKOC6.js","../bundle/oauth-EW7PTZVT.js","../bundle/open-Q2RDY344.js","../bundle/openai-STON6G3O.js","../bundle/process-OQUC2TW3.js","../bundle/program-N5BT75OC.js","../bundle/prompt-WHVF7UTW.js","../bundle/proxy-transport-A4MRO3PF.js","../bundle/recognize-YDQWMXNI.js","../bundle/remote-477LQHP6.js","../bundle/rerank-4YPB26FG.js","../bundle/serve-FXJNUOTS.js","../bundle/server-2S6HFBGR.js","../bundle/server-UOSUTZNE.js","../bundle/state-I2GGYGRL.js","../bundle/store-VQXIB6KV.js","../bundle/store-maintenance-command-LW2MMDLY.js"]
32
32
  if (((words) => words
33
33
  .filter((word) => !word.startsWith("-"))
34
34
  .slice(0, 2)
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  TELEGRAM_BOT
5
- } from "./chunk-OOQVHMCS.js";
5
+ } from "./chunk-42LRWOTT.js";
6
6
  import {
7
7
  BotTokenStore,
8
8
  apiPlainJson,
@@ -50,7 +50,7 @@ import "./chunk-GGGBPWUS.js";
50
50
  import "./chunk-XXW6PFAX.js";
51
51
  import "./chunk-CKJ73EF3.js";
52
52
  import "./chunk-FH4YIBBH.js";
53
- import "./chunk-P4FZJO5F.js";
53
+ import "./chunk-6WGAWISN.js";
54
54
  import "./chunk-66PL7P4C.js";
55
55
  import "./chunk-D72URWJE.js";
56
56
  import "./chunk-F6CV4KUN.js";
@@ -30,7 +30,7 @@ import {
30
30
  import {
31
31
  DESKTOP,
32
32
  TG
33
- } from "./chunk-P4FZJO5F.js";
33
+ } from "./chunk-6WGAWISN.js";
34
34
  import {
35
35
  asFirstWord,
36
36
  environmentOf,
@@ -26,7 +26,7 @@ var REASONS = defineReasons([
26
26
  ].map(([reason, code, message]) => ({ reason, code, message, details: [] })));
27
27
 
28
28
  // dist/version.js
29
- var VERSION = "0.129.0";
29
+ var VERSION = "0.130.0";
30
30
 
31
31
  // dist/identity.js
32
32
  var TG = {
@@ -15,7 +15,7 @@ import {
15
15
  proxySecrets,
16
16
  resolveSettings,
17
17
  usesOwnersSession
18
- } from "./chunk-OOQVHMCS.js";
18
+ } from "./chunk-42LRWOTT.js";
19
19
  import {
20
20
  AGENTS,
21
21
  MEMO_SCENARIOS,
@@ -122,7 +122,7 @@ import {
122
122
  DESKTOP,
123
123
  TG,
124
124
  VERSION
125
- } from "./chunk-P4FZJO5F.js";
125
+ } from "./chunk-6WGAWISN.js";
126
126
  import {
127
127
  installerOf
128
128
  } from "./chunk-66PL7P4C.js";
@@ -1086,7 +1086,7 @@ var definition = {
1086
1086
  };
1087
1087
  var run2 = /* @__PURE__ */ __name(async (argv, environment = {}) => {
1088
1088
  if (!botApi && needsBotApi(argv, environment.env ?? process.env))
1089
- useBotApi((await import("./bot-api-LQP75V5I.js")).telegramBotApiCommand);
1089
+ useBotApi((await import("./bot-api-V3ZJ75KE.js")).telegramBotApiCommand);
1090
1090
  const notice = updateNotice2(argv, {
1091
1091
  ...environment.tty === void 0 ? {} : { tty: environment.tty },
1092
1092
  ...environment.update ? { environment: environment.update } : {},
package/dist/bundle/tg.js CHANGED
@@ -3,7 +3,7 @@ import { createRequire as __bundleRequire } from "node:module";
3
3
  const require = __bundleRequire(import.meta.url);
4
4
  import {
5
5
  TG
6
- } from "./chunk-P4FZJO5F.js";
6
+ } from "./chunk-6WGAWISN.js";
7
7
  import {
8
8
  installerOf
9
9
  } from "./chunk-66PL7P4C.js";
@@ -188,7 +188,7 @@ if (wcat.code !== void 0) {
188
188
  app: TG,
189
189
  sqlite: true,
190
190
  // A static import would load the whole program, and its SQLite, before ensureSqlite could swap it.
191
- run: /* @__PURE__ */ __name(async ({ args }) => (await import("./program-7JJHTZ25.js")).run(args), "run"),
191
+ run: /* @__PURE__ */ __name(async ({ args }) => (await import("./program-N5BT75OC.js")).run(args), "run"),
192
192
  fail: /* @__PURE__ */ __name((error, { tty }) => {
193
193
  const object = errorObjectOf(error);
194
194
  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.129.0";
1
+ export declare const VERSION = "0.130.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.129.0";
1
+ export const VERSION = "0.130.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.129.0",
3
+ "version": "0.130.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",
@@ -179,8 +179,14 @@ summary; news digests remain separate future work. Permission: `messages.evidenc
179
179
  only when the owner asks to include their notes or imported Drive documents**: it adds both to the messages, in one
180
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`,
181
181
  `search conversations` (by meaning) or `search topics`; every search lives under `tg personal search`.
182
- For a natural question or uncertain wording, use `tg personal search messages '<question>' --discover`
183
- or MCP `discover: true`. It searches the local archive without model downloads, keeps hard filters
182
+ **For a question in the owner's own words** (a sentence, unsure wording, a name that may be misspelled, no chat
183
+ named), search in this order: `tg personal search conversations '<question>'` (by meaning and words; `conversations
184
+ status` shows which chats have vectors), then `tg personal search messages '<question>' --discover`, then key words.
185
+ Pass the question as the owner wrote it; do not cut it to one word first. Never filter the results yourself
186
+ (`grep -v`, `jq select`) by chat or sender: a hit in a chat you did not expect is often the answer. When the owner
187
+ says "I advised / I wrote", add `from:me`. A search that stops at its time limit answers `query.time-limit`: run it
188
+ again with `--timeout 60s` before trying other words.
189
+ For `--discover` (MCP `discover: true`): it searches the local archive without model downloads, keeps hard filters
184
190
  and includes eligible direct replies. Inspect missing terms, parent links and the messages;
185
191
  the first result and its score do not establish an answer. Explicit syntax remains strict.
186
192
  **Without `--discover`, `tg personal search messages` also asks Telegram's search** (`--backend both`; `archive`
@@ -261,7 +267,8 @@ summary; news digests remain separate future work. Permission: `messages.evidenc
261
267
  22. **Nothing relevant: search again in other words before saying it is not there.** A search finds the words
262
268
  it is given, and a paraphrase misses. Try the words the answer itself would contain (a document's title, the
263
269
  term the sender would use), one or two key words instead of a sentence, a synonym, the other language; for a
264
- question, `--discover`. After two or three tries, say what you searched for.
270
+ question, `search conversations` and `--discover` first (trap 5). After two or three tries, say what you searched
271
+ for.
265
272
 
266
273
  ## The usual path
267
274
 
@@ -337,7 +344,7 @@ tg personal search messages "invoice march" --backend archive --json # this mac
337
344
  tg personal search all "invoice march" --json # only when the owner asks: adds their notes and Drive documents
338
345
  tg personal conversations links rebuild --chat -1001234567890 --json # the threads inside a group, from what was kept; then list | show
339
346
  tg skill show link-conversations # only when the owner asks you to untangle a chat's threads yourself
340
- tg personal search conversations "<question>" --json # by meaning, after the owner ran tg personal conversations embed --chat <chat>
347
+ tg personal search conversations "<question>" --json # by meaning and words: the first search for a question in the owner's words
341
348
  tg personal watch --jsonl # new messages as {"type":"item","data"} lines, then a {"type":"end"} line
342
349
  ```
343
350