Repository navigation
feat: one cli-core without an override, Telegram's deletion rule and skill on the Messenger, the contract cases - #212
Merged
Merged
Conversation
…skill on the Messenger - cli-messaging 0.98.0 takes @leemour/cli-core as a peer (>=0.13.0 <0.16.0), and tg's 0.15.0 pin fits it, so the pnpm override that forced one copy goes. `pnpm why @leemour/cli-core` finds one version, and `tg commands --json` is byte-for-byte main's. - TELEGRAM.deletedWithoutChat carries the rule the store applied for Telegram by name: a deletion without its chat lands only in chats whose ids count per account. The store's own tests for it are ported here and run with the predicate. - TELEGRAM.skill names skills/tg-cli/SKILL.md, so `tg mcp` serves it as tg://skill; `tg skill` takes the same URL. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A seeded client stands in for mtcute's TelegramClient: it holds the contract seed with Telegram's id shapes (a one-to-one chat's id is the person's, a supergroup's starts -100), keeps what is sent, drops a repeated random_id, and pages with mtcute's own getHistory logic over Telegram's messages.getHistory offsets. 22 cases pass; `feed` is skipped, because tg's adapter has no PushedHistory. The suite found one gap: `contact` left out the one-to-one chat, since Telegram's common chats are groups only. It is now among them, newest first like the rest. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leemour
force-pushed
the
feat/cli-messaging-0.98
branch
from
October 1, 2026 21:55
ba73dad to
d368acf
Compare
leemour
added a commit
that referenced
this pull request
Oct 1, 2026
…ts, the shared bot commands (#215) The weekly breaking release. TELEGRAM_CAPABILITIES and its Capabilities import go: the type is gone from cli-messaging (#372); the adapter already has the four ServerReads methods, and deletedWithoutChat was set in #212. - messages search: words, best match first, the query language, --newest, --context and --source (in:max / in:all). A test drives the three options; docs/archive.md's search section says what they do. - models text list|download and the shared bot watch / callbacks / commands / webhooks come with it. The bot ones refuse ("a Telegram bot cannot …") until tg's adapter has them, in the next P8 PR; their options are in the test matrix's untested list with that reason. - pnpm-workspace.yaml: 0.99.0 and @leemour/cli-messaging-onnx@1.0.0 (a new dependency) skip the minimum release age. - docs/commands.md and docs/dev/test-matrix.md regenerated. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
Plan items 3 and 10 of cli-messaging's "port for N messengers" plan, and one copy of cli-core without the pnpm override. #211 merged the cli-messaging 0.98.0 bump while this PR was being built, so this PR is rebased onto #211 and no longer bumps anything.
Why
@leemour/cli-coreas a peer dependency (>=0.13.0 <0.16.0). With that, the override that forced one copy is no longer needed.Messenger, so the breaking release can remove the Telegram branch from the store.<cli>://skillonly when theMessengernames it.What
overridesentry for cli-core is removed. tg's 0.15.0 pin (from fix(docs): commands that change only this computer get their own label #211) is inside the peer range, andpnpm why @leemour/cli-corefinds one version.tg commands --jsonis byte-for-byte the same as main's, including all 56mutates: truemarks and the 12localmarks.TELEGRAM.deletedWithoutChat: the predicate is the same rule the store applies today. The store's two tests for that rule are ported tosrc/commands/context.test.tsand run with the predicate. A table covers channel, gigagroup, monoforum, a chat stored by its id alone, and Saved Messages.TELEGRAM.skill=new URL("../../skills/tg-cli/SKILL.md", import.meta.url), exported asSKILL;tg skilluses the same constant. The file resolves fromdist/commands/context.js(checked afterpnpm build).src/telegram/adapter.contract.test.tsrunscontractCasesoverTelegramAdapter. A seeded stand-in for mtcute'sTelegramClientholds the seed with Telegram's id shapes: a one-to-one chat's id is the person's, and a supergroup's starts with-100. It keeps what is sent and drops a repeatedrandom_id. It pages with mtcute's owngetHistorylogic over Telegram'smessages.getHistoryoffsets. 22 pass, 1 skipped:feed, because tg has noPushedHistory.contactleft out the one-to-one chat, because Telegram's common chats are groups only. That chat is now in the list, newest first with the rest. The changelog has it under Fixed.Testing
pnpm lint && pnpm typecheck && pnpm test: 439 passed, 1 skipped.pnpm test:matrix,pnpm docs:check,pnpm parity:check,pnpm smoke:bun,pnpm version:checkandpnpm install --frozen-lockfileall pass.docs/commands.mdregenerates unchanged.+ 1inaround's offset makes thearoundcase fail.🤖 Generated with Claude Code