Commit Graph

411 Commits

Author SHA1 Message Date
Peter Steinberger
455723375e fix: show directive options on query 2026-01-09 01:40:44 +01:00
Peter Steinberger
27adabbeea test: cover reasoning directive spacing (thanks @joshp123) (#539) 2026-01-09 00:51:05 +01:00
Peter Steinberger
f666f60731 fix: preserve inline directive spacing tests (thanks @joshp123) (#539) 2026-01-09 00:37:40 +01:00
Josh Palmer
43545a4864 🤖 codex: preserve spacing after inline directives (issue-telegram-inline-spacing) 2026-01-09 00:37:40 +01:00
Peter Steinberger
a33271d374 refactor: share paren-aware chunk break scan 2026-01-08 23:09:34 +01:00
Peter Steinberger
b48ed56635 test: add DM elevated regression coverage 2026-01-08 22:58:15 +01:00
Peter Steinberger
014667e00b fix: tighten group elevated targeting 2026-01-08 22:57:18 +01:00
Peter Steinberger
4a918ccf47 fix: avoid splitting outbound chunks inside parentheses (#499) — thanks @philipp-spiess 2026-01-08 20:39:28 +01:00
Philipp Spiess
4082b90aa4 Chunking: avoid splits inside parentheses 2026-01-08 20:38:00 +01:00
Peter Steinberger
ba19173b96 test: cover status model provider prefix 2026-01-08 20:23:38 +01:00
Keith the Silly Goose
7866203c5c fix(status): include provider prefix in model display
The /status command was showing 'anthropic/claude-sonnet-4-5' even when
using 'google-antigravity/claude-sonnet-4-5' because buildStatusMessage
received only the model name without the provider prefix.

When resolveConfiguredModelRef parsed a model string without a slash,
it fell back to DEFAULT_PROVIDER ('anthropic'), causing the misleading
display.

Fix: Pass the full 'provider/model' string to buildStatusMessage so
the provider is correctly extracted and displayed.

🪿 Investigated and submitted by Keith the Silly Goose
2026-01-08 20:11:37 +01:00
Josh Palmer
cc94db458c 🤖 codex: fix block reply ordering (#503)
What: serialize block reply sends, make typing non-blocking, add timeout fallback + abort-aware routing, and add regression tests.
Why: prevent out-of-order streamed blocks while keeping final fallback on timeouts.
Tests: ./node_modules/.bin/vitest run src/auto-reply/reply.block-streaming.test.ts src/auto-reply/reply/route-reply.test.ts
Tests: corepack pnpm lint && corepack pnpm build (pass). corepack pnpm test (ran locally; failure observed during run).

Co-authored-by: Josh Palmer <joshp123@users.noreply.github.com>
2026-01-08 19:30:24 +01:00
Peter Steinberger
bce3cc992f fix: group /model list output 2026-01-08 09:44:59 +01:00
Peter Steinberger
8930ec32cb feat: add slack multi-account routing 2026-01-08 08:49:16 +01:00
Peter Steinberger
00c1403f5c fix: unblock ci 2026-01-08 07:41:39 +00:00
Peter Steinberger
d1ceb3aa60 feat: add logs cli and restart hints 2026-01-08 06:56:34 +00:00
Peter Steinberger
6a81652ebf fix(typing): keep tool-start ttl mode-safe (#452, thanks @thesash) 2026-01-08 06:18:35 +00:00
Sash Catanzarite
29c5ed54b2 feat(typing): trigger indicator on tool start events
Add signalToolStart to TypingSignaler and call it from onAgentEvent
when tools begin executing. This keeps the typing indicator visible
during long-running tool operations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 06:18:35 +00:00
Sash Catanzarite
a6a550032a fix(typing): refresh TTL on every startTypingLoop call
Previously, startTypingLoop would return early if the typing timer was
already running, which meant the TTL would never get refreshed during
long tool executions. This caused the typing indicator to stop after
2 minutes even if tools were still running.

Now we refresh the TTL at the start of startTypingLoop, before the
early-return checks. This keeps typing alive during long operations.
2026-01-08 05:45:46 +01:00
Peter Steinberger
dc3e3f27d4 style: apply lint fixes 2026-01-08 04:44:15 +00:00
Peter Steinberger
5b45a143a1 fix: stabilize media paths and logs 2026-01-08 04:41:01 +00:00
Peter Steinberger
9c9d191d6f feat: improve cli setup flow 2026-01-08 05:33:54 +01:00
Peter Steinberger
4ef2fd328d test: cover multi-media prompt note 2026-01-08 05:30:04 +01:00
Peter Steinberger
ab8db941d0 feat: expand inbound media notes 2026-01-08 05:20:39 +01:00
Peter Steinberger
15379dedf0 fix(telegram): voice-note tag defaults (#188, thanks @manmal) 2026-01-08 03:15:08 +00:00
Manuel Maly
2972fce02c fix: flip audio default to file (backward compat)
- Default: sendAudio (file with metadata) - preserves old behavior
- Opt-in: [[audio_as_voice]] tag for voice bubble

This is non-breaking - existing integrations keep working.
2026-01-08 03:15:08 +00:00
Manuel Maly
262f8a8d45 feat(telegram): add [[audio_as_file]] tag support
Allow agents to specify audio mode via inline tag:
- Default: voice bubble (sendVoice)
- [[audio_as_file]]: audio file with metadata (sendAudio)

The tag is stripped from the final message text.

Example agent response:
  Here's a podcast episode! [[audio_as_file]]
  MEDIA:https://example.com/episode.mp3
2026-01-08 03:15:08 +00:00
Manuel Maly
5e1b91b32c feat(telegram): wire audioAsVoice through bot.ts
- Add audioAsVoice option to ReplyPayload type
- Update bot.ts to use sendVoice by default for audio (voice bubble)
- When audioAsVoice is false, use sendAudio (file with metadata)

This allows agents to control voice vs file mode via ReplyPayload.
2026-01-08 03:15:08 +00:00
Peter Steinberger
6e4174b5dc fix(ci): stabilize windows paths 2026-01-08 03:03:03 +00:00
Peter Steinberger
8aa3efb9e8 refactor: tidy directive parsing + queue status 2026-01-08 03:47:52 +01:00
Peter Steinberger
fbeb9e6775 fix(ci): stabilize windows tests 2026-01-08 02:44:19 +00:00
Peter Steinberger
780385e31f fix(auto-reply): handle /think no-arg 2026-01-08 03:39:05 +01:00
Peter Steinberger
ad5c87c193 fix: relax slash command parsing 2026-01-08 03:24:18 +01:00
Lutro
36b443f4f3 Telegram: fix /think command to show current level when no arg 2026-01-08 03:24:18 +01:00
Peter Steinberger
a450390f7c refactor: share reply payload threading/dedupe 2026-01-08 01:09:23 +00:00
Peter Steinberger
05b8679c8b feat: add providers CLI and multi-account onboarding 2026-01-08 01:55:59 +01:00
Peter Steinberger
17d052bcda fix: polish reply threading + tool dedupe (thanks @mneves75) (#326) 2026-01-08 00:50:47 +00:00
mneves75
33e2d53be3 feat(telegram): wire replyToMode config, add forum topic support, fix messaging tool duplicates
Changes:
- Default replyToMode from "off" to "first" for better threading UX
- Add messageThreadId and replyToMessageId params for forum topic support
- Add messaging tool duplicate detection to suppress redundant block replies
- Add sendMessage action to telegram tool schema
- Add @grammyjs/types devDependency for proper TypeScript typing
- Remove @ts-nocheck and fix all type errors in send.ts
- Add comprehensive docs/telegram.md documentation
- Add PR-326-REVIEW.md with John Carmack-level code review

Test coverage:
- normalizeTextForComparison: 5 cases
- isMessagingToolDuplicate: 7 cases
- sendMessageTelegram thread params: 5 cases
- handleTelegramAction sendMessage: 4 cases
- Forum topic isolation: 4 cases

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:50:47 +00:00
Peter Steinberger
b2de667b11 fix: persist topic session files 2026-01-07 22:56:50 +00:00
hsrvc
8da4f259dd Implement Phase 2: Topic-level message history isolation for multi-topic Telegram support
Add topic-specific session file isolation to fix root cause of Gemini turn validation errors.
Each Telegram topic now maintains its own conversation history file, eliminating race
conditions and message corruption during concurrent topic processing.

Changes:
1. Enhanced resolveSessionTranscriptPath() to support optional topicId parameter
   - Topic ID (Telegram messageThreadId) now incorporated into session filename
   - Format: sessionId.jsonl (direct chats) vs sessionId-topic-{topicId}.jsonl (topics)
   - Backward compatible: topicId is optional

2. Updated reply.ts to pass MessageThreadId to session file resolution
   - ctx.MessageThreadId now flows through to resolveSessionTranscriptPath()
   - Automatically provides topic context for each incoming message

3. Automatic propagation through entire system
   - sessionFile parameter automatically carries topic-specific path through:
     - FollowupRun object (queued runs)
     - runEmbeddedPiAgent() calls
     - compactEmbeddedPiSession() calls
     - SessionManager lifecycle (load, read, write operations)

Benefits:
✓ Complete elimination of shared .jsonl race conditions
✓ Each topic's conversation history independently cached
✓ SessionManager instances operate on isolated files
✓ No concurrent mutations of the same message history
✓ Maintains full Phase 1 turn validation as safety layer

Testing:
✓ Build succeeds with no TypeScript errors
✓ Backward compatible with non-topic sessions (direct messages)
✓ Topic ID properly extracted from Telegram messageThreadId

Expected impact:
- Gemini "function call turn" errors eliminated (root cause fixed)
- Message history corruption prevented across all topics
- Improved stability in multi-topic scenarios
- Each topic maintains independent conversation state

This completes the two-phase fix:
- Phase 1 (previous): Turn validation to suppress errors
- Phase 2 (current): Topic isolation to fix root cause

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-07 22:51:26 +00:00
Peter Steinberger
434c25331e refactor: centralize typing mode signals 2026-01-07 22:18:11 +00:00
Peter Steinberger
bac1608933 feat: add typing mode controls 2026-01-07 21:58:54 +00:00
Peter Steinberger
7ce1f635cd fix(commands): harden model alias parsing 2026-01-07 20:41:41 +00:00
Azade
bb29a3ee3f fix: filter reserved commands from model aliases + add tests 2026-01-07 20:41:41 +00:00
Azade
e41540e4ff feat(commands): add dynamic /<alias> model switching 2026-01-07 20:41:41 +00:00
Peter Steinberger
cb9f8146c4 refactor: centralize thread helpers 2026-01-07 20:01:19 +01:00
Peter Steinberger
8584bcd2f6 Merge remote-tracking branch 'origin/main' 2026-01-07 19:44:26 +01:00
Peter Steinberger
0d021391a9 fix: scope thread sessions and discord starter fetch 2026-01-07 19:42:50 +01:00
Peter Steinberger
aba4695cd1 test(status): cover model override display 2026-01-07 18:38:55 +00:00
Azade
2b09cb3d9f fix(status): show configured model instead of last-run model 2026-01-07 18:37:42 +00:00