Commit Graph

1550 Commits

Author SHA1 Message Date
Peter Steinberger
3964620cd4 fix: stabilize release validation regressions 2026-05-27 10:40:56 +01:00
Peter Steinberger
15582cfe21 fix: restore provider-scoped release discovery 2026-05-27 10:40:55 +01:00
Peter Steinberger
85f3e9e988 refactor: extract shared llm runtime
Move provider model registries, stream wrappers, OAuth helpers, and LLM utilities into src/llm with plugin-sdk barrels instead of depending on the old embedded runtime layout.
2026-05-27 10:40:15 +01:00
Peter Steinberger
1507a9701b refactor: centralize inbound supplemental context
* refactor: centralize inbound supplemental context

* refactor: trim supplemental finalizer typing

* docs: clarify supplemental context projection

* refactor: move inbound finalization into core

* refactor: simplify channel inbound facts

* refactor: fold supplemental media into inbound finalizer

* refactor: migrate channel inbound callers to builder

* docs: mark inbound finalizer compat types deprecated

* refactor: wire runtime turn context builder

* refactor: replace channel turn runtime API

* fix: respect discord quote visibility

* fix: avoid deprecated line dispatch helper

* refactor: deprecate channel message SDK seams

* docs: trim channel outbound SDK page

* test: migrate irc inbound assertion

* refactor: deprecate outbound SDK facades

* refactor: deprecate channel helper SDK facades

* refactor: deprecate channel streaming SDK facade

* refactor: move direct dm helpers into inbound SDK

* chore: mark legacy test-utils SDK alias deprecated

* refactor: remove unused allow-from read helper

* refactor: route remaining channel dispatch through core

* refactor: enforce modern extension SDK imports

* test: give slow image root tests more time

* ci: support node fallback on windows

* fix: add transcripts tool display metadata

* refactor: trim legacy channel test seams

* fix: preserve channel compat after rebase

* fix: keep deprecated channel inbound aliases

* fix: preserve discord thread context visibility

* fix: clean final rebase conflicts

* fix: preserve channel message dispatch aliases

* fix: sync channel refactor after rebase

* fix: sync channel refactor after latest main

* fix: dedupe memory-core subagent mock

* test: align clickclack inbound dispatch assertions

* fix: sync plugin sdk api hash after rebase

* fix: sync channel refactor after latest main

* fix: sync plugin sdk api hash after rebase

* fix: sync plugin sdk api hash after latest main

* test: remove stale inbound context awaits
2026-05-27 09:26:06 +01:00
Pablo Guardiola
0c867eef75 feat: expose plugin approval action metadata
Expose plugin approval action metadata so plugins can describe richer approval actions across gateway, SDK, channel, and UI surfaces.
2026-05-26 22:46:09 -07:00
Peter Steinberger
b9f6abf5e8 fix: bind plugin command llm auth to host agent 2026-05-27 06:38:35 +01:00
Peter Steinberger
acbb06e266 test: harden e2e harness isolation 2026-05-26 23:20:42 -04:00
Josh Lehman
9119492f15 fix: preserve plugin LLM command auth (#85936)
Merged via squash.

Prepared head SHA: e61c724708
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-05-26 22:41:52 -04:00
Peter Steinberger
df659d124d refactor(telegram): encode conversation binding mode 2026-05-27 03:26:31 +01:00
kesslerio
b8ea6d2aee fix(telegram): route plugin-bound topic messages 2026-05-27 02:52:25 +01:00
吴杨帆
77505daa85 fix(telegram): preserve command slots for aliases (#85270)
* fix(telegram): preserve command slots for aliases

* fix: report Telegram alias command overflow

* fix: preserve Telegram alias menu order

* docs: drop release-owned changelog entry

---------

Co-authored-by: wuyangfan <yangfan.wu@succaiss.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-26 22:24:03 +01:00
Peter Steinberger
80655fe955 test: fix current suite drift 2026-05-26 16:40:08 -04:00
Keshav's Bot
0afccc62ab fix(telegram): refine typing and progress drafts 2026-05-26 20:51:00 +01:00
alexph-dev
aa117ec4de fix(telegram): derive DM topics from bot capability
Remove the Telegram DM thread reply policy config and use Telegram bot capability as the single source of truth for DM topic session splitting.

DM messages with message_thread_id now split into thread-scoped sessions only when Telegram getMe reports has_topics_enabled for the bot. Doctor removes retired dm.threadReplies and direct.*.threadReplies keys, docs explain the upgrade behavior, and startup keeps cached bot info as a non-auth fallback when a fresh probe fails.

Refs #86513.
Thanks @alexph-dev.

Verification:
- pnpm docs:list
- pnpm exec oxfmt --check --threads=1 extensions/telegram/src/channel.ts extensions/telegram/src/channel.gateway.test.ts extensions/telegram/src/doctor-contract.ts extensions/telegram/src/doctor.test.ts
- git diff --check
- node scripts/run-vitest.mjs extensions/telegram/src/channel.gateway.test.ts extensions/telegram/src/doctor.test.ts extensions/telegram/src/bot/helpers.test.ts extensions/telegram/src/bot-message-context.dm-threads.test.ts extensions/telegram/src/config-schema.test.ts
- pnpm config:channels:check
- pnpm config:docs:check
- .agents/skills/autoreview/scripts/autoreview --mode local
- GitHub Actions: CI 26468039803, Workflow Sanity 26468040057, OpenGrep 26468039472, Real behavior proof 26468036483, CodeQL 26468039466, CodeQL Critical Quality 26468039473

Known CI caveat: checks-windows-node-test failed before tests because Windows runner setup left Node 22.19.0 active while the job requested Node 24.x; the same setup failure is present on current main CI run 26468063947.
2026-05-26 19:52:17 +01:00
Andy Ye
1fd8de8495 fix(telegram): treat ENETDOWN as transient network failure (#86762) 2026-05-26 18:40:31 +01:00
狼哥
c7821bd2a8 fix(telegram): treat targeted bot commands as mentions (#86553) 2026-05-26 17:21:33 +01:00
Vincent Koc
16d137dce6 test(telegram): use platform temp path in bot harness 2026-05-26 07:49:19 +02:00
Peter Steinberger
c04c03f8e9 test: restore auth regression coverage 2026-05-26 06:23:13 +01:00
Peter Steinberger
d00d0a21c2 chore: bump OpenClaw to 2026.5.26 2026-05-26 01:26:00 +01:00
Peter Steinberger
c1a026a976 fix: stabilize tests and reduce plugin memory churn 2026-05-26 00:01:30 +01:00
Neerav Makwana
0f67dfd074 fix(telegram): keep overlapping DM replies deliverable (#85361) (thanks @neeravmakwana)
Behavior addressed: Telegram direct-message turns no longer drop an earlier overlapping normal reply, while authorized aborts and explicit/native/plugin/skill command turns still supersede active reply work.
Real environment tested: local OpenClaw focused Telegram test shard plus existing contributor Telegram screenshot/log proof in the PR body.
Exact steps or command run after this patch: pnpm test extensions/telegram/src/telegram-reply-fence.test.ts extensions/telegram/src/bot-message-dispatch.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 93 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: overlapping normal Telegram DMs use non-interrupting reply fences and both final replies remain deliverable; direct /stop, authorized built-in commands, and explicit text/native command turns still supersede.
What was not tested: fresh live Telegram Desktop rerun by this agent; PR retains contributor screenshot/log proof and the Real behavior proof bot remains red despite proof labels.

Thanks @neeravmakwana.

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
2026-05-25 22:17:39 +01:00
Peter Steinberger
77d9ac30bb refactor: reuse shared coercion helpers (#86419)
* refactor: share talk event metric extraction

* refactor: reuse shared coercion helpers

* refactor: reuse shared primitive guards

* refactor: reuse shared record guard

* refactor: reuse shared primitive helpers

* refactor: reuse shared string guards

* refactor: reuse shared non-empty string guard

* refactor: share plugin primitive coercion helpers

* refactor: reuse plugin coercion helpers

* refactor: reuse plugin coercion helpers in more plugins

* refactor: reuse channel coercion helpers

* refactor: reuse monitor coercion helpers

* refactor: reuse provider coercion helpers

* refactor: reuse core coercion helpers

* refactor: reuse runtime coercion helpers

* refactor: reuse helper coercion in codex paths

* refactor: reuse helper coercion in runtime paths

* refactor: reuse codex app-server coercion helpers

* refactor: reuse codex record helpers

* refactor: reuse migration and qa record helpers

* refactor: reuse feishu and core helper guards

* refactor: reuse browser and policy coercion helpers

* refactor: reuse memory wiki record helper

* refactor: share boolean coercion helpers

* refactor: reuse finite number coercion

* refactor: reuse trimmed string list helpers

* refactor: reuse string list normalization

* refactor: reuse remaining string list helpers

* refactor: reuse string entry normalizer

* refactor: share sorted string helpers

* refactor: share string list normalization

* test: preserve command registry browser imports

* refactor: reuse trimmed list helpers

* refactor: reuse string dedupe helpers

* refactor: reuse local dedupe helpers

* refactor: reuse more string dedupe helpers

* refactor: reuse command string dedupe helpers

* refactor: dedupe memory path lists with helper

* refactor: expose string dedupe helpers to plugins

* refactor: reuse core string dedupe helpers

* refactor: reuse shared unique value helpers

* refactor: reuse unique helpers in agent utilities

* refactor: reuse unique helpers in config plumbing

* refactor: reuse unique helpers in extensions

* refactor: reuse unique helpers in core utilities

* refactor: reuse unique helpers in qa plugins

* refactor: reuse unique helpers in memory plugins

* refactor: reuse unique helpers in channel plugins

* refactor: reuse unique helpers in core tails

* refactor: reuse unique helper in comfy workflow

* refactor: reuse unique helpers in test utilities

* refactor: expose unique value helper to plugins

* refactor: reuse unique helpers for numeric lists

* refactor: replace index dedupe filters

* refactor: reuse string entry normalization

* refactor: reuse string normalization in plugin helpers

* refactor: reuse string normalization in extension helpers

* refactor: reuse string normalization in channel parsers

* refactor: reuse string normalization in memory search

* refactor: reuse string normalization in provider parsers

* refactor: reuse string normalization in qa helpers

* refactor: reuse string normalization in infra parsers

* refactor: reuse string normalization in messaging parsers

* refactor: reuse string normalization in core parsers

* refactor: reuse string normalization in extension parsers

* refactor: reuse string normalization in remaining parsers

* refactor: reuse string normalization in final parser spots

* refactor: reuse string normalization in qa media helpers

* refactor: reuse normalization in provider and media lists

* refactor: reuse normalization for remaining set filters

* refactor: reuse normalization in policy allowlists

* refactor: reuse normalization in session and owner lists

* refactor: centralize primitive string lists

* refactor: reuse lowercase entry helpers

* refactor: reuse sorted string helpers

* refactor: reuse unique trimmed helpers

* refactor: reuse string normalization helpers

* refactor: reuse catalog string helpers

* refactor: reuse remaining string helpers

* refactor: simplify remaining list normalization

* refactor: reuse codex auth order normalization

* chore: refresh plugin sdk api baseline

* fix: make shared string sorting deterministic

* chore: refresh plugin sdk api baseline

* fix: align host env security ordering
2026-05-25 21:20:41 +01:00
Vincent Koc
99997e4441 fix(test): stabilize e2e runtime imports 2026-05-25 17:35:26 +02:00
Sebastien Tardif
5182ebcf38 fix(telegram): propagate forum topic names into agent context (#86299)
* fix(telegram): propagate forum topic names into agent context

The topic-name-cache already tracks forum topic names via
forum_topic_created/edited/closed events in bot-message-context, but
this metadata was not surfaced in two key paths:

1. The native-command handler (bot-native-commands.ts) builds the agent
   context payload with IsForum but never looked up the cached topic
   name. Now it resolves the topic name from the cache and includes
   TopicName in the context, giving agents awareness of which forum
   topic they are responding in.

2. The action runtime (action-runtime.ts) executes createForumTopic and
   editForumTopic actions but never persisted the resulting topic
   metadata back to the cache. Now both actions write the topic name
   (and optional icon metadata) to the cache after success, ensuring
   subsequent messages in those topics can resolve the name.

Closes #86024

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* fix(telegram): scope forum topic cache updates

---------

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-25 11:00:17 +01:00
Peter Steinberger
bbc1772f4d build: enable modern TypeScript module syntax
* build: enable modern TypeScript flags

* build: drop erasable TypeScript syntax flag

* build: keep legacy class field semantics
2026-05-25 10:10:12 +01:00
Jason O'Neal
b552919277 fix(telegram): preserve inbound text entities (#83873) 2026-05-25 13:27:19 +05:30
Peter Steinberger
84ab206887 test(telegram): type topic cache harness store 2026-05-25 08:47:27 +01:00
Peter Steinberger
ff1fde1bb4 test(telegram): provide topic cache store in message context harness 2026-05-25 08:47:27 +01:00
Vincent Koc
a5d5604198 fix(tests): harden native macos plugin proof 2026-05-25 07:21:12 +02:00
Galin Iliev
b5c1199217 fix(telegram): route polling diagnostics away from errors
Route normal [telegram][diag] polling diagnostics through runtime.log while keeping non-diag Telegram warnings/errors and offset persistence failures on runtime.error.

Verification:
- node scripts/run-vitest.mjs extensions/telegram/src/monitor.test.ts (34 passed)
- git diff --check
- CI run 26378692736 passed on 979c6f31a4

Fixes #82957
2026-05-24 18:39:52 -07:00
Dallin Romney
8209426867 fix(telegram): transient Telegram pairing prompts (#85555)
* fix: avoid false telegram pairing prompts

* docs: add telegram pairing changelog

* refactor(telegram): share pairing-store gating and align isGroup check

Extract loadTelegramPairingStoreIfNeeded so the text-fragment flush path
and resolveTelegramGroupAllowFromContext share one implementation, and
align the isGroup derivation in the flush path with the
'group || supergroup' form used elsewhere in bot-handlers.runtime.ts.

Note on transient-vs-known errors: readChannelAllowFromStore already
translates missing-file (ENOENT) and JSON parse failures to an empty
allowlist internally, so the only errors that escape into the new
silent-drop path are unexpected I/O failures (EMFILE/EACCES/EIO/...) —
unpaired senders still get a pairing challenge as expected.

* fix(telegram): skip pairing-store read when commands.allowFrom already authorizes the sender

Native command auth resolves group/dm allow context (which may read the
pairing store) before checking commands.allowFrom. On DMs with
dmPolicy: "pairing", a transient pairing-store I/O failure was therefore
dropping commands from senders explicitly authorized by
commands.allowFrom.telegram.

Add a skipPairingStoreRead hint on resolveTelegramGroupAllowFromContext /
loadTelegramPairingStoreIfNeeded, precompute the command authorization
once at chat scope before the context call, and pass the hint when that
pre-check already authorizes the sender. The post-context command auth
check still owns the topic-scoped decision.

Regression covers a DM /status from a sender allowed by
commands.allowFrom.telegram with dmPolicy: "pairing" and a rejecting
readChannelAllowFromStore mock.

* fix(telegram): satisfy test-types on harness readChannelAllowFromStore

CI check-test-types failed because the harness now stores a loose
AnyAsyncMock for readChannelAllowFromStore but TelegramNativeCommandDeps
requires the precise typeof readChannelAllowFromStore signature. Cast at
the telegramDeps assignment so harness callers can keep passing any
vi.fn(...) (including ones that reject) without type pollution at the
call site.

* feat(telegram): reply with a retry hint when pairing-store read fails transiently

Wrap unexpected pairing-store I/O errors (EACCES, EMFILE, ...) in a
typed TelegramPairingStoreReadError and surface them through
handleInboundMessageLike with a friendly "please try again" reply that
matches the media-failure precedent at bot-handlers.runtime.ts:1893.
Beats silent drop: paired senders see why their message wasn't
processed, and unpaired senders who happen to send a DM during a
transient store outage retry naturally and get the correct pairing
prompt once the store recovers.

Verified live against @paxicoto_bot with chmod 000 on
~/.openclaw/credentials/telegram-default-allowFrom.json after touching
mtime to bypass the stat-pinned cache.
2026-05-24 15:12:30 -07:00
Ayaan Zaidi
5cfb12fa5d fix(telegram): migrate account topic cache sidecars 2026-05-24 18:58:02 +05:30
Ayaan Zaidi
eb9b882dae fix(telegram): migrate legacy cache sidecars 2026-05-24 18:58:02 +05:30
Ayaan Zaidi
996d07ee46 fix(telegram): store topic cache in plugin state 2026-05-24 17:38:27 +05:30
Ayaan Zaidi
2ed52969c5 fix(telegram): store bot info cache in plugin state 2026-05-24 17:38:27 +05:30
Peter Steinberger
e8643f0c15 test(telegram): keep startup limiter coverage focused 2026-05-24 12:36:45 +01:00
Peter Steinberger
04d86e0f47 test(telegram): isolate startup probe limiter timing 2026-05-24 12:23:32 +01:00
Peter Steinberger
578e73f667 test(release): harden plugin prerelease checks 2026-05-24 12:02:29 +01:00
Josh Lehman
62b51a6295 fix(telegram): serialize topic dispatch replies (#85709)
* fix(telegram): serialize topic dispatch replies (clawdbot-b19)

* fix(telegram): normalize dispatch topic context

* fix(telegram): satisfy dispatch race CI checks

* fix(telegram): normalize raw code language tags

* refactor(reply): centralize turn admission

* fix(telegram): persist recovered topic routes

* fix(reply): preserve queue policy admission

* fix(reply): retain active abort owner

* fix(reply): split active abort ownership

* fix(reply): defer busy followup drains

* fix(reply): wire hook abort ownership

* fix(reply): preserve deferred queue summaries

* fix(reply): type queued summary retry

* fix(reply): abort embedded and core runs

* test(reply): keep final abort operation active

* test(reply): stabilize abort normalization test

* fix(reply): keep non-visible admission skips silent

* test(reply): avoid dispatch shard mock bleed

* fix(reply): merge deferred queue summaries

* fix(reply): abort active-lane resolver runs

* fix(reply): compose borrowed lane abort signals

* fix(reply): keep interrupt turns caller-owned

* fix(telegram): keep recovered topic history scoped

* fix(reply): retry deferred summary queues

* fix(reply): document deferred summary restore

* fix(telegram): rebuild recovered topic prompt body

* fix(reply): run admitted session ids

* fix(telegram): recover topic chat actions

* fix(reply): honor pre-dispatch aborts for handled replies

* fix(reply): guard local handled final aborts

* fix(reply): refresh admitted session files

* fix(telegram): trust final current-message marker

* fix(telegram): migrate recovered room history

* fix(telegram): scope recovered topics to current chat

* fix(reply): wait for visible reply lane ownership

* fix(telegram): pass recovered topic body to agent

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 11:49:48 +01:00
Peter Steinberger
3679151c2c test(release): stabilize plugin prerelease checks 2026-05-24 11:40:48 +01:00
Peter Steinberger
0a8af67c11 test(telegram): wait for startup probe slots 2026-05-24 11:21:15 +01:00
Peter Steinberger
56eb23dda4 test(release): align plugin prerelease checks 2026-05-24 06:47:42 +01:00
Peter Steinberger
32631eb9d4 fix(telegram): normalize legacy action targets 2026-05-24 05:38:59 +01:00
Gio Della-Libera
617335250e fix(telegram): honor explicit default account warning (#85752) 2026-05-23 20:41:35 -07:00
Peter Steinberger
12f82270cf perf: cache stable gateway metadata 2026-05-24 02:54:28 +01:00
Peter Steinberger
0cba872e38 chore: bump version to 2026.5.24 2026-05-24 02:40:16 +01:00
狼哥
f05f243824 fix(telegram): normalize durable group retry targets (#85656)
Summary:
- The PR normalizes legacy Telegram `group:<numeric>` durable retry targets before text/media/payload/poll sends and delivered-message pinning, with regression tests and a changelog entry.
- Reproducibility: yes. Source inspection shows recovery passes `entry.to` unchanged into the Telegram outbound path, and current send resolution rejects bare `group:-100...` as a non-numeric Telegram chat ID.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(telegram): normalize durable retry pin targets
- PR branch already contained follow-up commit before automerge: fix(telegram): normalize durable group retry targets
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8565…

Validation:
- ClawSweeper review passed for head 272bc225dd.
- Required merge gates passed before the squash merge.

Prepared head SHA: 272bc225dd
Review: https://github.com/openclaw/openclaw/pull/85656#issuecomment-4524463510

Co-authored-by: luoyanglang <hanwanlonga@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-24 00:30:11 +00:00
Peter Steinberger
3cf806d172 fix(telegram): cache outbound replies for context
Co-authored-by: Keshav's Bot <keshavbotagent@gmail.com>
2026-05-24 00:04:16 +01:00
Peter Steinberger
c4f0da00a9 refactor: use channel target resolution APIs (#85814)
* refactor: use channel target resolution apis

* refactor: satisfy delivery lint

* refactor: remove unused target parsing shim

* fix: preserve routed cron topic targets
2026-05-23 21:26:55 +01:00
Peter Steinberger
a04566da11 test: isolate Telegram spooled timeout from stall watchdog 2026-05-23 17:08:00 +01:00