2314 Commits

Author SHA1 Message Date
Ayaan Zaidi
5d3104e699 fix: regenerate swift protocol models 2026-03-28 14:29:41 +05:30
lixuankai
f0a57fad42 fix: isolate device chat defaults (#53752) (thanks @lixuankai)
* [feat]Multiple nodes session context isolated from each other

* feat(android): Multiple nodes session context isolated from each other

* feat(android): Multiple nodes session context isolated from each other

* feat(android): Multiple nodes session context isolated from each other

* fix(android): isolate device chat defaults

---------

Co-authored-by: lixuankai <lixuankai@oppo.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-28 12:19:47 +05:30
Ayaan Zaidi
29b6e27c9e fix(android): auto-send voice turns on silence 2026-03-28 11:17:13 +05:30
Ayaan Zaidi
a7b8034a2b fix(android): use native tts in voice tab 2026-03-28 10:47:08 +05:30
Peter Steinberger
4900890626 test: align macOS config audit expectations 2026-03-28 04:53:02 +00:00
Peter Steinberger
a70d9beb3a build: update macOS package dependencies 2026-03-28 04:53:02 +00:00
Peter Steinberger
d29d56c090 build: update Peekaboo for macOS SDK compatibility 2026-03-28 04:47:31 +00:00
Peter Steinberger
c5c9640374 fix: harden config write auditing 2026-03-28 03:54:54 +00:00
Peter Steinberger
72ba2b3653 chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
ImLukeF
6c9126ec19 macOS: test gateway version normalization 2026-03-28 12:05:34 +11:00
huohua-dev
8545cbd358 fix(macos): strip "OpenClaw " prefix before parsing gateway version
`openclaw --version` outputs "OpenClaw 2026.x.y-z" but
readGatewayVersion() passed the full string to Semver.parse(),
which failed on the "OpenClaw " prefix. This caused the app to
fall back to reading package.json from a local source checkout
(~/Projects/openclaw), reporting a false version mismatch.

Strip the product name prefix before parsing so the installed
CLI version is correctly recognized.
2026-03-28 12:05:33 +11:00
Tak Hoffman
4430805719 Allow inherited AWS config file paths 2026-03-27 15:16:19 -05:00
Jacob Tomlinson
6eb82fba3c Infra: block additional host exec env keys (#55977) 2026-03-27 18:50:37 +00:00
Josh Avant
6ade9c474c feat(hooks): add async requireApproval to before_tool_call (#55339)
* Plugins: add native ask dialog for before_tool_call hooks

Extend the before_tool_call plugin hook with a requireApproval return field
that pauses agent execution and waits for real user approval via channels
(Telegram, Discord, /approve command) instead of relying on the agent to
cooperate with a soft block.

- Add requireApproval field to PluginHookBeforeToolCallResult with id, title,
  description, severity, timeout, and timeoutBehavior options
- Extend runModifyingHook merge callback to receive hook registration so
  mergers can stamp pluginId; always invoke merger even for the first result
- Make ExecApprovalManager generic so it can be reused for plugin approvals
- Add plugin.approval.request/waitDecision/resolve gateway methods with
  schemas, scope guards, and broadcast events
- Handle requireApproval in pi-tools via two-phase gateway RPC with fallback
  to soft block when the gateway is unavailable
- Extend the exec approval forwarder with plugin approval message builders
  and forwarding methods
- Update /approve command to fall back to plugin.approval.resolve when exec
  approval lookup fails
- Document before_tool_call requireApproval in hooks docs and unified
  /approve behavior in exec-approvals docs

* Plugins: simplify plugin approval code

- Extract mergeParamsWithApprovalOverrides helper to deduplicate param
  merge logic in before_tool_call hook handling
- Use idiomatic conditional spread syntax in toolContext construction
- Extract callApprovalMethod helper in /approve command to eliminate
  duplicated callGateway calls
- Simplify plugin approval schema by removing unnecessary Type.Union
  with Type.Null on optional fields
- Extract normalizeTrimmedString helper for turn source field trimming

* Tests: add plugin approval wiring and /approve fallback coverage

Fix 3 broken assertions expecting old "Exec approval" message text.
Add tests for the /approve command's exec→plugin fallback path,
plugin approval method registration and scope authorization, and
handler factory key verification.

* UI: wire plugin approval events into the exec approval overlay

Handle plugin.approval.requested and plugin.approval.resolved gateway
events by extending the existing exec approval queue with a kind
discriminator. Plugin approvals reuse the same overlay, queue management,
and expiry timer, with branched rendering for plugin-specific content
(title, description, severity). The decision handler routes resolve calls
to the correct gateway method based on kind.

* fix: read plugin approval fields from nested request payload

The gateway broadcasts plugin approval payloads with title, description,
severity, pluginId, agentId, and sessionKey nested inside the request
object (PluginApprovalRequestPayload), not at the top level. Fix the
parser to read from the correct location so the overlay actually appears.

* feat: invoke plugin onResolution callback after approval decision

Adds onResolution to the requireApproval type and invokes it after
the user resolves the approval dialog, enabling plugins to react to
allow-always vs allow-once decisions.

* docs: add onResolution callback to requireApproval hook documentation

* test: fix /approve assertion for unified approval response text

* docs: regenerate plugin SDK API baseline

* docs: add changelog entry for plugin approval hooks

* fix: harden plugin approval hook reliability

- Add APPROVAL_NOT_FOUND error code so /approve fallback uses structured
  matching instead of fragile string comparison
- Check block before requireApproval so higher-priority plugin blocks
  cannot be overridden by a lower-priority approval
- Race waitDecision against abort signal so users are not stuck waiting
  for the full approval timeout after cancelling a run
- Use null consistently for missing pluginDescription instead of
  converting to undefined
- Add comments explaining the +10s timeout buffer on gateway RPCs

* docs: document block > requireApproval precedence in hooks

* fix: address Phase 1 critical correctness issues for plugin approval hooks

- Fix timeout-allow param bug: return merged hook params instead of
  original params when timeoutBehavior is "allow", preventing security
  plugins from having their parameter rewrites silently discarded.

- Host-generate approval IDs: remove plugin-provided id field from the
  requireApproval type, gateway request, and protocol schema. Server
  always generates IDs via randomUUID() to prevent forged/predictable
  ID attacks.

- Define onResolution semantics: add PluginApprovalResolutions constants
  and PluginApprovalResolution type. onResolution callback now fires on
  every exit path (allow, deny, timeout, abort, gateway error, no-ID).
  Decision branching uses constants instead of hard-coded strings.

- Fix pre-existing test infrastructure issues: bypass CJS mock cache for
  getGlobalHookRunner global singleton, reset gateway mock between tests,
  fix hook merger priority ordering in block+requireApproval test.

* fix: tighten plugin approval schema and add kind-prefixed IDs

Harden the plugin approval request schema: restrict severity to
enum (info|warning|critical), cap timeoutMs at 600s, limit title
to 80 chars and description to 256 chars. Prefix plugin approval
IDs with `plugin:` so /approve routing can distinguish them from
exec approvals deterministically instead of relying on fallback.

* fix: address remaining PR feedback (Phases 1-3 source changes)

* chore: regenerate baselines and protocol artifacts

* fix: exclude requesting connection from approval-client availability check

hasExecApprovalClients() counted the backend connection that issued
the plugin.approval.request RPC as an approval client, preventing
the no-approval-route fast path from firing in headless setups and
causing 120s stalls. Pass the caller's connId so it is skipped.
Applied to both plugin and exec approval handlers.

* Approvals: complete Discord parity and compatibility fallback

* Hooks: make plugin approval onResolution non-blocking

* Hooks: freeze params after approval owner is selected

* Gateway: harden plugin approval request/decision flow

* Discord/Telegram: fix plugin approval delivery parity

* Approvals: fix Telegram plugin approval edge cases

* Auto-reply: enforce Telegram plugin approval approvers

* Approvals: harden Telegram and plugin resolve policies

* Agents: static-import gateway approval call and fix e2e mock loading

* Auto-reply: restore /approve Telegram import boundary

* Approvals: fail closed on no-route and neutralize Discord mentions

* docs: refresh generated config and plugin API baselines

---------

Co-authored-by: Václav Belák <vaclav.belak@gendigital.com>
2026-03-27 09:06:40 -07:00
Peter Steinberger
14b3360c22 chore: bump versions to 2026.3.26 2026-03-27 02:03:22 +00:00
Seungwoo hong
138a92373b fix(talk): prevent double TTS playback when system voice times out (#53511)
Merged via squash.

Prepared head SHA: 864d556fa6
Co-authored-by: hongsw <1100974+hongsw@users.noreply.github.com>
Co-authored-by: grp06 <1573959+grp06@users.noreply.github.com>
Reviewed-by: @grp06
2026-03-26 15:37:40 -07:00
Peter Steinberger
883239a560 build: prepare 2026.3.25 unreleased 2026-03-26 13:57:45 +00:00
Tak Hoffman
ab37d8810d test: introduce planner-backed test runner, stabilize local builds (#54650)
* test: stabilize ci and local vitest workers

* test: introduce planner-backed test runner

* test: address planner review follow-ups

* test: derive planner budgets from host capabilities

* test: restore planner filter helper import

* test: align planner explain output with execution

* test: keep low profile as serial alias

* test: restrict explicit planner file targets

* test: clean planner exits and pnpm launch

* test: tighten wrapper flag validation

* ci: gate heavy fanout on check

* test: key shard assignments by unit identity

* ci(bun): shard vitest lanes further

* test: restore ci overlap and stabilize planner tests

* test: relax planner output worker assertions

* test: reset plugin runtime state in optional tools suite

* ci: split macos node and swift jobs

* test: honor no-isolate top-level concurrency budgets

* ci: fix macos swift format lint

* test: cap max-profile top-level concurrency

* ci: shard macos node checks

* ci: use four macos node shards

* test: normalize explain targets before classification
2026-03-25 18:11:58 -05:00
Peter Steinberger
97a7e93db4 build: prepare 2026.3.24 release 2026-03-25 09:31:05 -07:00
Peter Steinberger
e9ac2860c1 docs: prepare 2026.3.24-beta.2 release 2026-03-25 06:58:39 -07:00
Peter Steinberger
b19cc399b6 test: fix clobbered config snapshot expectation 2026-03-25 04:54:37 -07:00
Peter Steinberger
d874f3970a build: prepare 2026.3.24-beta.1 2026-03-25 04:41:26 -07:00
Tak Hoffman
9c7823350b feat: add /tools runtime availability view (#54088)
* test(memory): lock qmd status counts regression

* feat: make /tools show what the agent can use right now

* fix: sync web ui slash commands with the shared registry

* feat: add profile and unavailable counts to /tools

* refine: keep /tools focused on available tools

* fix: resolve /tools review regressions

* fix: honor model compat in /tools inventory

* fix: sync generated protocol models for /tools

* fix: restore canonical slash command names

* fix: avoid ci lint drift in google helper exports

* perf: stop computing unused /tools unavailable counts

* docs: clarify /tools runtime behavior
2026-03-24 21:09:51 -05:00
scoootscooob
3a4cc89c53 fix: allow compact retry after failed session compaction (#53875) 2026-03-24 11:23:42 -07:00
scoootscooob
a395c757ab Chat UI: guard compact retries 2026-03-24 10:58:09 -07:00
scoootscooob
19093112ce Chat UI: tighten compact transport handling 2026-03-24 10:58:09 -07:00
scoootscooob
44e27c6092 Webchat: handle bare /compact as session compaction 2026-03-24 10:58:09 -07:00
Val Alexander
a710366e9e feat(ui): Control UI polish — skills revamp, markdown preview, agent workspace, macOS config tree (#53411) thanks @BunsDev
Co-authored-by: BunsDev <68980965+BunsDev@users.noreply.github.com>
Co-authored-by: Nova <nova@openknot.ai>
2026-03-24 01:21:13 -05:00
Peter Steinberger
5ab3782215 fix: add config clobber forensics 2026-03-24 04:50:30 +00:00
Peter Steinberger
dc4d2ca263 build: prepare 2026.3.24 2026-03-23 21:05:59 -07:00
Peter Steinberger
6c58277577 build: prepare 2026.3.23 2026-03-23 12:58:00 -07:00
Peter Steinberger
870b0d216a build: prepare 2026.3.23-beta.1 2026-03-23 11:54:49 -07:00
Vincent Koc
8b02ef1332 fix(android): gate canvas bridge to trusted pages (#52722)
* fix(android): gate canvas bridge to trusted pages

* fix(changelog): note android canvas bridge gating

* Update apps/android/app/src/main/java/ai/openclaw/app/node/CanvasActionTrust.kt

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(android): snapshot canvas URL on UI thread

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-23 01:24:51 -07:00
Peter Steinberger
4d50084c6e fix(exec): escape invisible approval filler chars 2026-03-22 22:52:14 -07:00
Peter Steinberger
412a3eb1ac build: bump version to 2026.3.22 2026-03-22 11:58:33 -07:00
Vincent Koc
4113db7d78 fix(protocol): sync generated swift bindings 2026-03-22 11:58:25 -07:00
Peter Steinberger
719bfb46ff style: format macos sources for ci 2026-03-22 17:32:30 +00:00
Kaneki
d551d8b8f7 fix: make Android current-location callback cancellation-safe (#52318) (thanks @Kaneki-x)
* Android: make current-location callback cancellation-safe

* fix: make Android current-location callback cancellation-safe (#52318) (thanks @Kaneki-x)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 22:40:45 +05:30
Kaneki
c7788773bf fix: serialize TalkModeManager player cleanup (#52310) (thanks @Kaneki-x)
* Android: fix MediaPlayer double-release race in TalkModeManager

* Android: guard currentPosition read against concurrent player release

* fix: serialize TalkModeManager player cleanup

* fix: serialize TalkModeManager player cleanup (#52310) (thanks @Kaneki-x)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 22:31:30 +05:30
Peter Steinberger
a94ec3b79b fix(security): harden exec approval boundaries 2026-03-22 09:35:25 -07:00
Felippe Mercurio
8790c54635 fix(android): use scheme default port for gateway setup URLs (#43540)
* fix(android): use scheme default port for gateway setup URLs

* test(android): cover gateway endpoint default ports

* fix(android): preserve direct gateway default port

* fix(android): preserve explicit cleartext port display

* fix: preserve Android gateway setup URL ports (#43540) (thanks @fmercurio)

---------

Co-authored-by: clawdia <clawdia@fmercurio.tech>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 10:21:38 +05:30
Goweii
e7e4c68caf Android: update status bar appearance in OpenClawTheme (#51098)
* Android: update status bar appearance in OpenClawTheme

* fix: update Android status bar appearance (#51098) (thanks @goweii)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 09:33:24 +05:30
Kaneki
1e98dbcad3 Android: fix Bitmap memory leaks in PhotosHandler (#41888)
* Android: fix Bitmap memory leaks in PhotosHandler

Bitmaps created by decodeScaledBitmap and intermediate scaled copies
inside encodeJpegUnderBudget were never recycled, leaking native memory
on every photos.latest invocation (up to 20 bitmaps per call).

- latest(): wrap bitmap usage in try/finally to guarantee recycle
- decodeScaledBitmap(): recycle the decoded bitmap after scaling
- encodeJpegUnderBudget(): use try/finally to recycle intermediate
  scaled bitmaps on all exit paths (success, compress failure, and
  cannot-shrink-further early returns)

Made-with: Cursor

* Android: guard decodeScaledBitmap against scale() exceptions

* fix: note Android photos bitmap cleanup (#41888) (thanks @Kaneki-x)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 08:53:26 +05:30
Kaneki
2909d8cd12 Android: fix Bitmap memory leaks in CanvasController snapshots (#41889)
* Android: fix Bitmap memory leaks in CanvasController snapshots

snapshotPngBase64() and snapshotBase64() create bitmaps via
captureBitmap() and scaleForMaxWidth() but never recycle them,
leaking native memory on every canvas snapshot invocation.

Wrap both methods in nested try/finally blocks:
- outer: always recycles the captured bitmap
- inner: recycles the scaled bitmap only when it differs from the
  captured one (scaleForMaxWidth returns `this` when no scaling needed)

Made-with: Cursor

* fix: note Android canvas snapshot bitmap leak in changelog (#41889) (thanks @Kaneki-x)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 08:50:42 +05:30
Kaneki
88da51d91b Android: fix temp file leak in CameraHandler.handleClip (#41890)
* Android: fix temp file leak in CameraHandler.handleClip

When readBytes() throws (IOException, OOM, etc.), the recorded clip
file was never deleted because delete() only ran on the success path.

Move file.delete() into a finally block so the temp file is cleaned up
regardless of whether readBytes() succeeds or fails.

Made-with: Cursor

* fix: Android camera clip cleanup (#41890) (thanks @Kaneki-x)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 08:49:50 +05:30
kaneki
f7866c1c15 Android: escape SQL LIKE wildcards in contacts search query
The contacts search passed user input directly into a LIKE pattern
without escaping % and _ characters, causing them to act as SQL
wildcards and return incorrect results.

Add an escapeLikePattern() helper that escapes \, %, and _ with a
backslash, and add ESCAPE '\' to the selection clause so SQLite
treats them as literal characters.

Made-with: Cursor
2026-03-22 08:48:29 +05:30
kaneki
d38561acbe Android: fix Bitmap memory leaks in CameraCaptureManager.snap 2026-03-22 08:44:06 +05:30
Kaneki
d6346aaf63 Android: fix sensor callback race condition in MotionHandler (#43781)
* Android: fix sensor callback race in MotionHandler using tryResume

* call completeResume before unregisterListener to avoid coroutine leak

* replace internal tryResume/completeResume with AtomicBoolean guard

* use CancellableContinuation.resume(value, onCancellation) for cancellation safety

* use non-deprecated resume overload for kotlinx.coroutines 1.10+

* fix: simplify Android motion continuation resume

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 08:41:02 +05:30
Kaneki
e7814f7ba0 Android: fix incomplete JS string escaping in A2UI action status (#43784)
* Android: fix incomplete JS string escaping in A2UI action status

* escape U+2028/U+2029 Unicode line terminators in JS strings

* refactor(android): serialize A2UI action status strings

* fix: serialize Android A2UI action status strings (#43784) (thanks @Kaneki-x)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 08:39:53 +05:30
Ayaan Zaidi
b67baae1f6 fix: make permission rationale completion single-shot 2026-03-22 08:34:02 +05:30