Commit Graph

78555 Commits

Author SHA1 Message Date
Serghei 9b2328dc37 fix(gateway): chat clients lose the last streamed text when a run ends in error (#119556)
…s in error

The 150 ms delta throttle in emitChatDelta withholds the most recent chunk
without scheduling it, leaving it in the run buffer for a later event to
deliver. emitChatTerminal exists to be that event: it flushes the buffer
before emitting the terminal frame.

On the error terminal it cannot, because the buffer is cleared at the top of
the branch, before finalizeLifecycleEvent runs. The flush then resolves empty
text and no-ops, so the withheld tail never reaches the chat channel, and a
terminal that classifies as a cancellation resolves its message to undefined.

The clear is redundant on the immediate branch: finalizeLifecycleEvent already
clears the buffer itself, after emitChatTerminal has flushed and resolved the
terminal message. Removing it there fixes both the missing delta and the
missing message. The deferred retry-grace branch still needs the clear so a
fallback attempt cannot merge onto the failed attempt's text, so flush before
clearing there, matching the pre-tool and pre-item flush sites in the same
function.

The end terminal was already correct, which is why this stayed invisible.

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-05 11:00:22 -05:00
Vincent Koc 113af2fcbd fix(ci): preserve stdin through Docker heartbeat logging 2026-08-05 23:56:36 +08:00
WhatsSkiLL 238c8bfc23 fix(android): show active session status in sidebar (#118624) 2026-08-05 11:55:10 -04:00
Peter Steinberger 3ec8af66d1 refactor(openai): simplify ChatGPT OAuth credential flow (#119628) 2026-08-05 08:51:41 -07:00
Vincent Koc ebae858817 fix(qa): restart after migration convergence 2026-08-05 23:43:07 +08:00
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 6269be70c5 refactor(memory): consolidate sync and dreaming helpers (#119633)
* refactor(memory): consolidate sync and dreaming helpers

* test(memory): track descriptor-backed promotion writes
2026-08-05 08:41:35 -07:00
Shakker 0b68f8e1ed refactor: isolate ClickClack binding retention (#119358) 2026-08-05 16:38:59 +01:00
Shakker 81ad24a158 fix: bound detached ClickClack discussion bindings 2026-08-05 16:38:59 +01:00
Shakker 586f32fe25 fix: preserve concurrent ClickClack attachment refreshes 2026-08-05 16:38:59 +01:00
ragesaq 5cd2c5b07b fix: keep ClickClack discussion rooms durable
Separate durable ClickClack room identity from replaceable exact-session attachments. Session archive, reset, deletion, and recreation retain the existing room and history while rotating local routing authority and preserving fail-closed exact-incarnation grants.

Pin ambiguous room recovery to the originating account and credential, and retain prior attachments when persistence fails.

Closes #119300

Co-authored-by: Chisel <chisel@psiclawops.dev>
2026-08-05 16:38:59 +01:00
Peter Steinberger e745c298a1 fix(qa): verify Matrix DM rooms really share or isolate their sessions (#119663)
* fix(qa): verify persisted Matrix room session identities

* test(qa): prove Matrix routing keys and transcript identities independently

* fix(qa): compare authoritative Matrix sender identities across drivers
2026-08-05 08:36:32 -07:00
Peter Steinberger e31c24254c refactor(media): unify media provider registries (#119651) 2026-08-05 08:33:46 -07:00
Vincent Koc 4e53edb878 merge: land llama.cpp lifecycle fix (#119238)
Punchcard-Session: clear-orchard-lantern-qj
2026-08-05 23:26:10 +08:00
Peter Steinberger 9bc2f455a5 fix(qa): preserve control UI policy across all suite runtimes (#119656) 2026-08-05 08:24:38 -07:00
Peter Steinberger 52c4554787 refactor(codex): consolidate approval and elicitation ownership (#119626) 2026-08-05 08:23:08 -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 4511c9b71f refactor(android): remove obsolete chat rendering paths (#119615) 2026-08-05 08:17:04 -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
Peter Steinberger ce06e7924e refactor(qa): consolidate scenario runtime helpers (#119623) 2026-08-05 08:01:58 -07:00
Val Alexander 4663244170 fix(telegram): bind Mini App auth to dashboard launches
Require a short-lived, owner-bound launch ticket before minting a Control UI bootstrap token.

Co-authored-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
2026-08-05 20:24:34 +05:30
Peter Steinberger d7a444b08a refactor(agent-core): unify session projection and compaction summaries (#119639) 2026-08-05 07:49:12 -07:00
pash-openai 55715cafb3 fix(codex): allow natural reactions in the current conversation (#119649) 2026-08-05 14:41:32 +00:00
Peter Steinberger 8db2cb7a94 refactor(providers): deduplicate bundled model catalogs (#119627) 2026-08-05 07:40:07 -07:00
Peter Steinberger 6c53dbe2b0 fix(ui): observe the active service worker after asset refresh (#119622) 2026-08-05 07:35:31 -07:00
Vincent Koc 62f2c2a35c merge: sync origin/main
Punchcard-Session: frost-brook-timber-mx
2026-08-05 22:26:20 +08:00
Vincent Koc e67d164403 fix(llama-cpp): require full-process cleanup recovery
Punchcard-Session: frost-brook-timber-mx
2026-08-05 22:26:11 +08: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
Vincent Koc 99021d173a perf(agents): add concurrency benchmark (#119569) 2026-08-05 22:23:37 +08:00
Peter Steinberger b3f3da1688 fix(browser): visibly report failed pairing and tab-sharing actions (#119526)
* fix(browser): surface extension action errors exactly once

* fix(browser): reuse typed extension error response handler

* fix(browser): settle tab sharing only after consent reconciliation

* fix(browser): retain popup action errors across status refreshes

* fix(browser): preserve popup failures across state transitions
2026-08-05 07:22:51 -07:00
Peter Steinberger 08b9c4c3e1 refactor(lobster): consolidate embedded workflow execution (#119630) 2026-08-05 07:22:43 -07:00
Peter Steinberger 1b4a60be15 fix(plugin-sdk): stabilize tuple-derived API baseline ordering (#119635) 2026-08-05 07:15:45 -07:00
Peter Steinberger acc31c3af3 docs(skills): make full-authority maintainer runs unattended (#119629) 2026-08-05 07:11:57 -07:00
Peter Steinberger 03a9e022ed fix(managed-child): honor process groups that vanish before cleanup (#119614) 2026-08-05 06:57:55 -07:00
Peter Steinberger e7b7d1c8cd fix(ci): stop label-driven automation churn (#119610) 2026-08-05 06:53:23 -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 0d7baffc19 fix(clawrouter): show stable error for malformed usage responses (#119580)
* fix(clawrouter): handle malformed usage responses

* fix(clawrouter): use canonical usage record coercion

Punchcard-Session: clear-orchard-lantern-bc

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-05 21:33:06 +08:00
sunlit-deng 29175dd11e fix(gateway): claim malformed plugin icon routes (#119559) 2026-08-05 21:23:49 +08:00
amittell d85920c03e fix(telegram): preserve truthful empty-content delivery (#88810)
* fix(telegram): skip empty rendered text deliveries
* fix(telegram): preserve empty delivery outcomes

---------

Co-authored-by: amittell <1388680+amittell@users.noreply.github.com>
2026-08-05 18:41:38 +05:30
Jason (Json) 90148cf3e7 fix(tooling): balance local tsgo CPU cap (#119542) 2026-08-05 07:11:31 -06:00
clawsweeper[bot] c3d17e84f4 fix(build): select the root-help bundle that exports outputRootHelp (#119590)
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-08-05 21:10:48 +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 4b37a05225 fix(ci): preserve QA profile evidence on timeout (#119572)
* fix(ci): preserve QA profile timeout evidence

Punchcard-Session: silver-valley-valley-dt

* fix(ci): classify QA timeout escalation

Punchcard-Session: silver-valley-valley-dt

* fix(ci): distinguish QA watchdog expiry

Punchcard-Session: silver-valley-valley-dt

* test(ci): type QA watchdog signal expectations

Punchcard-Session: silver-valley-valley-dt
2026-08-05 21:06:35 +08:00
Peter Steinberger 74014c286d fix(qa): select the scenario's required provider before its models (#119491)
* fix(qa): resolve scenario provider requirements before selection

* fix(qa): preserve validated scenario provider lane type

* test(qa): isolate provider lane selection regressions

* fix(qa): honor explicit scenario lanes in unified runtime suites
2026-08-05 05:53:02 -07:00
Peter Steinberger 4c94d9fb93 fix(qa): reject silent and out-of-character persona conversations (#119497)
* fix(qa): reject unanswered and unsafe character conversations

* fix(qa): propagate classified persona delivery failures

* fix(qa): keep qualitative persona evaluations on live providers

* test(qa): avoid inefficient persona failure table spread
2026-08-05 05:37:54 -07:00
Peter Steinberger 85fd4c9a02 fix(qa): preserve scoped native message and command identity (#119499) 2026-08-05 05:34:43 -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