Follow-up to c5254f13ee (#112074): delete the legacy string-match timeout
classifier (the CLI path only sees typed GatewayTransportError from
callGateway's wrapper timer), the duplicate JSON/blank-message validation
in the private gateway command, the now-pointless getGatewayDispatchConfig
wrapper, the single-use embedded-loader alias, and the cross-os release
guard for the EMBEDDED FALLBACK marker no build can emit anymore.
* refactor(ai): invert plugin coupling behind the transport host port
* fix(ai): queue custom transport registrations until the host is configured
* refactor(ai): remove relocated transport sources from src/agents
* fix(ai): source core stream types from canonical packages and fix tarball fixtures
* fix(ai): invert plugin transport host wiring
* fix(ai): harden managed transport projection
* test(ai): register synchronous stream in transport mock
* fix(ai): lazily install transport runtime host
* fix(ai): preserve completion compat detection
* fix(agents): race in-flight tool promises against run abort (#103905)
wrapToolWithAbortSignal forwarded the combined abort signal into tool
execute calls but awaited the returned promise without racing it, so a
tool that never observes the signal kept running after stuck-session
recovery aborted the run and delivered its result into a dead run.
Race the execute promise against the combined signal so the wrapped
call rejects with AbortError as soon as the abort fires. The tool
promise itself cannot be cancelled in JavaScript; it keeps running in
the background and its late settlement is detached so it never lands
in the aborted run. Tool results and errors pass through unchanged
while the run is alive.
Refs #103905
* fix(agents): satisfy oxlint abort-race rejection rules without losing tool errors
* fix(lint): annotate intentional non-Error pass-through rejections
The race intentionally forwards tool rejections untouched (including
non-Error values), which trips oxlint's promise-rejection rules; mark
both sites with oxlint-disable-next-line justifications.
* test(scripts): allowlist intentional abort-race rejection suppression
The raw non-Error pass-through reject() in agent-tools.abort.ts is the
documented tool-error contract; register its prefer-promise-reject-errors
suppression in the production allowlist.
* fix(agents): observe sync-aborted tool rejections
Co-authored-by: thomas.szbay <thomas.szbay@xydigit.com>
---------
Co-authored-by: thomas.szbay <thomas.szbay@example.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: thomas.szbay <thomas.szbay@xydigit.com>
* fix(e2e): keep phase log tails UTF-8 safe
The phase runner keeps a bounded in-memory log tail per phase and writes it
to stderr when a phase fails. The byte-based cut can land inside a multi-byte
UTF-8 character, and decoding from that offset emits U+FFFD replacement
characters at the start of the diagnostics tail. Reuse the decodeUtf8Tail
helper from scripts/e2e/lib/text-file-utils.mjs (#109669) so the retained
window starts on a character boundary.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(e2e): declare decodeUtf8Tail in text-file-utils types
phase-runner.ts imports decodeUtf8Tail from text-file-utils.mjs; the
adjacent declaration file must export it or check-test-types fails with
TS2305.
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(e2e): reuse tailText wrapper for phase log tails
Co-Authored-By: Claude <noreply@anthropic.com>
* test(e2e): focus phase tail regression
Co-authored-by: wangmiao0668000666 <wang.miao86@xydigit.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Replace .slice(0, maxChars) with truncateUtf16Safe in two locations:
- readBoundedResponseText (error body truncation)
- truncateBody (issue body preview)
Without this fix, an emoji (or any astral character) straddling the
truncation boundary would leave a lone surrogate in the output, producing
invalid UTF-16 that serializes to a garbled replacement character.
Follows the same pattern as Leon-SK668's PRs #108184, #108193, #108208.
* build(protocol): make @openclaw/gateway-protocol publishable to npm
* chore(mxc): align package version with release train
* fix(release): support gateway-only core packages
* chore(pr): reuse green hosted CI from patch-identical pre-rebase heads (24h window)
* fix(pr): type-safe fixtures and lint cleanup for hosted-CI reuse tests
* feat(sessions): retain reset history in sqlite with physical disk budget
* fix(sessions): satisfy test-types, knip export scan, and docs map
* fix(sessions): align behavioral suites and flip proof with retained history, route-aware cleanup plans