Repository navigation
Conversation
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.
Motivation
The existing herdr/directory-based topic titles identify where a session runs, but not what the conversation is about. Auto-generated omp titles and local session renames can therefore leave Telegram topics indistinguishable or stale. This makes it harder to find the right session without opening each topic.
Behavior
pi.getSessionName(), with the existing herdr agent name → space label → directory fallback when the session is unnamed.agent_end, and through an unref'd 30-second comparison. Unchanged names do not call Telegram.TOPIC_NOT_MODIFIEDis treated as success; failures warn once per failed name and retry on a subsequent check. Live collisions retain the existing-pidsuffix convention within the display cap./telegram topics names session|space, alongsidetopics tidy, persisted astopicsNamesand defaulting tosession. Switching tospacerestores each owned topic's 0.14.0 herdr agent → space label → folder-derived name once at the next check. After restoration there are no more topic edits or name-sync interval work in space mode. A settings-file watcher lets all live owning sessions react to switches, including returning tosession, without restarting. Current mode appears in topics status andtopics names [status]. No naming key remains in the generic/telegram setschema./rename <name>for the paired owner's private session topic. It callspi.setSessionName, never submits an agent prompt, and collapses whitespace without capping the stored session name. Bare/renameshows the current name and usage; control/unowned topics show usage only, and non-owners cannot rename sessions. The command accepts the@botnamesuffix./renamechanges the omp session in both modes. Inspacemode its reply says the topic keeps the space name and points to/telegram topics names session.Compatibility and default choice
The topic registry format, session/herdr resume identities, topic ownership, and message routing are unchanged. An old standalone daemon still forwards
/renameunchanged to updated live sessions; existing sessions must be exited/resumed locally to load the new extension. A daemon restart is only needed to refresh the menu, help, and control/unowned-topic usage handling.This branch chooses
sessionas the default so the new naming behavior is immediately useful. Upstream may preferspaceas the default for a more conservative rollout; the topics naming command makes that choice explicit.No version bump was made. The repository has no unreleased changelog section or PR template.
Validation
bun install: passed;bun install --frozen-lockfile: passed.bun run check: rerun after the topics naming-command revision — TypeScript typecheck and all 481 tests passed (0 failures)./telegram topics; onlybun run checkwas rerun for that revision as requested.bun run smoke:package: passed with npm 11 supplied usingnpm exec --yes --package=npm@11 -- bun run smoke:package.bun run check:host -- 18.1.16: passed with npm 11; resolved host 18.1.16.bun run check:host -- latest: passed with npm 11; resolved host 18.8.9.TOPIC_NOT_MODIFIED, failure retries, collisions, persisted topics naming modes, one-time space restoration and retry, cross-session settings-file switches without a restart, command validation/status/completions, owner/bare/non-owner/control/unowned/rename, the bot-name suffix, unchanged daemon forwarding, and the real extension session API in both modes.The system npm 12 changes
npm pack --jsonfrom an array to a keyed object, which the existing package smoke runner does not accept. Using npm 11 restored the runner's expected output without changing unrelated upstream scripts.Read-only live evidence
For session
01a12072-d179-760e-95e3-6e3dc9e68e85, registry thread5504254storestg 相关; its last JSONLtitle_changealso recordstg 相关(2026-10-11T00:28:52.904Z). Both match after normalization/capping (5 code points). This is evidence from the previously patched installed bridge, not a deployment of this branch. Nothing under~/.ompwas modified and no live process was restarted.Local commits
dfb7057— Follow omp session names in Telegram topics (including/telegram topics names session|space).ea1ae96— Add owner-only Telegram session rename command.