Commit Graph

42235 Commits

Author SHA1 Message Date
Peter Steinberger 6edf4a2b7e improve: reduce worker tool startup imports (#119644)
* perf(worker): narrow core tool imports

* fix(worker): preserve generic tool factories

---------

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-05 08:42:50 -07:00
Peter Steinberger e31c24254c refactor(media): unify media provider registries (#119651) 2026-08-05 08:33:46 -07:00
SunnyShu e5e96fa37d fix(agents): keep exact NO_REPLY silent instead of mirroring messaging-tool text (#119463)
* [AI] fix(agents): keep exact NO_REPLY silent instead of mirroring messaging-tool text

Exact final NO_REPLY used to be rewritten to the latest messaging-tool text
(messagingToolSentTexts.at(-1)). sessions_send bodies are recorded in that
global list on success, but carry no channel route target, so an internal
escalation note could become the final user-facing payload and be delivered
to the originating user channel (#119383).

Remove the obsolete generic rewrite: the Doctor migration contract already
states exact NO_REPLY is never rewritten to visible fallback text, and both
the block-reply delivery path and the final payload normalizer treat exact
NO_REPLY as silence. Messaging-tool sent-text/target evidence recording is
unchanged so dedupe and lifecycle evidence keep working.

Fixes #119383

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

* [AI] refactor(agents): document NO_REPLY invariant without report reference

ClawSweeper P3: the inline comment in handleMessageEnd referenced the
specific report (#119383). State the durable invariant instead: global
messaging-tool send evidence is not a user-route reply and must never be
mirrored into the final payload. Also apply oxfmt formatting to the new
regression test fixture lines.

Related to #119383

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-05 08:23:01 -07:00
Peter Steinberger 9546d2af58 fix(doctor): capitalize Gateway in plugin restart guidance (#119659)
* fix(doctor): capitalize Gateway restart guidance

* test(doctor): keep plugin refusal coverage focused
2026-08-05 08:14:18 -07:00
ml12580 13523321b3 fix(agents): strip echoed base64 image payloads so photo-heavy turns no longer hit the per-turn output cap (#119488)
* fix(agents): strip echoed base64 image payloads before per-turn CLI output-limit accounting

* fix(agents): normalize Claude tool media before output metering

Complete the owner-boundary repair for #119488 and #119445.

Preserve contributor @ml12580 and reporter @orbitingflea attribution.

* fix(agents): frame coalesced CLI records before output limits

Resolve both exact-head P1 coalesced-line framing findings and preserve the shipped raw-line CLI backend hook.

Preserve contributor @ml12580 and reporter @orbitingflea attribution for #119488 and #119445.

* fix(agents): meter every bounded Claude output frame

Resolve exact-head blank-frame and padded-output accounting across both Claude parser owners while preserving coalesced media and the shipped raw-line plugin hook.

Preserve contributor @ml12580 and reporter @orbitingflea attribution for #119488 and #119445.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-05 07:24:50 -07:00
Peter Steinberger f39156323e improve: make state-heavy test suites faster (#119617)
* test(state): reuse current database fixtures

* test(claws): compare database snapshots directly

* test(state): remove obsolete fixture options

---------

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-05 07:24:41 -07:00
Peter Steinberger 1b4a60be15 fix(plugin-sdk): stabilize tuple-derived API baseline ordering (#119635) 2026-08-05 07:15:45 -07:00
Yufeng He cd709e4a3a fix(media): keep the ttl sweep out of the managed outgoing tree (#119127)
* fix(media): keep the ttl sweep out of the managed outgoing tree

attachments.ttlHours arms a maintenance sweep that prunes every direct
child of the media dir by mtime. That includes media/outgoing, which
is not scratch: it holds the only durable copy of generated media
referenced by chat-history SQLite rows, and the legacy records/*.json
files that the orphan reaper treats as its pre-SQLite migration
barrier. One sweep deleted history originals while their rows kept
pointing at them, and cleared the barrier so the next reap removed
legacy orphans it was written to protect.

Skip the outgoing subtree in pruneNonPlaybackMedia. It is owned by
cleanupManagedOutgoingMediaRecords, which reaps with the database in
the loop instead of by mtime alone.

Fixes #119088

Signed-off-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(gateway): run the managed outgoing reaper on the media cadence

ClawSweeper's P1: skipping `outgoing` in the ttl sweep removed the only
periodic cleanup for transient records and unindexed originals, since
the SQLite-aware reaper only fired after chat.history reads. Run it
right after each maintenance sweep instead, so transient managed media
still expires in sessions that never read history, and say so in the
ttlHours help text (P2).

Signed-off-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* ci: retrigger after a runner checkout flake

* style: run oxfmt over the maintenance timer edit

* fix(media): decouple managed cleanup from attachment ttl

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(gateway): drain media cleanup during shutdown

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* test(gateway): let media maintenance settle before cadence

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(gateway): publish media cleanup owner before start

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(gateway): bound media cleanup shutdown drain

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(gateway): fence media cleanup across restarts

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): retain history when session state is unavailable

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): retain history for unavailable fixed stores

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): keep target result type private

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): retain history when session database is missing

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): preserve fixed-store ownership during cleanup

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): use discovered owner for history lookup

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): retain history for unreadable session rows

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): honor explicit retired store ownership

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(gateway): share media cleanup fence across startup

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(gateway): fence media cleanup in close prelude

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): retain history for unreadable sibling stores

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(media): require complete ownership evidence before cleanup

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* test(media): end-to-end regression for GC on a dropped session_nodes

The exact case the review called out: a real seeded database loses its
session_nodes table, the global sweep runs, and the record plus its
original bytes must survive. A control case keeps the healthy path
honest: a dereferenced record still gets deleted when the store reads
fine. Fails against the pre-guard code, passes with it.

* refactor(sessions): isolate retention availability reads

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* fix(sessions): keep availability result type private

Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

---------

Signed-off-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-05 06:41:32 -07:00
Peter Steinberger 359d8d867b fix(claws): remove owner-qualified skills (#119606)
* fix(claws): remove qualified skill refs

* test(claws): update uninstall plan fixtures
2026-08-05 06:41:22 -07:00
sunlit-deng 29175dd11e fix(gateway): claim malformed plugin icon routes (#119559) 2026-08-05 21:23:49 +08:00
Jason (Json) bf7840f539 fix(gateway): keep context prewarm cooperative (#119607) 2026-08-05 07:09:05 -06:00
Qiong 36ee98d815 fix(channels): preserve concurrent draft updates when sendOrEditStreamMessage returns false (#112370)
* fix(channels): preserve concurrent draft updates when sendOrEditStreamMessage returns false

* test(channels): relocate draft race coverage for clean merge

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-05 06:08:23 -07:00
Vincent Koc 80da61668e improve(doctor): avoid repeated plugin metadata scans (#119482)
* perf(doctor): reuse plugin metadata snapshot

Punchcard-Session: coral-workshop-workshop-3f

* test(doctor): update legacy issue mock

Punchcard-Session: coral-workshop-workshop-3f

* fix(doctor): refresh metadata after repairs

* test(doctor): type legacy issue mock arguments

Punchcard-Session: coral-workshop-workshop-3f

* fix(doctor): invalidate scoped plugin metadata

Punchcard-Session: coral-workshop-workshop-3f

* fix(doctor): keep snapshot scope type private

Punchcard-Session: coral-workshop-workshop-3f

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-05 19:06:08 +08:00
clawsweeper[bot] b8834450f5 fix(sessions): preserve BOMs in Windows-aware exec decoding (#119509)
Punchcard-Session: clear-orchard-lantern-bc

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-05 18:32:39 +08:00
Jason (Json) c45b0a1944 fix(gateway): reuse published owner for context prewarm (#119562) 2026-08-05 03:51:46 -06:00
clawSean c02e39345b fix(telegram): route poll answers into agent turns
Route public poll votes through Telegram’s authorized inbound turn path while preserving chat/topic origin and durable ordering. Surface unsupported routing without duplicating sent polls.

Co-authored-by: clawSean <260045960+clawSean@users.noreply.github.com>
2026-08-05 14:42:51 +05:30
Peter Steinberger dedfc01628 fix(test): stage live auth profiles from SQLite (#113651)
* fix(test): stage live auth from SQLite

Punchcard-Session: cobalt-cedar-timber-04

* fix(test): snapshot staged auth atomically

Punchcard-Session: cobalt-cedar-timber-04

* fix(test): fail closed on partial auth schema

Punchcard-Session: calm-cedar-river-aa

* fix(test): resolve live auth stage path lazily

Punchcard-Session: calm-cedar-river-aa

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-05 17:12:09 +08:00
Jason (Json) 287da89fab fix(gateway): prevent post-ready catalog warmup from stalling RPCs (#119377)
* fix(gateway): keep context cache warmup responsive

* fix(gateway): yield request-time context projection

* Revert "fix(gateway): yield request-time context projection"

This reverts commit ce37a8f1eb.

* Revert "fix(gateway): keep context cache warmup responsive"

This reverts commit 940ffa2ece.

* fix(gateway): stop prewarming session catalogs
2026-08-05 02:10:45 -06:00
Achyut Mukund 7617e91d70 fix(gateway): reject blank session history keys (#85261)
Punchcard-Session: clear-orchard-lantern-bc

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-05 15:49:10 +08:00
louria 3faa2b0888 fix(tool-search): normalize dotted call arguments (#119418) (#119464)
Co-authored-by: Xiaomi <openclaw@louria.github.io>
2026-08-05 15:22:05 +08:00
sunlit-deng 07ad8114b0 fix: make plugin verification restart guidance install-neutral (#119508) 2026-08-05 15:15:34 +08:00
Jason (Json) 47ce26985d fix(ui): preserve profile avatars under Control UI base paths (#119308)
* fix(ui): preserve active session status layout

* fix(ui): preserve avatar paths and fork lineage

* fix(ui): preserve avatars under control UI base paths
2026-08-05 00:31:04 -06:00
Jesse Merhi 95d7d95515 feat(tools): support batched tool search queries (#118623)
* feat(tools): support batched tool search queries

* fix(tools): harden batched tool search

* fix(tools): preserve batch search contracts

* fix(tools): bound batch search processing

* fix(tools): bound batch candidate metadata

* fix(tools): preserve callable batch candidates

* docs(tools): align batch search QA proof

* refactor(tools): isolate search request parsing

* test(qa): strengthen structured search proof

* test(qa): align structured directory proof

* fix(tools): preserve scalar search compatibility

* test(qa): disable batch scenario retries

* test(qa): allow direct-only tools in structured proof

* test(qa): verify nested catalog call result

* test(qa): remove obsolete result scanner
2026-08-05 16:28:10 +10:00
Jason (Json) 77f7560b41 fix(gateway): prevent chat metadata from blocking concurrent RPCs (#119369)
* fix(gateway): serve chat metadata from prepared snapshots

* fix(gateway): make chat metadata replacement atomic

* fix(gateway): keep metadata contract cycle-free

* fix(gateway): settle coalesced metadata replacement

* fix(gateway): retry invalidated metadata projections

* fix(gateway): terminate unowned metadata invalidation
2026-08-05 00:10:18 -06:00
Peter Steinberger dca3ed16de fix: adopt Tailscale names and avatars into user profiles (#119479)
* fix(gateway): adopt Tailscale profile identities

* fix(gateway): normalize Tailscale identity subjects

* fix(gateway): preserve Tailscale identity provenance

* fix(gateway): detach Tailscale avatar adoption
2026-08-04 23:09:06 -07:00
wangyan2026 20bd49db89 fix(pairing): normalize account key in legacy allowFrom filename parsing (#110415)
* [AI] fix(pairing): normalize account key in legacy allowFrom filename parsing

parseAllowFromFilename extracted the account segment from filenames
without normalizing it via safeAccountKey, so non-canonical spellings
(e.g. HY_RIN_Bot vs hy_rin_bot) could never match configured accounts.
This left the file unresolved, producing a startup migration warning
that blocks gateway readiness on every restart.

Normalize accountKey via safeAccountKey before comparing so that raw
and canonical spellings resolve to the same account. Wrap in try/catch
so pathological filename segments skip safely instead of throwing.
Guard non-canonical DEFAULT segments: when safeAccountKey maps a
non-literal-default segment (e.g. "DEFAULT") to the canonical key
"default", skip the filter so the file remains unresolved instead of
being attributed to the implicit bundled default account and deleted.
Keep the implicit bundled-default fallback on the literal canonical
suffix (accountKey === DEFAULT_ACCOUNT_ID). Ambiguity detection
remains unchanged.

Related to #110187

* fix(pairing): constrain legacy filename recovery

Co-authored-by: WangYan <wang.yan29@xydigit.com>

* fix(pairing): preserve case-colliding legacy files

Co-authored-by: WangYan <wang.yan29@xydigit.com>

* fix(pairing): match legacy files to raw account ids

Co-authored-by: WangYan <wang.yan29@xydigit.com>

* fix(pairing): keep default suffix literal

Co-authored-by: WangYan <wang.yan29@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-04 22:59:30 -07:00
Vincent Koc eb39ac8cac fix(plugins): keep install fixtures registry-valid (#119489)
Punchcard-Session: amber-workshop-river-yr
2026-08-05 13:26:02 +08:00
Xiaoshuai Zhang 72fd25d47d fix(gateway): connect bootstrap clients to self-signed WSS (#80204)
* fix(gateway): propagate TLS pins to bootstrap clients

Co-authored-by: Xiaoshuai Zhang <dev@jetd.one>
Punchcard-Session: cobalt-brook-meadow-m9

* fix(gateway): keep TLS loader type private

Punchcard-Session: cobalt-brook-meadow-m9

* fix(gateway): preserve TLS pin transport policy

Punchcard-Session: cobalt-brook-meadow-m9

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Xiaoshuai Zhang <dev@jetd.one>
2026-08-05 13:19:27 +08:00
ml12580 ae41dcef54 fix: auto-reply gateway stalls in a zero-work drain loop after a queue drop policy change (#119331)
* fix(auto-reply): preserve pending overflow summaries

Co-authored-by: ml12580 <long.xinyuan3@xydigit.com>

* fix(auto-reply): record queue cap outcomes

* fix(auto-reply): align summary lines with sources

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-04 22:19:19 -07:00
Jason (Json) 141a16f7b3 fix(sessions): release writer lane during transcript archival (#119460) 2026-08-04 23:13:58 -06:00
Vincent Koc a1d20ae31b test(tui): cover session lifecycle and resume (#119465)
Punchcard-Session: ember-workshop-lantern-bs
2026-08-05 12:16:06 +08:00
Peter Steinberger 752dd2b5b8 refactor(cli): consolidate repeated command registration (#119434) 2026-08-04 20:51:32 -07:00
Cuttingwater f0a74970ec fix(system-agent): apply approved proposal exactly once (#119389)
Co-authored-by: Chris Davidson <chris.davidson.47@gmail.com>
2026-08-04 23:48:18 -04:00
Peter Steinberger 39bbd8afd3 refactor(sessions): consolidate transcript and state helpers (#119435) 2026-08-04 20:45:41 -07:00
Peter Steinberger 2692954c72 refactor(infra): consolidate service paths and usage rollups (#119433) 2026-08-04 20:39:53 -07:00
Syu b316c9cacf fix(channels): honor explicit preview streaming settings
Explicit Telegram and Discord preview modes now override inherited block streaming while explicit channel block settings remain authoritative.

Co-authored-by: Syu <zhuqimo@gmail.com>
2026-08-05 09:04:49 +05:30
Yuval Dinodia 3bda007ca4 fix(mcp): guard stdio stdout frame parsing against oversized-buffer crash (#119379)
…rash

An MCP server whose stdout frame exceeds the SDK ReadBuffer 10 MiB cap makes
ReadBuffer.append throw synchronously inside the child stdout data callback.
The handler had no try/catch, so the error escaped as an uncaughtException and
took down the host process, killing every concurrent session. The frame size is
driven by tool-result data a lower-privileged sender can influence, not by the
operator who chose the server.

Wrap append and processReadBuffer in the same try/catch the upstream SDK
transport uses: route the error to onerror and close the transport so the MCP
runtime handles it as a server disconnect. This matches the existing stdin
(#75438) and stderr (#99803) guards in this file; stdout was the missed path.

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-04 22:29:30 -05:00
Peter Steinberger c4dccc614d refactor(auto-reply): centralize delivery deduplication and routing (#119436) 2026-08-04 20:29:21 -07:00
Vincent Koc e35d22807e perf(xai): lazy-load optional capability runtimes (#119374)
Punchcard-Session: coral-workshop-workshop-3f
2026-08-05 11:26:40 +08:00
Peter Steinberger a5ebadc293 refactor(media): share image and video geometry normalization (#119416) 2026-08-04 20:23:25 -07:00
Vincent Koc 9371dddcdb fix(config): preserve plugin metadata for missing config (#119421)
Restore plugin metadata for valid missing-config snapshot reads while preserving scan-free plain reads and fail-closed invalid snapshots.
2026-08-05 11:22:42 +08:00
Jason (Json) ab7b3ffd1f fix: retry delivery when outbound adapter is unavailable (#119371)
* fix(outbound): preserve pre-dispatch retryability

* test(outbound): assert lazy runtime sender

* fix(feishu): preflight direct message runtime

* test(gateway): preserve scoped registry fixture
2026-08-04 21:22:07 -06:00
Vincent Koc fd1662f49c fix(cli): retire invalid secret flags and prove doctor recovery (#118926)
* test(qa): add doctor CLI recovery coverage

* test(qa): secure doctor exec SecretRef proof

* test(qa): gate doctor systemd recovery proof

* test(qa): normalize doctor terminal output

* test(qa): close doctor probe sockets

* test(qa): classify doctor probe as foreign

* test(qa): track doctor probe sockets

* test(qa): retain doctor instance narrowing

* test(qa): preserve observed doctor recovery proof

* test(qa): keep doctor recovery on stable dist

* test(qa): honor Windows exec ACL blocking

* test(qa): use canonical home for systemd recovery

* test(qa): follow bounded gateway recovery

* test(qa): accept lifecycle service label

* test(qa): align doctor recovery contract

Punchcard-Session: crisp-lantern-orchard-nv

* docs(secrets): remove retired provider bypasses

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): isolate doctor recovery target

Punchcard-Session: crisp-lantern-orchard-nv

* fix(cli): retire invalid secret provider flags

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): isolate doctor supervisor mode

Punchcard-Session: crisp-lantern-orchard-nv

* fix(plugins): remove dead secret path bypass

Punchcard-Session: crisp-lantern-orchard-nv

* chore: drop release-owned changelog entry

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): isolate doctor sudo scope

Punchcard-Session: crisp-lantern-orchard-nv

* fix(secrets): remove dead path bypass

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): isolate systemd user bus

Punchcard-Session: crisp-lantern-orchard-nv
2026-08-05 11:20:23 +08:00
Peter Steinberger a8caab5c3d refactor(plugin-sdk): remove unused private QA helpers (#119437) 2026-08-04 20:16:07 -07:00
Peter Steinberger 1f3d45b76f refactor(plugins): consolidate lifecycle hook dispatch (#119429) 2026-08-04 20:11:22 -07:00
Vincent Koc 17ef7771a6 fix(ci): stabilize TUI PTY proof ownership (#119420)
* fix(ci): stabilize TUI PTY proof ownership

Punchcard-Session: cobalt-brook-meadow-m9

* fix(test): align TUI PTY event typings

Punchcard-Session: cobalt-brook-meadow-m9
2026-08-05 11:08:56 +08:00
Peter Steinberger 23c7981a73 test(system-agent): reduce suite setup overhead (#119424)
* test(system-agent): reduce suite setup overhead

* test(system-agent): type-check TUI call ordering

---------

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-04 20:08:53 -07:00
Vincent Koc 1ee0564b09 fix(discord): avoid doctor runtime loading (#119391)
* fix(discord): publish doctor capability metadata

Punchcard-Session: amber-workshop-river-yr

* fix(doctor): read packaged channel metadata

Punchcard-Session: amber-workshop-river-yr
2026-08-05 11:05:35 +08:00
Peter Steinberger 22de30f998 fix(media): decouple playback cache retention (#119417) 2026-08-04 19:57:48 -07:00
Peter Steinberger 03cbc2cad5 refactor(channels): unify configured binding resolution (#119414) 2026-08-04 19:55:09 -07:00