Commit Graph

69389 Commits

Author SHA1 Message Date
heichl_xydigit
1f3b4e86ca fix(agents): keep not_required delivery status when completion_announced_at exists (#108710)
* fix(agents): keep not_required delivery status when completion_announced_at exists for expectsCompletionMessage=false runs

createDeliveryFromTypedColumns unconditionally overrode status to
'delivered' when completion_announced_at was present, even for runs
where expects_completion_message is false. This produced a contradictory
delivery state where a run that does not require completion delivery
was marked as delivered.

Only set status to 'delivered' when expects_completion_message is true.
For not_required runs that still have completion_announced_at recorded
(for informational purposes), preserve announcedAt without overriding
the status.

* test(agents): cover tainted delivery rows

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 10:21:50 -07:00
Peter Steinberger
0815f6a4f9 feat(android): add Wear proxy protocol (#108835)
* feat(android): add Wear proxy protocol

Introduce a bounded, versioned phone/watch RPC contract and wire its test, lint, and build gates before either runtime endpoint lands.

Co-authored-by: Sebastian Schubotz <git@sibbl.de>

* test(android): lock Wear wire names

Cover every supported RPC method and event discriminator so phone and watch cannot silently drift.

Co-authored-by: Sebastian Schubotz <git@sibbl.net>

* fix(android): bound Wear JSON depth

Reject excessively nested Data Layer envelopes before kotlinx.serialization can recurse through them.

* fix(android): enforce Wear depth on encode

Keep outbound messages inside the same JSON nesting contract enforced by the decoder.

* fix(android): preflight Wear payload depth

Traverse arbitrary JSON payloads iteratively before serialization so deeply nested local trees fail safely.

---------

Co-authored-by: Sebastian Schubotz <git@sibbl.de>
Co-authored-by: Sebastian Schubotz <git@sibbl.net>
2026-07-16 10:21:38 -07:00
Peter Steinberger
c11d112b63 refactor(codex): deduplicate sandbox HTTP test setup (#109229) 2026-07-16 10:12:31 -07:00
Peter Steinberger
a726bd7340 fix(qa): retry transient FTS settle races 2026-07-16 18:11:50 +01:00
Peter Steinberger
e71ef76e8e feat(onboarding): offer detected Claude Code/Codex/Hermes memory imports across CLI, macOS, and Linux onboarding (#108977)
* feat(migrate): add Hermes memory-only import and a shared memory-import core

* feat(onboarding): offer detected memory imports during CLI setup and guided onboarding

* feat(ui): show a first-run memory-import offer in Control UI onboarding mode

* feat(linux-app): open the first-run dashboard in onboarding mode

* feat(macos): add the onboarding memory-import page

* docs: document the onboarding memory-import page across surfaces

* chore(i18n): translate onboarding memory-import strings for control-ui and native locales

* refactor: keep memory-import internals unexported for deadcode gates

* fix(ci): resolve lint findings in onboarding memory import

* chore(i18n): refresh native inventory after lint refactor

* fix(ci): skip updater artifacts in the unsigned Linux companion PR lane

* chore(i18n): reconcile locale artifacts after rebase
2026-07-16 10:10:01 -07:00
Alix-007
7da3bc9872 fix(acpx): prevent process cleanup from hanging (#109146)
* fix(acpx): bound process inspection

* docs(changelog): note ACPX cleanup deadline

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

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 10:08:56 -07:00
Peter Steinberger
4432016f7f refactor: prune redundant OpenClaw env controls (#109211)
* refactor: prune redundant OpenClaw env controls

* docs: refresh environment reference map
2026-07-16 10:06:39 -07:00
NianJiu
1eda44ee36 fix(acp): show durable notice after gateway disconnect (#108827)
* fix(acp): record disconnect interruptions

* test(acp): tighten disconnect settlement coverage

Co-authored-by: NianJiuZst <180004567+NianJiuZst@users.noreply.github.com>

* fix(acp): preserve replay order under backpressure

Co-authored-by: NianJiuZst <180004567+NianJiuZst@users.noreply.github.com>

* test(acp): await accepted prompt ledger record

Co-authored-by: NianJiuZst <180004567+NianJiuZst@users.noreply.github.com>

* fix(acp): isolate ledger mutation queues

Co-authored-by: NianJiuZst <180004567+NianJiuZst@users.noreply.github.com>

---------

Co-authored-by: NianJiuZst <180004567+NianJiuZst@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 10:01:10 -07:00
Peter Steinberger
ba65a56ffd test(scripts): fix pid-write race in tsc-boundary SIGTERM test (#109140)
The child wrote its pid with fs.writeFileSync, which makes the file visible at
open() (0 bytes) before the content lands. Under CI load the existsSync-gated
reader in waitForFile could observe the empty file, so readFileSync returned ''
and Number.parseInt yielded NaN, making isProcessAlive(NaN) false and failing the
pre-kill liveness assertion (checks-node-compact-small-6 flake). Write the pid to
a temp file and rename it into place so the path only appears with full content.
2026-07-16 09:54:49 -07:00
Peter Steinberger
fe4a0aae62 perf(ci): carry extension boundary artifacts on a Blacksmith sticky disk (#109169)
* perf(ci): carry extension boundary artifacts on a Blacksmith sticky disk

The boundary lane spends ~113s of its 214s rebuilding plugin-sdk
declaration artifacts that an actions/cache was meant to carry — but
that cache is evicted so fast under the repo quota that even its prefix
restore never hits. Same-repo runs now keep the artifacts on a sticky
disk with a coarse toolchain key (source changes intentionally hit a
stale snapshot: restored mtimes predate the fresh checkout, so the
mtime-based freshness predicate always routes into the incremental
rebuild — a stale snapshot can never false-skip the compile). Fork PRs
keep the GitHub cache path and can never write repository-global
snapshots. Seed/restore round-trip verified locally with rsync -aR
layout mirroring.

* perf(ci): restore boundary artifacts for the lint lane too

check-lint's shard runner spawns the same plugin-sdk boundary artifact
prep the boundary lane snapshots (~72s of its wall clock); it now
mounts the shared sticky read-only-by-convention (only the boundary
lane seeds) and restores before the run step.

* fix(ci): make the lint boundary-sticky mount strictly read-only

Autoreview caught a first-hydration race: with commit if-missing, a
cold-key lint job racing the boundary lane could commit an empty,
marker-less snapshot that if-missing then never repairs. commit false
makes lint a pure reader; only the boundary lane can seed.
2026-07-16 09:54:29 -07:00
Monkey-wusky
e6ac6c8506 fix(agents,skills): keep session-identity and experience-review transcript truncation UTF-16 safe (#106370)
* fix(agents,skills): keep session-identity and experience-review transcript truncation UTF-16 safe

normalizeCliContextValue (cli-output.ts) and formatSkillExperienceReviewTranscript
(experience-review-prompt.ts) both used raw .slice(0, N) / .slice(-N) to truncate
user-facing strings. When a truncation boundary falls inside a surrogate pair (emoji),
the resulting string contains a lone surrogate — encodeURIComponent throws URIError,
JSON serialisers may reject it, and downstream display surfaces can render garbage.

Replace .slice(0, 200) with truncateUtf16Safe in normalizeCliContextValue.
Replace .slice(0, 6_000) with truncateUtf16Safe and full.slice(-tailBudget) with
sliceUtf16Safe(full, tailStart) in formatSkillExperienceReviewTranscript.

Follows the pattern established by #98644, #102470, #101728 and the broader
UTF-16 safety sweep already applied across the codebase.

* chore: re-trigger CI after PR body update

* test(agents,skills): construct transcripts exceeding 60k chars, verify old slices dangle

Both experience-review fixtures now exceed EXPERIENCE_REVIEW_MAX_TRANSCRIPT_CHARS
so the truncation branch actually fires. Pre-condition assertions prove the old raw
.slice(0,6000) / .slice(tailStart) produce isolated surrogates; the production
functions (formatSkillExperienceReviewTranscript, formatCliOutputError) do not.

cli-output test also adds pre-condition check showing normalizeCliContextValue
with raw .slice(0,200) would split a surrogate pair.

* test: tighten UTF-16 truncation coverage

Co-authored-by: 毛宇豪0668001457 <mao.yuhao@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 09:53:58 -07:00
Leon-SK668
a8fe7dd834 fix(android): preserve emoji in debug diagnostics (#108823)
* fix(android): preserve unicode in debug diagnostics

* chore(android): refresh native i18n inventory

* test(android): satisfy debug handler ktlint

* refactor(android): centralize UTF-safe diagnostics

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 09:53:14 -07:00
Peter Steinberger
618002c141 refactor(core): reuse keyed promise memoization (#109184) 2026-07-16 09:51:40 -07:00
Peter Steinberger
4dc67161ee fix(qa): harden gateway process cleanup 2026-07-16 17:51:26 +01:00
Peter Steinberger
aebea4891e feat(ios): render plugin approvals as native Allow/Deny notifications (#108709)
* feat(ios): render plugin approvals as native Allow/Deny notifications

Extend the iOS approval handling from exec to plugin approvals so the native
push the gateway now sends (#108505) shows a phone notification with Allow/Deny.
Extract a shared ApprovalNotificationBridge with exec/plugin wrappers owning
their own kind constants and category; tag the parsed prompt with its kind;
register the plugin category and route plugin pushes in the app delegate; add a
.plugin case that maps the plugin presentation (title/description/pluginId/
severity) into the existing prompt and widens the exec-only validation, current,
cache-restore, and resolve guards to accept plugin; parameterize the dialog copy
by kind. Watch snapshot publication stays exec-only; the phone notification still
mirrors to the watch via WatchConnectivity. Reuses the unified approval.get/
approval.resolve RPCs (already kind-generic); no server or protocol changes.

* chore(i18n): sync native inventory after rebase

* chore(ios): drop accidentally committed local Version.xcconfig build override

* fix(ios): sync Apple i18n catalog and remove dead approval-bridge methods

Sync apps/ios/Resources/Localizable.xcstrings for the new plugin-approval
strings (native inventory sync alone did not cover the Apple catalog).
Remove the superseded per-bridge registerCategory variants and the redundant
exec parseResolvedPush wrapper flagged by the iOS Periphery dead-code scan;
registration uses ApprovalNotificationBridge.registerCategories and the shared
parse helpers.

* chore(ios): drop generated SwiftSources filelist; reconcile native i18n inventory

* chore(ios): drop generated Xcode project from tracking

Codex generated OpenClaw.xcodeproj for its simulator test run and the initial
apps/ios directory commit force-added it; xcodegen regenerates it in CI, so it
must not be tracked (matches main).

* chore(ios): reconcile native i18n inventory after rebase
2026-07-16 09:50:42 -07:00
Peter Steinberger
7e410bdb52 fix(auto-reply): stop minting channel source-turn ids for internal-origin turns (#109201)
PR #108283 started deriving a durable channel source-turn id for gateway
chat.send turns carrying originatingChannel/originatingTo overrides, while
the gateway's pre-created user-turn recorder keys the persisted turn by run
id. The same PR's admission guard then throws 'channel restart recovery
requires source-keyed user-turn admission' for every such turn — breaking
qa-lab suite runs, ACP-bridge flows, and relay integrations (reproduced
live on the codex harness chat-image probe; text-only fails identically).

Internal-origin turns (gateway chat.send stamps the internal channel as the
ingress provider) carry run ids, not provider message ids; gateway turns
already own restart via fingerprint admission and client-side idempotent
retries. Skip the mint for internal ingress at both derivation sites so
admission takes the source-less persist path, while real channel ingress
keeps the new source-keyed recovery. Also surface the full agent.wait
result in the codex harness live test error (how this was found).

Live proof: gateway-codex-harness.live.test.ts chat-image probe on a
Blacksmith Testbox with a real OpenAI key failed with the admission error
twice on main and passes admission with this fix.
2026-07-16 09:48:53 -07:00
Monkey-wusky
f193c50577 fix(codex): preserve sandbox HTTP UTF-8 diagnostics (#108618)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 09:47:07 -07:00
Peter Steinberger
e37eed86b0 fix(ui): throttle usage refreshes on reconnect with focus/TTL policy (#108904)
* fix(ui): throttle usage refreshes on reconnect

* fix(ui): throttle profile usage refreshes

* fix(ci): satisfy test-type and knip gates

* test(ui): reconcile usage reconnect coverage

* refactor(ui): extract usage refresh runtime
2026-07-16 09:46:59 -07:00
wings1029
966e176e04 fix(shell-env): cap login shell env probe cache with eviction (#108862)
* fix(shell-env): cap login shell env probe cache with eviction

The loginShellEnvProbeCache Map keys include the exec function reference
and exec environment, which can vary across calls. A 64-entry eviction
cap prevents unbounded growth.

* refactor(shell-env): share bounded probe cache insertion

Co-authored-by: 陈志强0668000989 <31802073+wings1029@users.noreply.github.com>

* fix(shell-env): retain active probe cache entries

Co-authored-by: 陈志强0668000989 <31802073+wings1029@users.noreply.github.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 09:46:35 -07:00
Peter Steinberger
d4d7b80431 refactor(feishu): remove comment retry test seam (#109192) 2026-07-16 09:46:29 -07:00
Peter Steinberger
af42fbb6f3 perf(ci): unblock parallel oxlint shards and gate the lint-lane i18n verify (#109144)
* perf(ci): unblock parallel oxlint shards and gate the lint-lane i18n verify

check-lint is the slowest static lane (median 252s): the control-UI
i18n verify runs 86s unconditionally and the three oxlint shards run
serially (89s) because the parallel gate demands 48GB of memory — a
local-Mac threshold that Blacksmith's 32GB 16 vCPU class can never
meet. CI now parallelizes shards at 8+ cores / 24GB+, and the lint case
reuses the existing run_control_ui_i18n manifest gate so diffs that
cannot affect generated catalogs skip the verify while oxlint always
runs.

* chore(ci): print oxlint shard concurrency decision

The lint-lane validation run still executed shards serially on a 16
vCPU runner; one log line exposes the resolved concurrency and the
host resources the decision saw.
2026-07-16 09:45:47 -07:00
Peter Steinberger
fa2b38c890 test: speed up stuck-session recovery coverage (#109195) 2026-07-16 09:44:46 -07:00
Peter Steinberger
ccbbd8b08c fix(autoreview): sync config token fixture (#109182) 2026-07-16 09:44:42 -07:00
Dallin Romney
303be5e0e4 fix(qa): label static scorecard data as inventory (#108784) 2026-07-16 09:43:51 -07:00
Peter Steinberger
05dd921016 fix: shard OpenAI transport stream tests (#109181)
* test(agents): shard OpenAI transport stream suites

* chore(lint): transfer transport test baselines
2026-07-16 09:43:07 -07:00
wahaha1223
0903ebe4fa fix(xai): release realtime reconnect delay on close (#108252)
* fix(xai): cancel realtime reconnect backoff on close

* test(xai): cover reconnect after bridge close

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 09:40:49 -07:00
Peter Steinberger
e363add72f fix(prompt-probe): close stalled response bodies (#109188) 2026-07-16 09:39:48 -07:00
Peter Steinberger
b3301e3212 feat(clients): show live plan checklists in web, iOS, and Android chat (#108675)
The gateway already broadcasts stream:"plan" agent events with typed
{step, status} snapshots; all three clients dropped them. Control UI now
renders an expandable checklist bar above the composer (run-scoped,
cleared on run lifecycle); the shared iOS/macOS chat UI mounts a
Liquid Glass pill (iOS 26 glassEffect, material fallback) between the
message list and composer; Android adds an expandable pill above the
composer bridged through ChatController/NodeRuntime/MainViewModel.
All parsers accept typed and legacy string steps, enforce the
single-in_progress invariant, and scope snapshots and clears to the
owning run. Locale artifacts, Android resources, and the iOS string
catalog carry generated translations for the pill strings.
2026-07-16 09:33:52 -07:00
Peter Steinberger
f871b499b6 fix(infra): drop consumer-less gateway supervision exports
333c4f9a61 and 244f4965dc landed six exports with no production
consumers, failing the hard-zero deadcode gate on every PR: a dead
re-export block in restart-handoff (the contract module's real importer
uses it directly), three result/mode types only referenced inside their
own modules, and two supervision symbols whose only consumers were their
tests. The types and helpers stay defined for the in-flight supervisor
work to re-export alongside real consumers; the supervision test now
proves mode resolution through the public isGatewayExternallySupervised
surface.
2026-07-16 09:31:46 -07:00
Peter Steinberger
8bf4d388b0 fix(onepassword): disable desktop-app integration on broker op calls (#109157)
Without OP_LOAD_DESKTOP_APP_SETTINGS=false and OP_BIOMETRIC_UNLOCK_ENABLED=false,
op 2.35 on macOS reads the 1Password desktop app's settings even on the
service-account path and can block on a per-PID App Data Protection dialog,
hanging the broker until timeoutMs on Mac gateway hosts.
2026-07-16 09:15:03 -07:00
Michael Appel
9359544e84 fix: tighten control ui input validation [AI] (#106545)
* fix: harden control ui input validation

* test: avoid secret-like media fixtures

* fix: preserve edge-case preview and media handling

* test: avoid control-character media fixture

* fix(tui): type searchable select search text

* fix(config): preserve merge-patch record identifiers

---------

Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>
2026-07-16 21:44:38 +05:30
Peter Steinberger
79b1fdfa39 feat(mac): mascot accessory pack — nightcap, grad cap, hat-tip exit (#108882)
* feat(mac): mascot accessory pack — nightcap, grad cap, hat-tip exit

New accessory channel for the shared mascot: sleepy (and auto-dozing)
Clawd wears a floppy blue nightcap; the final onboarding page tops the
celebration with a graduation cap whose tassel swings with the body;
and leaving the working mood plays a hat-tip — claw to the brim, small
bow, hard hat lifts away. Headwear drawing moves to its own canvas
extension file.

* fix(mac): one hat at a time and no phantom hat tips

The working hard hat (including its hat-tip exit) suppresses any mood-
or consumer-requested accessory until it is fully gone, and the hat-tip
plays only when the hat actually seated — a working state cancelled
mid-don exits through the normal entrance instead of synthesizing a
full hat just to lift it.

* chore(i18n): refresh native inventory lines for mascot view
2026-07-16 09:14:21 -07:00
Peter Steinberger
20d748a4f0 feat(agents): agent-owned gateway terminals with operator co-attach 2026-07-16 09:12:50 -07:00
Peter Steinberger
8c676623b7 fix(discord): open newest activity widget when launch ID is missing (#108817)
* fix(discord): open latest activity widget on fallback

* chore: remove release-owned changelog entry

* fix(discord): order activity fallback by delivery

* fix(discord): require atomic widget delivery updates

* test(discord): type activity delivery fixtures

* test(discord): model missing atomic state support

* fix(discord): order activity fallback by message snowflake

* docs(discord): clarify activity fallback order
2026-07-16 09:11:55 -07:00
Alix-007
59fa034fcb fix(doctor): bound launchctl environment probes (#109115) 2026-07-16 09:08:55 -07:00
Peter Steinberger
14bb0b4e52 refactor(discord): deprecate abort signal helper (#109166) 2026-07-16 09:08:00 -07:00
wangmiao0668000666
813021fa79 fix(feishu): honor abortSignal in drive comment reply retry loop (#108408)
* fix(feishu): honor abortSignal in drive comment reply retry loop

The inter-attempt delay in monitor.comment.ts used a bare setTimeout and
never received the owning monitor account's AbortSignal, so an account
teardown (ws disconnect, webhook stop, config reload) left the in-flight
comment reply retry running for up to ~6s after the rest of the lifecycle
settled. delayMs now wraps waitForAbortableDelay from async.ts and the
abortSignal is threaded through fetchDriveCommentContext →
resolveDriveCommentEventTurn → handleFeishuCommentEvent →
createFeishuDriveCommentNoticeHandler, sourced from
monitorSingleAccount.

The retry loop checks the waitMs return value and the abortSignal flag,
breaking out of the next 1s tick instead of running the full 6×1s poll
budget. Sibling surface monitor.bot-identity.ts already uses the same
pattern; #104431 explicitly skipped the comment-monitor retry because
it is a result-predicate poll, not an error retry, and this fix is
orthogonal to that decision.

Not tested: live Feishu tenant, real bot identity, real drive comment,
and account restart. requestFeishuOpenApi itself does not accept
AbortSignal — that is a separate, larger refactor and is out of scope.

* test(feishu): prove comment retry abort

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 09:05:23 -07:00
zengLingbiao
5f4f249d88 fix(prompt-probe): bound Anthropic upstream proxy fetch requests (#108832)
* fix(prompt-probe): bound Anthropic upstream proxy fetch requests

* test(prompt-probe): exercise stalled upstream deadline

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 09:04:39 -07:00
Peter Steinberger
d806cf4171 test: reuse resolver git fixture (#109154) 2026-07-16 09:03:15 -07:00
Peter Steinberger
4733a59f26 feat(ui): web delights — empty-state mascots, first-reply confetti, composer drag-catch (#109118)
* feat(ui): web delights — empty-state mascots, first-reply confetti, composer drag-catch

Three mascot-powered moments in the Control UI: the plugins page and
channels hub show a sleepy Clawd when truly empty and a curious one on
a search miss; the very first successful assistant reply in a browser
earns a single confetti burst in the mascot palette (localStorage
once-flag, reduced-motion aware); and dragging files over the new-
session composer makes the welcome mascot tease with an open mouth,
then snap a catch on drop — upload behavior untouched.

* fix(ui): satisfy strict types and knip for the confetti module

Tuple index under noUncheckedIndexedAccess gets an anchored fallback,
the once-flag helper stays module-internal (knip counts only production
consumers), and its coverage moves to the public fireFirstReplyConfetti
path in jsdom using the shared storage mock.
2026-07-16 09:02:32 -07:00
Shakker
9b48ad5977 fix: avoid redundant Windows restart persistence (#109162) 2026-07-16 17:01:39 +01:00
Shakker
266d3c8551 refactor: focus external restart verification 2026-07-16 17:01:39 +01:00
Shakker
6013e593c7 fix: narrow unmanaged restart results 2026-07-16 17:01:39 +01:00
Shakker
332b522f90 fix: harden external restart integration 2026-07-16 17:01:39 +01:00
Shakker
fadd5cfd22 docs: document external gateway supervision 2026-07-16 17:01:39 +01:00
Shakker
333c4f9a61 feat: add restart handoff consume protocol 2026-07-16 17:01:39 +01:00
Shakker
e123606b46 feat: support externally supervised gateway restarts 2026-07-16 17:01:39 +01:00
Shakker
244f4965dc feat: add external gateway supervision policy 2026-07-16 17:01:39 +01:00
Peter Steinberger
46c3dba537 chore: gate releases on Codex progress follow-through (#108828)
* test(release): gate Codex progress follow-through

* test(release): register Codex follow-through entry

* test(release): harden Codex follow-through proof

* test(release): preserve legacy Codex follow-through proof
2026-07-16 09:01:00 -07:00
Alix-007
2d0f0d0ec0 fix(daemon): bound Node runtime probes (#109127) 2026-07-16 09:00:06 -07:00