Commit Graph

88 Commits

Author SHA1 Message Date
Peter Steinberger
fdbfa1bffc refactor: finish database-first state migration 2026-05-10 06:04:32 +01:00
Peter Steinberger
b707ab10a4 refactor: simplify session store loads 2026-05-10 06:04:28 +01:00
Brandon Zarnitz
86b53aa2ca fix(telegram): suppress silent-reply rewrite in DM no-response turns (#78188)
When a Telegram turn ends with no visible final response, the dispatcher synthesized a NO_REPLY payload that silent-reply rewrite could turn into visible DM chatter such as "All quiet on my side."

Gate that synthesized fallback on group chats. DMs with no queued final response now stay quiet, while group/forum fallback behavior remains available when policy asks for a visible rewrite.

Tests:
- pnpm test extensions/telegram/src/bot-message-dispatch.test.ts
- pnpm check:changed
2026-05-10 09:56:00 +05:30
Ayaan Zaidi
6bf9185d27 fix(telegram): gate media dedup on visible delivery 2026-05-10 08:47:04 +05:30
Roger Deng
22e564da4b fix(telegram): track block media only after successful delivery
Move sentBlockMediaUrls recording from before sends to after successful
delivery completion. If a block send throws, the URL is not recorded,
so final fallback delivery retains the media attachment instead of
incorrectly deduplicating it.

Add regression tests for both success-path dedup and failure-path
media preservation.

Addresses ClawSweeper P2: block-failure → final-media-loss.
2026-05-10 08:47:04 +05:30
Roger Deng
8ff38c0988 fix(telegram): deduplicate MEDIA attachments in non-streaming mode
Non-streaming Telegram delivers each MEDIA: attachment twice — once
from the media-only block reply and once from the final reply. Track
media URLs sent via block replies and filter duplicates from final
replies.

Closes #78372
2026-05-10 08:47:04 +05:30
Ayaan Zaidi
1367ec7461 fix(telegram): use partial stream deltas 2026-05-10 08:29:19 +05:30
Andy Ye
512a26c29b fix telegram partial progress coalescing 2026-05-10 08:29:19 +05:30
Andy Ye
0a4ef37f65 fix telegram partial draft fragments 2026-05-10 08:29:19 +05:30
Andrew Cunliffe
048ca8c765 fix(telegram): suppress 'no extra answer' placeholder when reply is in flight (#78929) 2026-05-10 08:28:31 +05:30
Alexis Dagues
d44aeb6901 fix(telegram): mirror outbound replies to session transcript
Telegram's deliverReplies dispatches via Grammy SDK directly, bypassing
deliverOutboundPayloads where the channel-mirror writer runs. Outbound
assistant replies were never appended to the session transcript, leaving
Telegram .jsonl files empty (the sessions.json sessionFile path was
populated but the file was never created on disk).

Add an optional transcriptMirror callback param to deliverReplies and
populate it from bot-message-dispatch's deliveryBaseOptions. Reuses the
existing appendAssistantMessageToSessionTranscript helper that
deliverOutboundPayloads already calls. Also mirrors preview-finalized
replies so the transcript captures all final assistant output.

Plugin SDK boundary expansion: re-export
appendAssistantMessageToSessionTranscript from
plugin-sdk/agent-harness-runtime so extension code can call it without
reaching into core src/. API baseline regenerated.

Addresses openclaw#75991 for telegram + CLI runtime combinations.
Supersedes openclaw#77484 (incorporates reviewer feedback: preview-
finalized mirror + changelog entry).
2026-05-09 20:20:25 +05:30
Ayaan Zaidi
10bbed8a6d fix(telegram): chain over-limit stream previews 2026-05-08 18:41:49 +05:30
Super Zheng
e7277b4e3a refactor(agents): preserve raw reasoning stream and push formatting to edge (#78397)
Merged via squash.

Prepared head SHA: bb56f7ee00
Co-authored-by: medns <1575008+medns@users.noreply.github.com>
Co-authored-by: odysseus0 <8635094+odysseus0@users.noreply.github.com>
Reviewed-by: @odysseus0
2026-05-08 06:08:21 -07:00
Ayaan Zaidi
30e079dd89 fix(channels): honor reasoning defaults in previews (#71817) (thanks @anagnorisis2peripeteia) 2026-05-08 18:32:04 +05:30
Neerav Makwana
447182a852 fix(telegram): avoid fallback after message tool send (#78726) (thanks @neeravmakwana)
* telegram: correlate message-tool sends with inbound turn (#78685)

Register the active Telegram inbound SessionKey/outbound peer while dispatching,
and mark inbound lane delivery when deliverOutbound emits a matching telegram
message:sent success. Prevents rewritten silent-reply fillers after visible
tool-routed replies with an empty final.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(telegram): track message action delivery

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-05-07 09:09:36 +05:30
keshavbotagent
3f210b10ce fix: show Codex tool progress in channel drafts (#77949)
Summary:
- Normalize Codex app-server dynamic and native tool activity into channel-visible tool progress.
- Keep Telegram message-tool-only progress drafts visible without duplicate dynamic item/tool lines.
- Preserve suppressed item progress while avoiding duplicate tool callbacks.

Verification:
- OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/codex/src/app-server/event-projector.test.ts extensions/codex/src/app-server/run-attempt.test.ts extensions/telegram/src/bot-message-dispatch.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/dispatch-from-config.test.ts --pool=forks --maxWorkers=1
- pnpm tsgo:extensions:test
- pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/codex/src/app-server/event-projector.ts extensions/codex/src/app-server/event-projector.test.ts extensions/codex/src/app-server/run-attempt.ts extensions/codex/src/app-server/run-attempt.test.ts extensions/codex/src/app-server/tool-progress-normalization.ts extensions/telegram/src/bot-message-dispatch.ts extensions/telegram/src/bot-message-dispatch.test.ts src/auto-reply/get-reply-options.types.ts src/auto-reply/reply/agent-runner-execution.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/dispatch-from-config.ts src/auto-reply/reply/dispatch-from-config.test.ts src/infra/agent-events.ts
- pnpm lint:extensions
- pnpm build
- CI on 6ff6a1f868: 88 success, 20 skipped, 1 neutral, no failures or pending checks

Fixes #75641.
2026-05-06 08:18:20 +01:00
Ayaan Zaidi
814b125f11 fix(telegram): separate progress drafts from final replies 2026-05-06 09:27:08 +05:30
Ayaan Zaidi
bca16d0f00 fix(telegram): finalize streamed text in place 2026-05-06 09:27:08 +05:30
Peter Steinberger
05eda57b3c refactor: migrate bundled plugins to message lifecycle 2026-05-06 01:46:42 +01:00
Vincent Koc
1470b439e2 fix(telegram): rotate previews after visible tool output 2026-05-05 16:12:13 -07:00
Vincent Koc
e03fe1e289 fix(telegram): reuse preview for long text finals (#77658)
* fix(telegram): reuse preview for long text finals

* test(qa): cover long telegram finals

* fix(qa): satisfy extension lint

* fix(qa): keep telegram long final fixture to two chunks

* test(telegram): cover three chunk finals

* fix(telegram): force long final preview boundary
2026-05-04 21:19:44 -07:00
Val Alexander
042d7b8823 fix(telegram): clean up tool-only previews 2026-05-04 08:55:41 -05:00
Peter Steinberger
fa689295c6 fix: resolve small triage issues 2026-05-04 07:38:42 +01:00
Vincent Koc
51e847fb96 fix(telegram): preserve safe progress previews 2026-05-03 23:10:08 -07:00
Val Alexander
21ac476904 fix(telegram): stabilize reply dispatch runtime
Summary:
- Add a stable provider-dispatcher dist entry and legacy alias coverage for stale reply-dispatch chunks.
- Make Telegram reasoning stream previews transient after final delivery and harden visible-send reasoning sanitization.
- Document transient /reasoning stream behavior and credit @BunsDev in the changelog.

Verification:
- pnpm test src/agents/tools/message-tool.test.ts src/infra/tsdown-config.test.ts test/scripts/runtime-postbuild.test.ts extensions/telegram/src/bot-message-dispatch.test.ts src/plugin-sdk/channel-streaming.test.ts src/plugin-sdk/channel-entry-contract.test.ts
- OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/channels/plugins/module-loader.test.ts src/plugin-sdk/channel-entry-contract.test.ts
- pnpm exec oxfmt --check --threads=1 <changed files>
- git diff --check
- pnpm build
- GitHub PR checks for b8b7a91834
2026-05-04 01:07:57 -05:00
Vincent Koc
c979ed3a3a fix(channels): pass raw progress detail to drafts 2026-05-03 18:43:11 -07:00
Peter Steinberger
36c047c026 fix(channels): unify progress draft line formatting 2026-05-04 00:50:09 +01:00
Peter Steinberger
392897304c fix(channels): delay progress drafts until work is visible 2026-05-04 00:22:13 +01:00
Peter Steinberger
c33e578554 feat: add channel progress drafts
Adds unified progress-draft streaming for chat channels, with docs and per-channel regressions.
2026-05-03 22:01:08 +01:00
Peter Steinberger
5330cbb25d refactor(telegram): clarify reply supersession fence 2026-05-03 17:25:58 +01:00
Peter Steinberger
2696baba81 fix(telegram): suppress superseded turn replies 2026-05-03 17:25:58 +01:00
chinar-amrutkar
463493aa28 fix(telegram): suppress stale replies when dispatch is superseded
When a newer inbound message arrives while an older dispatch is still
processing, buffered final answers from the old dispatch could be
delivered into the new message's thread.

Add `bufferedGeneration` to `BufferedFinalAnswer` to track which
abort fence generation buffered the answer. `takeBufferedFinalAnswer`
now rejects buffered answers whose generation doesn't match the
current dispatch's generation, preventing stale content delivery.

Fixes #76642
2026-05-03 17:25:58 +01:00
Ayaan Zaidi
5130622750 fix(telegram): require observed final delivery 2026-05-03 21:31:56 +05:30
jack-stormentswe
2b38345c8a fix(telegram): force fresh final after visible intermediate output (#76529) 2026-05-03 16:53:06 +01:00
Tyler Nishida
796c1e67c3 fix message-tool-only telegram fallback (#76272) 2026-05-03 23:15:53 +09:00
Peter Steinberger
e65b490f11 fix(telegram): stream plain reply drafts 2026-05-02 04:51:46 +01:00
Ayaan Zaidi
2a4dd89253 fix(telegram): remove native draft preview transport 2026-04-30 18:07:57 +05:30
Peter Steinberger
ffe67e9cdc refactor(channels): route inbound turns through kernel 2026-04-30 04:08:47 +01:00
Peter Steinberger
02ebac6250 refactor(channels): share turn dispatch results 2026-04-30 02:58:40 +01:00
Peter Steinberger
9a9cd0c0ab refactor(channels): add shared turn kernel 2026-04-29 23:16:16 +01:00
Peter Steinberger
cb8c513ce3 fix(telegram): honor final-only streaming mode 2026-04-28 20:28:06 +01:00
Peter Steinberger
4336a7f3a9 refactor(plugin-sdk): narrow config runtime imports 2026-04-27 14:58:32 +01:00
Rubén Cuevas
a08b65a90a fix(telegram): send fresh finals for stale previews (#72038)
* fix(telegram): send fresh finals for stale previews

* test(telegram): cover stale preview send fallback

* fix(telegram): keep stale archived preview fallback

* fix(telegram): clear stale active previews

* fix(telegram): reset preview state after fresh finals
2026-04-26 15:44:30 -07:00
VACInc
78c7292c95 fix: keep telegram tool progress without preview (#71825) (thanks @VACInc)
* fix(telegram): keep default tool progress without preview

* fix: keep telegram tool progress without preview (#71825) (thanks @VACInc)

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-26 11:11:18 +05:30
Peter Steinberger
257e767e5b fix(telegram): include native quote excerpts for replies 2026-04-26 06:32:46 +01:00
Rubén Cuevas
f9146cabfc fix(telegram): preserve native quote replies
Preserve exact Telegram selected quote text for native quote replies, share Telegram reply parameter construction between bot delivery and direct outbound sends, and retry with legacy replies when Telegram rejects native quote parameters.\n\nThanks @rubencu.
2026-04-26 06:09:43 +01:00
Jamil Zakirov
52267a6b75 fix(auto-reply): run message_sending before inbound delivery
Run inbound auto-reply delivery through message_sending hooks before sending replies.

Co-authored-by: Jamil Zakirov <15848838+jzakirov@users.noreply.github.com>
2026-04-25 10:07:35 +05:30
Peter Steinberger
70fd1c91aa fix(channels): harden tool progress previews 2026-04-25 04:54:29 +01:00
Peter Steinberger
f29e15c05d fix(telegram): bound tool progress preview formatting
Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
2026-04-25 03:19:01 +01:00
Neerav Makwana
e54a37a91e fix(telegram): harden progress preview rendering 2026-04-25 03:19:01 +01:00