@wirecat/tg-cli 0.43.1 → 0.44.1

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/README.md CHANGED
@@ -432,8 +432,9 @@ every exit code. All codes: [docs/commands.md](docs/commands.md#exit-codes).
432
432
  - Before each send, from a command or over MCP, `tg` checks the profile's limits and writes a line to
433
433
  the journal — without the message's text.
434
434
  - A level of `ask` in `permissions` asks you in the terminal before a change; over MCP nobody is
435
- there to answer, so it goes ahead — use `readonly` to stop an agent. `--file` refuses keys and hidden files unless you add
436
- `--allow-any-file`, and over MCP there is no way around it.
435
+ there to answer, so it goes ahead — use `readonly` to stop an agent. `--file` protects known credential
436
+ files, CLI folders and the local store. Ordinary hidden working folders are allowed;
437
+ `--allow-any-file` is available only in CLI, and MCP cannot override these protections.
437
438
  - The limits protect against an agent talked into sending by a message it read, not against one
438
439
  that sets out to get round them: against that you need a boundary outside — a sandbox or a
439
440
  separate user.
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.43.1";
1
+ export declare const VERSION = "0.44.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.43.1";
1
+ export const VERSION = "0.44.1";
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.43.1",
3
+ "version": "0.44.1",
4
4
  "description": "A local command line interface for a personal Telegram account, built for agents and scripts",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",
@@ -36,7 +36,7 @@
36
36
  "test:matrix": "vitest run >/dev/null && tsc --build --force >/dev/null && cli-dev test-matrix --program dist/program.js --untested scripts/test-matrix-untested.ts --name tg --check",
37
37
  "test:slow": "vitest run --reporter=json --outputFile=coverage/tests.json >/dev/null; cli-dev slow-tests",
38
38
  "smoke:bun": "bun run scripts/smoke.ts",
39
- "docs:check": "node --experimental-strip-types scripts/docs-check.ts && cspell --no-progress --no-summary README.md 'docs/*.md' && rumdl check --config node_modules/@wirecat/cli-core/config/rumdl.toml --disable MD028 README.md docs/*.md",
39
+ "docs:check": "node --experimental-strip-types scripts/docs-check.ts && cspell --no-progress --no-summary README.md 'docs/*.md' && rumdl check --config config/wirecat/rumdl.toml --disable MD028 README.md docs/*.md",
40
40
  "parity:check": "pnpm build && node dist/bin/tg.js commands --json | cli-messaging-parity tg && node dist/bin/tg.js commands --json | cli-messaging-parity tg --pages README.md docs/*.md",
41
41
  "smoke:live": "pnpm build && node --experimental-strip-types scripts/smoke-live.ts",
42
42
  "release:check": "pnpm build && node --experimental-strip-types scripts/release-check.ts",
@@ -52,28 +52,33 @@
52
52
  "postinstall": "node install/postinstall.mjs",
53
53
  "bot:generate": "node --experimental-strip-types scripts/bot/generate.ts",
54
54
  "bot:generate:check": "node --experimental-strip-types scripts/bot/generate.ts --check",
55
- "check:agent-docs": "pnpm build && node --experimental-strip-types scripts/check-agent-docs.ts"
55
+ "check:agent-docs": "pnpm build && node --experimental-strip-types scripts/check-agent-docs.ts",
56
+ "standards:check": "node config/wirecat/check.mjs",
57
+ "docs:lint": "markdownlint-cli2",
58
+ "docs:spell": "cspell lint --config cspell.json --no-progress README.md"
56
59
  },
57
60
  "dependencies": {
58
- "@wirecat/cli-core": "0.18.1",
59
- "@wirecat/cli-messaging": "0.215.0",
60
61
  "@mtcute/node": "0.32.3",
62
+ "@wirecat/cli-core": "0.19.3",
63
+ "@wirecat/cli-messaging": "0.217.1",
61
64
  "commander": "15.0.0",
62
65
  "undici": "7.30.0",
63
66
  "valibot": "1.5.0"
64
67
  },
65
68
  "devDependencies": {
66
- "@biomejs/biome": "^2.5.14",
67
- "@cspell/dict-en-gb": "^5.0.34",
68
- "@cspell/dict-ru_ru": "^2.3.2",
69
+ "@biomejs/biome": "2.5.15",
70
+ "@cspell/dict-en-gb": "5.0.34",
71
+ "@cspell/dict-ru_ru": "2.3.3",
69
72
  "@napi-rs/canvas": "1.0.10",
70
73
  "@types/node": "^22.20.4",
71
74
  "@vitest/coverage-v8": "5.0.2",
72
- "cspell": "^10.3.6",
73
- "lefthook": "^2.1.14",
75
+ "cspell": "10.3.6",
76
+ "lefthook": "2.1.16",
74
77
  "rumdl": "^0.2.78",
75
78
  "typescript": "^7.0.2",
76
79
  "unpdf": "1.8.1",
77
- "vitest": "^5.0.2"
80
+ "vitest": "^5.0.2",
81
+ "@cspell/dict-es-es": "3.0.9",
82
+ "markdownlint-cli2": "0.23.3"
78
83
  }
79
84
  }
@@ -139,7 +139,11 @@ summary; news digests remain separate future work. Permission: `messages.evidenc
139
139
  5. **Start a search with `tg search all`**: messages, mail and notes on this machine in one answer, each hit
140
140
  typed (`message`, `mail`, `note`). Narrow with `tg search messages`, `search mail`, `search notes`,
141
141
  `search conversations` (by meaning) or `search topics`; every search lives under `tg search`.
142
- **`tg search messages` reads the local archive and asks Telegram's search too** (`--backend both`; `archive`
142
+ For a natural question or uncertain wording, use `tg search messages '<question>' --discover`
143
+ or MCP `discover: true`. It searches the local archive without model downloads, keeps hard filters
144
+ and includes eligible direct replies. Inspect missing terms, parent links and the messages;
145
+ the first result and its score do not establish an answer. Explicit syntax remains strict.
146
+ **Without `--discover`, `tg search messages` also asks Telegram's search** (`--backend both`; `archive`
143
147
  for the archive only). Good search needs downloaded chats: if a search finds nothing and `coverage.next` is
144
148
  set, run it (`tg store fetch --all --background`) or ask the owner before saying the message does not exist.
145
149
  Words and quoted phrases include word forms;
@@ -329,7 +333,7 @@ endpoint consent and `deny|allow` controls native chat opt-outs. Never widen the
329
333
  scenarios without the owner's separate consent. Shared `serve` replies to everyone a rule matches unless the audience limits it, and only with explicit
330
334
  `permissions.replies.send:allow`; the default is deny.
331
335
 
332
- Search reads the local archive and asks Telegram's search by default; `coverage` says what the archive held and
336
+ Ordinary search also asks Telegram; `--discover` reads only the archive, even with `--backend both`; `coverage` says what the archive held and
333
337
  `coverage.next` what to fetch. `--sync-first` explicitly fetches new messages before searching and
334
338
  marks nothing read: at most 5 chats, 500 messages and 30 seconds. Change these bounds with `--max-chats`,
335
339
  `--max-messages`, `--sync-time`. Failed or incomplete refresh retains local results with stale coverage and refresh
@@ -384,9 +388,10 @@ to `messages download`. For MCP discover `attachments extract`, then use `tg_wri
384
388
  extraction returns a continuation `cursor` and metadata without file text. After an explicitly
385
389
  authorized fetch, `--catch-up` prepares local search within `--catch-up-chunks`,
386
390
  `--catch-up-messages` and `--catch-up-time`; `--no-catch-up` overrides profile `searchCatchUp`.
387
- from_dir and retained-file transfer refuse hidden files/folders, CLI folders and the message store;
388
- MCP output_dir also refuses these locations. Local PDF text: at most 20 pages and 30 seconds.
389
- Local voice: complete mono/stereo Ogg Opus, at most 10 minutes.
391
+ from_dir and retained-file transfer protect known credential files/folders, CLI folders and the message store;
392
+ MCP output_dir protects these locations too. Ordinary hidden working folders are allowed.
393
+ Local PDF text has no fixed page-count limit or separate 30-second cutoff; cancellation and file/text budgets apply.
394
+ Local voice requires complete mono/stereo Ogg Opus without a ten-minute cutoff; long recordings need more memory.
390
395
  No models are downloaded and no remote provider is called. First inspect local `store gaps plan`,
391
396
  then repair only with the owner's authorization using `store gaps repair --fingerprint <hash>`
392
397
  and explicit gap/message/time/page/pause bounds. `--background` uses ordinary store jobs.