Commit Graph

295 Commits

Author SHA1 Message Date
Val Alexander
245451b6a9 fix(whatsapp): keep QR login state in sync
Keep WhatsApp QR login state synced across gateway, macOS, and UI wait flows.

- Preserve the latest QR data URL/version while login polling rotates codes.
- Keep the wait-result protocol bounded to current QR metadata.
- Stabilize QR rendering and media fixture coverage after rebasing on main.

Validation:
- pnpm test extensions/whatsapp/src/login-qr.test.ts extensions/whatsapp/src/media.test.ts extensions/whatsapp/src/agent-tools-login.test.ts src/gateway/protocol/channels.schema.test.ts src/gateway/server-methods/web.start.test.ts ui/src/ui/controllers/channels.test.ts
- pnpm test:extension whatsapp
- cd apps/macos && swift test --filter ChannelsSettingsSmokeTests
- GitHub PR checks: 62 success, 5 skipped
2026-04-24 15:37:16 -05:00
Peter Steinberger
cb2c36b049 fix: lock realtime talk instructions 2026-04-24 05:33:11 +01:00
Peter Steinberger
04066d246a feat: add browser realtime talk 2026-04-24 03:33:36 +01:00
Marcus Castro
f5f0235bb1 feat(whatsapp): adopt replyToMode quoting (#62305)
* fix(core): align auto-reply threading behavior

* fix(core): propagate reply threading through outbound and gateway

* fix(whatsapp): use cached metadata for native quoted replies

* feat(whatsapp): add configurable native reply quoting
2026-04-23 01:19:47 -03:00
Peter Steinberger
b2472d6560 build: migrate schema deps to typebox 2026-04-23 04:59:42 +01:00
Peter Steinberger
ccf2e77e8d fix: retire one-shot subagent MCP runtimes 2026-04-23 02:46:13 +01:00
Peter Steinberger
d8d0380297 fix: use transport activity for stale health 2026-04-22 08:52:55 +01:00
Peter Steinberger
8645e8655e refactor: share pairing connect detail assembly 2026-04-20 14:24:51 +01:00
Ayaan Zaidi
f070a92e19 fix(gateway): surface pending pairing upgrade details 2026-04-20 13:36:41 +05:30
Ayaan Zaidi
4e01916a7e fix(gateway): report pairing upgrade details 2026-04-20 13:08:04 +05:30
Ayaan Zaidi
66e1c3982d fix(status): sanitize pairing recovery details 2026-04-20 12:33:03 +05:30
Ayaan Zaidi
4bc5eab390 fix(gateway): enrich pairing connect errors 2026-04-20 12:33:03 +05:30
Marcus Castro
aa76cf43f0 fix(whatsapp): stabilize auth state and reconcile local runtime after CLI login (#67815)
* WhatsApp: harden auth persistence and backup recovery

* WhatsApp: model unstable auth state across runtime and setup

* WhatsApp: recover login and monitor startup from unstable auth

* Channels: surface auth stabilizing in status and health

* Gateway protocol: add channels.start surface

* Gateway: reconcile local channel runtime after CLI login

* Channels UI: reflect recovered login start state

* Changelog: note WhatsApp auth stabilization

* Gateway: fix lint in call test
2026-04-19 14:20:46 -03:00
Peter Steinberger
aaad2468c8 refactor: share config delivery context schema 2026-04-19 00:20:28 +01:00
Kagura
2c3542e315 fix: allow unknown properties in WakeParams schema (#68355) (thanks @kagura-agent)
* fix: allow unknown properties in WakeParams schema (#68347)

WakeParamsSchema used additionalProperties: false, rejecting unknown
properties like 'paperclip' from external tools. Changed to
additionalProperties: true for forward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: trim wake params schema comments

* fix: allow unknown properties in WakeParams schema (#68355) (thanks @kagura-agent)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-18 09:10:05 +05:30
Devin Robison
0e7a992d3f fix(agents): filter bundled tools through final policy (#68195)
* fix(agents): filter bundled tools through final policy

* changelog: filter bundled tools through final policy (#68195)

* forward agentId into compaction tool-policy filter

Pass effectiveSkillAgentId to applyFinalEffectiveToolPolicy in the
compaction path so per-agent tool policies apply to bundled tools
during compaction the same way they do during normal runs.

* scope final tool-policy filter to bundled tools only

Running the full tool-policy pipeline on the merged core + bundled tool list
re-filters core tools whose plugin WeakMap metadata no longer survives the
normalize/hook wrappers applied by createOpenClawCodingTools(). Narrow the
helper to only the newly-appended bundled MCP/LSP tools so plugin-provided
core tools keep matching group:plugins and plugin-id allowlist entries.

* harden authorization signals on final tool policy

- message.action gateway handler now server-derives senderIsOwner from the
  authenticated gateway client scopes (ADMIN_SCOPE on client.connect.scopes)
  and ignores any senderIsOwner value on the wire, so a non-admin scoped
  caller cannot spoof owner status to unlock owner-only channel actions or
  owner-only tool policy. Schema keeps the field optional for wire compat
  but documents that it is ignored.

- applyFinalEffectiveToolPolicy now cross-checks caller-provided groupId
  against the session-derived group context resolved from sessionKey (and
  spawnedBy). When they disagree, the caller groupId plus its adjacent
  groupChannel/groupSpace are dropped and a warn is emitted, so a caller
  that fabricates a different group id cannot reach a more permissive
  group-scoped tool policy during the final bundled-tool filter. Added a
  JSDoc trust invariant on the helper input describing the required
  server-verified identity contract.

* align compact agentId resolution with core tools

Drop the explicit agentId on applyFinalEffectiveToolPolicy during
compaction. The core tool set produced just above via
createOpenClawCodingTools(...) also omits agentId, so resolveEffectiveToolPolicy
falls back to resolveAgentIdFromSessionKey(sessionKey) in both places.
Passing effectiveSkillAgentId only to the final filter made the two
policy lookups diverge on legacy/non-agent session keys where the
sessionKey path resolves to main but effectiveSkillAgentId follows the
configured default-agent path, which could deny or allow bundled tools
under a different per-agent policy than the already-created core tools.

* tighten trusted propagation for owner and group signals

- message.action gateway handler: full-operator callers (shared-secret
  bearer or operator.admin scope) now propagate the request-provided
  senderIsOwner through to channel action handlers instead of having it
  hard-coded off. Previously the hardened path force-derived ownership
  from ADMIN_SCOPE alone, which broke owner-gated actions when the
  trusted runtime forwards them via the least-privilege gateway path
  (callGatewayLeastPrivilege requests only the method scope, so even
  legitimate owner senders were downgraded to senderIsOwner=false).
  Narrowly-scoped callers (e.g. operator.write-only) still have the wire
  value forced to false so a non-admin caller cannot assert ownership.

- applyFinalEffectiveToolPolicy: fail-closed when the session key and
  spawnedBy encode no group context. Previously the helper only dropped
  a caller-provided groupId that conflicted with a non-empty set of
  session-derived group ids, which left an accept-caller fallback open
  when the session had no group context at all (direct/cron/subagent
  session keys). An attacker who could run without a group-bound session
  could then supply an arbitrary groupId and reach a more permissive
  group-scoped tool policy. Now: no session-derived group context plus
  any caller-provided groupId drops the caller value and warns.

* suppress unavailable-core-tool warnings in bundled-only pass

applyToolPolicyPipeline infers its coreToolNames reference set from the
tools array it is filtering. The bundled-only second pass only sees the
MCP/LSP subset, so normal core allowlist entries (for example
tools.allow: ['read', 'exec']) would look "unknown" during this pass
and emit misleading warnings even when the config is valid for the full
effective tool set — polluting logs and potentially evicting real
diagnostics from the shared warning cache. Set
suppressUnavailableCoreToolWarning on every step of this pass so known
core-tool allowlist entries stay silent; genuinely unknown entries
still surface through the otherEntries warning path.
2026-04-17 14:45:12 -06:00
Val Alexander
0b6c39be18 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev
Co-authored-by: Val Alexander <bunsthedev@gmail.com>
2026-04-17 02:48:30 -05:00
Val Alexander
d0c83777fb Control UI: refresh slash commands from runtime command list (#65620)
* Refresh slash commands from runtime command list

- Load live slash commands into the chat UI and command palette
- Keep builtin fallback behavior when runtime commands are unavailable

* Apply suggestion from @greptile-apps[bot]

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

* Control UI: harden runtime slash command discovery

* Control UI: bound runtime slash command payloads

* Control UI: use default agent for plain session keys

* Control UI: guard malformed slash command payloads

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-04-12 20:38:37 -05:00
Tak Hoffman
c37e49f275 Add /trace toggle and fix Active Memory diagnostics 2026-04-12 13:20:22 -05:00
Marcus Castro
aaae1aeb8f fix(whatsapp): route react through gateway (#64638)
* fix(whatsapp): route react through gateway

* fix(gateway): accept full message action tool context
2026-04-11 11:38:10 -03:00
Peter Steinberger
60b61288c4 test: fix cron and binding stability 2026-04-11 02:10:47 +01:00
Peter Steinberger
85ee6f2967 fix: stabilize live qa suite routing 2026-04-11 00:58:40 +01:00
Peter Steinberger
c2e2b87f28 fix(acp): classify gateway chat error kinds 2026-04-10 10:12:07 +01:00
samzong
0f0a192ecb [Fix] agents.create RPC: support model param, write identity to config (#61577)
* fix(gateway): support model on agents.create, write identity to config

Signed-off-by: samzong <samzong.lu@gmail.com>

* fix(gateway): sync agent identity file writes

* fix(gateway): preserve richer identity markdown

* fix(gateway): preserve destination identity on workspace moves

* fix(gateway): preserve source identity on workspace moves

---------

Signed-off-by: samzong <samzong.lu@gmail.com>
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-04-10 14:36:22 +08:00
samzong
723dec0432 [Feat] Gateway: add commands.list RPC method (#62656)
Merged via squash.

Co-authored-by: samzong <samzong.lu@gmail.com>
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
Reviewed-by: @frankekn
2026-04-10 14:28:47 +08:00
Mulualem Eshetu
4977c4ab82 fix(control-ui): preserve configured model metadata in picker (#61382)
Merged via squash.

Prepared head SHA: c738f6f146
Co-authored-by: Mule-ME <83214007+Mule-ME@users.noreply.github.com>
Co-authored-by: mukhtharcm <56378562+mukhtharcm@users.noreply.github.com>
Reviewed-by: @mukhtharcm
2026-04-09 16:28:43 +05:30
Peter Steinberger
8d79b87dc7 style: apply formatter output 2026-04-08 09:58:22 +01:00
Peter Steinberger
3ff56020b1 refactor: dedupe gateway trimmed readers 2026-04-08 01:36:38 +01:00
Peter Steinberger
434d56a948 refactor: dedupe lowercase helper readers 2026-04-07 10:37:39 +01:00
Peter Steinberger
ce7ef626b8 refactor: dedupe gateway helper readers 2026-04-07 08:40:35 +01:00
Sam Padilla
f1b7dd6c0a fix: honor lightContext in spawned subagents (#62264) (thanks @theSamPadilla)
* Add lightContext support for spawned subagents

* Clarify and guard lightContext usage in sessions_spawn

* test: guard sessions_spawn lightContext acp misuse

* fix: honor lightContext in spawned subagents (#62264) (thanks @theSamPadilla)

---------

Co-authored-by: Jaz <jaz@bycrux.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-07 11:05:45 +05:30
Peter Steinberger
fdacaf0853 test: sync messaging runtime and talk expectations 2026-04-07 05:46:13 +01:00
scoootscooob
f4fcaa09a3 feat(gateway): add compaction checkpoints (#62146)
Merged via squash.

Prepared head SHA: e37542554a
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Reviewed-by: @scoootscooob
2026-04-06 17:27:43 -07:00
Peter Steinberger
85b3203421 fix(agents): carry async media wake attachments structurally 2026-04-06 03:03:53 +01:00
Peter Steinberger
dd8525cacd fix(gateway): accept music generation internal events 2026-04-06 02:18:15 +01:00
Peter Steinberger
3fcff952ba feat(agents): detach video generation completion 2026-04-06 00:50:32 +01:00
Peter Steinberger
b8e2e5c251 test: genericize talk provider fixtures 2026-04-05 18:52:18 +01:00
Nimrod Gutman
28955a36e7 feat(ios): add exec approval notification flow (#60239)
* fix(auth): hand off qr bootstrap to bounded device tokens

* feat(ios): add exec approval notification flow

* fix(gateway): harden approval notification delivery

* docs(changelog): add ios exec approval entry (#60239) (thanks @ngutman)
2026-04-05 16:33:22 +03:00
Peter Steinberger
9a0d88a868 refactor: move talk config contract under plugin 2026-04-05 14:26:35 +01:00
Ayaan Zaidi
823ce7957d fix(gateway): harden talk.speak responses 2026-04-05 08:20:47 +05:30
Nimrod Gutman
a9140abea6 fix(auth): hand off qr bootstrap to bounded device tokens 2026-04-04 15:57:38 +09:00
Vincent Koc
c4597992ca fix(config): remove remaining legacy surface leaks (#60726) 2026-04-04 15:55:31 +09:00
Vincent Koc
561db47566 docs(boundaries): add import-topology guardrails 2026-04-04 14:06:18 +09:00
Vincent Koc
c7a947dc0a fix(config): remove legacy config aliases from public schema 2026-04-04 01:24:14 +09:00
samzong
37ab4b7fdc [Feat] Add ClawHub skill search and detail in Control UI (#60134)
* feat(gateway): add skills.search and skills.detail RPC methods

Expose ClawHub search and detail capabilities through the Gateway protocol,
enabling desktop/web clients to browse and inspect skills from the registry.

New RPCs:
- skills.search: search ClawHub skills by query with optional limit
- skills.detail: fetch full detail for a single skill by slug

Both methods delegate to existing agent-layer functions
(searchSkillsFromClawHub, fetchSkillDetailFromClawHub) which wrap
the ClawHub HTTP client. No new external dependencies.

Signed-off-by: samzong <samzong.lu@gmail.com>

* feat(skills): add ClawHub skill search and detail in Control UI

Add skills.search and skills.detail Gateway RPC methods with typed
protocol schemas, AJV validators, and handler implementations. Wire
the new RPCs into the Control UI Skills panel with a debounced search
input, results list, detail dialog, and one-click install from ClawHub.

Gateway:
- SkillsSearchParams/ResultSchema and SkillsDetailParams/ResultSchema
- Handler calls searchClawHubSkills and fetchClawHubSkillDetail directly
- Remove zero-logic fetchSkillDetailFromClawHub wrapper
- 9 handler tests including boundary validation

Control UI:
- searchClawHub, loadClawHubDetail, installFromClawHub controllers
- 300ms debounced search input to avoid 429 rate limits
- Dedicated install busy state (clawhubInstallSlug) with success/error feedback
- Install buttons disabled during install with progress text
- Detail dialog with owner, version, changelog, platform metadata

Part of #43301

Signed-off-by: samzong <samzong.lu@gmail.com>

* fix(skills): guard search and detail responses against stale writes

Signed-off-by: samzong <samzong.lu@gmail.com>

* fix(skills): reset loading flags on query clear and detail close

Signed-off-by: samzong <samzong.lu@gmail.com>

* fix(gateway): register skills.search/detail in read scope and method list

Add skills.search and skills.detail to the operator READ scope group
and the server methods list. Without this, unclassified methods default
to operator.admin, blocking read-only operator sessions.

Also guard the detail loading reset in the finally block by the active
slug to prevent a transient flash when rapidly switching skills.

Signed-off-by: samzong <samzong.lu@gmail.com>

* fix(skills): guard search loading reset by active query

Signed-off-by: samzong <samzong.lu@gmail.com>

* test: cover ClawHub skills UI flow

* fix: clear stale ClawHub search results

---------

Signed-off-by: samzong <samzong.lu@gmail.com>
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-04-03 19:30:44 +08:00
Peter Steinberger
fff6333773 fix(exec): implement Windows argPattern allowlist flow 2026-04-03 00:09:28 +09:00
Bruno Lorente
ca76e2fedc fix(cron-tool): add typed properties to job/patch schemas (#55043)
Merged via squash.

Prepared head SHA: 979bb0e8b7
Co-authored-by: brunolorente <127802443+brunolorente@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-01 23:41:19 +03:00
Luke
1654c3a851 feat(gateway): make chat history max chars configurable (#58900)
* feat(gateway): make chat history max chars configurable

* fix(gateway): address review feedback

* docs(changelog): note configurable chat history limits
2026-04-01 21:08:37 +11:00
Peter Steinberger
f6317fb747 fix(gateway): stop pinning node commands to pairing state 2026-04-01 18:27:06 +09:00
Peter Steinberger
db0cea5689 refactor(gateway): extract node pairing reconciliation 2026-04-01 18:02:31 +09:00