Repository navigation
feat(tg): tg_* tools read Telegram through the VIBEE app (refs gHashTag/t27#10066) - #21
Merged
Merged
Conversation
… graded by telegram.t27 The owner's session already lives in the VIBEE app (vibee-render, gHashTag/999-multibots-telegraf), which serves its tg_* tools at POST /mcp. telegram.mjs now forwards a read call the wasm accepted there with X-Agent-Key from VIBEE_AGENT_KEY, instead of spawning the tg CLI whose Keychain session was never created. Seven tools under the app's names: tg_unanswered, tg_dialogs, tg_history, tg_search, tg_contacts, tg_participants, tg_scheduled. No send tool; tg_unanswered ends with where sending is. wasm/telegram.wasm and wasm/telegram_table.mjs regenerated from specs/t27mcp/telegram.t27 (gHashTag/t27#10326) on the lab: 9 of 9 tests, 0 vacuous, 9 mutants caught. Refs gHashTag/t27#10066 Co-Authored-By: Claude Opus 5.5 <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.
What
The tg_* tools now read the owner's Telegram account through the owner's VIBEE app instead of the
tgCLI.The app is gHashTag/999-multibots-telegraf, running as the
vibee-renderservice. It already holds the logged-in session and serves its tg_* tools atPOST /mcp. ThetgCLI's Keychain session was never created, so the old tools could only answer no session. These tools return data from the first call.There are seven tools, under the app's own names:
tg_unansweredtg_dialogstg_historytg_searchtg_contactstg_participantstg_scheduledThe contract is
specs/t27mcp/telegram.t27, in gHashTag/t27#10326. It is compiled towasm/telegram.wasm(332 B), andwasm/telegram_table.mjsis generated from it.VIBEE_AGENT_KEYunset)/mcpbecomes a draft that no screen can confirm.tg_unansweredends by pointing to the app's bot or mini app, where the owner presses the button on the draft card.Changes
telegram.mjs: the glue, rewritten to forward to the app overfetch, 39 lines. It passes counts and flags to the wasm, never text.wasm/telegram.wasmandwasm/telegram_table.mjsare regenerated.wasm/BUILDrecord is updated.VIBEE_AGENT_KEY,T27_TG_APP) replaceT27_TG.Evidence
Live on the owner's Mac over stdio JSON-RPC:
tools/listlists 26 tools.tg_unanswered {limit: 3}returns data that starts with the FOREIGN DATA line and ends with the line on where sending is.tg_search {query: "t27"}returns 17 KB.tg_history {chat: "bad chat; rm"}is refused with the spec's text.T27_TG_APP=http://127.0.0.1:9/mcpand an unknown username each give their own outcome text.Refs gHashTag/t27#10066
🤖 Generated with Claude Code