Commit Graph

1221 Commits

Author SHA1 Message Date
Kevin Lin
310396f1e1 fix(codex): enable configured apps in service sessions (#115433)
* fix(codex): attest configured plugin apps before turns

* fix(codex): tighten plugin thread config

* fix(codex): expose account app admission wrapper
2026-07-28 22:39:20 -07:00
joshavant
a6d58f0e6d fix(codex): attest safe Node network options 2026-07-28 23:22:52 -05:00
Peter Steinberger
d5567ed61e fix: prevent duplicate agent turns and slow Codex harness runs (#115474)
* fix(agents): deduplicate turns and speed up Codex harnesses

* test(agents): keep keyed transcript fixtures type-safe

* fix(codex): simplify linear native skill traversal

* fix(agents): preserve admitted SQLite turns during orphan repair

* test: split session user idempotency regressions
2026-07-28 22:56:12 -04:00
Shakker
f6bd2b6518 fix: scope subagent handoff to direct tools (#115466) 2026-07-29 02:22:09 +01:00
Shakker
b2efac5134 fix: clarify native subagent completion handoff 2026-07-29 02:22:09 +01:00
Peter Steinberger
a49a5bfa74 perf(codex): serve catalog pages stale-while-revalidate and skip warm-client start resolution (#115403)
* perf(codex): serve catalog pages stale-while-revalidate and skip warm-client start resolution

* fix(codex): skip empty-tool runtime discovery
2026-07-28 19:24:39 -04:00
Ayaan Zaidi
895bf61ea0 feat(agents): surface watched-session awareness to the model (#114835) 2026-07-29 07:39:20 +09:00
Alix-007
4ce534aec2 fix(codex): bound Computer Use process inspection (#109091)
* fix(codex): bound Computer Use process repair

Co-authored-by: Alix-007 <li.long15@xydigit.com>

* test(codex): isolate review policy fixtures

Co-authored-by: Alix-007 <li.long15@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-28 17:14:30 -04:00
Peter Steinberger
826beb724d feat(skills): enable self-learning review for Codex sessions (#114501)
* feat(skills): enable Codex experience review

* style(codex): keep event projector within ratchet
2026-07-28 14:21:42 -04:00
Peter Steinberger
0f91859382 fix: keep isolated gateway workspaces and skills inside state dir (#114487)
* fix: isolate non-default state workspaces and skills

* fix(codex): isolate native personal skills

* chore: refresh plugin SDK API manifest

* fix: keep SDK manifest generation scoped

* refactor(codex): keep isolation plugin-local

* test: satisfy optional skill snapshot typing

* refactor(codex): extract thread lifecycle preflight
2026-07-28 13:48:21 -04:00
Peter Steinberger
5de0366d95 fix(codex): stabilize prompts and expose real cache regressions (#115238)
* fix(codex): stabilize prompt caching and measure uncached work

* test(codex): refresh stable dynamic-tool prompt snapshots

* fix(qa): account for cache rewrites and incomplete telemetry

* fix(qa): reject inconsistent measured cache totals

* fix(qa): preserve live profile eligibility and parity topology

* fix(qa): extract acyclic runtime parity usage contract
2026-07-28 13:26:04 -04:00
Vincent Koc
8d5a652ed8 Merge pull request #115211 from openclaw/fix/realtime-oauth-supported-protocol
* commit 'b90f2d1db8bcb65a86d2785e3956b419c5114b25':
  test(ui): reset config route hash between cases
  fix(talk): remove unsupported Codex OAuth realtime
2026-07-29 00:15:00 +08:00
Peter Steinberger
924f91ce47 refactor(sessions): isolate legacy transcript fixtures (#115231)
* test(sessions): isolate legacy file fixtures

* test(sessions): hide fixture-only manager type
2026-07-28 11:56:16 -04:00
Peter Steinberger
9ae79eed2d perf(catalog): cadence-proof provider caches and parallelize the Claude scan (#115259) 2026-07-28 11:37:37 -04:00
Peter Steinberger
d23ce0530b test(codex): de-flake attempt turn-watch timing tests (#115258) 2026-07-28 11:33:37 -04:00
Peter Steinberger
2160b97cdc refactor(config): retire compaction truncateAfterCompaction gate (#115206) 2026-07-28 11:30:50 -04:00
Vincent Koc
b90f2d1db8 Merge remote-tracking branch 'origin/main' into pr-115211-prep
* origin/main:
  fix: preserve skill proposals across apply crashes and workspace moves (#114535)
  fix(qa): run maturity Docker scenarios through the aggregate scheduler (#114447)
  refactor(cli): unify configured model rows onto the shared row pipeline (#115239)
  fix(ui): stop modal autofocus steal after the open animation (#115168)
  fix(process): preserve long supervisor timeout deadlines (#115230)
  fix(slack): preserve pasted inbound tables (#115163)
  fix(codex): restore trajectory capture for canonical session targets (#115220)
  refactor(qa): make scenario selection taxonomy-owned (#114055)
  feat(plugins): match shared models across vendor-namespaced catalog ids (#115210)
2026-07-28 22:48:56 +08:00
Peter Steinberger
49c62f3505 fix(codex): restore trajectory capture for canonical session targets (#115220)
Attempt dispatch stopped emitting legacy `sqlite:` session-file markers in
#113233, which replaced SessionTranscriptRuntimeTarget.sessionFile with
storePath and started passing the canonical session key instead. The Codex
plugin still re-derived its own SQLite gate from that string, so
parseSqliteSessionFileMarker never matched and every Codex run bailed out
with reason "non-sqlite-session-target".

The host already owns SQLite target resolution and identity validation: it
returns a recorder only when a committed session row resolves. Drop the
stale marker gate and the now-dead trajectorySessionFile plumbing, leaving
the host-provided recorder as the single gate.
2026-07-28 10:29:19 -04:00
Vincent Koc
861b9ccce1 fix(talk): remove unsupported Codex OAuth realtime 2026-07-28 21:32:38 +08:00
Peter Steinberger
c0df3cf0b9 fix(codex): preserve startup diagnostics on initialize timeout (#115161)
* fix(codex): preserve app-server startup diagnostics

* chore: leave release notes to release automation
2026-07-28 08:08:12 -04:00
Peter Steinberger
92b4af2dc8 improve(codex): reuse live app-server threads safely (#115089) 2026-07-28 05:08:23 -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
6dbe7ff1e2 perf(catalog): memoize probes and single-flight identical list requests (#114961) 2026-07-28 02:00:27 -04:00
Peter Steinberger
27f62f3e8e fix(codex): verify native patches and honor fast mode (#114907) 2026-07-28 00:00:49 -04:00
Peter Steinberger
f036ed43a2 fix(codex): prevent long conversations slowing on thread resume (#114882)
* fix(codex): reduce native thread resume overhead

* test(codex): register native attempt connection shard

* fix(codex): keep oversized rollouts on bounded fast path
2026-07-27 23:56:44 -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
f2a12916d7 fix(codex): refuse Platform routes on a subscription-signed native Codex home (#114719)
A user-home app-server keeps its native Codex account, and OpenClaw verified only
half of that contract. A subscription route was checked against the native
account, but a Platform (API-key) route was not: an operator signed in to Codex
with a ChatGPT subscription who selected an API-billed model silently spent their
plan. Both directions of the same billing boundary now share one account/read
check. An absent account is left alone, since a native home may serve a custom
model provider that reports no OpenAI account at all.

The home-scope rule behind #114397 was also expressed four times: two
prepared-auth call sites spread it in conditionally from raw plugin config, two
others read resolved start options, and the supervision connection applied its
own default inline. resolveCodexAppServerHomeScope now owns it, and homeScope is
a required argument of resolveCodexAppServerPreparedAuthHandoff, so a new call
site that forgets it fails to compile instead of failing every turn.

Docs dropped the stale user-home paragraph that still described the startup
failure #114397 removed and told operators to delete a working OpenAI profile.
2026-07-27 22:42:18 -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
b2f137797b fix(codex): isolate QA sandbox from production policy (#114830) 2026-07-27 21:05:41 -04:00
Peter Steinberger
37cf0c6064 improve: reduce GPT-5.6 coding harness overhead (#114574)
* improve: reduce GPT-5.6 coding harness overhead

* refactor: extract runtime parity timing helpers

* fix(qa): verify native apply-patch runtime parity

* fix(qa): use mock patch execution evidence

* fix(qa): preserve workspace templates in full syncs

* fix(qa): make rejected patch fixtures deterministic

* fix(qa): prove apply-patch workspace containment

* fix(qa): expose runtime prompt-cache usage

* fix(codex): confine forced private QA patch turns

* fix(qa): verify native patch execution and sandbox precedence

* fix(qa): execute native patches and prove disk mutation

* fix(codex): avoid duplicate native patch registration

* perf(agents): keep code mode catalog guidance compact

* fix(qa): make native Codex patch evidence deterministic

* fix(qa): recognize native sandbox denial errors

* fix(qa): advertise native Codex mock model capabilities

* fix(qa): seed native Codex mock model catalog at startup

* fix(qa): recognize native Codex patch denial results

* fix(ci): repair Codex harness parity checks

* fix(qa): distinguish unknown prompt-cache measurements

* fix(qa): accept native Codex project patch denials

* fix(ci): isolate runtime parity report contracts

* fix(codex): eliminate native runtime transport overhead

* fix(qa): consume runtime parity report contract

* fix(qa): compare matched runtime timing captures

* fix(qa): type native response delta context

* fix(qa): satisfy native codex websocket lint
2026-07-27 19:24:52 -04:00
Peter Steinberger
960b050add refactor(extensions): remove orphaned shadow trial and retired config aliases (#114709)
* refactor(memory-core): remove orphaned shadow trials

* refactor(qqbot): migrate direct voice upload formats

Release note: QQBot configs using voiceDirectUploadFormats now migrate through openclaw doctor --fix to audioFormatPolicy.uploadDirectFormats at root and account scope. Existing nested uploadDirectFormats values win conflicts, and runtime reads only the nested policy.

* refactor(feishu): migrate tools base alias

Release note: Feishu configs using tools.base now migrate through openclaw doctor --fix to tools.bitable at root and account scope. Existing bitable values win conflicts, and runtime accepts only the canonical key.

* refactor(extensions): remove dead runtime state

* chore(config): refresh bundled channel metadata

* refactor(codex): keep realtime fallback type private

* test(ci): align QA compatibility scenario count
2026-07-27 17:12:41 -04:00
Peter Steinberger
f4058528e5 refactor(agents): centralize message-tool and direct-visibility predicates (#114720)
* refactor(agents): centralize message-tool and direct-visibility predicates

* refactor(agents): unexport classifyTool and drop redundant union
2026-07-27 16:51:20 -04:00
ClawSweeper
e073d17be1 perf(codex): prewarm app server during attempt setup (#114551)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 11:02:16 -07:00
Peter Steinberger
8f8e40dabe perf(gateway): share one node.list snapshot across session catalog providers (#114646) 2026-07-27 13:14:07 -04:00
Peter Steinberger
3f37731175 docs(agents): surface hidden tool capabilities in model-facing descriptions (#114516) 2026-07-27 07:20:25 -04:00
Peter Steinberger
669db2968f refactor(agents): retire TOOLS.md into an AGENTS.md section with a doctor migration (#113966)
* fix(agents): stop retired attestation hashes from faking a vanished workspace

* feat(agents): migrate TOOLS.md content into the AGENTS.md tools section

* refactor(agents): drop TOOLS.md from the workspace bootstrap set

* refactor(policy): read tool policy entries from AGENTS.md

* docs: describe local tool notes as an AGENTS.md section

* test(codex): drop TOOLS.md developer-instruction coverage with the removed path

* test(agents): cover the TOOLS.md doctor migration behaviors

* refactor(doctor): satisfy TOOLS.md migration lint

* test(agents): split workspace attestation survival coverage

* refactor(codex): simplify workspace context basenames

* refactor(doctor): keep TOOLS.md migration helpers module-local

* docs: regenerate docs map

* fix(doctor): keep migration claims fresh

* fix(doctor): preserve nested tool notes

* refactor(doctor): split tools migration helpers

* refactor(doctor): limit TOOLS.md migration to workspace root

* style(doctor): keep migration under line limit

* fix(doctor): recover interrupted AGENTS publish

* docs(hooks): describe root-only TOOLS.md migration accurately

* fix(doctor): preserve migrated tool guidance visibility

* test(agents): regenerate prompt snapshots after rebase

* fix(policy): block evaluation while TOOLS.md is unmigrated

* fix(doctor): check merged bootstrap budget per agent

* fix(doctor): keep budget helper internal

* refactor(doctor): keep migration budget helpers to their consumers
2026-07-27 03:56:30 -04:00
Peter Steinberger
65cce37480 fix(codex): keep user-home app-servers on native Codex auth (#114397)
A prepared OpenClaw auth handoff was still resolved for connections that
target the operator's native Codex home, so every turn failed with
"Prepared Codex auth requires an isolated app-server home." once a stored
OpenAI profile produced a prepared model route. User-home mode now keeps
its native account for both subscription and Platform routes, matching the
documented contract; the shared-client guard stays as the backstop.
2026-07-27 03:19:06 -04:00
Peter Steinberger
7b71d5608e perf(gateway): reuse session catalog entry snapshots per request (#114358)
* perf(gateway): reuse session catalog entry snapshots

* chore(gateway): satisfy knip and typed-test lanes for catalog snapshot
2026-07-27 02:14:11 -04:00
Peter Lee
0406e66369 fix(ui): keep stable chat rows in insertion order and only sort live tool/stream items by timestamp (#113266)
* fix(ui): keep stable chat rows in insertion order and only sort live tool/stream items by timestamp

* fix(ui): keep live rows within current turn

* fix(ui): keep current work above queued turns

* fix(ui): keep streamed replies above queued turns

* fix(ui): preserve reconnecting run order

* fix(ui): preserve causal terminal ordering

* fix(ui): bound replay rows to owning turns

* fix(ui): keep question summaries in owning turns

* fix(ui): scope question run ownership to session

* fix(ui): restore reconnecting chat run identity

* fix(ui): remove unused chatItemTimestamp import in chat-thread-build.ts

* fix(ui): correlate question summaries with agent runs

Co-authored-by: Peter Lee <li.xialong@xydigit.com>

* chore(i18n): refresh native source baseline

Co-authored-by: Peter Lee <li.xialong@xydigit.com>

* fix(ui): remove unused chatItemTimestamp export and split tool-stream test file

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 02:08:22 -04:00
Jesse Merhi
d7627d6f4c refactor(prompt): use plain inbound context labels and drop system-tag sanitizer (#112000)
* refactor(prompt): plain inbound context labels with a provenance marker

Replaces trust-worded inbound context labels ("(untrusted metadata)",
"(untrusted, for context)") with plain labels plus a fixed provenance
marker suffix appended to every OpenClaw-injected context header.

Detection keys on the marker, not label text, so strippers stay correct
across UI, TUI, replay, /trace segmentation, memory recall, and the Swift
chat preprocessor. Drops sanitizeInboundSystemTags in favor of the marker
boundary plus trusted system-prompt narration.

Renames the untrusted-named plugin SDK context identifiers to
channel-provenance names, keeping deprecated aliases registered for
removal after 2026-09-08.

Adds `openclaw doctor --fix` migrations that rewrite legacy inbound
labels in stored SQLite transcripts and purge legacy envelope-
contaminated LanceDB recall rows.

* fix(ci): resolve gate failures for plain inbound context labels

- doctor sqlite readers: open read-only connections via openNodeSqliteDatabase
  so the Kysely connection-boundary guardrail holds; unexport the now-internal
  transcript snapshot type (Knip unused-export gate).
- compat registry: split the record table into registry-records.ts and
  plugin-sdk-subpath-records.ts. The new compat record pushed registry.ts past
  the 700-line oxlint cap; suppressions are disallowed, so follow the existing
  sibling record-module pattern. Public exports and PluginCompatCode literals
  unchanged.
- acp-runtime test: assert current finalization behavior (newline normalization
  only). The bracket de-fang and System: rewrite it expected were removed with
  sanitizeInboundSystemTags; forged system lines are neutralized at the
  system-event queue, the single chokepoint feeding the System:-per-line render.
- regenerate docs_map and the plugin SDK API baseline manifest.

* fix(prompt): harden inbound context label migration and drop in-band sanitizer

Review follow-ups on the plain-label + provenance-marker change:

- Remove src/security/system-tags.ts. Rewriting inbound text to neutralize
  look-alike `System:`/`[System]` markers corrupted legitimate user text and is
  not a real injection boundary; role separation plus external-content wrapping
  is. Explicit product decision, recorded at the system-event queue.
- Narrow the LanceDB legacy-row purge so it cannot delete benign memories. It
  now requires a complete known legacy sentinel line, a legacy label followed by
  a fenced JSON body, or the complete legacy external-content header. The prior
  predicates matched ordinary prose such as `Notes (untrusted metadata):`, and
  deletion is irreversible.
- Make explicit-empty canonical ChannelStructuredContext win over the deprecated
  alias via a present/absent result instead of collapsing `[]` to undefined.
- Keep `\r?` in the active-memory doctor rule. It is the only rule spanning the
  header's line break, migrated assistant rows skip newline normalization, and
  without it the marked-header replace wins and the body strips to empty. Added
  a CRLF regression test.
- Fix stale comments that described removed behavior, and cover the Swift
  prose-block strip path.

Claude-Session: https://claude.ai/code/session_01WNzsPddQmxy9Y7jKD4wAxH
2026-07-27 11:27:53 +10:00
keshavbotagent
46f4018ff9 fix(codex): recover in-place session resets (#114056)
* fix(codex): recover in-place session resets

* fix(codex): preserve retired generation fences

---------

Co-authored-by: Josh Lehman <josh@martian.engineering>
2026-07-26 16:49:57 -07:00
Colin Johnson
de9ed64c29 feat(talk): enable GPT Live with Codex OAuth (#113354) 2026-07-25 20:41:27 -04:00
Peter Steinberger
1bce047953 fix(ci): repair plugin prerelease contracts (#113820) 2026-07-25 12:38:31 -07:00
Peter Steinberger
332006bc1f test: consolidate OpenClaw test state fixtures (#113576)
* test: consolidate OpenClaw test state fixtures

* test(plugin-sdk): expose isolated test state

Promote the isolated OpenClaw test-state lifecycle through a narrow published Plugin SDK subpath so extension tests no longer import private core helpers. This intentional SDK surface addition is maintainer-approved.

* test: use SDK test-state seam in extensions

Route bundled extension suites through the focused repo-local Plugin SDK test-state entrypoint and remove the Codex projector harness exports made stale by fixture consolidation. Keep the seam out of production builds and published package artifacts while auditing its real consumers in the full-tree deadcode scan.

* test(plugins): map test-state in package boundaries
2026-07-25 05:30:52 -07:00
Masato Hoshino
bdcc5d54a5 fix(agents): honor run abort signal in image and pdf tools (#112644)
* fix(agents): honor run abort signal in image and pdf tools

The image and pdf agent tools declared `execute: async (_toolCallId, args)`
and dropped the run abort signal that `wrapToolWithAbortSignal` supplies as
the third execute argument. The wrapper only races the execute promise, so an
aborted run kept sequentially downloading images/PDFs (up to the per-tool cap,
each up to the byte cap) and still issued a paid vision/PDF-model call for a
dead run.

Thread the signal into the existing `requestInit: { signal }` seam (which the
media fetch layer already merges into the download fetch) and add
`signal.throwIfAborted()` between sequential loop items and before the paid
model call. No new media-options signal field; non-abort behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agents): keep the pdf test suite under the lint ceiling; guard model dispatch

Follow-up on the abort-signal change, resolving the check-lint failure and a
review finding on the same seam.

max-lines
---------
Adding the two pdf abort tests pushed src/agents/tools/pdf-tool.test.ts to 1018
effective lines against a ceiling of 1000, failing check-lint. Resolved without
touching config/max-lines-baseline.txt — a suppression there would also have
tripped the max-lines ratchet.

- The new tests declared their own `describe` with `beforeEach`/`afterEach`
  hooks identical to the existing `describe("createPdfTool")`. They exercise
  that same tool, so they now live in it and the duplicated scaffolding is gone.
- `stubPdfToolInfra`, `createPdfModelRegistry` and `FAKE_PDF_MEDIA` moved to
  pdf-tool.test-support.ts, which already exists for exactly this. They go
  through `createPdfToolInfraStub(completeMock)` rather than being exported
  directly, because the stub wires the suite's own `complete` mock into the
  model registry and vi.mock handles are file-scoped. All 21 existing call
  sites are unchanged.

Abort propagation into model dispatch
-------------------------------------
The previous revision stopped cancellation at download boundaries and before
the first model call, but `runImagePrompt`/`runPdfPrompt` never saw the signal.
A run cancelled while the first provider request was in flight could still
issue the remaining ones — the image path dispatches `describeImage` once per
image in a sequential loop, so a dead run kept paying for every later image.

Both now take an optional `signal` and check it immediately before each
provider dispatch (3 sites in image-tool, 4 in pdf-tool).

Forwarding the signal further, into the provider transports themselves, is a
different seam and is deliberately left out of this PR.

Also declares `requestInit` on `ImageToolLoadWebMediaOptions`. The local facade
omitted it while the underlying loader accepts it (web-media.ts declares it and
forwards it to readRemoteMediaBuffer), so the option worked at runtime and only
compiled because spread properties skip excess-property checking. A non-spread
call site would not have.

tsgo core + core-test, oxlint, oxfmt clean; pdf-tool and image-tool suites 266
tests pass.

* test(agents): prove in-flight media aborts

* test(agents): narrow PDF loader options

* test(agents): reject abort mocks with errors

* fix(agents): propagate media cancellation

* test(agents): type PDF abort fixture

* test(agents): type prepared runtime snapshot

* fix(agents): normalize abort rejection errors

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-25 05:17:09 -07:00
Peter Steinberger
9e9615d7c1 refactor(codex): prune migration pipeline (#113536) 2026-07-25 00:58:11 -07:00
Vincent Koc
749dbcb2a7 refactor(media): consolidate generated media byte limits (#113556) 2026-07-25 15:39:49 +08:00
Peter Steinberger
4f1b5da9d8 refactor(codex): split app-server config (#113552)
* refactor(codex): split app-server config

* refactor(codex): keep config helper types private
2026-07-25 00:36:50 -07:00
Peter Steinberger
d734df9d0f test(codex): read canonical steering terminal outcome (#113416) 2026-07-24 14:39:27 -07:00
Jason (Json)
ee606def49 fix(codex): stop Computer Use readiness stalls across fallbacks (#113393)
* fix(codex): bound computer use readiness preflight

* chore(codex): keep service status internal
2026-07-24 14:27:53 -06:00