Commit Graph

39444 Commits

Author SHA1 Message Date
Peter Steinberger
f8e35afecc feat: avatar upload UI, self-service profiles, server-side avatar route (#111421)
* feat: avatar upload UI, self-service profiles, server-side avatar proxy

* refactor(ui): make resolveAvatar synchronous so avatar updates render immediately

resolveAvatar no longer does async work (gravatar moved server-side), so
the until()-deferred render left the identity chip img stale after
updateSelfUser. Rendering synchronously reuses the img element and
reflects avatarUrl changes on the next render.

* fix(gateway): bound avatar Gravatar lookup to one timeout budget

Linked-email Gravatar lookups ran sequentially, each with its own 5s
timeout, so an upstream outage stalled the held connection for
5s x linked-email-count. Resolve them concurrently and pick the first
hit in email order, keeping primary-email precedence while capping the
request to a single timeout budget.

* fix(gateway): cap per-profile Gravatar fan-out to bound sockets and memory

A profile with many linked emails would fan out one concurrent fetch per
email with no bound, each able to buffer up to MAX_GRAVATAR_BYTES before
the cache budget applies. Cap the lookups to the first 8 primary-ordered
emails so a single avatar request holds a bounded number of sockets and
transient bytes.

* test: reconcile avatar tests with server-side gravatar model after merge

main landed a client-side Gravatar path (browser computes the gravatar.com
URL); this branch resolves avatars through the same-origin gateway route,
which is the only approach that works under the Control UI CSP (img-src
'self'). Update the identity-section, app-sidebar footer chip, and
profile-page e2e expectations to assert the canonical /api/users/<id>/avatar
route (gateway serves the Gravatar fallback behind it) instead of a
CSP-blocked direct gravatar.com image.

* test(gateway): fix fetchImpl mock param type for check-test-types

The Gravatar mock typed its param as (url: string), narrower than the
fetchImpl signature (URL | RequestInfo); function-param contravariance
made it unassignable under tsgo:test. Widen to the fetch input type and
extract the URL via a small helper that avoids no-base-to-string on a
Request.

* fix(gateway): short-circuit Gravatar lookups and version presence avatar URL

Two autoreview findings on the avatar path:

- Privacy: the concurrent Promise.all fan-out queried every linked email's
  hash against Gravatar even when the primary already had one, exposing
  secondary work/personal addresses. Resolve sequentially with short-circuit
  so a later hash is disclosed only after the earlier email is a definite
  miss, under one shared request deadline that still bounds total latency.

- Staleness: presence published an unversioned /api/users/<id>/avatar, so a
  reconnecting viewer's <img> kept the stale cached image after an upload.
  Carry the profile revision as ?v=<updatedAt> so a changed avatar refetches.
2026-07-19 08:52:01 -07:00
Peter Steinberger
1ef99e6dfb feat(agents): authoritative write diffs end to end (#111456)
* feat(agents): authoritative write diffs end to end

The write tool now reports what actually happened: no-op (changed:false),
created files (created:true with a bounded numbered diff), and overwrites
(created:false with a real old-to-new diff when the old content is
readable text within byte, line, and edit-distance budgets — unknown
removals are never fabricated). The gateway history projection forwards
the changed/created flags, the web and iOS write rows prefer the
authoritative diff and suppress the +N -0 stat when creation is not
proven, and the iOS transcript cache persists one bounded apply_patch
envelope so patch diffs survive cold opens.

* chore(i18n): sync native inventory
2026-07-19 08:48:26 -07:00
Peter Steinberger
ca3a1873a6 fix(test): make broad shard execution deterministic (#111416)
* fix(test): harden broad shard execution

* test: allow broad-profile contention

* style(telegram): remove redundant chat id cast

* style(test): preserve setup test spacing
2026-07-19 08:39:16 -07:00
Peter Steinberger
8c7f09a3c4 feat(system-agent): durable rolling transcript with openclaw.chat.history (#111440)
* feat(system-agent): durable rolling transcript with openclaw.chat.history

* chore(ui): scanner-safe auth root in custodian session ownership key

* fix(system-agent): durable reset boundary for transcript seeding

* fix(ui): ownership-aware custodian session rotation with capability gating

* fix(ui): bounded history load and reconnect-safe transcript refresh

* fix(ui): keep unknown-outcome warning and event nudges across transport transitions

* fix(ui): flag-backed unknown-outcome warning independent of retry state

* fix(ui): armed ownership boundaries and abandon-before-rotate ordering

* chore(ui): localize the server-side sensitive mask in durable history

* fix(ui): repair rebase-dropped import and mock arity

* chore: gate fixes — void history handler, module-local transcript internals

* refactor(gateway): leaf history-turn contract to keep the module graph acyclic

* chore(gateway): stamp openclaw.chat.history with its introduction train

* test(gateway): record openclaw.chat.history in the 2026.7 train pin
2026-07-19 08:37:00 -07:00
Peter Steinberger
223235044a fix(cli): exit cleanly on subcommand-group --help (lazy register handle leak) (#111433)
Lazy command-group registration must import the real command tree to render complete help. On macOS with NODE_USE_SYSTEM_CA=1, those imports start Node's system CA loader worker; natural shutdown can block in CleanupCachedRootCertificates while joining LoadSystemCACertificates.

Request the existing stream-flushed one-shot exit immediately after successful Commander help parsing, covering both CommanderError and normal-return plugin help without affecting leaf command execution.
2026-07-19 08:10:56 -07:00
Peter Steinberger
356bec6f5d fix(usage): price usage rows with the owning agent's model registry (#111389)
* fix: scope usage pricing by agent

* fix(usage): satisfy pricing check gates
2026-07-19 07:57:50 -07:00
Peter Steinberger
31423de908 fix(channels): preserve ingress shutdown and named-account setup (#111449)
* fix(channels): repair plugin prerelease regressions

* chore: leave release notes to release automation

* fix(channels): update plugin SDK API baseline
2026-07-19 07:57:37 -07:00
Peter Steinberger
adf02e8de4 refactor(plugin-sdk): retire global provider publication (#111426)
* refactor(plugin-sdk): retire global provider publication

* docs: refresh SDK migration map
2026-07-19 07:44:11 -07:00
Peter Steinberger
783a5d21cf refactor(config): purge numeric tuning knobs behind built-in defaults (#111382) 2026-07-19 07:35:45 -07:00
Peter Steinberger
ec01949d86 feat(ui): gravatar fallback in shared avatar primitive (#111418)
* feat(ui): gravatar fallback in shared avatar primitive

* fix(ui): expire gravatar negative cache instead of page-lifetime poisoning

* docs(ui): name gravatar retry tradeoff at the negative cache

* fix(ui): scope avatar failures to current viewer
2026-07-19 07:12:11 -07:00
Peter Steinberger
e71ddb5c70 fix(onboard): reject unknown auth choices (#111409) 2026-07-19 07:09:37 -07:00
Peter Steinberger
d96a5e2c9e fix(system-agent): rebind verified model routes (#111431) 2026-07-19 07:07:44 -07:00
xingzhou
b4a206fc41 fix(gmail): prevent duplicate watch renewals during stalls (#108974) 2026-07-19 22:05:04 +08:00
Peter Steinberger
3a85143d97 fix(qa): align ask-user protocol shape (#111429) 2026-07-19 07:03:47 -07:00
xingzhou
7ea4e6701e fix(export): prevent broken emoji in HTML tool call previews (#104054) 2026-07-19 22:00:31 +08:00
Peter Steinberger
c42ceb8770 test(gateway): await complete trajectory export instructions (#111427) 2026-07-19 06:59:28 -07:00
Peter Steinberger
4d8462afdb test(sessions): isolate store pruning integration test (#111414) 2026-07-19 06:59:22 -07:00
Peter Steinberger
5ae1f7f0f5 fix(agents): reuse configless prepared runtime (#111423) 2026-07-19 06:56:19 -07:00
Peter Steinberger
d9465c941e fix(gateway): constrain proxy device auto-approval roles (#111394) 2026-07-19 06:52:15 -07:00
Peter Steinberger
d3f2c5ad81 fix(agents): handle deadline race in native hook relay (#111413) 2026-07-19 06:50:31 -07:00
Peter Steinberger
ccea4ea440 fix(models): support nested policy wildcards (#111350) 2026-07-19 06:47:42 -07:00
Peter Steinberger
a5323301e9 fix(swarm): live agents.run fan-outs launch collectors (#111379)
* fix(swarm): preserve host identity for collector launches

* test(swarm): type the in-process gateway dispatcher

* chore: drop changelog entry — release generation owns CHANGELOG

* test(swarm): satisfy promise executor lint
2026-07-19 06:08:30 -07:00
Peter Steinberger
8d2e616483 fix(gateway): preserve explicit approval ids for validation (#111388) 2026-07-19 06:06:50 -07:00
Peter Steinberger
06f5f73e47 refactor: own model discovery by runtime lifecycle (#111173)
* refactor(agents): prepare model runtime catalogs

Build lifecycle-owned model and auth snapshots, carry prepared stores into hot agent paths, and serialize config/auth publication.

Credits @zeroaltitude's #90741 investigation and benchmark approach.

* refactor: finish lifecycle-owned model discovery

* fix: align prepared model catalog contracts

* test: align lifecycle catalog mocks

* test: fix prepared catalog type fixtures

* refactor: split prepared model runtime ownership

* fix: import prepared runtime replacement gate type

* test: split media runtime coverage

* test: preserve image auth fixture key types

* test: isolate lifecycle gate fixtures

* chore: keep release changelog owned

* refactor: finish prepared model catalog migration

* test: keep catalog review fixtures scanner-safe

* refactor: preserve lifecycle model runtime ownership

* fix: close prepared runtime lifecycle races

* fix: preserve compaction workspace fallback

* chore: document btw generation rebinding

* fix: preserve prepared generation boundaries

* fix: keep model-list discovery flag explicit

* fix: serialize standalone model runtime activation

* refactor: migrate subagent model catalog lookup

* refactor: clarify doctor catalog lookup seam

* chore: refresh plugin sdk api baseline

* test: migrate swarm catalog dependency

* refactor(telegram): rename runtime catalog seam

* refactor: extract model-aware tool context

* test(models): isolate lifecycle catalog fixtures

* refactor(agents): avoid btw parameter rebinding

* fix(net-policy): align root ipaddr dependency

* fix(build): keep net policy dependency bundled

* fix(deadcode): document net policy compile dependency
2026-07-19 05:30:54 -07:00
Peter Steinberger
3b84a55d99 refactor(protocol): pre-publish cheat-window cleanup and vintage tracking (#111041)
* fix(codex): drain dynamic-tool handlers before side-thread cleanup

* refactor(protocol): rename question ids to questionId and flatten answer maps

* refactor(protocol): slim worker stack and unify session-catalog shapes

* refactor(protocol): delete dead public surface and polish packaging

* feat(protocol): track release-train vintage on gateway methods and schemas

* fix(apps): align question surfaces merged from main with reshaped protocol

* test(health): shape secret fixtures to scanner-safe token names

* test(health): use scanner-safe token fixtures

* fix(apps): align question surfaces merged from main with reshaped protocol

* fix(ci): prove reshaped protocol in shallow checks

* fix(ui): align sidebar question fixtures with protocol

* fix(apps): read flat Swift question answers

* fix(apps): align question surfaces merged from main with reshaped protocol

* fix(apps): refresh native question inventory

* fix(apps): align macOS snapshot fixtures with protocol

* fix(ui): align narration question fixture with protocol
2026-07-19 04:07:15 -07:00
Peter Steinberger
104691f822 feat(swarm): add QuickJS guest orchestration (#111298)
* feat(swarm): add QuickJS guest orchestration (#110325)

* fix(agents): turn-stable swarm replay identity — distinct exec invocations cannot collide

* fix(agents): turn-stable swarm replay identity — distinct exec invocations cannot collide

* fix(agents): turn-stable swarm replay identity — distinct exec invocations cannot collide
2026-07-19 03:58:59 -07:00
Peter Steinberger
bbcfec9e96 fix(channels): prevent outbound echoes and expose native login (#111341)
* fix(channels): centralize outbound echo suppression

* chore(plugin-sdk): refresh channel outbound surface

* test(commands): avoid native plugin fallback loading

* refactor(channels): separate outbound echo state

* docs(changelog): note channel action decisions

* fix(discord): align webhook preflight call

* fix(discord): use type-only thread binding import

* fix(channels): stream login blocks and widen turn results

* test(channels): narrow drop-capable turn results

* fix(channels): address echo and reply edge cases
2026-07-19 03:49:11 -07:00
Peter Steinberger
ef91ce5712 feat: keep reset session history searchable (#111194)
* feat(sessions): retain reset history in sqlite with physical disk budget

* fix(sessions): satisfy test-types, knip export scan, and docs map

* fix(sessions): align behavioral suites and flip proof with retained history, route-aware cleanup plans
2026-07-19 03:38:51 -07:00
Peter Steinberger
5c9916950e feat(gateway): watched sessions in presence with viewer facepiles (#111225)
* feat(gateway): expose watched sessions in presence

* fix(gateway): resolve concurrent watched-session rollbacks via in-flight state

* fix(ui): viewing CI conformance — lazy facepile, bindings, dead exports

* fix(ui): move viewer presence projection out of the startup chunk

* fix(ui): capture sessionKey before facepile filter closure
2026-07-19 02:53:19 -07:00
Peter Steinberger
cfe4096db6 fix(cron): separate command delivery failures (#111345) 2026-07-19 02:50:47 -07:00
Peter Steinberger
d4ed08994d fix(onboard): validate reset preflight (#111348) 2026-07-19 02:42:49 -07:00
Alex Knight
a868d34804 Fix fractional restart handoff migration (#110231)
Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com>
2026-07-19 19:42:27 +10:00
Peter Steinberger
b9fa1ffa27 feat(gateway): system change history RPC and Ask OpenClaw recent-changes panel (#111286)
* feat(gateway): system change history RPC and Ask OpenClaw recent-changes panel

* test(gateway): fix journal fixtures, split custodian page tests, refresh docs map

* chore: quiet lint on journal reader tests and custodian harness
2026-07-19 02:38:05 -07:00
Peter Steinberger
4e7ef6223c fix(cron): keep paced schedules stable across force runs and edits (#111331)
* fix(cron): preserve cadence ownership

* fix(cron): satisfy maintenance lint
2026-07-19 02:26:28 -07:00
Peter Steinberger
a5a05466fc fix(mcp): bound probe initialization (#111318) 2026-07-19 02:26:14 -07:00
Peter Steinberger
10313e3eee refactor(sessions): keep late-media attachment text out of persisted transcripts (#111293)
* refactor(sessions): keep late-media attachment text out of persisted transcripts

Late-resolved media appended a second user turn whose content was literal
"[media attached: <path>]" lines, so clients rendered wire scaffolding
under the image — same leak class as #111204. Persist those turns bare
(media fields + a protected __openclaw.lateMedia marker, image blocks
kept), and project the attachment lines at the LLM boundary and the
history-image-prune stage instead, byte-identical for providers across
string, array, and legacy forms. Also dedupes media-field sniffing into
a shared hasPersistedMedia helper.

* fix(sessions): satisfy type gates for late-media boundary projection

* fix(agents): narrow prune content cast to array element type

* test(sessions): split transcript persistence suite under max-lines cap
2026-07-19 02:14:19 -07:00
Peter Steinberger
11beef19e2 fix(cli): keep plugin help transport-free (#111322) 2026-07-19 02:00:35 -07:00
zhang-guiping
dd16befe58 fix(logs): bound stalled journal subprocesses 2026-07-19 16:56:54 +08:00
Peter Steinberger
e20d4cd450 fix(media): gate inbound audio on structured media facts (#111315)
hasInboundAudio previously accepted <media:audio> placeholder bodies,
[Audio transcript headers, and filename sniffing alongside MediaTypes.
It now consumes only the structured facts channels already carry
(MediaType/MediaTypes, kind audio or audio/*), removing the string
reverse-engineering ahead of the placeholder-elimination program.
Discord — the one channel with a coverage hole — now carries its native
audio classification (MIME, voice fields, constrained filename fallback)
as structured kind: "audio", with definitive fetched/declared MIME
precedence so generic container types cannot erase declared audio and
filename hints cannot override definitive non-audio MIME.
2026-07-19 01:55:26 -07:00
Peter Steinberger
8631832048 fix: workspace divergence no longer wedges cloud-worker sessions (#111244)
* fix(cloud-workers): resolve workspace divergence with keep-local conflicts

* fix: retain workspace conflicts during worker reclaim

* style: satisfy workspace reconciliation lint

* chore: defer cloud worker changelog to release

* refactor: split cloud workspace reconciliation modules

* fix: satisfy workspace module boundary checks
2026-07-19 01:49:35 -07:00
Peter Steinberger
2e8b042f9f feat(gateway): resolve durable profile identity at connection setup (#111311) 2026-07-19 01:41:35 -07:00
Mason Huang
8c0e876e85 fix: prevent cumulative usage from inflating session context (#108323)
* fix: use last-call usage for session context

* fix: preserve final nonzero call usage

* fix: keep exact usage snapshots context-scoped

* refactor(agents): remove unused last-call accumulator

* fix(agents): scope usage fallback to uncompacted attempts

* test(agents): type compaction usage fixture

* test(agents): use provider usage fixture shape
2026-07-19 16:40:55 +08:00
Peter Steinberger
f07a1fb502 refactor: centralize bounded file reads in fs-safe (#111104)
* refactor: use fs-safe bounded descriptor reads

* build: update fs-safe to 0.4.2

* build: refresh root npm shrinkwrap

* fix: satisfy bounded read return paths

* fix: update fs-safe integration for latest main

* fix: adopt fs-safe overflow compatibility release

* build: complete fs-safe lockfile update

* build: update fs-safe to 0.4.4

* build: refresh plugin SDK API baseline

* test: follow fs-safe bounded read seam
2026-07-19 01:29:23 -07:00
Peter Steinberger
96c9cc112c fix(cron): preserve script state and stop stale runs after restart (#111292)
* fix(cron): preserve script execution boundaries

* chore: keep release changelog unchanged
2026-07-19 01:24:19 -07:00
Peter Steinberger
918f6615d0 feat(ui): Swarm progress widget — dot grid per swarm group (#110325) (#111297)
* feat(ui): Swarm progress widget — dot grid per swarm group (#110325)

* fix(ui): keep swarm renderer internals private
2026-07-19 01:19:56 -07:00
xingzhou
7b3a8dba14 fix(meeting-bot): preserve spawn failure diagnostics (#107614) 2026-07-19 16:17:46 +08:00
Peter Steinberger
3a5da4faa8 feat(ui): live agent activity subtitles on running sidebar sessions (#111221)
* feat(ui): live agent activity subtitles on running sidebar sessions

* refactor(ui): lazy-load narration controller off the startup chunk, unexport test-only symbols

* chore(ui): raise startup JS budget to 312 KiB for the lazy narration feature

* test(ui): restore real timers after narration controller cases
2026-07-19 01:08:06 -07:00
Peter Steinberger
4efcea1fd2 feat(browser): send pages to OpenClaw from the Chrome extension (#111158)
* feat(browser): send pages to the main session from the Chrome extension

One-click page share in the OpenClaw Chrome extension: toolbar popup with an
optional note, page/selection context menu, and Alt+Shift+S. Capture is
selection-first with a readability heuristic, X/Twitter thread extraction, and
Google Docs plain-text export via the user's session cookies. Payloads ride the
existing paired relay WebSocket as a new pageShare message; the gateway-only
page-share sink wraps page text in the external-content safety boundary, then
enqueues a main-session system event and requests an immediate heartbeat
(hooks/wake semantics). Node-hosted relays report a clear unsupported error.

Capture heuristics adapted from Nat Eliason's MIT-licensed send-to-openclaw.

Co-authored-by: Codex <codex@openai.com>

* fix(browser): keep page-controlled metadata inside the share safety boundary

Review findings: move title/URL inside wrapExternalContent (a hostile <title>
must not become trusted header text), prefer the user's selection over the
full Google Docs export, and pass the context-menu selectionText through so
iframe selections and selections cleared during relay reconnect still win.

* fix(browser): bind context-menu shares to the click-time document

Selection shares from the context menu now send the click snapshot directly
(no recapture), so navigations during relay reconnect cannot mislabel the
source and iframe selections are preserved. The Google Docs selection probe
scans all accessible frames before falling back to the full-document export.

* test(browser): expect the page-share handler in relay server args

* fix(browser): probe only the main frame for Google Docs selections

All-frame injection rejects wholesale when one frame is inaccessible and
returns child frames in nondeterministic order, so the probe now reads the
main frame only. Child-frame selections still share correctly through the
context menu's click-time selectionText; toolbar/shortcut entry sends the
full page for that case (named tradeoff in the code comment).

* fix(browser): satisfy page-share CI gates

---------

Co-authored-by: Codex <codex@openai.com>
2026-07-19 01:07:28 -07:00
Peter Steinberger
0f95e66b7f feat(talk): add durable client voice sessions (#111216)
Live-append voice transcripts into the agent session and persist a per-agent SQLite call record across relay and client transcript paths.

Add run-scoped spoken confirmation for high-impact actions, mutation digests, bootstrap-context injection, talk.client.transcript and talk.client.close protocol methods, and Control UI adoption. This adds zero new configuration.

Co-authored-by: Clifton King <clifton@users.noreply.github.com>
2026-07-19 01:06:49 -07:00
Peter Steinberger
a8b7290f34 feat(gateway): durable user profiles with email aliases and avatars (#111224)
* feat(gateway): durable user profiles with email aliases and avatars

* fix(gateway): compress merge tombstones, content-hash avatar ETags, users CLI json output

* fix(gateway): lean profile listing, scoped avatar routing, typed email validation

* fix(gateway): protocol-complete profile payloads and consistent store reads

* fix(gateway): mark profile schema ensured only after commit

* fix(gateway): avatar endpoint HEAD support and RFC If-None-Match

* fix(gateway): profiles CI conformance — bindings, lint, knip, sql boundary

* feat(gateway): self-service profile edits for authenticated users

* fix(gateway): users.self bootstrap, tombstone-aware ownership, escaped CLI output

* fix(gateway): raw-DDL allowlist entry and lean profile exports
2026-07-19 00:58:43 -07:00