Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
## Testing

---
Reviewed against [the review checklist](https://github.com/leemour/cli-messaging/blob/main/docs/dev/REVIEW.md) — §A for a docs PR, §B for code.
Reviewed against [the review checklist](https://github.com/WireCatLabs/cli-messaging/blob/main/docs/dev/REVIEW.md) — §A for a docs PR, §B for code.
6 changes: 3 additions & 3 deletions .github/workflows/parity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
path: shared
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: leemour/${{ matrix.cli }}-cli
repository: WireCatLabs/${{ matrix.cli }}-cli
path: cli
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
Expand All @@ -57,11 +57,11 @@ jobs:
path: shared
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: leemour/max-cli
repository: WireCatLabs/max-cli
path: max
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: leemour/tg-cli
repository: WireCatLabs/tg-cli
path: tg
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @leemour/cli-messaging

The messenger-neutral half of a messaging command line tool, shared by
[`tg-cli`](https://github.com/leemour/tg-cli) and [`max-cli`](https://github.com/leemour/max-cli).
Built on [`@leemour/cli-core`](https://github.com/leemour/cli-core), a peer dependency: the CLI installs
[`tg-cli`](https://github.com/WireCatLabs/tg-cli) and [`max-cli`](https://github.com/WireCatLabs/max-cli).
Built on [`@leemour/cli-core`](https://github.com/WireCatLabs/cli-core), a peer dependency: the CLI installs
it itself, so the install holds one copy.

**Status: on npm** — what each version changed is in [CHANGELOG.md](CHANGELOG.md). The domain model, message locators, message rendering, name
Expand Down Expand Up @@ -189,7 +189,7 @@ shows it. The token is never printed and never
written to a file.

The GitHub form publishes from the job in the `npm` environment, which is what
npm's trusted publisher names: `leemour` / `cli-messaging` / `release.yml` / environment `npm`.
npm's trusted publisher names: `WireCatLabs` / `cli-messaging` / `release.yml` / environment `npm`.

### How often, and what may break

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Please report a security problem privately, not in a public issue:

- by email: [hello@wirecat.dev](mailto:hello@wirecat.dev);
- or through [GitHub's private vulnerability reporting](https://github.com/leemour/cli-messaging/security/advisories/new).
- or through [GitHub's private vulnerability reporting](https://github.com/WireCatLabs/cli-messaging/security/advisories/new).

Say what you saw, how to repeat it, and which version. Never send a session file, a token or
someone's messages.
Expand Down
4 changes: 2 additions & 2 deletions bin/publish-sqlite
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
# Publishes an empty @leemour/cli-messaging-sqlite@0.0.0 once, so the package exists and npm lets its
# trusted publisher be set (npmjs.com → the package → Settings → Trusted Publisher: GitHub Actions,
# leemour/cli-messaging, workflow sqlite.yml, environment npm). Every version with libraries is
# WireCatLabs/cli-messaging, workflow sqlite.yml, environment npm). Every version with libraries is
# published by that workflow, never from this machine.
#
# bin/publish-sqlite
Expand Down Expand Up @@ -32,7 +32,7 @@ cat > "$work/package.json" <<JSON
"version": "0.0.0",
"description": "Placeholder: the SQLite builds for @leemour/cli-messaging are published from CI",
"license": "MIT",
"repository": { "type": "git", "url": "git+https://github.com/leemour/cli-messaging.git", "directory": "packages/sqlite" }
"repository": { "type": "git", "url": "git+https://github.com/WireCatLabs/cli-messaging.git", "directory": "packages/sqlite" }
}
JSON
(cd "$work" && npm publish --access public --userconfig "$work/.npmrc")
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/CLI-COMPLIANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ measures six representative tasks, not every provider command or every model.

| Consumer | Adopted runtime | Validation |
|---|---|---|
| [MAX PR438](https://github.com/leemour/max-cli/pull/438), [PR441](https://github.com/leemour/max-cli/pull/441) | SDK 0.161.0, core 0.17.2 | 1,473 tests passed, 2 skipped; 92.15% line coverage; matrix 700 tested / 100 justified / 0 missing. |
| [Telegram PR309](https://github.com/leemour/tg-cli/pull/309) | SDK 0.161.0, core 0.17.2 | 1,158 tests passed, 1 skipped; 95.05% line coverage; matrix 2,086 tested / 51 justified / 0 missing. |
| [MAX PR438](https://github.com/WireCatLabs/max-cli/pull/438), [PR441](https://github.com/WireCatLabs/max-cli/pull/441) | SDK 0.161.0, core 0.17.2 | 1,473 tests passed, 2 skipped; 92.15% line coverage; matrix 700 tested / 100 justified / 0 missing. |
| [Telegram PR309](https://github.com/WireCatLabs/tg-cli/pull/309) | SDK 0.161.0, core 0.17.2 | 1,158 tests passed, 1 skipped; 95.05% line coverage; matrix 2,086 tested / 51 justified / 0 missing. |

Both consumer changes passed lint/typecheck, generated references, parity, public docs and
skill/configuration-reference checks. Exact PR-head CI includes Linux, macOS, Windows,
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
their `release` and `test-live` skills share.

**The shared rules are max-cli's** —
[max-cli `docs/dev/CONVENTIONS.md`](https://github.com/leemour/max-cli/blob/main/docs/dev/CONVENTIONS.md):
[max-cli `docs/dev/CONVENTIONS.md`](https://github.com/WireCatLabs/max-cli/blob/main/docs/dev/CONVENTIONS.md):
the linter decides formatting, strict TypeScript with no `any`, sparse comments that say *why*,
core code takes its environment as arguments, one-shot means the process exits, no credential or
message in a log, a test must not prepare what a first run lacks.
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ their pages, their live accounts, and whether the owner signs a report.

A release is reliable when two halves agree: **`pnpm release:check`**, everything a program can
decide, and **the judgement half**, the steps below. The automatic half is
[`@leemour/cli-core/release`](https://github.com/leemour/cli-core#readme). Both CLIs run the same
[`@leemour/cli-core/release`](https://github.com/WireCatLabs/cli-core#readme). Both CLIs run the same
checks from it and add their own.

## What changed
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/STANDARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ remains available through `<cli> commands --json`, with no scoped fields.
1. **Each user page of max has a tg page on the same question**, at the same depth: installing,
using, configuring, security, troubleshooting, diagnostics, groups. max's pages are Russian,
tg's English.
Both follow the docs site's page set (leemour/cli-docs `docs/STRUCTURE.md`): `index.md` is the
Both follow the docs site's page set (WireCatLabs/cli-docs `docs/STRUCTURE.md`): `index.md` is the
site's short start page, `archive.md` the local store, `roadmap.md` what is coming. Pages one tool
has alone, and why:
- max `bot.md` — tg has no bot side yet; its page comes with it (P8).
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Types-only files have no code to count.

A unit test takes milliseconds; one that takes a round second is sleeping in the code under test,
and on a slow CI runner a few of those cross vitest's 5 s limit (max-cli
[`TESTING.md`](https://github.com/leemour/max-cli/blob/main/docs/dev/TESTING.md#no-test-waits-for-real)).
[`TESTING.md`](https://github.com/WireCatLabs/max-cli/blob/main/docs/dev/TESTING.md#no-test-waits-for-real)).
On 2026-09-29 the slowest test here took 57 ms. The waits that exist are reached without sleeping:

- `store fetch --pause` is the pause between pages; a test passes `--pause 1ms`. A short "wait N
Expand Down
4 changes: 2 additions & 2 deletions docs/search/query-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Это справка — третья из четырёх частей документации поиска. Поиск на каждый день и поиск по темам
описаны в каждом CLI: `docs/search.md` и `docs/topic-search.md`
([tg](https://github.com/leemour/tg-cli/blob/main/docs/search.md),
[max](https://github.com/leemour/max-cli/blob/main/docs/search.md)); устройство — на странице
([tg](https://github.com/WireCatLabs/tg-cli/blob/main/docs/search.md),
[max](https://github.com/WireCatLabs/max-cli/blob/main/docs/search.md)); устройство — на странице
[How search works](https://wirecat.dev/en/docs/search-architecture).

Lucene profile v1 доступен через shared services, CLI и MCP; потребителям нужна
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Viacheslav Ptsarev",
"repository": {
"type": "git",
"url": "git+https://github.com/leemour/cli-messaging.git"
"url": "git+https://github.com/WireCatLabs/cli-messaging.git"
},
"type": "module",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/onnx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/leemour/cli-messaging.git",
"url": "git+https://github.com/WireCatLabs/cli-messaging.git",
"directory": "packages/onnx"
},
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/leemour/cli-messaging.git",
"url": "git+https://github.com/WireCatLabs/cli-messaging.git",
"directory": "packages/sqlite"
},
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/parity-audit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const fresh = (): Record<string, string> => {
"main",
"--depth",
"1",
`https://github.com/leemour/${cli}-cli.git`,
`https://github.com/WireCatLabs/${cli}-cli.git`,
into,
])
const env = sandboxEnvironment(auditHome())
Expand Down
2 changes: 1 addition & 1 deletion src/cli/messenger/messages-search-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const messagesSearchCommand = (messenger: Messenger, kind: SearchKind = "
\`${messenger.app.command} store fetch --all --background\` (the last 90 days of every chat); the answer's
coverage says what was searched and coverage.next what would improve it. Mail is \`${messenger.app.command} search mail\`;
everything at once is \`${messenger.app.command} search all\`.
Search guide: https://github.com/leemour/cli-messaging/blob/main/docs/search/query-language.md`,
Search guide: https://github.com/WireCatLabs/cli-messaging/blob/main/docs/search/query-language.md`,
)
.option("--regex", "the words are one regular expression, case-insensitive, tested against every stored text")
.option("--saved <name|id>", "run a saved search or an earlier run; options typed here replace its own")
Expand Down
2 changes: 1 addition & 1 deletion src/cli/messenger/messages-stats-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const messagesStatsCommand = (messenger: Messenger): Command =>
)
.addHelpText(
"after",
"Search guide: https://github.com/leemour/cli-messaging/blob/main/docs/search/query-language.md",
"Search guide: https://github.com/WireCatLabs/cli-messaging/blob/main/docs/search/query-language.md",
)
.action(async function (this: Command, words: string[]) {
const context = messengerContext(this, messenger)
Expand Down
2 changes: 1 addition & 1 deletion src/mcp/tools/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { chatOf, limit } from "../tool.js"
const EXACT = "bare words and quotes match their exact form only, as exact:word does; not with an AST"

export const MESSAGES_SEARCH_DESCRIPTION =
"Search the local store, and the messenger's server where it can search, using the Lucene 9.12.3 profile, default AND, with strict Boolean matching. Legacy discovery is explicit with language=legacy. Text or a versioned AST, account-scoped filters, calendar timezone, term/body regex and candidate presets use one service. Empty hits still report archive coverage. `saved` runs a saved search (searches_list) or an earlier run (searches_history). With sync_first, first fetch new messages within max_chats (5), sync_time (30s), max_messages (500), under messages.sync-first permission. A failed or bounded refresh keeps local results with stale coverage and refreshed details. thread=true attaches each hit's bounded parent/reply graph, with provenance and stale-edge labels; thread_hops, thread_messages, thread_bytes, thread_within set its separate bounds. Guide: https://github.com/leemour/cli-messaging/blob/main/docs/search/query-language.md. Text words and quoted phrases match every form of their words (Snowball stems, exact forms ranked first, query.stemming says how); exact:word, or exact=true, matches the exact form only. Where the messenger's server can search, it is also asked by default (backend=both; archive for the local store only) within server_time (5s), under messages.server-search: its hits are saved and re-checked by the same strict query, each hit says its source (archive, server, both), and server says what the server step did. coverage says what the archive held: messages and chats searched, chats never fetched or behind, up to ten attention chats, and next — the command that would improve the answer; when next is set and nothing was found, run it (or ask the owner) before concluding the message does not exist. Returns { items, page, limit, hasMore, corrections, completeness, wordsReady, stemsReady, query, coverage, server? }."
"Search the local store, and the messenger's server where it can search, using the Lucene 9.12.3 profile, default AND, with strict Boolean matching. Legacy discovery is explicit with language=legacy. Text or a versioned AST, account-scoped filters, calendar timezone, term/body regex and candidate presets use one service. Empty hits still report archive coverage. `saved` runs a saved search (searches_list) or an earlier run (searches_history). With sync_first, first fetch new messages within max_chats (5), sync_time (30s), max_messages (500), under messages.sync-first permission. A failed or bounded refresh keeps local results with stale coverage and refreshed details. thread=true attaches each hit's bounded parent/reply graph, with provenance and stale-edge labels; thread_hops, thread_messages, thread_bytes, thread_within set its separate bounds. Guide: https://github.com/WireCatLabs/cli-messaging/blob/main/docs/search/query-language.md. Text words and quoted phrases match every form of their words (Snowball stems, exact forms ranked first, query.stemming says how); exact:word, or exact=true, matches the exact form only. Where the messenger's server can search, it is also asked by default (backend=both; archive for the local store only) within server_time (5s), under messages.server-search: its hits are saved and re-checked by the same strict query, each hit says its source (archive, server, both), and server says what the server step did. coverage says what the archive held: messages and chats searched, chats never fetched or behind, up to ten attention chats, and next — the command that would improve the answer; when next is set and nothing was found, run it (or ask the owner) before concluding the message does not exist. Returns { items, page, limit, hasMore, corrections, completeness, wordsReady, stemsReady, query, coverage, server? }."

const backendInputs = {
backend: v.optional(
Expand Down
2 changes: 1 addition & 1 deletion src/search/lucene/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function queryError(reason: string, span: Span, alternative?: string): ne
reason,
span,
...(alternative ? { alternative } : {}),
guide: "https://github.com/leemour/cli-messaging/blob/main/docs/search/query-language.md",
guide: "https://github.com/WireCatLabs/cli-messaging/blob/main/docs/search/query-language.md",
},
)
}
Expand Down
Loading