Commit Graph

6260 Commits

Author SHA1 Message Date
Peter Steinberger
4d6756d45d refactor: generalize voice audio compatibility 2026-04-22 06:58:45 +01:00
Peter Steinberger
182d0fcee2 fix(telegram): isolate sent-message cache stores 2026-04-22 06:47:51 +01:00
Peter Steinberger
95331e5cc5 fix(channels): thread runtime config through sends 2026-04-22 06:47:51 +01:00
JuniperSling
bcd1dec3dc feat(tencent): remove Token Plan provider and auth (#69996)
Co-authored-by: albertxyu <albertxyu@tencent.com>
2026-04-21 22:46:07 -07:00
Vincent Koc
6d6845ea9d fix(googlechat): harden google auth transport (#69812)
* fix(googlechat): localize google auth gaxios compat

* fix(googlechat): declare undici for staged runtime deps

* fix(googlechat): harden google auth transport

* fix(googlechat): narrow credential file reads

* fix(googlechat): preserve auth proxy transport

* fix(googlechat): allow symlinked auth files

* fix(googlechat): atomically load auth files

* fix(googlechat): eagerly buffer auth responses

* fix(googlechat): cap auth response buffering

* fix(googlechat): pin staged auth runtime deps

* fix(googlechat): buffer auth responses as array buffers

* Update CHANGELOG.md

* fix(googlechat): reject unstreamed auth responses

* fix(googlechat): use ambient fetch for auth transport

* fix(googlechat): keep guarded auth fetch on runtime path

* fix(googlechat): align staged zod range

* chore(lockfile): sync googlechat zod spec
2026-04-21 22:40:57 -07:00
Peter Steinberger
40719bcb74 refactor: move cron output policy to channel plugins 2026-04-22 06:11:49 +01:00
Peter Steinberger
bdcbb6b49d refactor: move Feishu model override parsing to plugin 2026-04-22 06:11:49 +01:00
Peter Steinberger
7189b49f81 refactor: move media defaults into plugin manifests 2026-04-22 06:11:49 +01:00
Peter Steinberger
2e775fb03e refactor: move stale socket modes to channel status 2026-04-22 06:11:49 +01:00
Peter Steinberger
de616055f7 perf(ci): trim preflight setup and stream test waits 2026-04-22 06:11:02 +01:00
JuniperSling
d8b9be468a feat(tencent): add bundled Tencent Cloud provider plugin (Tokenhub + Token Plan) (#68460)
* feat(tencent): add bundled Tencent Cloud provider plugin (Tokenhub + Token Plan)

* fix(tencent): use provider-specific default model aliases

Both Tencent providers previously defaulted to the same alias "HY3 Preview",
which collides in buildModelAliasIndex (single alias map, keyed by normalized
alias). When both providers are onboarded, alias-based selection routed to
whichever provider was configured last.

Disambiguate the fallback aliases so resolution is deterministic regardless
of onboarding order:
  - tencent-tokenhub   -> "HY3 Preview (TokenHub)"
  - tencent-token-plan -> "HY3 Preview (Token Plan)"

* docs(tencent): rename model to "Hy3 preview" and drop "HY3" family name

Align with the external-facing product name:
  - model display name: "HY3 Preview" -> "Hy3 preview"
  - family/umbrella references in docs and auth hints: "HY3" -> "Hy3 preview"
  - internal cost constant: HY3_COST -> HY_COST

Model call id (hy3-preview) is unchanged.

* docs(tencent): use "Hy" as the family name in generic references

Keep specific model references as "Hy3 preview" (model catalog names,
onboarding aliases, Available-models docs entries), but switch
family/umbrella references to the plain "Hy" family name so future Hy
versions fit without doc churn:

  - auth hints: "Hy via Tencent TokenHub Gateway" / "Hy via Token Plan"
  - docs intro + Use-case table: "Tencent Hy models" / "call Hy via ..."
  - models.ts pricing comment: "Hy pricing"

* feat(tencent): add tiered pricing for Hy3 preview model

---------

Co-authored-by: albertxyu <albertxyu@tencent.com>
2026-04-21 21:59:22 -07:00
pashpashpash
89932593bb Show typing while heartbeats are running (#69963)
* Heartbeat: show typing during runs

* Heartbeat: fix typing review issues

* Discord: preserve heartbeat typing config
2026-04-22 13:50:27 +09:00
Zihao WAN
d4f91a354e fix(ollama): forward think:false for qwen3 chat requests (#69967)
Forward top-level Ollama think flags on native /api/chat requests so --thinking off sends think:false.\n\nThanks @WZH8898.
2026-04-22 05:49:16 +01:00
fuller-stack-dev
276c00015c fix: add local embedded TUI mode (#66767) (thanks @fuller-stack-dev)
* feat(tui): add local embedded TUI mode with terminal/chat aliases

Adds a gateway-free local TUI path so users can run openclaw in their
terminal without needing a running gateway process.

- TuiBackend interface abstraction (tui-backend.ts) with EmbeddedTuiBackend
  implementation that drives the agent loop in-process
- openclaw tui --local flag for local embedded mode
- openclaw terminal / openclaw chat aliases that imply --local
- /auth slash command with codex CLI delegation to avoid prolite plan issue
- Default model display fallback on startup
- Local-aware status text and log suppression
- Concise auth error hints, raw HTML 403 suppression
- Onboarding hatch flow launches local TUI (no gateway required)
- Commander alias bug fix in run-main.ts (.aliases() check)
- All new and updated tests passing (145/145)

* TUI: fix alias detection, cross-platform codex lookup, and history byte-budget safeguards

* TUI: remove RuntimeEnv type annotation to fix CI oxlint error

* TUI: filter gateway-dependent tools and auto-approve plugin hooks in embedded mode

* TUI: suppress console noise and add embedded mode system prompt note

* TUI: reduce embedded-mode tool filtering from 15 to 7, add local session tools

* TUI: fix remaining PR review comments

* TUI: address latest review feedback and CI drift

* Core: align prompt helper with latest base

* Core: match prompt helper formatting with base

* Core: restore prompt helper from latest base

* fix(tui): preserve local auth fallback in source checkouts

* fix(tts): guard telephony provider invocation

* fix(tui): support Windows codex auth shim

* fix(tui): harden local auth flow

* fix: preserve embedded tool-first run events

* fix(tui): keep embedded plugin approvals gated

* fix(tui): restore embedded attempt import

* fix(tui): resolve sessions in embedded stub

* fix: add embedded TUI changelog entry (#66767) (thanks @fuller-stack-dev)

* fix: pass setup TUI local mode through relaunch (#66767) (thanks @fuller-stack-dev)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-22 10:08:57 +05:30
Shakker
f9bac5038c fix: harden static provider catalog path 2026-04-22 04:51:38 +01:00
Shakker
d73c31110b fix: harden static provider catalog listing 2026-04-22 04:51:38 +01:00
Shakker
04ecf284fc fix: use static provider catalogs for model listing 2026-04-22 04:51:38 +01:00
Shakker
8ba52acc41 fix: add Kimi K2.6 provider catalog rows 2026-04-22 04:51:38 +01:00
Sanjay Santhanam
a37321ad5f fix(memory-core): suppress startup "cron service unavailable" warning (closes #69939)
memory-core registers a gateway:startup hook that runs reconcileManagedDreamingCron() before deps.cron is attached to the startup event (the startup hook is deferred via a 250ms setTimeout in server.impl).

Downgrade the first startup-time "cron service unavailable" warning to a debug log, and rely on the existing runtime reconciliation path to warn if the cron service truly stays unavailable after boot. The managed dreaming cron job itself runs correctly — this was a log-noise regression, not a functional failure.

Signed-off-by: Sanjay Santhanam <51058514+Sanjays2402@users.noreply.github.com>
2026-04-22 04:50:25 +01:00
Peter Steinberger
f027d8faa7 refactor(discord): share native interaction channel context 2026-04-22 04:47:57 +01:00
Peter Steinberger
00cdab99bf test: harden ci timing cleanup 2026-04-22 04:45:19 +01:00
Peter Steinberger
a8a023779d fix(discord): preserve fetched thread parent for plugin commands (#69908) (thanks @neeravmakwana) 2026-04-22 04:31:31 +01:00
Neerav Makwana
349d86c152 fix(discord): move in-check inside try/catch in channel-access helper
Wrap the `key in channel` probe inside the existing `try/catch` in `readDiscordChannelPropertySafe` so a throwing Proxy `has` trap (or any other reflective error on the presence check) degrades to `undefined` instead of propagating, matching the existing behavior for throwing getters on the value read.

Add a regression test that exposes the interaction channel through a Proxy whose `has` trap throws on `parentId` and asserts the slash-command path still defers and dispatches.

No behavior change for Carbon prototype getters or plain-object channels: the safe accessor still traverses the prototype chain (required for Carbon's `GuildThreadChannel.parentId`), still returns `undefined` for missing or throwing reads, and still preserves null-to-undefined coercion downstream.
2026-04-22 04:31:31 +01:00
Neerav Makwana
dbf8fd0db7 fix(discord): read channel.parentId through safe accessor on partial thread channels
The Carbon `GuildThreadChannel.parentId` getter throws "Cannot access rawData on partial Channel" whenever Discord delivers a partial thread (for example when an interaction channel is unhydrated). The existing `"parentId" in channel` guard did not help because the `in` operator returns true for prototype getters without invoking them, so the read still crashed `/new` and similar slash commands, guild reactions, and the native model picker when invoked from inside a thread.

Expose a `resolveDiscordChannelParentIdSafe` helper alongside the other channel accessors and use it everywhere we currently read `channel.parentId` from the inbound Discord channel. When the getter throws, the helper returns `undefined`, and the downstream code already falls back to re-fetching the thread id via `resolveDiscordChannelInfo`, keeping authorization/config lookups on the same inputs as before.

Add a regression test that installs a throwing `parentId` getter on a partial guild thread channel and asserts the slash-command path still defers and dispatches instead of surfacing an unauthorized reply.

Fixes #69861
2026-04-22 04:31:31 +01:00
Peter Steinberger
b0734664f8 style: format touched code 2026-04-22 04:24:45 +01:00
Peter Steinberger
23a017be7c fix: suppress Mattermost quoted reasoning replies (#69927) (thanks @lawrence3699) 2026-04-22 04:10:28 +01:00
lawrence3699
bb43c7b89f fix(mattermost): suppress reasoning previews 2026-04-22 04:10:28 +01:00
lawrence3699
367faac596 fix(mattermost): suppress reasoning-only replies 2026-04-22 04:10:28 +01:00
Peter Steinberger
0f4dc42767 build: update pi packages to 0.68.1 2026-04-22 03:35:15 +01:00
Peter Steinberger
e92079be6b fix: finish browser click timeout recovery (#63524) 2026-04-22 03:08:36 +01:00
Dongseok Paeng
cd82b94333 fix(browser): propagate click aborts through agent act routes
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-22 03:08:36 +01:00
Dongseok Paeng
adc05f090a fix(browser): time out stuck chrome mcp clicks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-22 03:08:36 +01:00
Peter Steinberger
c97c5a5aff fix: canonicalize opencode-go base URL 2026-04-22 03:05:48 +01:00
ayeshakhalid192007-dev
55c415a1da fix(browser): address review comments on Chrome MCP timeout handling 2026-04-22 03:02:49 +01:00
ayeshakhalid192007-dev
88268aa2cd fix(browser): make chrome.internal tests pass on Linux (existsSync mock) 2026-04-22 03:02:49 +01:00
ayeshakhalid192007-dev
dc9c46a8df fix(browser): reset Chrome MCP session after navigate_page timeout
navigateChromeMcpPage() now always passes a timeout to the Chrome MCP
navigate_page tool (defaulting to CHROME_MCP_NAVIGATE_TIMEOUT_MS when
the caller omits timeoutMs), and callTool() grows an optional safety-net
that tears down a stuck session via Promise.race so the next caller gets
a fresh subprocess. The catch block gains a transport-identity guard to
avoid clobbering a concurrently-created replacement session.
2026-04-22 03:02:49 +01:00
Peter Steinberger
ef66798433 fix: preserve outbound thread sessions 2026-04-22 02:56:23 +01:00
Patrick Erichsen
529577e045 fix(memory/dreaming): surface blocked status when heartbeat is disabled for main (#69875)
* fix(memory/dreaming): surface blocked status in memory status when heartbeat disabled for main

Replace the hand-rolled heartbeat-rules logic in resolveDreamingBlockedReason
with the shared resolveHeartbeatSummaryForAgent helper, promoted from core to
the plugin-sdk via infra-runtime. Collapses the two disabled-reason branches
into a single message that points at a new Troubleshooting section in the
dreaming docs, so the silent-failure mode described in openclaw/openclaw#69843
becomes legible without the extension re-encoding heartbeat-enablement rules.

Refs openclaw/openclaw#69843, openclaw/openclaw#46046.

* refactor(memory/dreaming): share resolveDreamingBlockedReason across cli and /dreaming surfaces

- Move resolveDreamingBlockedReason from cli.runtime.ts into dreaming.ts as an exported helper and pin its heartbeat check to DEFAULT_AGENT_ID (now exported from plugin-sdk/routing) so the status-line check agrees with the cron's hardcoded sessionTarget even when the configured default agent is not main.
- Render the blocked reason from formatStatus in dreaming-command.ts directly under the enabled line, so /dreaming status, /dreaming on, /dreaming off, and bare /dreaming all flag that the cron is blocked instead of implying dreaming is healthy.
- Tighten the blocked-reason text to lead with user impact ('dreaming is enabled but will not run because heartbeat is disabled for main'), so operators immediately understand the config is toggled on but nothing is actually running.
- Tighten the dreaming Troubleshooting copy to name main explicitly and mention both surfaces.
- Add tests locking the new behavior across cli.test.ts (default-agent=ops still reports blocked for main) and dreaming-command.test.ts (/dreaming status ordering, /dreaming on surfacing, healthy-heartbeat omission).

Refs openclaw/openclaw#69843, openclaw/openclaw#46046.

* fix(memory/dreaming): check heartbeat for the resolved default agent, not the literal 'main'

sessionTarget: 'main' is a cron session-type enum variant meaning 'the default agent's main session', not an agent id (see src/cron/service/jobs.ts). buildManagedDreamingCronJob does not set agentId, and cron runtime resolves the missing agentId through resolveDefaultAgentId(cfg) before enqueuing or waking. The previous pin to DEFAULT_AGENT_ID could produce a false 'blocked' reading when a configured default agent is not 'main' and its heartbeat is fine, and could miss a real block when the default agent is not 'main' and that agent's heartbeat is actually off.

Switch resolveDreamingBlockedReason to resolveDefaultAgentId(cfg) and interpolate the resolved agent id into the message so the blocked line names the agent whose heartbeat is the blocker. Introduce a narrow local CRON_SESSION_TARGET_MAIN constant for the cron session-type enum variant (used by the sessionTarget type and value) so the remaining 'main' literal is semantically distinct from any agent id. Revert the DEFAULT_AGENT_ID export addition on plugin-sdk/routing; memory-core no longer needs it. Update the Troubleshooting doc wording and the cli test that was locking the wrong behaviour.

Refs openclaw/openclaw#69843, openclaw/openclaw#46046.

* fix(memory/dreaming): align blocked check with server-cron wake's defaults-only heartbeat

resolveDreamingBlockedReason was using resolveHeartbeatSummaryForAgent, which merges agents.defaults.heartbeat with agents.list[].heartbeat. The managed dreaming cron leaves job.agentId and job.sessionKey unset, so server-cron's wake wrapper cannot look up a per-agent entry and calls runHeartbeatOnce with agents.defaults.heartbeat only. Using the summary helper would disagree with the actual wake when the default agent overrides heartbeat.every differently from the defaults (either direction — false blocked when the override would run, or false healthy when defaults block).

Mirror the wake path explicitly: rule-1 enablement via isHeartbeatEnabledForAgent against the default agent, rule-3 interval via resolveHeartbeatIntervalMs with defaults-only heartbeat config. Comment points at server-cron so a future cleanup of that latent override-propagation gap sees the coupling.

Refs openclaw/openclaw#69843.
2026-04-21 18:51:43 -07:00
Patrick Erichsen
efb7d426cf fix(browser): reject ax<N> refs in act path instead of timing out (#69924) 2026-04-21 18:43:27 -07:00
Peter Steinberger
fb9a21ae8f fix: centralize draft preview finalization 2026-04-22 02:32:55 +01:00
Peter Steinberger
eb6006730d fix(line): guard outbound media targets 2026-04-22 01:48:14 +01:00
Peter Steinberger
66576f3355 test(extensions): fix lint-clean test assertions 2026-04-22 01:43:18 +01:00
Peter Steinberger
5c74e9da01 fix(qqbot): avoid eager storage directory creation 2026-04-22 01:42:10 +01:00
Gustavo Madeira Santana
19354c9a6a fix(discord): keep slash follow-ups ephemeral (#69869)
Merged via squash.

Prepared head SHA: 0f5ab77156
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 20:02:59 -04:00
Ron Cohen
08bc16853e WhatsApp: add group and direct system prompt support (#59553)
Merged via squash.

Prepared head SHA: 63e2b50e01
Co-authored-by: Bluetegu <1525690+Bluetegu@users.noreply.github.com>
Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com>
Reviewed-by: @omarshahine
2026-04-21 16:40:32 -07:00
Bek
e116b343b2 feat(slack): Annotate inbound Slack mention tokens in Slack RawBody and BodyForAgent content so the agent sees both the actionable Slack mention token and a human-readable name. (#65731)
* Annotate inbound Slack mentions in raw bodies

* Avoid shared regex state in Slack mention rendering

* Bound Slack mention lookups with concurrency

* slack: keep mention concurrency helper plugin-local

* test: stabilize node core CI assertions

* slack: cap mention lookups per inbound message

* test: reset suite gateway runtime state

* fix(slack): reuse plugin sdk concurrency helper
2026-04-21 19:03:50 -04:00
Peter Steinberger
df3fcbd716 test: lazy-load openai provider catalog contract 2026-04-21 23:35:37 +01:00
Bek
70683179a0 fix(slack): narrow first turn context seeding to remove redundant thread-starter content (#68402)
Fix Slack thread bootstrap replaying the bot's own prior turns into new sessions and duplicating the thread-starter prompt block.

Narrows first-turn context seeding to exclude only the current Slack bot's own starter/history entries, so self-authored turns no longer pollute new session prompts while preserving human and third-party bot context

Removes the redundant plain-text starter prelude in runPreparedReply() that doubled thread-starter content when no ThreadHistoryBody was present
2026-04-21 18:28:34 -04:00
Bek
dfe0e49c8a fix(qmd): Dedup in-flight manager creation so only one full QMD manager arms per agent/config at a time, eliminating the concurrent exportSessions() collisions that triggered path changed during write errors (#65226)
Fixes concurrent manager creation races that caused SafeOpenErrors during session export.

Deduplicates in-flight manager creation so only one full QMD manager arms per agent/config at a time, eliminating the concurrent exportSessions() collisions that triggered path changed during write errors
Resolves and snapshots runtime inputs before cache reuse, replacing stale managers atomically when workspace/config changes, and aborting queued export work promptly on close()
2026-04-21 18:22:21 -04:00
Devin Robison
ee316dbc4b fix(tlon): guard memex upload target (#69794)
* fix(tlon): guard memex upload target

* fix(tlon): harden guarded memex upload

* fix(tlon): validate hosted memex upload targets

* fix(tlon): tighten hosted domain matching

* fix(tlon): reject non-standard memex upload ports

* fix(tlon): disable memex upload redirects

* test(tlon): drop redundant mock resets in memex upload test

* chore(lint): update tlon raw-fetch allowlist for guarded memex upload

* fix(tlon): reject unparseable ship URLs in hosted-ship classifier

* fix(lint): point tlon raw-fetch allowlist at fetch callee lines

* fix(tlon): guard custom-S3 upload through fetchWithSsrFGuard

* fix(tlon): preserve scheme-less hosted ship routing and allow explicit :443

* docs(changelog): note tlon upload guard

* fix(tlon): guard memex lookup and private s3 opt-in

* fix(tlon): validate upload result URLs
2026-04-21 15:57:49 -06:00