Commit Graph

1265 Commits

Author SHA1 Message Date
Peter Steinberger
fdec6fe7d4 refactor(plugins): reuse scoped loader for capability discovery (#117373)
* refactor(plugins): reuse scoped loader for capabilities

* fix(plugins): retain channel capabilities during discovery
2026-08-01 09:50:34 -07:00
Jesse Merhi
8b21c23cc2 feat(web-fetch): add tools.web.fetch.headers for operator request headers (#115545)
* feat(web-fetch): add tools.web.fetch.headers for operator request headers

* docs(web-fetch): update cache discriminator comment

* fix(web-fetch): reserve runtime and cookie headers

* fix(web-fetch): harden operator header normalization

* fix(web-fetch): align header safety contracts

* fix(web-fetch): close header logging gaps

* fix(web-fetch): report case-colliding headers

* fix(web-fetch): reject stale colliding headers

* fix(web-fetch): refuse credential token aliases

* fix(web-fetch): preserve empty header values

* fix(web-fetch): refuse credential-shaped headers

* chore(config): refresh web fetch header baselines

* test(web-fetch): cover header security contracts

* fix(web-fetch): narrow credential header refusal

* fix(web-fetch): preserve trace metadata headers

* fix(web-fetch): keep header validation internal

* test(web-fetch): satisfy strict test contracts

* fix(web-fetch): refuse vendor credential headers

* fix(web-fetch): refuse authentication signatures

* fix(web-fetch): detect qualified auth signatures

* fix(web-fetch): refuse auth-suffixed headers

* fix(web-fetch): refuse compact credential headers

* fix(secrets): audit authentication signatures

* fix(web-fetch): redact operator headers in captures

* fix(web-fetch): keep capture metadata internal

* fix(web-fetch): allow sensitive operator headers

* test(web-fetch): cover normalized operator headers

* docs: note web fetch request headers

* chore(config): refresh web fetch header baseline

* chore: remove release-owned changelog entry
2026-08-02 02:07:25 +10:00
Jesse Merhi
d3f4530ce8 feat(google): allow operator headers on Gemini web search (#115549)
* feat(google): support Gemini web search headers

* fix(google): validate Gemini search headers

* docs(changelog): credit Gemini headers

* test(secrets): route config contracts through collector

* chore: remove release-owned changelog entry

* test(google): cover resolved search headers
2026-08-02 01:41:09 +10:00
Peter Steinberger
e4d1b7e0d3 refactor(plugins): move plugin contributions into the registry bundle (#117372)
* refactor(plugins): move plugin contributions into the registry bundle

* fix(plugins): guard embedding owner union and drop unused test-util imports

* fix(plugins): break registry facade import cycles

* fix(plugins): remove obsolete registry snapshot seams

* test(gateway): preserve plugin runtime mock exports

* test(auto-reply): install builder registry in diagnostics fixture

* test(plugins): activate registry-backed capability fixtures
2026-08-01 06:57:01 -07:00
Peter Steinberger
9214183f45 refactor(sessions): retire runtime transcript sidecars (#117380) 2026-08-01 06:21:54 -07:00
Peter Steinberger
aa2a5c96f6 feat(channels): record account lifecycle facts and retire inferred health vocabularies (#117300)
* fix(channels): record account lifecycle facts

* fix(channels): bound recorded lifecycle grace

* fix(channels): preserve authored health state

* test: dedupe health snapshot type literal and fix spread order
2026-08-01 02:51:47 -07:00
Ayaan Gazali
11069c3df5 fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (#117206) 2026-08-01 15:33:16 +08:00
Peter Steinberger
edfeec49e7 refactor(channels): centralize progress draft events (#117269) 2026-08-01 00:26:56 -07:00
Peter Steinberger
0cd33bad88 fix(plugin-sdk): project recorded health facts through computed account status (#117236)
* fix(plugin-sdk): project recorded health facts through computed account status

* fix(plugin-sdk): regenerate API baseline and pin ingressUnavailable literal in test
2026-07-31 22:52:48 -07:00
Peter Steinberger
cd8a96491e fix: repair canonical session keys with doctor (#116703)
* fix: repair canonical session keys with doctor

* test: align canonical validation with reopen boundary

* test: align session fixtures with canonical keys

* fix: copy only canonical session repair winners

* fix: cover canonical repair edge cases

* test: remove retired preview helper import

* test: align canonical repair delivery scope

* fix: close canonical repair validation gaps

* fix: preserve destination-only repair generations

* fix: preserve canonical repair window projections

* style: format canonical repair imports

* fix: preserve canonical repair delivery ownership

* fix: preserve winner-owned cross-store state

* fix: guard canonical delivery rehoming

* fix: align canonical session contracts after rebase

* test: accept internal canonical repair fixtures

* test: move sharing alias coverage to doctor
2026-07-31 10:04:08 -07:00
Josh Avant
ce67ffb70e feat(agents): add tool-free isolated completion (#114343)
* feat: add isolated pure-inference completion

* fix(google): block ambient system prompt writes

* docs: refresh generated map
2026-07-30 13:24:45 -05:00
Omar Shahine
6f9da38401 feat(agents): rename model- and user-facing scheduler strings to automations (#114852)
* fix(agents): teach canonical automations tool in fallback guidance and reuse the identity source

Review follow-ups: the structured-list fallback still taught models the cron
tool; the cron-scope test echoed its own stub; MCP serve allowlist and voice
confirmation hardcoded the name instead of the canonical constant.

* fix(mcp): place automations identity import outside the header comment

* feat(agents): rename model- and user-facing scheduler strings to automations

Rewrites every string the model or user sees that names the feature:
tool label and terminal presentation, display-summary preset, subagents
catalog description, heartbeat guidance, subagent prompt, session labels
(Cron: -> Automation:), default job name, unattended-run preamble, delivery
awareness text, task-ledger progress summary, failure alerts, auto-disable
notification, model preflight diagnostics, validation errors, and the
shipped workspace AGENTS.md template. Adds a system-prompt backstop rule on
the automations tool line: the feature is called automations, never cron.

Cron stays only where it names the schedule syntax ({kind:"cron"}, cron
expressions), config keys (cron.triggers.enabled), RPC method names, and
session-key namespaces. Test fixtures with legacy labels are kept as
stored-data coverage. Part of RFC openclaw/rfcs#50 Phase 1 (PR B).

* docs(templates): keep workspace template on the live docs anchor until the docs PR renames it

* fix(cron): rename remaining failure-notification producers and stale test expectations

Codex review follow-ups: the per-run failure notification (server-cron-
notifications) and the doctor legacy-notify advisory still said Cron job;
failure-alert and incomplete-turn suites still asserted the old wording.

* chore(plugin-sdk): re-emit plugin-state test runtime dts

CI's extension-boundary runner holds stale tsgo incremental state whose
cached plugin-state-test-runtime.d.ts predates the keyed-store re-exports;
the freshness stamp validates it and reruns reuse the same sticky disk.
Touching the module forces incremental emit to regenerate the declaration.
Fresh builds of this head (local exact CI command and a forced Testbox
rebuild) both emit the exports correctly.

* fix(agents): rename residual model- and operator-facing cron prose

Found in combined dev-gateway E2E: fallback tool line still told models the
scheduler tool is cron; heartbeat scratch description, cron model preflight
rejection, doctor and Claw prose still said cron jobs.

* fix(agents): finish model-facing scheduler strings flagged in review

Loop work-order prompts, subagents tool description, cron-tool write errors,
and the headless exec denial label now say automations; loop builders covered
by prompt assertions; snapshots regenerated.

* chore(agents): refresh generated baselines and live docs anchor after rebase onto main

* fix(agents): rename new main-side cron tool error expectations to automations

* fix(gateway): rename main-side cron notification test expectations to automations

* chore(agents): apply review moves - automations commands in workspace template, drop unrelated sdk comment

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
2026-07-30 08:54:55 -07:00
Vincent Koc
8a3f5c862b fix(plugin-sdk): ship documented public typings (#116345)
* fix(plugin-sdk): ship documented public typings

* fix(plugin-sdk): refresh public contract artifacts
2026-07-30 18:20:07 +08:00
Ayaan Zaidi
7c47e4ad0e fix(channels): collapse cumulative commentary snapshots onto one progress-draft line
Providers stream commentary as cumulative snapshots, and the draft line id was derived from the commentary text, so each snapshot minted a new id and stacked another line instead of replacing the open one. Id-less commentary now remembers its open line and reuses that id when the next snapshot continues it; a snapshot sanitized to nothing no longer clears the line, since only an explicit item id retracts.

Also fixes activation: the commentary gate guessed "partial" when streaming.mode was unset, which made progress.commentary a silent no-op on channels whose own default is progress (Telegram, Discord). It now takes the caller's resolved mode, matching resolveChannelStreamingPreviewToolProgress. Proven live on Telegram: three overlapping commentary lines collapse to one.
2026-07-30 16:36:16 +09:00
Ayaan Zaidi
48b3c1ea00 chore(sdk): repin the API baseline after the resolver signature change
resolveChannelStreamingPreviewToolProgress gained an optional mode parameter,
which changes the exported plugin-SDK surface.
2026-07-30 13:36:21 +09:00
Ayaan Zaidi
dcb0ad5c29 fix(ci): satisfy docs formatting, lint, and the SDK API baseline
Three gates my own changes broke:

- docs/channels/telegram.md needed a blank line before </Note>; I formatted the
  TypeScript but never ran the docs formatter over the pages I edited.
- The mock harness matched a literal with a regex, which oxlint's prefer-includes
  rejects.
- Widening resolveChannelPreviewStreamMode's defaultMode to StreamingMode and
  adding rendersRollingLinesNatively changes the exported plugin-SDK surface, so
  the API baseline hash had to be regenerated.
2026-07-30 13:36:21 +09:00
joshavant
21db50efc7 refactor(whatsapp): keep inbound boundary transport-private 2026-07-29 20:34:55 -05:00
Vincent Koc
f970e5093b refactor(channels): add portable inbound boundary 2026-07-29 20:34:55 -05:00
Peter Steinberger
b9377f6048 fix(codex): enforce native MCP tool access (#116054)
* fix(codex): enforce native MCP tool access

* chore: remove prerelease changelog entry

* chore: restore changelog to main

* refactor(codex): build MCP server patches from entries
2026-07-29 17:06:49 -04:00
Ryan Hughes
9560e17185 feat(hooks): add persistent hook session mode (#75918)
* feat(hooks): add explicit persistent sessions

* fix(hooks): validate persistent mapping session keys

* chore: leave persistent hooks note to release process

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-30 02:57:28 +08:00
Peter Steinberger
ea967be0df feat(gateway): add loopback locality controls (#115959)
* feat(gateway): add loopback locality controls

* fix(gateway): keep loopback auth delays enforced under concurrency

The pending-timer cap let an attacker park cheap failures in every slot and then guess without penalty. Delays now key off a per-key deadline, so parallel guesses wait out the same escalating penalty and are still bounded by the max delay.

* fix(gateway): share one loopback penalty timer per key

Concurrent failures on a key now share a single timer and deadline instead of allocating one per in-flight request. Also corrects the security doc: the delay raises the cost of repeated guessing from one source, but credentials are compared before the failure response is delayed, so it is not a defense against parallel fan-out.

* docs(gateway): record why loopback delay stays post-verification

* docs: refresh generated docs map

* docs: refresh plugin SDK API baseline

* test: update loopback locality CI expectations
2026-07-29 12:25:57 -04:00
Peter Steinberger
662abec754 feat(gateway): push session PR indicators to subscribed clients (#115643)
* feat(gateway): push session PR indicators to subscribed clients

* test(gateway): fix PR indicator drift

* chore(protocol): allowlist PR-indicator event for native apps (Control UI surface)

* test: align PR indicator lifecycle coverage

* fix(ui): scope session PR store listeners to active watchers
2026-07-29 06:30:01 -04:00
Peter Steinberger
986e5d1758 refactor(channels): share ingress retention defaults (#115824) 2026-07-29 06:24:30 -04:00
Peter Steinberger
bde6b166c0 refactor(channels): deduplicate ingress monitor shells (#115792)
* refactor(channels): deduplicate ingress monitor shells

* fix(channels): preserve ingress error overload types

* fix(channels): type ingress error overload implementation

* chore(plugin-sdk): ratchet ingress error surface
2026-07-29 05:33:00 -04:00
Peter Steinberger
c402688894 feat(media): probe duration and dimensions for playback metadata (#115728)
* feat(media): probe playback metadata

* fix(media): satisfy CI gates

* fix(media): satisfy lint rules
2026-07-29 04:52:17 -04:00
Peter Steinberger
382ea7b74e refactor: centralize channel streaming config hints (#115739)
* refactor: centralize channel streaming config hints

* fix: repair code mode static checks

* fix: restore QA evidence validator import
2026-07-29 04:42:23 -04:00
Peter Steinberger
b2cc5f5042 fix(memory): promote durable facts after repeated recall (#115715)
* fix(memory): calibrate promotion gate defaults

* docs: refresh generated docs map
2026-07-29 03:51:59 -04:00
Vincent Koc
14940edf15 feat(skills): add Skill Workshop lifecycle hooks (#115606)
* feat(skills): add lifecycle hook contracts

* feat(plugins): expose skill hook contracts

* feat(plugins): identify skill evaluators

* feat(skills): persist proposal evaluation lifecycle

* feat(skills): add agent evaluation action

* feat(skills): emit committed skill lifecycle changes

* feat(gateway): expose skill proposal evaluation lifecycle

* feat(ui): add Skill Workshop evaluations

* fix(skills): bind lifecycle state to proposal revisions

* fix(skills): preserve lifecycle events without artifacts

* feat(cli): evaluate skill proposals

* fix(ui): bind evaluations to proposal revisions

* docs(skills): document lifecycle hook primitives

* chore(plugin-sdk): refresh skill hook surface

* fix(skills): harden proposal evaluator execution

* fix(plugins): isolate skill evaluator inputs

* fix(cli): align skill lifecycle deadlines

* fix(skills): preserve evaluation replay invariants

* test(ui): capture Skill Workshop evaluation proof

* fix(skills): bind apply to evaluated target tree

* fix(skills): preserve evaluation contract edges

* fix(skills): bound evaluation event storage

* chore(skills): keep lifecycle helpers internal

* refactor(skills): isolate evaluation persistence

* fix(skills): satisfy lifecycle validation gates

* chore(protocol): refresh Skill Workshop clients

* docs: refresh Skill Workshop map

* chore: keep release notes in PR metadata

* docs: refresh merged docs map

* fix(ci): type Code Mode catch errors

* fix(skills): freeze lifecycle observation payloads

* fix(protocol): keep proposal inspect backward-decodable

* fix(skills): enforce final evaluator bundle limits

* fix(skills): preserve lifecycle caller attribution

* chore: drop subsumed Code Mode formatting

* test(plugins): adapt lifecycle hook mocks
2026-07-29 15:49:44 +08:00
Peter Steinberger
8fd49c84aa feat: make self-learning automatic by default (#115576)
* feat: make self-learning automatic by default

* fix: preserve capture authorization boundaries

* test: split autonomous capture coverage
2026-07-29 02:04:57 -04:00
Peter Steinberger
a24c1ceb3a fix(channels): release inbound debounce at admission (#115603)
Track full dispatch completion separately for error handling and shutdown drain while allowing same-session follow-ups to steer active runs. Fixes #113180.

Co-authored-by: Taksh <takshkothari09@gmail.com>
2026-07-29 01:38:15 -04:00
Ayaan Zaidi
895bf61ea0 feat(agents): surface watched-session awareness to the model (#114835) 2026-07-29 07:39:20 +09:00
Peter Steinberger
f78ba09120 feat(talk): support GPT-Live realtime voice over ChatGPT OAuth (#115226)
* feat(gateway): share the canonical browser-origin policy with plugins

Export resolveAcceptedBrowserOrigin through openclaw/plugin-sdk/webhook-request-guards
so browser-facing plugin routes reuse the Gateway's real origin contract instead of a
narrow allowedOrigins array check. Private LAN/Tailnet Control UI loads and the
Host-header fallback were previously rejected with 403 by plugin offer routes while the
Control UI itself worked.

Moves the loopback/forwarded-header helpers to net.ts (re-exported from auth.ts) so the
guard can delegate without importing gateway auth, and migrates the Codex realtime
broker onto the shared seam.

* feat(talk): let providers own agent delegation for realtime voice

Adds an optional runAgentConsult callback to the browser-session create request and
injects the existing embedded consult runtime from talk-client, bound to the same agent
and session key the GA tool path uses. Providers whose realtime protocol delegates work
through their own control channel (rather than GA function calls) can now reach the
OpenClaw agent without a client round-trip.

Threads the effective per-session model into browser-session capability resolution so a
request-level model override selects the right capability set, and propagates a caller
abort signal into consultRealtimeVoiceAgent so a superseded delegation stops its run.

* feat(openai): support GPT-Live realtime voice over ChatGPT OAuth

Implements OpenAI's quicksilver/frameless session natively for Talk browser sessions.
The Gateway creates the WebRTC call (multipart sdp+session to https://api.openai.com/v1/live)
and owns the sideband control socket, so the browser never holds upstream credentials;
delegation.created events run through the OpenClaw agent and stream back as speakable
context appends.

Verified end-to-end on 2026-07-28 against a ChatGPT Pro OAuth profile: call create 201
with an rtc_* id and answer SDP, sideband session.started, session.close teardown.
ChatGPT OAuth is preferred over a Platform API key because /v1/live access for platform
keys is waitlist-gated; the legacy chatgpt.com backend route returns 403 for every model
and protocol version and is not used.

Accepted models are gpt-live-1-codex and gpt-live-1-boulder-alpha; the voice allowlist is
the ten values the route actually accepts, since an invalid voice is rejected at call
creation and cannot be repaired afterwards (session.update reports immutable_field_update).

* docs: document GPT-Live Talk support and its route gotchas

Records the working route and auth, the accepted models and voices, the browser-only
scope, and the two traps that cost the most time: the chatgpt.com backend route returns
403 Voice session access denied for every model, and that same 403 is also what an
invalid voice returns, so it must not be read as an account entitlement block.

* fix(openai): resolve GPT-Live CI failures

* refactor(openai): own zod runtime dependency

* fix(openai): satisfy lint and live-shard gates for GPT-Live

Types the retry-delay finish callback as Error so the rejection reason is provably an
Error at the call site; the abort path already normalized a non-Error AbortSignal reason,
but the unknown parameter type hid that from static analysis.

Registers the new GPT-Live live test in the native-live-extensions-openai shard
expectation. The shard selector already picked the file up from the real tree; only the
hardcoded list in the tooling test lagged.

* fix(openai): clean up post-rebase capability resolver

* fix(openai): preserve GPT-Live delegation fragments

* fix(openai): close GPT-Live sideband handoff race

* fix(openai): accept UUID GPT-Live call ids

* style: apply oxfmt to GPT-Live sources and Talk docs

* style: format Talk docs after rebase

* fix(openai): keep GPT-Live transcript context across ignored delegations
2026-07-28 15:05:55 -04:00
Peter Steinberger
e89ff13494 fix(nostr): report unavailable ingress when queue open fails (#115313)
* fix(nostr): surface durable ingress startup failures

* chore: keep changelog release-owned
2026-07-28 13:34:23 -04:00
Peter Steinberger
28630a9a65 feat(memory): provenance-gated memory with dreaming on by default (#114819)
* feat(memory): add provenance and recall metadata to the memory index

* feat(memory): provenance-gated promotion and capture hygiene

* feat(dreaming): LLM consolidation with deterministic gates, on by default

* feat(active-memory): deterministic recall lane with escalation default

* feat(memory): user model file and standing intents

* docs(memory): document the memory architecture

* fix(memory): live-QA fixes — metadata writers, provenance classes, intent scope, claim accumulation
2026-07-28 06:04:25 -04:00
Peter Steinberger
9c051c6513 fix(config): accept documented global exec approval notice delay (#115101)
Restore the already shipped global exec approval notice setting through the same strict validator as its per-agent override.

Reported-by: @glorifiedautocomplete
Original-fix-by: @natedemoss (#57293)
2026-07-28 05:51:20 -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
Vincent Koc
a15f080a12 fix(config): refresh generated docs baseline 2026-07-28 08:35:25 +02:00
Peter Steinberger
31ad055259 fix(ui): avoid restart prompt when toggling advanced settings (#114937)
* fix(ui): keep advanced disclosure browser-local

* chore: leave changelog to release flow
2026-07-28 01:17:40 -04:00
joshavant
1153ef4c4d chore(plugin-sdk): refresh API baseline 2026-07-27 22:40:32 -05:00
Peter Steinberger
e0a119dabf fix(channels): own account status in one closed state machine (#114775)
* refactor(channels): own account status in one closed state machine

* fix(gateway): stop storing derived reasons and configured in channel runtime

* fix(channels): separate linkage from configuration in whatsapp and zalo personal

* fix(cli): render channel state reasons apart from runtime failures

* refactor(channels): keep account-state projection internal to its owner
2026-07-27 23:04:28 -04:00
Peter Steinberger
577a0642fa fix(plugin-sdk): classify loopback hosts consistently (#114832)
* fix(plugin-sdk): expose loopback host classifier

* fix(ollama): remove stale host normalizer import

* chore: keep release notes in PR context
2026-07-27 22:55:44 -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
0bfe7dd357 feat(plugins): deliver sessions.changed to plugin services (#114813)
* feat(plugins): deliver sessions.changed to plugin services

* docs: regenerate docs map

* refactor(clickclack): split reconcile scheduler and history formatting out of the discussion service

* style: format discussion service
2026-07-27 20:56:44 -04:00
Peter Steinberger
1cbbda18c3 perf(logging): flush file transport asynchronously off the request path (#114769)
* perf(logging): flush file transport asynchronously off the request path

* fix(ci): record flushLogger surface growth and drain before log reads

- +1 public export/callable budget with annotation: logger file-transport
  flush for graceful shutdown drains; regenerate SDK API baseline
- three tests that read the log file right after logging now drain the
  async file transport first (flushLogger) instead of racing the flusher

* test: drain async log transport before reading talk and request-trace logs

* test: drain async log transport in CLI logger file tests

* test: drop unused withTempDirSync import
2026-07-27 19:40:43 -04:00
Zakaria Rahali
a04ba3a468 fix(config): compaction.enabled is rejected as invalid config (#114118)
* fix(config): compaction.enabled is rejected as invalid config

Setting agents.defaults.compaction.enabled in openclaw.json made the
whole config fail to load with "agents.defaults.compaction: Invalid
input", so auto-compaction could not be turned off.

The runtime already reads the field (SettingsManager.getCompactionEnabled
returns settings.compaction?.enabled ?? true, and setCompactionEnabled
writes it), and the documented config example in
docs/reference/session-management-compaction.md already shows
"enabled: true". Only the zod schema was missing the key, and the
compaction object is .strict(), so the unknown key rejected the config.

Adds enabled to AgentDefaultsSchema and to AgentCompactionConfig.

Closes #110065

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

* fix(config): wire compaction enablement through runtime

Align the accepted compaction.enabled contract across runtime precedence, help, labels, docs, and generated schema baselines.

Co-authored-by: Zakaria Rahali <zakariarahali288@gmail.com>

* test(config): preserve omitted compaction setting

Document the reload lifecycle and lock in project-setting precedence when the OpenClaw config key is absent.

Co-authored-by: Zakaria Rahali <zakariarahali288@gmail.com>

* refactor(config): centralize compaction runtime override

* fix(config): preserve compaction safety guards

* fix(scripts): avoid ripgrep in merge fallback

* docs(config): refresh current main baseline

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 17:23:35 -04:00
Peter Steinberger
f0e81b97e8 refactor(model-picker): centralize session apply contracts (#114739)
* refactor(model-picker): centralize session apply contracts

* fix(ci): keep model apply helper result internal

* fix(model-picker): require channel codec opt-in
2026-07-27 16:58:23 -04:00
Peter Steinberger
0e37f143f5 refactor(slack)!: retire inline interactive directives for typed presentation (#114738)
* refactor(slack): retire inline interactive directives

Release note: Slack configs using channels.slack.capabilities.interactiveReplies, including per-account settings, are removed by openclaw doctor --fix. Slack-only [[slack_buttons:...]] and [[slack_select:...]] markup is no longer parsed; emit typed presentation buttons and selects instead.

* docs: refresh Slack docs map
2026-07-27 16:41:00 -04:00
Peter Steinberger
f275db6974 refactor: remove dead split facades (#114726)
* refactor: remove dead split facades

* fix: update facade ownership references
2026-07-27 16:32:52 -04:00
WhatsSkiLL
79c517df89 fix(agents): stop stable tool argument churn (#112620)
* fix(agents): detect stable tool argument churn

* fix(agents): refine argument churn evidence

* fix(agents): route argument churn through recovery

* fix(agents): reconcile rewritten loop arguments

* fix(agents): defer churn recovery across policy waits

* fix(agents): preserve churn clocks across policy waits

* fix(agents): harden concurrent churn policy tracking

* fix(agents): avoid stale churn false positives

* fix(agents): satisfy loop diagnostic CI guards

* fix(agents): normalize write churn outcomes

* fix(logging): order churn activity events

* fix(agents): classify churn no-progress outcomes

---------

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-28 01:34:37 +08:00
Peter Steinberger
0090768b51 refactor(agents): remove runtime migration fallbacks and post-split duplication (#114355)
* refactor(agents): deduplicate native hook relay facade

* refactor(agents): centralize recovery notice transport

* refactor(agents): share subagent session store readers

* refactor(agents): remove retired runner branches

* refactor(agents): remove runtime orphan-session migration

* refactor(agents): carry prepared session targets

* chore(plugin-sdk): refresh agent harness API baseline

* fix(agents): type shared subagent store entries

* docs(agents): clarify runtime migration invariants

* fix(agents): constrain session target inheritance

* Revert "fix(agents): constrain session target inheritance"

This reverts commit b44cfe7396.

* Revert "refactor(agents): carry prepared session targets"

This reverts commit 5abe0a8156.

* fix(agents): align migration ownership and relay exports

* fix(agents): preserve harness compatibility aliases

* fix(agents): trim unused relay options export
2026-07-27 08:02:53 -04:00