1544 Commits
Author SHA1 Message Date
Peter Steinberger 30772d5061 fix(sessions): preserve context and lifecycle when forking chats (#132227)
* fix(sessions): preserve fork lifecycle ownership and context

Preserve incognito storage, revalidate message-cut authority at commit, and keep late UI fork results scoped to their presentation. Carry prepared child identity and actual context through subagent cleanup and receipts. Verify native source cuts with canonical projection and preserve supervision connection and cleanup ownership. Document the separate canonical-descendant initialization limitation.

* refactor(agents): remove unused subagent prompt task input

* test(codex): validate native fork fixture request shapes

* fix(codex): avoid inherited labels in native session forks

* fix(test): align fork prompt fixtures and session type imports

* refactor(agents): reuse subagent attachment result type
2026-08-28 20:21:57 -07:00
Ayaan GazaliandPeter Steinberger 3b3372bd76 fix(agents): honor account-scoped history limits instead of silently ignoring them (#119326)
* fix(history): preserve routed limits and provider checkpoint continuity

Honor admitted account and peer policy, retain complete bounded provider checkpoints across short history windows, and recover unsupported replay from durable conversation history.

Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>

* test(history): preserve the JSON recovery serialization assertion

* test(history): assert context-engine admission and snapshot behavior

* fix(ai): preserve SDK compaction response lifetime

Bound compaction response bytes before SDK parsing so request deadlines, body retries, and typed cancellation retain their canonical owner.

Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>

* refactor(ai): simplify compaction test lifecycle and Azure URL normalization

Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>

* test(ai): use the shared deferred helper for compact HTTP checks

Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>
2026-08-28 19:58:28 -07:00
Peter Steinberger 13c11b47a4 fix(presence): keep colliding profiles and raw viewers separate (#132250)
* fix(presence): keep colliding profile and raw viewers separate

Use recorded identity namespaces for ephemeral presence grouping, viewer
exclusion, activity cards, and typing counts. Keep timing facts owned by
each connection so later profile qualification cannot leak activity across
identities, and preserve current self identity over stale hello snapshots.

Fixes #132247. This live-presence repair is separate from the merged
transcript-provenance repair in #132038; persistence and authorization
remain unchanged.

* test(presence): qualify header and activity profile fixtures
2026-08-28 19:45:11 -07:00
Ayaan Zaidi cff996e413 feat(qa): add Convex-leased Telegram userbot proof (#131715)
Replace Telegram Desktop and Mantis proof plumbing with a repository-owned Telegram Test Server skill and ten Convex-leased headless user sessions. Workers keep full harness freedom while the broker owns only exclusive lease lifecycle.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-29 07:56:30 +05:30
Peter Steinberger 52e43a4a4f feat(gateway): auto-apply safe doctor config migrations at startup (#132135)
* feat(gateway): auto-apply safe doctor config migrations at startup

Gateway startup now runs the same deterministic, prompt-free legacy
config-key migrations as "openclaw doctor --fix" when an otherwise
invalid single-file config can be fully migrated, instead of refusing
readiness with a doctor hint. The write happens under the existing
startup migration lease, after state migrations consume retired
locators, only when the complete result validates including plugins,
and keeps the previous config in the .bak ring. Configs using
$include, Nix mode, newer-version configs, update-in-progress runs,
and configs that stay invalid keep the current fail-closed refusal.

This replaces the narrow two-key stable-upgrade repair with the full
migration set (which subsumes it), so headless service gateways just
work across upgrades instead of stopping on retired config keys.

* fix(doctor): keep startup repair preview off the shared state database

resolveStartupConfigSnapshot serves gateway pre-bootstrap selection and
backup discovery, which run before state-database admission. The full
planner resolves plugin doctor contracts through the installed-plugin
registry, which opens the shared SQLite store — a broken store (or
backup's pre-validation guarantee) must not break those callers. The
preview tier now applies only state-free migrations with raw validation;
the preflight committer and canonical-write matcher stay authoritative.

* test(doctor): avoid shadowing the path module in repair fixtures

* test(doctor): pin checkpoint build provenance for unbuilt test environments

CI unit shards and unbuilt checkouts have no dist/build-info.json, so the
checkpoint layer fails open by design and the startup-repair checkpoint
assertions could never hold there. Wrap the real module with a pinned
build identity so recording and needs-checks stay meaningful.

* fix(doctor): reach plugin-owned migrations from the startup trust check

The pre-bootstrap trust check admitted only state-free core migrations,
so a config whose sole repair belongs to a plugin doctor contract was
refused before the plugin-aware preflight could migrate it. The resolver
now runs the full planner first and falls back to the state-free preview
only when the installed-plugin registry store is unreachable, keeping
backup discovery and broken-store startups fail-closed.
2026-08-28 17:56:30 -07:00
Peter Steinberger 48f43ac39d fix(sessions): honor per-agent model policies and aliases (#132205)
Carry the target agent identity through session creation, patching, title preparation, and keyed-session model comparisons. Preserve explicit-empty policy behavior, agent aliases, and the admin gate for actual model changes.
2026-08-28 17:11:36 -07:00
Peter Steinberger a86b427ca8 fix: allow off-catalog chat models under unrestricted policy (#132175)
* fix(models): honor unrestricted chat model policy

* test(models): declare fuzzy fixture model policy

* fix(models): preserve model-provider SDK compatibility
2026-08-28 17:05:51 -07:00
Peter Steinberger 2a4c715aa0 docs: correct chat model selection examples (#132218) 2026-08-28 17:01:47 -07:00
7f9d83aec5 docs: clarify Code Mode opt-in default (#132191)
Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Vito Cappello <3279061+VACInc@users.noreply.github.com>
2026-08-28 19:12:23 -04:00
Peter Steinberger 855346b49f fix: keep CJK compaction summaries within budget (#132145)
* fix: keep CJK compaction summaries within budget

Preserve canonical CJK pressure in bounded worker projections, including tool argument keys and values. Keep raw projection limits separate and avoid loading the session runtime just to estimate tokens. Cover restored chunks and the full summary consumer.

* test: use canonical messages in compaction fixtures

Remove obsolete estimator mocks and represent assistant content as typed blocks. Preserve oversized-retry precedence and sanitization checks with the real estimator.
2026-08-28 15:28:59 -07:00
Peter Steinberger d4bfa4fc8a fix(chat): stop channel messages borrowing profile identities (#132038)
* fix(chat): stop channel messages borrowing profile identities

Record bounded sender provenance at the input source and require a qualified
profile for portraits, person Activity links, viewer matching, and typing.
Carry the same authenticated fact through live presence for optimistic sends.

Keep historical transcript text and labels without guessing profile identity.
Preserve deliberate hook/redaction behavior, reject sender reassignment, and
keep distinct authors separate in chat grouping and display deduplication.
No SQLite schema change or historical backfill.

Closes #131886

* fix(ui): preserve qualified identity in viewer avatars

Carry the recorded live-user identity through presence projection and avatar
rendering instead of manufacturing profiles from raw presence IDs. Mixed
raw-ID groups remain unqualified; their grouping contract stays separate.

Qualify genuine profile fixtures across Gateway, avatar, and browser tests.
Keep a historical same-ID no-link browser control and preserve strong avatar
layout, retry, and missing-image assertions.

Follow-up for #132038; fixes CI and the retained browser-fixture review finding.

* test: synchronize node approval readiness and qualify presence fixtures
2026-08-28 15:01:52 -07:00
Peter Steinberger 6e6a0e59fd fix(qa): keep leases when Gateway startup teardown fails (#131740)
* fix(qa): keep leases when Gateway startup teardown fails

Retain a synchronous QA child owner through startup, replacement, and explicit finalization. Release Gateway-backed transport leases only after authoritative process settlement, independently of cleanup diagnostics. Preserve failure artifacts and primary fixture errors.

Fixes #131643

* test(qa): keep fixture cleanup inside plugin boundaries

* test(qa): retain integrated fixture owners and stop observations

* ci: follow renamed local JSONL socket owner in CodeQL

* test(qa): record reviewed cleanup error suppressions

* test(ci): exercise PR-native network semantic review

Route sensitive changes into the existing semantic gate and restore configured net-policy coverage. Add actual query fixtures, including an intentional red checkpoint for JavaScript-family raw clients before the follow-up predicate repair. PR remains draft until semantic proof and final CI pass.

* fix(ci): classify supported JavaScript network sources

Preserve the existing directory and owner boundaries across TS, MTS, JS, and MJS. Hosted semantic regression 33190472078 failed on exactly the three missing executable rows; expected findings and test exclusions remain unchanged.

* test(ci): isolate network fixtures and retain guard coverage

Use independent fixture stems and explicit MTS extractor inputs while preserving every expected finding. Scan the semantic fixture root for duplicates and keep the exact socket-owner assertion insensitive to formatting.

* test(qa): return confirmed stop in WhatsApp cleanup fixture

* test(qa): own Discord attachment gateway before startup

* ci: fail closed on unavailable CodeQL diff metadata

* test(oc-path): measure synchronous worker CPU budgets
2026-08-28 14:31:29 -07:00
JeromeandAyaan Zaidi 7e05bd49ea fix(agents): stop retrying provider request ceilings (#130275)
Groq can report a per-request size ceiling as a TPM rate-limit error. Record the token-denominated Requested > Limit fact at failover classification so embedded recovery stops compaction and retry with reset guidance, while transport-owning fallbacks can still advance and ordinary TPM throttling retains backoff.

Co-authored-by: Jerome Queck <jeromequeck@jeromegroup.org>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-29 02:19:10 +05:30
Peter Steinberger 75a3e75375 fix: preserve conversation after memory flush exhaustion (#132010)
Optional memory maintenance must not reset unsummarized conversation history. Preserve ordinary replies after exhausted flush retries and surface required compaction failures through the existing recovery outcome.

Fixes #131957
2026-08-28 12:20:39 -07:00
Peter Steinberger 1e6e4027ad feat(profile): enable Git co-author credit by default (#131964)
* feat(profile): enable Git co-author credit by default

Verified GitHub identities now get public `Co-authored-by` credit unless the
person explicitly opts out. An absent `git.coauthor.enabled` row is the default
rather than a refusal, resolved through one shared helper used by both the
attribution resolver and the Control UI toggle.

* fix(profile): fail closed on malformed co-author preference values

The preference API persists arbitrary JSON, so `value !== false` let a
non-boolean row read as consent to publish a verified person's public Git
trailer. Only a missing row or literal `true` now enables credit, with
regression coverage at the attribution resolver and the profile toggle.

* docs(vision): state the team-assistant direction alongside personal use

The privacy rule governs what leaves an install, not what teammates see on a
shared Gateway. Say that explicitly so co-author credit and other shared-session
attribution are not read as a violation of the telemetry opt-in rule, and name
team.openclaw.ai as where OpenClaw is built with OpenClaw.
2026-08-28 12:11:19 -07:00
Peter Steinberger 2518b25d45 fix(qa): prevent early Discord bot reuse and implicit transcript rooms (#131883)
* fix(qa): prevent early Discord bot reuse and implicit transcript rooms

* chore(qa): defer the Crabline dependency update

* fix(ci): use public QA helper and gate skipped report fetches
2026-08-28 11:48:45 -07:00
Peter Steinberger 548c9f2ac4 docs: reframe docs for teams and soften group-chat guidance (#132012)
* docs: reframe for teams and soften group-chat guidance

The docs framed OpenClaw as single-user ("personal AI assistant",
"personal assistant trust model") even though multi-user sessions,
named operator roles, presence, and commit credit shipped. Reframe the
trust model as one trust boundary per gateway (a single operator or a
mutually trusting team), treat group chats as a first-class deployment
with caution scoped to genuinely public rooms, and add a Team setup
guide next to the personal one.

* docs: link Why OpenClaw from README and docs root

Reframe the README intro away from single-operator-only wording, add the
team deployment and Why OpenClaw links, and point the docs landing page
at the architecture case.

* docs: soften security callouts from warnings to notes

* docs: keep Slack DMs on pairing default in team example
2026-08-28 11:47:17 -07:00
Peter Steinberger a6b142c743 fix(ui): keep elapsed time within each independent run (#131846)
Record preparation start at the lifecycle owner and preserve independent send boundaries after failures, without splitting same-run steering. Fixes #131825.
2026-08-28 09:29:47 -07:00
solt_onigiri_andPeter Steinberger c2a0e706e7 fix(active-memory): keep recall errors out of prompt context (#120658)
* fix(active-memory): exclude error payloads from recall context

* fix(active-memory): prioritize failed recall status

* test(active-memory): cover failed recall cleanup and gateway flow

Co-authored-by: soltonigiri <kano.nests@gmail.com>

* test(active-memory): diagnose cleanup rejection and gateway startup

Co-authored-by: soltonigiri <kano.nests@gmail.com>

* fix(active-memory): preserve recall failures through timeout cleanup

Carry terminal and cleanup failure facts through the canonical partial-result
owner so timeout recovery cannot inject earlier memory from failed recall.
Preserve legitimate partial recovery, original cleanup errors and contributor
payload filtering. Cover direct recovery and declare the real Gateway test's
existing built-runtime prerequisite.

Co-authored-by: soltonigiri <kano.nests@gmail.com>

* fix(active-memory): finish cleanup and built Gateway verification

Name the canonical cleanup operation without changing error propagation, align the strict CI prerequisite expectation, and run the real recall proof through an isolated exact-build Gateway process. Preserve all behavioral assertions and deadlines; hosted verification remains required.

Co-authored-by: soltonigiri <kano.nests@gmail.com>

* test(active-memory): exercise authorized chat recall

Use the public interactive chat route, which supplies canonical turn tool authority, for the built Gateway recall regression. Preserve the real provider, memory, failed-status, prompt-isolation, and history assertions and their deadlines.

Co-authored-by: soltonigiri <kano.nests@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: soltonigiri <kano.nests@gmail.com>
2026-08-28 09:26:39 -07:00
Shakker ca1f4fb22e fix: gateway shutdown cannot cancel deferred context-engine maintenance (#131394)
Deferred context-engine maintenance now cooperatively cancels during Gateway stop and accepted restart drain, releasing queued work and owned engine resources without quarantining cancellation-aware plugins.

Fixes #129200.
2026-08-28 17:05:31 +01:00
Peter Steinberger b03d2e79e9 fix(sessions): prevent participant misattribution in Activity (#130986)
* fix(sessions): preserve participant identity and input provenance

Keep profile, agent, remote, observed, and legacy identities distinct in the existing participant table. Record accepted input at admission, including steering, instead of inferring a person from the session creator. Preserve historical membership and counts while leaving ambiguous profile timestamps unknown through stopped-writer Doctor migration.

Project full visibility-filtered person membership before preview limits so Activity does not misattribute channel identities or omit people outside the facepile. Keep participant membership separate from authorization and expose raw-selector ambiguity to memory operators.

Repair Doctor readiness reporting, generic Swift inline-union generation, direct-dispatch metadata handling, and fixture-owned database lifetimes. Verify namespace collisions, real provider input, accepted steering, visibility, backup/migration/reopen boundaries, native decoding, and the built-CLI lifecycle.

Fixes #130661

* fix(macos): isolate readiness and discovery lifecycles

Keep readiness fixtures private for their entire lifetime and give health readiness one deadline owner. Start and cancel slow host discovery with active discovery, not model construction.

Make native protocol, callback, onboarding, and process-cleanup tests observe their intended lifecycle phases without expanding deadlines or weakening assertions. Correct the documented signing default.

Validated with 1,839 parallel native tests, the release product build, causal negative controls, pinned Swift lint/format checks, and fresh isolated autoreview. Native production delta: -5 lines.

* docs(macos): clarify app profile isolation boundaries

* build(protocol): refresh generated Swift install models

* fix(protocol): preserve optional literal field presence

* fix(ci): bound SDK declarations and isolate test lifecycles

Discover the current declaration source graph in a joined child before normal eager emission, and track its complete source-bearing cache inputs. Repair shared jsdom focus teardown and native worker fixture request ordering without changing UI focus ownership or execution fallback policy.

* test(sessions): prove Goal participant upgrade boundaries
2026-08-28 06:04:18 -07:00
Peter SteinbergerandAmp df905a6cb6 fix(sessions): preserve shared history across startup and repairs (#127241)
* fix(doctor): atomically repair session transcripts

* fix(sessions): keep runtime reads and repairs on SQLite owners

Resolve physical session databases once and carry that identity through startup, search, boards, maintenance, and Doctor. Remove automatic legacy JSON import from Gateway startup while preserving explicit Doctor upgrades.

Publish repaired legacy transcripts with strict atomic replacement and preserve the source when backup, write, or rename fails.

* fix(sessions): simplify startup ownership and diagnostics

* test(sessions): migrate legacy history through Doctor in CLI proof

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-28 03:32:53 -07:00
0790f563f9 fix(providers): keep discovered image support for configured models (#125670)
* fix(providers): preserve discovered model input capability

Co-authored-by: qingminlong <qing.minlong@xydigit.com>

* fix(providers): preserve discovered input capabilities

---------

Co-authored-by: qingminlong <qing.minlong@xydigit.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-28 16:51:02 +08:00
Peter Steinberger 14d6bb81ad fix(memory): forget diary claims after session backfill (#131626) 2026-08-28 01:48:08 -07:00
Peter Steinberger 8b7a6a99f4 fix(delivery): preserve retry budget when producer claims expire (#131614) 2026-08-28 01:39:38 -07:00
Ayaan GazaliandPeter Steinberger 0bb870a40a fix(channels): bundled channels reject the documented mediaMaxMb override (#118157)
* fix(channels): enforce documented media limits at byte boundaries

Resolve canonical account caps at native byte consumers, publish QA attachments durably, and refresh global media policy without resurrecting manually stopped accounts. Preserve existing local survivor warnings, remote batch atomicity, transport ceilings, and contributor schema work.

Co-authored-by: Ayaan Gazali <ayaangazali.work@gmail.com>

* fix(qa-channel): serialize preview changes with durable delivery

* test(qa-channel): reuse the typed deferred helper

* fix(auto-reply): retain media captions when block streaming is off

Resolve disabled block delivery at message-end so suppressed text callbacks cannot strip the later attachment caption. Preserve enabled break modes and per-turn precedence using the existing boolean owner.

* docs(streaming): clarify captions with block delivery disabled

* test(media): rebalance bounded core typecheck shards

Keep the existing 720-root ceiling and exact-once canonical coverage by moving media tests into the messaging shard. The plugin/platform shard reached 721 roots with the new media contract coverage; the new allocation is 682 and 526 roots. No runtime or test assertions change.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-28 00:07:56 -07:00
Peter Steinberger 0ad43d1511 fix(gateway): adopt verified GitHub public profile names (#131579)
Prefer the verified GitHub public name for new or unnamed profiles and upgrade saved names only when they exactly match the current canonical login. Preserve other saved names and provider fallback on the next normal identity sync. Reuse existing GitHub requests without migration or schema changes.
2026-08-27 23:25:32 -07:00
Peter Steinberger 870ed9a5ab fix: recover active sessions across repeated gateway restarts (#131527)
* fix: recover active sessions across repeated gateway restarts

* fix: resolve recovery CI integration failures

* chore: document transcript assertion safety

* fix: finish recovery start persistence before command teardown

* test: type command fixtures with internal session state
2026-08-27 23:25:30 -07:00
Peter Steinberger 54a5358356 fix(ui): open worktree sessions before setup finishes (#131559)
* fix(ui): open worktree sessions before setup finishes

Admit the first turn before naming, checkout, and repository setup; show
startup progress and keep failures retryable in the same session. Reuse the
accepted-run workspace owner, fence cancellation and setup authority, and
block sibling work until the workspace is ready.

Fixes #124966 (immediate worktree sessions and setup progress).

* test(ui): retain project picker capability in startup fixture

* fix(worktrees): fence checkout retries after cancellation

* test: align native phases and title fallback with admitted startup
2026-08-27 23:13:38 -07:00
synthandPeter Steinberger 343252af82 fix(config): preserve legacy model restrictions during migration (#114983)
Materialize legacy model allowlists atomically at the migration owner and
validate authored and resolved config before writing. Defer unresolved model
references without dropping their existing restriction or falsely marking the
migration complete. Preserve include ownership and repeated doctor stability.

Fixes #114964.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-27 22:45:15 -07:00
Peter Steinberger 9b51558d0c fix(worktrees): allow five minutes for checkout (#131458)
* fix(worktrees): allow five minutes for checkout

* fix(git): report the applied checkout timeout

* test(git): include applied timeout in result fixtures

* test(ui): make activity avatar fixtures order-independent

* test(ui): normalize fetch fixture request URLs
2026-08-27 21:42:41 -07:00
RoboClawandroboclaw-bot 3fe43df369 fix(ui): unify online person rows (#131440)
Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
2026-08-27 20:12:14 -07:00
Peter Steinberger b29f97590b fix(worktrees): keep setup and cleanup failures readable (#131420) 2026-08-27 20:07:54 -07:00
Peter Steinberger d9069c731e fix(git): keep worktree failure messages readable (#131363) 2026-08-27 18:48:40 -07:00
Peter Steinberger 63ba751a2d test: separate GNU shell integration from portable coverage (#131339) 2026-08-27 18:28:04 -07:00
Peter Steinberger 2026a7b47b refactor(memory): simplify provenance and dreaming flows (#131318)
* refactor(memory): simplify provenance and dreaming flows

* chore(memory): prune removed assertion baseline
2026-08-27 18:06:27 -07:00
Peter Steinberger 0fdae639d1 fix(memory): forgotten facts survive in consolidation history (#131248)
* fix(memory): forgotten facts survive in consolidation history

* refactor(memory): share purge planning and consolidation fixtures
2026-08-27 16:28:04 -07:00
Peter Steinberger 61a47996d5 fix(memory): forgotten content survives retries and consolidation (#131179)
* fix(memory): preserve provenance until derived content is purged

* refactor(memory): simplify provenance key collections
2026-08-27 15:44:53 -07:00
Peter Steinberger 19be0f6dc0 fix: honor scenario drivers in generated QA commands (#131101)
* fix: honor scenario drivers in generated QA commands

Carry declared driver requirements through coverage search, grouping and quoted command output. Preserve unconstrained defaults and validate generated arguments through real CLI parsing and canonical lane selection. Closes #131088.

* test: capture generated QA commands through the shell
2026-08-27 11:58:30 -07:00
Peter Steinberger ff3cf3de3b docs(start): correct headless credential handoff to the SQLite auth store (#131024) 2026-08-27 09:40:27 -07:00
Peter Steinberger 3aaf13ca84 feat(ui): show activity cards for online people (#130664)
* feat(ui): show activity cards for online people

Record live person timing independently of heartbeat freshness and expose keyboard- and touch-accessible cards with visible session links. Preserve continuous online intervals across overlapping tabs without adding persistent activity history.

Closes #130649

* build(protocol): refresh generated presence timing fields

* fix(gateway): scope presence snapshots to read-access operators

Apply one recipient projection to hello, system-presence, and events. Keep person timing and time-zone details behind read access, and filter watched references with the canonical session-list policy without leaking hidden counts. Preserve idle-person metadata for readers and prevent non-reader activity-driven frames.

* fix(plugins): preserve Gateway capability load context

Carry the owning registry's metadata generation, workspace, install records, and built-artifact preference through capability discovery. Preserve standalone source loading and existing speech eligibility while avoiding synchronous source transforms on cold Talk catalog requests.

Fixes #130777

* test: align integrated presence and capability coverage

Keep the recipient matrix in its timing-aware owner, close the suite-owned Gateway for shutdown proof, and spy on the canonical install-record reader. Remove the retired private carrier's assertion allowance.

* fix(gateway): broadcast presence when clients connect

Publish completed connection rows through the canonical scoped broadcaster so established readers see first connections and reconnects without waiting for profile edits or activity. Preserve shared online intervals and reset them only after the final socket closes.

* fix(ci): align presence fixtures and sidebar type ownership

Reuse the canonical sidebar host type to remove the type-only lazy-runtime cycle. Assert omitted scopes through hello auth and denied presence reads, and supply presence version callbacks in the shared WebSocket context fixture. Retain startup admission and drain assertions without changing deadlines.

* fix(ui): retain latest scroll commands until their destination

Do not treat the virtualizer's idle debounce or a decreasing offset as reader takeover. Settle at the actual DOM end within one pixel, retaining the separate eight-pixel UI-follow policy and explicit input cancellation. Cover retargeted idle delivery and near-end precision with the real dependency, synchronize pointer baseline capture, and type the existing composer snapshot as its textarea contract.

Fixes #130892
2026-08-27 08:07:22 -07:00
Peter Steinberger 52750a2a65 fix(agents): restore direct-command proactive compaction (#130863)
Share usage-based maintenance with successful built-in command turns while
preserving diagnostic-only pressure estimates and native compaction ownership.
Carry the winning auth profile privately, fence session accounting, and retain
completed local replies when ordinary post-turn summarization fails.

Cover threshold, delivery, cancellation, successor, and routing boundaries;
clarify the documented scheduling behavior without adding configuration.

Closes #130716
2026-08-27 03:27:56 -07:00
Peter Steinberger 45de8e7a9e fix(matrix): automatic replies lose native table formatting (#130820) 2026-08-27 01:37:01 -07:00
Peter Steinberger 625f3cf7ea fix(agents): preserve Codex for reasoning capability metadata (#130752)
* fix(agents): preserve Codex for reasoning capability metadata

Keep native-compatible reasoning metadata out of authored transport overrides.
Share effective harness availability across execution, session metadata, and
thinking controls while preserving exact-request fallback and locked ownership.

Fixes #130665.

* fix(agents): keep cold harness registry reads side-effect free
2026-08-27 00:41:18 -07:00
Peter Steinberger 1d872fe87e fix: filter watched-session presence for each recipient (#130764) 2026-08-27 00:07:48 -07:00
Peter Steinberger 7eebd6d4a6 docs(hooks): clarify setup and execution contracts (#130734) 2026-08-26 23:12:06 -07:00
8a0cf73053 fix(memory): isolate sqlite-vec KNN from the event loop (#128078)
* fix(memory): isolate sqlite-vec KNN in subprocess

* fix(memory): satisfy KNN subprocess CI guards

* test(release): include memory KNN child artifact

* test(memory): update KNN subprocess fixtures

* fix(memory): bound KNN child row payloads

* fix(memory): preserve published readers during cancellable KNN

Keep shadow reindex database, vector readiness, FTS and metadata state in
an owned async context. Public operations retain the published connection,
and escaped shadow continuations cannot write to it after rebuild closes.

Terminate the one-shot query child through its owned handle and retain
admission until close. Remove process-tree/PID probing and test-only hooks.
Cover publication overlap, callback reads, cancellation and recovery.

Co-authored-by: OpenClaw Assistant <assistant@openclaw.local>

* refactor(memory): separate database context ownership

Keep the published reader and shadow writer context in its own owner module. Repair plugin test imports and typed lint findings without changing the verified KNN behavior.

---------

Co-authored-by: OpenClaw Assistant <assistant@openclaw.local>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-26 20:29:02 -07:00
Markus HartungandPeter Steinberger 18c801daa1 fix(ai): stabilize runtime context across Responses tool rounds (#130166)
* fix(agents): stabilize runtime context across tool rounds

Keep current-turn metadata after the active user and before tool calls so Responses continuation retains the complete prior request prefix. Preserve active hook context and intentionally resend when transient context expires on a later turn.

Reworks #130166. Thanks to Markus Hartung for investigating continuation failures.

Co-authored-by: Markus Hartung <mail@hartmark.se>

* fix(ai): localize continuation ordering to Responses

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-26 19:01:32 -07:00
Ayaan GazaliandPeter Steinberger 1f2e99832b fix(channels): bundled channels reject the documented responsePrefix override (#118148)
* fix(channels): bundled channels reject the documented responsePrefix override

* fix(feishu): pass channel and account to the reply prefix resolver

The ordinary reply dispatcher built the prefix context without channel or
accountId, so channels.feishu.responsePrefix and its account override fell
through to the global value. The comment dispatcher already passed them.

* fix(channels): accept twitch's root responsePrefix and type ClickClack's

Twitch validates as a two-branch union with both branches closed, so
responsePrefix declared only on the account shape left
channels.twitch.responsePrefix rejected whenever accounts is present. Also
declares responsePrefix on ClickClackAccountConfig so typed callers can express
what its schema already accepts.

* fix(clickclack): apply the configured responsePrefix in model mode

Model mode sends the completion straight to ClickClack instead of going through
the agent reply pipeline, so the documented responsePrefix parsed and then did
nothing. Resolve it through the public reply-pipeline seam so template
variables like {model} render from the completion's own provider and model.

* fix(clickclack): do not double the response prefix in model mode

systemPrompt is operator-owned, so a model can be instructed to emit the
configured prefix itself and the unconditional concatenation then sent it
twice. Match the shared reply normalizer's startsWith guard.

* test(clickclack): resolve inbound access through the real resolver

Main now requires access.channelIngress, which the hand-built fixture did not
provide, so the model-mode messages never dispatched. Drop the fixture and let
handleClickClackInbound resolve access from a DM-shaped message, matching the
sibling bot-loop tests.

* test(channels): reject a key missing from any composed branch

A union alternative is a configuration mode an operator can pick, so a key
present in only one mode is unusable in the other even though the union still
validates. Treat any rejecting alternative as a rejection, and walk allOf when
collecting account schemas.

* fix(channels): offer responsePrefix only where the reply path applies it

Applying the prefix to an outbound reply is per-channel wiring, not a shared
step. Buzz, Nostr, QA Channel, Raft, Reef and SMS never read it, so accepting
the key there validated a setting their delivery path ignores. Anchor the
contract to the channels that consume the prefix.

* fix(channels): complete shared response prefix delivery

Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>

* docs(config): refresh response prefix baseline

* test(tlon): use canonical prefix fixture helpers

* test(channels): prove Twitch reply prefix delivery

Exercise schema admission and the real shared reply dispatcher at the Twitch native send boundary, replacing redundant schema-only coverage. Keep Tlon fixtures on canonical imports and recording options.

* docs(channels): clarify explicit message prefix behavior

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-26 17:08:28 -07:00
Peter Steinberger a4c01c1a77 feat(ui): save appearance preferences per user profile (#130340)
* feat(ui): save appearance preferences per user profile

When a Control UI connection is bound to an authenticated user profile
(trusted-proxy, Tailscale, GitHub identity), theme, theme mode, and accent
become per-profile: stored in the existing user_preferences KV store via
users.prefs.set, overriding gateway-wide ui.prefs, with live cross-device
updates over a new additive users.prefs.changed event scoped to the same
merged profile. Restore default deletes only the profile key and falls back
to the gateway-wide value. talk.config projects the caller's profile accent
for native clients. Profile-less connections (token/password/none auth)
keep the existing gateway-config behavior byte-identically.

Release-note context: on multi-person gateways appearance choices are now
personal and follow you across devices; an admin restyling their own UI no
longer reskins the whole team.

* chore(protocol): allowlist users.prefs.changed for mobile clients

iOS and Android resolve the profile accent through talk.config on connect
and config refresh; live per-profile appearance push on natives is a named
follow-up.

* chore(protocol): regenerate Swift/Kotlin models for users.prefs.changed

* fix(ui): honor explicit defaults and identity switches for profile appearance

Addresses the three ClawSweeper review findings:
- resetValue for profile-bound appearance keys is the deletion fallback
  (gateway value), so an explicit product-default selection persists as a
  profile write instead of being misclassified as a reset.
- An identity switch between two known scopes forces a full appearance
  reconcile and clears appearance keys the returning identity never set,
  so a shared browser cannot keep the previous profile's look (boot keeps
  the last-seen shortcut).
- talk.config joins the profile-dependent dispatch gate so a pending
  GitHub identity sync completes before the profile accent is projected;
  token clients pass through untouched.

* chore(ui): satisfy assertion-safety ratchet and docs formatting

* refactor(ui): extract server-prefs storage primitives

server-prefs.ts crossed the 700-line cap after the review fixes; the
stateless localStorage persistence primitives move to
server-prefs-storage.ts (no behavior change). Shrink-prunes the
assertion-safety baseline for the moved casts.

* fix(ui): keep imported custom themes out of profile storage

Custom palettes are browser-local by contract, so a profile must never
carry theme=custom to a browser that cannot render it. The wire contract
drops custom from the storable theme values (readers self-heal any stored
value), a profile-bound custom selection stays retained browser-local
(including the offline-queued path), and the exhaustive theme test now
encodes the exception.
2026-08-26 16:48:26 -07:00