Commit Graph

317 Commits

Author SHA1 Message Date
Peter Steinberger
9f2d2781da fix(agents): preserve resumed turns after stale terminal events (#116777) 2026-07-31 03:57:16 -07:00
Peter Steinberger
bc4221a07e fix(docker): keep custom-port containers healthy (#116639)
* fix(docker): probe the active gateway port

* fix(docker): register the healthcheck runtime boundary
2026-07-30 20:47:03 -07:00
WhatsSkiLL
e5cee36b46 fix(memory): retry failed queued session targets (#115923)
* fix(memory): retain failed queued sync targets

* fix(memory): drain retained targets on idle sync

* test(memory): prove idle queued sync recovery

* fix(memory): preserve queued sync ownership

* fix(memory): avoid queued sync self-deadlock

* fix(memory): stop queued recovery during close

* fix(memory): clear retained sync state on close

* test(memory): prove live queued rejection transition

* fix(memory): enforce sync repro invariants

* test(memory): bound archive recovery proof

* test(memory): seed archive proof transcript

* test(memory): exercise archived transcript recovery

* chore(knip): register memory sync repro

* fix(memory): reject blank queries before settings

* style(memory): satisfy queue recovery lint

* test(memory): align doctor migration expectations

* test(memory): insert explicit provenance fixture

---------

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-30 02:47:59 -07:00
WhatsSkiLL
c63fdc631f fix(sessions): release closed SQLite entry caches (#115794)
* fix(sessions): release closed sqlite entry caches

* chore(ci): register sqlite cache lifetime proof

---------

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
2026-07-30 02:06:44 -07:00
Vincent Koc
8530edb057 fix(plugins): deliver subagent completion to current requester (#116091)
* fix(plugins): deliver subagent completion to requester

Co-authored-by: ambitioncn <36698505+ambitioncn@users.noreply.github.com>

* test(qa): register current-requester plugin fixture

* fix(plugins): scope requester authority per hook

---------

Co-authored-by: ambitioncn <36698505+ambitioncn@users.noreply.github.com>
2026-07-30 07:06:17 +08:00
Josh Lehman
6beaff450e fix(codex): avoid transcript mirror snapshot churn (#115070) 2026-07-29 11:59:14 -07:00
Peter Steinberger
5bfc65d7f4 refactor: remove 3,543 lines of redundant runtime and tests (#115961)
* refactor: remove 3,543 lines of redundant runtime and tests

* refactor: ratchet production environment variable budget
2026-07-29 11:43:41 -04:00
Peter Steinberger
e0c384b771 fix(ci): tighten ClawHub environment variable ratchet (#115958) 2026-07-29 11:22:06 -04:00
Vincent Koc
7e08953401 Merge pull request #115839 from openclaw/refactor/status-summary-owner
refactor(status): own summary preparation
2026-07-29 22:07:31 +08:00
Vincent Koc
4278fdfd5e Merge pull request #115825 from openclaw/refactor/health-owner-boundary
refactor(gateway): own health snapshot collection
2026-07-29 22:00:59 +08:00
Vincent Koc
70fca59fac Merge pull request #115823 from openclaw/refactor/msteams-message-handler-decomposition
refactor(msteams): decompose inbound message handler
2026-07-29 21:57:31 +08:00
Vincent Koc
7833bab183 Merge pull request #115806 from openclaw/refactor/whatsapp-monitor-orchestration
refactor(whatsapp): split inbound monitor orchestration
2026-07-29 21:56:59 +08:00
Vincent Koc
f65c933287 merge: own Workshop apply transitions
* origin/refactor-workshop-apply-transitions:
  fix(skills): verify workshop migration without recovery
  fix(skills): recover complete apply transitions
  fix(skills): revalidate rollback targets
  fix(skills): restore post-commit write failures
  fix(skills): retain rollback for partial writes
  fix(skills): avoid recursive workshop recovery locks
  fix(skills): use bounded config recovery reads
  chore(skills): prune workshop max-lines baseline
  fix(skills): preserve workshop recovery config
  fix(skills): refresh snapshots after apply rollback
  fix(skills): guard workshop rollback recovery
  refactor(skills): drop obsolete workshop lint waiver
  test(skills): assert recovery through retry
  test(skills): prove workshop apply recovery
  fix(skills): avoid recursive workshop target locks
  refactor(skills): recover interrupted workshop applies
  refactor(skills): own workshop apply transitions
  refactor(skills): isolate workshop transition persistence
  refactor(skills): prepare reversible workspace writes
2026-07-29 21:03:00 +08:00
Peter Steinberger
40dafc5c33 refactor: replace context-engine retry proxy with declared params (#115872)
* refactor(context-engine): remove legacy host-key retry proxy

* refactor(context-engine): declare accepted host parameters

* fix(context-engine): preserve engine adapter receivers

* refactor(plugins): tighten context-engine compat record

* refactor(context-engine): inline compat window lookup

* docs(plugins): align context-engine removal diagnostic

* test(context-engine): declare harness proof parameters
2026-07-29 08:37:08 -04:00
Vincent Koc
3d8953c3fe merge current main after workshop rollback fix
* origin/main:
  fix(ui): fall back to updateAvailable.latestVersion for handoff version verification (#112987)
  feat(gateway): manage audio and video attachments end to end (#115842)
2026-07-29 19:35:06 +08:00
Peter Steinberger
4c4aa2ed12 feat(gateway): manage audio and video attachments end to end (#115842)
* feat(gateway): manage audio and video attachments

* feat(gateway): preserve generated media metadata

* fix(gateway): align seeded managed media

* fix(gateway): scope pending media trust by URL

* fix(gateway): split managed media by trust

* fix(gateway): require terminal media trust unanimity

* fix(gateway): align managed media metadata types

* fix(gateway): refresh managed media contracts

* chore(ci): model managed media test seams

* test(sessions): expect canonical media kinds
2026-07-29 07:27:36 -04:00
Vincent Koc
b101d05fb2 chore(skills): prune workshop max-lines baseline 2026-07-29 18:27:17 +08:00
Vincent Koc
b335c337bf fix(status): preserve summary facade 2026-07-29 18:22:31 +08:00
Vincent Koc
b6627f2000 chore(msteams): prune max-lines baseline 2026-07-29 17:49:58 +08:00
Vincent Koc
afcbc8591a chore(checks): prune health max-lines baseline 2026-07-29 17:36:30 +08:00
Vincent Koc
e2df9be989 refactor(whatsapp): bound delivery helper responsibilities 2026-07-29 17:05:09 +08:00
Kevin Lin
8704d3d83f fix(gateway): prevent model owner mismatch after plugin activation (#115747)
* fix(gateway): publish plugin runtime config at startup

* chore: allow gateway startup test seam
2026-07-29 01:33:02 -07:00
Vincent Koc
9daa60961c fix(agents): serialize sandbox provisioning (#115645)
* fix(agents): serialize sandbox provisioning

* test(docker): add sandbox browser sidecar e2e

* fix(ci): register sandbox browser e2e entrypoint

* fix(ci): restore code mode matrix checks
2026-07-29 14:50:15 +08:00
Peter Steinberger
1e82025a54 refactor(ollama): unify local model onboarding (#115543)
* refactor(ollama): unify local model onboarding

* fix(ollama): remove obsolete setup max-lines exemption
2026-07-29 01:24:58 -04:00
Peter Steinberger
767fb50034 refactor(code-mode): split focused runtime stress suites (#115462) 2026-07-28 21:30:01 -04:00
Peter Steinberger
86b68bc8e3 refactor(code-mode): prepare MCP namespaces once per run (#115459)
* refactor(code-mode): prepare MCP namespaces once per run

* fix(code-mode): remove unused MCP declaration paths
2026-07-28 21:11:16 -04:00
Peter Steinberger
e1e1c1879b fix: validate plugin installs before lifecycle mutations (#115427) 2026-07-28 18:25:57 -04:00
Peter Steinberger
053384fa01 refactor(ui): adopt @lit/task for async data lifecycle (#115131)
* refactor(ui): adopt @lit/task for async data lifecycle

- migrate chat diff/discussion, new-session discovery, and MCP app setup reads
- migrate usage, plugins, transcript/checkpoint, worktree, memory-import, and model-setup reads
- delete read-lane request counters, abort-controller epochs, and current-request predicates while retaining mutation epochs and keyed caches

* chore(ui): drop dead plugin search helper (knip)

* chore(deps): allowlist @lit/task as root UI-workspace dependency in knip

* fix(ui): preserve usage refresh lifecycle

* test(ui): source workboard fixture copy from en locale (raw-copy gate)

* test(ui): read workboard fixture copy via t() (typed locale access)

* style: format test-support imports
2026-07-28 08:37:47 -04:00
Peter Steinberger
0d7fb8eb39 refactor(fs): adopt fs-safe 0.5 core primitives (#113705)
* refactor(fs): unify exclusive file publication

* fix(fs): fence stale lock reclamation

* refactor(fs): bound wiki scans and secret reads

* chore(fs): finalize fs-safe 0.5 compatibility

* fix(fs): preserve publication ownership and legacy mode

* fix(fs): fail closed on unverifiable lock owners

* fix(fs): preserve concurrent backup publications

* refactor(fs): preserve ambiguous backup outputs

* fix(fs): preserve mixed-version lock coordination

* refactor(file-transfer): adopt fs-safe archive extraction

* refactor(fs): add bounded walk and secret seams

* refactor(auth): replace proper-lockfile with fs-safe

* fix(fs): honor Windows mode override casing

* refactor(snapshot): adopt fs-safe publication

* refactor(memory-wiki): adopt prunable root walks

* refactor(fleet): adopt bounded archive restore

* fix(fs): preserve post-publication ownership receipts

* refactor(fs): harvest final fs-safe primitives

* style(fs): clean harvest lint

* chore(plugin-sdk): refresh move helper API baseline

* refactor(snapshot): adopt native Windows ACL facts

* refactor(fs): adopt hardened atomic outputs

* fix(fs): scope lock reentrancy to logical owners

* chore(config): lower env var count budget

* fix(deps): adopt published fs-safe 0.5.0

* fix(ci): align SDK surface ratchets

* fix(ci): regenerate SDK API baseline after rebase

* fix(fs): preserve owner-scoped file lock nesting

* fix(ci): refresh SDK API baseline for file locks

* fix(fs): separate SQLite and file lock reentrancy

* fix(imessage): bound pinned attachment reads

* fix(agents): narrow session-key lock options

* fix(fs): preserve fs-safe 0.5 compatibility contracts

* fix(windows): retain private SQLite directory owner

* refactor(sqlite): centralize exclusive coordinator

* refactor(snapshot): isolate Windows ACL policy

* fix(windows): retain snapshot ACL inspector

* chore(config): realign env budget after rebase

* test(agents): accept canonical sandbox escape error

* docs(changelog): defer fs-safe release note
2026-07-28 03:41:47 -04:00
Peter Steinberger
a5ee5039ce test(ui): split the oversized Control UI e2e suites (#114889)
* test(ui): split oversized Control UI e2e suites

* test(ui): bound new-session locator polling

* test(ui): fix split e2e metadata

* test(ui): give startup waits an explicit budget
2026-07-28 01:07:21 -04:00
Peter Steinberger
938749180e refactor(nodes)!: retire arming leases for durable capability enablement (#114892)
* refactor(nodes): retire phone control leases

* fix(doctor): clean retired phone control state

* docs(nodes): document durable capability enablement

* docs(changelog): defer node enablement note

* fix(doctor): harden retired phone control cleanup

* fix(doctor): fail closed on unreadable lease state

* fix(doctor): validate retired lease journals

* fix(doctor): preserve deny-shadowed consent

* docs: refresh node authorization map

* fix(doctor): keep retirement helpers private
2026-07-27 23:51:30 -04:00
Peter Steinberger
4273ca9dbd refactor(sessions): remove file-era transcript runtime (#113233)
* refactor(sessions): keep helper transcripts in memory

* refactor(sessions): remove file-era transcript storage

* test(sessions): use SQLite identity in attempt persistence

* test(codex): isolate legacy transcript fixtures

* fix(sessions): preserve SQLite transcript identity

* fix(sessions): harden transcript lifecycle invariants

* fix(sessions): validate transcript identities

* fix(sessions): close identity compatibility gaps

* fix(sessions): preserve leaf and plugin identities

* fix(sessions): retain dispatch transcript targets

* fix(sessions): preserve active transcript context

* fix(sessions): isolate artifact accounting

* fix(sessions): bound SQLite usage accounting

* fix(sessions): retain bounded latest usage

* fix(sessions): align rebased transcript targets

* test(sessions): align accessor scope fixture

* fix(telegram): derive SQLite transcript identity

* refactor(sessions): remove file-era compaction residue

* chore(sessions): lower max-lines baseline

* fix(sessions): preserve structured transcript identity

* test(sessions): align doctor identity assertions

* fix(sessions): isolate default SDK database

* refactor(sessions): remove dead file-era exports

* fix(sessions): reconcile SQLite transcript identity

* fix(sessions): pass checkpoint identity explicitly

* test(sessions): make entry field probe explicit

* test(sessions): satisfy transcript cleanup lint

* test(sessions): align diagnostics identity proof

* fix(sessions): finish transcript runtime teardown

* fix(sessions): preserve transcript identity invariants

* fix(sessions): harden transcript compatibility edges

* fix(sessions): preserve checkpoint transcript anchors

* fix(sessions): preserve SQLite lifecycle invariants

* fix(sessions): retarget compaction successors

* test(sessions): preserve transcript fixture semantics

* feat(plugin-sdk): add command transcript targets

* fix(sessions): serialize transcript rewrites

* fix(sessions): validate legacy successor identity

* fix(sessions): normalize compaction ownership

* fix(sessions): validate successor identity before adoption

* fix(sessions): preserve plugin transcript ownership

* fix(sessions): carry transcript identity through commands

* fix(sessions): import legacy checkpoint artifacts into SQLite

* fix(sessions): preserve successor transcript ownership

* fix(sessions): align transcript consumers with target identity

* fix(sessions): scope transcript token estimates

* fix(sessions): retain agent identity across lifecycle hooks

* fix(sessions): resolve scoped SQLite targets

* fix(sessions): isolate lifecycle transcript targets

* fix(sessions): validate compaction agent ownership

* fix(sessions): preserve reset and cleanup lifecycle

* fix(sessions): serialize prompt cleanup lifecycle

* fix(sessions): remove stale lock import

* fix(sessions): preserve reset target context

* fix(sessions): fence prompt reload takeover

* fix(sessions): unblock abort and default lifecycle reads

* fix(sessions): validate legacy successor scope

* fix(sessions): reject metadata-only runtime rows

* fix(sessions): propagate custom transcript stores

* fix(sessions): preserve adopted retry targets

* fix(sessions): allow unkeyed usage reads

* fix(sessions): harden runtime target boundaries

* fix(sessions): serialize retry transcript writes

* fix(sessions): bound prompt reload disposal

* fix(sessions): complete retry marker identity

* fix(sessions): keep legacy marker identity minimal

* test(sessions): tighten teardown fixture types

* fix(sessions): preserve compatibility target identity

* test(sessions): persist post-checkpoint boundary turn

* test(sessions): align runtime store mock contracts

* style(sessions): simplify persisted identity guard

* fix(sessions): prefer complete typed targets

* fix(sessions): recover legacy marker targets

* test(sessions): align marker lookup fixture scope

* fix(sessions): validate partial transcript targets

* fix(sessions): reconcile partial transcript identities

* fix(sessions): canonicalize compatibility identities

* test(sessions): cover compatibility aliases

* fix(sessions): adopt legacy successor identity

* fix(sessions): preserve usage read identity

* fix(sessions): preserve partial marker compatibility

* fix(sessions): validate legacy successor mappings

* fix(sessions): reconcile marker store mappings

* fix(sessions): preserve legacy fallback identity

* fix(sessions): harden marker alias resolution

* fix(sessions): prefer verified successor aliases

* fix(sessions): resolve preferred marker aliases

* fix(sessions): serialize cleanup admission

* fix(sessions): align marker lookup scopes

* fix(codex): type marker alias summaries

* style(sessions): satisfy changed lint

* test(sessions): align structured target assertions

* fix(sessions): reconcile latest identity contracts

* fix(sessions): validate transcript identity boundaries

* docs(sessions): explain stable registry keys

* fix(sessions): harden compatibility target round trips

* fix(sessions): port usage identity to split modules

* test(sessions): align subagent transcript identity

* fix(sessions): finish transcript identity migration

* fix(agents): route subagent completion capture through transcript targets

* fix(agents): settle SQLite prompt handoff during cleanup

* chore: shrink max-lines baseline after teardown

* fix(sessions): port teardown across split runtime owners

* fix(sessions): carry transcript targets through split owners

* test(agents): use SQLite compaction target in abort coverage

* chore: retain unrelated max-lines suppressions

* chore: shrink max-lines baseline after main splits

* style(agents): const compaction checkpoint locals

* fix(sessions): harden SQLite teardown boundaries

* test(sessions): use typed metadata in predicate isolation fixture

* test(agents): cover malformed settlement rejections lint-safely

* fix(sessions): close remaining SQLite identity races

* fix(agents): fail closed on incomplete successor targets

* fix(sessions): preserve transcript identity fallbacks

* fix(agents): preserve session-key abort admission

* fix(trajectory): validate incomplete export targets

* test(sessions): drop retired pricing cache imports

* fix(sessions): validate partial transcript identities

* fix(sessions): close transcript identity edge cases

* fix(plugins): reserve retired transcript locator slot

* fix(sessions): scope transcript locks by target

* style(sessions): simplify SDK initialization error

* fix(sessions): preserve initialized transcript state

* fix(codex): verify mirrored history session keys

* fix(sessions): reject stale transcript ownership

* fix(sessions): anchor asynchronous transcript ownership

* fix(sessions): measure active transcript state

* fix(sessions): preserve scoped transcript compaction

* fix(sessions): harden transcript identity and lifecycle

* fix(sessions): resolve scoped command transcript stores

* fix(sessions): make transcript appends failure-atomic

* fix(sessions): enforce scoped transcript ownership

* fix(sessions): reject cross-owner transcript handoffs

* fix(sessions): fence cleanup transcript ownership

* fix(sessions): retire stale write ownership contexts

* fix(sessions): preserve pending session migration state

* fix(sessions): validate migrated transcript ownership

* fix(sessions): validate usage transcript targets

* fix(sessions): clear predecessor transcript metadata

* fix(sessions): align durable session event targets

* fix(sessions): fence late prompt handoffs

* fix(sessions): fence lifecycle transcript fallbacks

* fix(sessions): bound zero-length memory capture

* fix(sessions): preserve transcript teardown ownership

* fix(sessions): reject duplicate cleanup ownership

* fix(sessions): serialize runtime writes with sqlite leases

* fix(sessions): close sqlite teardown concurrency gaps

* fix(sessions): preserve nested lifecycle failures

* fix(sessions): canonicalize sqlite transcript ownership

* fix(sessions): settle disposed prompt handoffs

* fix(sessions): resolve canonical attempt lock targets

* test(sessions): align canonical target fixtures

* test(sessions): retire redundant jsonl parser coverage

* refactor(sessions): split active transcript cursors

* test(memory): retire legacy marker fixture

* fix(sessions): preserve canonical transcript access after rebase

* fix(sessions): fence prompt lease and return transcript targets

* fix(sessions): colocate transcript leases with target store

* fix(sessions): canonicalize transcript lease and worker targets

* fix(sessions): preserve plugin and fork identity markers

* fix(sessions): complete sqlite transcript target migration

* fix(sessions): integrate canonical followup identity

* fix(sessions): preserve bounded transcript topology

* fix(sessions): validate transcript identity boundaries

* fix(context): separate caller and successor targets

* test(sessions): split persistence compatibility coverage

* test(sessions): preserve fixture topology efficiently

* chore(sdk): refresh plugin api baseline

* test(agents): align compaction lock target mocks

* test(sessions): seed malformed transcript fixtures directly

* fix(agents): canonicalize transcript compatibility inputs

* fix(agents): type optional tool result ids

* test(ci): stabilize loaded process timing

* test(tui): wait for collect queue admission
2026-07-27 22:33:24 -04:00
Peter Steinberger
d5e46646f2 refactor(gateway-protocol): derive schema registries from owner fragments (#114817)
* refactor(protocol): share schema owner barrel

* refactor(protocol): extract ordered schema fragments

* refactor(protocol): compose public schema registry

* docs(protocol): document schema fragments

* ci(protocol): guard schema registry structure

* style(protocol): satisfy registry guard lint
2026-07-27 21:08:20 -04:00
Peter Steinberger
a1e0c9ea09 refactor(packages): DM-policy contract suite, dead routes, package folds (#114776)
* test(channels): share DM policy contract suite

* refactor(memory): remove dead host CLI routes

* refactor(acp): use canonical normalization helpers

* refactor(web): fold provider runtime into core

* refactor(packages): remove dead runtime exports

* chore(knip): drop retired ACP entry roots
2026-07-27 20:20:13 -04:00
Peter Steinberger
7e8afba703 feat(plugins): mirror local coding sessions to a remote Beam receiver (#114735)
* feat(plugins): mirror local coding sessions to a remote Beam receiver

* fix(plugins): satisfy static gates for the Beam mirror seam

* fix(plugins): import the config type from the narrow contracts subpath

* fix(plugins): require catalog consent and loopback-only plaintext for the Beam mirror
2026-07-27 17:31:34 -04:00
Peter Steinberger
f8cc39ce62 refactor(reply): converge queued follow-up execution [AI-assisted] (#114599)
* refactor(reply): converge queued follow-up execution

* fix(reply): preserve follow-up lifecycle invariants

* fix(reply): fence follow-up admission generation

* fix(reply): reconcile follow-up preflight state

* fix(reply): fence persisted follow-up generation

* fix(reply): defer follow-up compaction terminal notices

* style(reply): format follow-up admission

* fix(reply): normalize follow-up session metadata

* fix(reply): fence in-memory follow-up generation

* test(reply): satisfy follow-up lint contracts

* fix(reply): revalidate failed follow-up preflight

* fix(reply): reject deleted follow-up generation

* fix(reply): release restart-aborted operations

* test(reply): avoid unbound operation assertion

* fix(reply): refresh follow-up presentation state

* test(reply): use canonical plan update shape

* fix(reply): harden follow-up progress delivery

* fix(reply): synchronize recovered follow-up operation

* test(reply): mark partial operation fixture

* fix(reply): adopt owned preflight rotations

* docs(reply): clarify restart settlement guard

* test(reply): preserve terminal notice call count

* refactor(reply): remove retired follow-up exports

* test(reply): prove dispatcher-only follow-up routing

* chore(reply): remove stale delivery type import

* fix(reply): finalize follow-up cleanup and failure delivery

* fix(reply): prefer authoritative admission snapshot

* fix(reply): avoid replay on progress failure

* fix(reply): retain suppressed-mode terminal failures

* fix(reply): preserve follow-up session context

* fix(reply): preserve exclusive delivery and deleted state

* fix(reply): prevent post-start follow-up replay

* fix(reply): prioritize safe follow-up failure delivery

* fix(reply): signal follow-up execution after start

* fix(reply): harden follow-up settlement

* refactor(reply): keep session clear internal

* fix(reply): consume pre-run user aborts

* fix(reply): retain progress delivery failure

* fix(ci): register codex prewarm test shard

* test(reply): retain operation mock type
2026-07-27 15:06:11 -04:00
Peter Steinberger
a62abee427 fix(tui): prevent cross-session leaks and lost streamed replies (#114504)
* fix(tui): isolate sessions and preserve concurrent streamed replies

* refactor(tui): extract bounded terminal fixture support

* fix(tui): prevent stale concurrent streams from reopening sessions

* fix(tui): reconcile Gateway run aliases and test ownership
2026-07-27 07:26:52 -04:00
Peter Steinberger
498a2caaf2 fix(models): keep dynamic model lists consistent across CLI and Gateway (#114393)
* fix(models): unify prepared catalogs and safe migration

* refactor(models): remove obsolete prepared catalog paths
2026-07-27 03:46:56 -04:00
Peter Steinberger
0cc0a100ee refactor(cron): split oversized modules, retire max-lines suppressions, behavior-name regression suites (#114391)
* refactor(cron): split oversized modules

* test(cron): consolidate regression suites

* refactor(cron): keep delivery outbound loader module-private
2026-07-27 03:22:51 -04:00
Peter Steinberger
fdfe5125a3 fix(ai): unify Responses stream processing (#114263)
* refactor(ai): unify Responses stream processing

* fix(ai): preserve unindexed output boundaries

* refactor(ai): remove obsolete Responses helpers

* refactor(ai): trim canonical stream surface
2026-07-27 00:28:07 -04:00
Peter Steinberger
c91a37aeed feat(ui): add a Memory settings page (#114037)
* feat(ui): add a Memory settings page with Dreaming as a tab

Memory config was scattered across five surfaces: the memory.* schema section
lived on AI & Agents with 43 of 51 keys behind the Advanced tier, the memory
slot owner was only visible on Plugins, dreaming's knobs were JSON-only, its
status UI sat under Agents, and Memory Import was a separate route.

/settings/memory now owns that surface, following the MCP page shape (curated
rows above an embedded schema editor):

- Overview: the exclusive memory slot rendered as a segmented control over
  installed memory-kind plugins, memory.backend promoted out of Advanced with
  the qmd sub-config revealed only when qmd is selected, additive add-on rows,
  and a Memory Import link.
- Search: the memory.search surface via the embedded editor.
- Dreaming: the global frequency/model/timezone/storage/phase knobs, which
  previously required hand-editing openclaw.json, plus an agent picker feeding
  the existing dream scene/diary/advanced panel for the agent-scoped reads.

Engine selection calls plugins.setEnabled so the gateway's exclusive slot
policy stays the single owner instead of being duplicated in the UI.

* fix(ui): redirect stale ai-agents memory deep links to the memory page

* fix(ui): report memory runtime defaults on the Memory page

The Dreaming tab rendered its own defaults instead of the ones
resolveMemoryDreamingConfig applies, so a config carrying only
dreaming.enabled showed all three phases off while they were running, and
an unset storage mode read as inline instead of separate. Toggle specs now
carry the runtime fallback and the storage default is stated once, both
pointing at src/memory-host-sdk/dreaming.ts.

Three more surfaces asserted things the runtime does not do:

- plugins.slots.memory "none" is the explicit-off sentinel, not an engine
  id, so the segmented control selected nothing. The slot now resolves to a
  closed auto/off/pinned selection with its own hint.
- memory.backend is resolved by the memory runtime the slot owner
  registers, which only memory-core ships, so the row is hidden for any
  other engine instead of saving a value nothing reads.
- The Dreaming tab wrote config.dreaming for whichever plugin owns the
  slot even when that plugin's schema cannot hold it. It now reuses the
  enablement flow's schema check (resolveDreamingConfigPathSupport, shared
  with updateDreamingEnabled) and renders an unsupported state instead.

Also key the plugin-catalog sync on the connected phase: the connecting ->
connected transition keeps the same client object, so a page mounted
during the handshake never loaded the catalog and never showed the engine
picker.

The tab keeps the autosave status line and restart banner the embedded
editor renders on the other tabs; these knobs autosave, but nothing
reported it. The pure view moved to memory-dreaming.ts with the element in
memory-dreaming-page.ts, matching memory.ts/memory-page.ts.

* fix(ui): resolve the memory slot through the canonical policy

The Memory page re-derived plugins.slots.memory instead of using the rule the
runtime applies, which broke both directions of the engine control:

- An unset slot was reported as "the first enabled memory-kind plugin in the
  catalog". The runtime resolves it to the slot's default owner
  (DEFAULT_SLOT_BY_KEY.memory), so the page could show one engine as active
  while another was loaded, reveal or hide the backend row for the wrong
  plugin, and target the wrong plugin when switching memory off.
- Off called plugins.setEnabled(false), which writes enablement only. The slot
  stayed pinned, so the choice did not survive a refresh and re-enabling that
  plugin from the Plugins page silently switched memory back on.

resolveSlotSelection now lives next to defaultSlotIdForKey in
src/plugins/slots.ts and owns the rule once; config normalization consumes it
and the page imports it instead of restating it. Off writes the explicit "none"
sentinel through the config form, so it round-trips; picking an engine still
goes through plugins.setEnabled, which is where the exclusive slot policy
lives. The dreaming controller's own copy of the rule is gone too.

Four smaller fixes on the same surface:

- A failed engine change is reported next to the control instead of being
  swallowed, so the selector no longer just snaps back.
- Dreaming's numeric inputs carry the memory-core manifest's integer/min/max
  bounds and refuse out-of-range edits at the field, rather than patching a
  value autosave then fails to write.
- Settings search destinations carry the Memory tab that renders the matched
  child, so a memory.search hit no longer lands on Overview, whose narrowed
  editor omits it.
- The Dreaming tab caches only a definitive schema-capability answer. An
  offline or failed lookup now reports "unknown" and is retried on reconnect
  instead of permanently suppressing the recheck.

* fix(ui): model unknown memory state instead of collapsing it

The Memory page reported unknowns as decided values. An empty catalog meant
loading, disconnected, or a failed plugins.list, yet add-on rows rendered
"Disabled"; catalog completions were keyed on client identity, which survives a
phase flip, so a stale load could repopulate a disconnected page or overwrite a
newer read; and `?tab=` was adopted once per distinct value, so a repeat
navigation to a tab the user had left was ignored.

Replace the ad-hoc nullable fields with closed shapes. MemoryCatalog is a
loading/unavailable/ready union, so absence of an entry only decides anything
inside `ready`, and MemoryAddonRow carries a four-state enablement the view
renders without ever inventing an "off". CatalogConnection is one object per
(client, connected) transition and doubles as the request generation an
in-flight load carries, so obsolete completions are dropped by identity. The tab
is no longer page state at all: the URL owns it, tab clicks navigate, and every
arrival is honored.

Settings search now resolves the engine/backend through the same
resolveMemoryBackend the page uses and matches only the `memory.*` children the
page can surface, so a `memory.qmd` hit under the built-in backend no longer
routes to an Overview whose editor omits it.

* fix(ui): surface a disabled memory owner and anchor curated backend search

The slot and plugin enablement are independent config surfaces, so
`plugins.slots.memory` can name a plugin the catalog reports as disabled.
The engine control showed that plugin as selected, and because re-picking an
already-selected radio fires no change event, there was no way back on. Add an
explicit enable row for that state and let the same-id write through when the
owner is not running; picking Off stays a no-op.

`memory.backend` is curated out of the schema editor, so the generic
`#config-section-memory` anchor scrolled past it. Fold the memory tab and hash
choice into one `memoryDestination` owner that routes a curated-only match to
the new anchor above the editor.

* fix(ui): scope the dreaming capability probe to its connection

The probe was deduplicated by plugin id alone, which cannot tell a current
answer from a stale one. A disconnect and reconnect on the same slot owner left
the token armed, so the reconnect read as "already in flight" and swallowed the
retry that an `unknown` answer requires — leaving an unsupported engine's knobs
editable until some unrelated config notification arrived. An A -> B -> A switch
had the mirror problem: the old A response was accepted for the new A probe.

Make the in-flight probe an object whose identity is the generation, drop it
whenever the owner or the connection changes, and accept only the completion
that still owns the slot. Same shape as the catalog guard on the Memory page.

* fix(ui): satisfy the lint and dead-export gates on the memory page

Exhaustive switches need a terminal `default:` to satisfy
typescript/consistent-return, matching the existing view-status.ts shape.

Seven symbols were exported with no production consumer outside their own
module, which the hard-zero Knip production scan rejects. Tests alone do not
make internals contracts, so drop the exports and reach the behavior through
each module's public surface instead: the view props type comes from
`Parameters<typeof renderMemory>`, the tab panel is found by its ARIA role, and
the dreaming number/storage helpers are proven through `renderDreamingSettings`.

Folding those helper unit tests into the render path also corrected one of them:
a `type="number"` input coerces unparseable text to empty, so the "reject
garbage" case was unreachable through the real control. Replaced with the
inclusive-bound and clear-the-field cases, which are reachable.

* refactor(ui): keep the memory schema facts out of the startup bundle

Settings pages are already lazy — the config route is `import("./config-page.ts")`
— but settings search runs from app-host at startup, and it needed the same
answers about which `memory.*` children are reachable and where a match lives.
Importing those from the view module dragged lit, hub-tabs, and settings-ui into
the startup chunk with it, blowing the Control UI startup budget.

Move the rendering-free facts (slot/backend resolution, tab and curated key
lists, schema narrowing, the anchor id) into memory-schema.ts, which imports
only record-coerce and the shared slot policy. The view keeps the templates and
now consumes the same module, so there is still one owner per fact.

* chore(ui): record the memory settings surface in the startup budget baseline

Routing settings search through memory-schema.ts instead of the view module
recovered 10,872 B of the startup chunk (334,992 -> 324,120 B), which is back
under the 324,608 B ceiling. The remaining 2,795 B over the old baseline is the
honest cost of the new surface: its i18n strings, plus the slot/backend facts
the startup search index has to read.

Measured by hosted CI (run 30189972795); this worktree cannot build locally
because pnpm wants to purge a node_modules shared with other running agents.
2026-07-26 21:05:03 -04:00
Peter Steinberger
9eae43bd37 refactor(infra): move exec approvals into the shared SQLite state DB (#114063)
* refactor(infra): move exec approvals into the shared SQLite state DB

Delete the file-runtime exec-approvals store (exec-approvals.json + .lock
sidecar machinery) on both runtimes and make the reserved
exec_approvals_config singleton row canonical. Doctor owns the one-time
import with claim/verify/receipt discipline; runtime fails closed with a
doctor instruction while un-migrated legacy state exists. The wire CAS
contract, socket semantics, and gateway auth-token derivations are
unchanged. Kills the #113929 lock-contention bug class structurally and
nets around -2.9k lines.

* fix(infra): green CI gates and retire file-era exec approvals tests

Break the migration-type import cycle with a leaf contract, regenerate the
plugin-SDK API and native i18n baselines for the intentional surface change,
drop unused exports, and replace the macOS file-era approvals test suite with
SQLite-backed behavior coverage per the obsolete-internals test policy.

* chore: green max-lines ratchet, native i18n baseline, and unused-export scan
2026-07-26 06:39:23 -04:00
Peter Steinberger
27293aa273 feat(ui): gateway subtitle in the sidebar footer identity card (#114059)
* feat(ui): show gateway subtitle in sidebar footer

* chore: keep CHANGELOG release-only

* test(ui): fix indexed-access type in sidebar gateway case

* perf(ui): trim footer subtitle startup bytes

* perf(ui): trim gateway footer strings

* perf(ui): re-record startup baseline for gateway footer

* perf(ui): re-record startup baseline from Linux build
2026-07-26 05:23:42 -04:00
Peter Steinberger
5347285d6b improve(models): source pricing from hosted catalog (#114060)
* feat(model-catalog): serve hosted fallback pricing

* refactor(config): retire client pricing bootstrap settings

* refactor(gateway): delete client pricing refresh runtime

* docs(models): explain hosted catalog pricing

* fix(model-catalog): preserve pricing privacy and aliases

* fix(model-catalog): fingerprint pricing eligibility

* fix(model-catalog): harden pricing endpoint checks

* fix(model-catalog): materialize source-safe pricing aliases

* fix(model-catalog): keep unknown pricing fallbacks safe

* fix(model-catalog): reject zero-only hosted prices

* fix(model-catalog): fail closed without pricing policy metadata

* refactor(utils): extract usage pricing normalization

* fix(model-catalog): rebuild policy-owned pricing namespaces

* test(model-catalog): type publisher cost fixtures

* chore(config): regenerate schema baselines

* fix(utils): keep raw pricing tiers private
2026-07-26 03:48:25 -04:00
Peter Steinberger
299f5a4941 refactor(copilot): split attempt runtime (#114035)
* refactor(copilot): split attempt runtime

* refactor(copilot): narrow attempt helper exports

* refactor(copilot): expose user input bridge type

* refactor(copilot): consume user input bridge type
2026-07-26 01:58:31 -04:00
Peter Steinberger
5284408470 refactor(agents): split subagent-spawn and drop its max-lines baseline entry (#114030)
* refactor(agents): split subagent spawn helpers

* refactor(agents): keep spawn agent state caller-owned

* refactor(agents): keep relocated subagent-spawn symbols module-private
2026-07-26 01:12:07 -04:00
Peter Steinberger
99d8d90572 refactor(memory-core): split CLI runtime (#114013)
* refactor(memory-core): split CLI runtime

* refactor(memory-core): narrow CLI helper exports

* test(memory-core): follow secret resolver split
2026-07-25 21:37:59 -07:00
Peter Steinberger
c66f0d340b refactor(qa-lab): split suite execution (#113974)
* refactor(qa-lab): split suite execution

* refactor(qa-lab): tighten suite module contracts

* refactor(qa-lab): keep suite environment private
2026-07-25 20:43:51 -07:00
Peter Steinberger
8d75a6ded6 refactor(agents): split acp-spawn helpers and drop max-lines suppression (#113979)
* refactor(agents): split acp-spawn helpers and drop max-lines suppression

* refactor(agents): keep relocated acp-spawn helpers module-private
2026-07-25 20:11:54 -07:00
Peter Steinberger
71cb266c1f fix(ui): keep Coding sessions visible after reconnect (#113981)
* fix(ui): preserve scoped session hydration

* chore: leave changelog to release automation

* build(ui): refresh startup budget baseline
2026-07-25 19:56:50 -07:00