Commit Graph

42314 Commits

Author SHA1 Message Date
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
Peter Steinberger c8730c748c test(state): reuse legacy database fixtures (#119423)
* test(state): reuse legacy database fixtures

* test(state): use tracked temp fixture

---------

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-04 19:50:57 -07:00
Vincent Koc 1b499e2c3c fix(reset): preserve bootstrap guidance for dynamic models (#119179)
Punchcard-Session: silver-valley-valley-dt
2026-08-05 10:45:23 +08:00
Peter Steinberger 5ffd2dfbc3 refactor(status): consolidate scan projections and lazy loaders (#119412) 2026-08-04 19:41:40 -07:00
mikasa 722dfb3d64 fix(status): status --all slows down with missing plugins (#119203)
* fix(status): avoid repeated discovery for missing channels

* fix(status): batch missing plugin repair hints

* fix(status): type missing plugin channel ids

* fix(status): preserve required channel ids

* fix(status): keep batch hint type internal

* fix(status): preserve batch repair laziness

---------

Co-authored-by: daily-fix[bot] <daily-fix[bot]@users.noreply.github.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-04 19:41:31 -07:00
Peter Steinberger 02f7ed0f51 refactor(gateway): consolidate usage reporting and caches (#119409) 2026-08-04 19:37:36 -07:00
Serghei 9c61076f66 perf(gateway): keep reload and recovery machinery off gateway cold start (#119094)
The run loop primes cli/gateway-cli/lifecycle.runtime.ts before installing
signal handlers, so every symbol that hub re-exports loads before the HTTP
listener binds. Two of those re-exports resolved through forwarding modules:
gateway/server-reload-handlers.ts also re-exports the hot-reload and managed
reloader modules, and agents/main-session-restart-recovery.ts also re-exports
its -runtime sibling. ESM evaluates the whole forwarding module, so priming the
hub pulled both graphs onto the cold-start path.

Re-export each symbol from the module that defines it instead.
abortPendingChannelReloads lives in gateway/server-reload-contracts.ts, whose
own imports are all type-only, and markRestartAbortedMainSessions lives in
agents/main-session-restart-recovery-marking.ts. Both retargets resolve to the
same module instances, so shared reload-generation state and behavior are
unchanged, and the eager priming that protects signal handlers from dist chunk
rotation stays in place.

Add a CLI-lane import-boundary test so these re-exports cannot be routed back
through a forwarding module, and point the two run-loop test mocks at the
defining modules.
2026-08-04 19:37:05 -07:00
mushuiyu886 c6be75957f fix(cli): align TaskFlow controller columns for wide text (#118801) 2026-08-04 19:31:55 -07:00
Peter Steinberger 195b0ea3fa fix: make startup migration restart guidance install-neutral (#119406) 2026-08-04 19:28:27 -07:00
Dinesh H Suthar 50c7444edf fix(sessions): preserve compatible auth profiles on model changes (#117550)
* fix(model-picker): preserve compatible auth profiles
* chore(plugin-sdk): refresh API baseline
* fix(model-picker): keep profile policy core-owned
* fix(model-picker): preserve profiles across auth aliases
* chore(plugin-sdk): update public surface budgets
* fix(model-picker): honor explicit profile clearing
* fix: preserve compatible auth profiles on model changes
* perf: reuse prepared auth profile metadata
* docs(plugin-sdk): document direct model persistence fallback
* test: expose auth snapshot in directive mock

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Co-authored-by: Dinesh Suthar <dineshsld20@gmail.com>
2026-08-05 07:40:00 +05:30
Josh Avant 618fba92bf feat(audit): add execution identity inspection (#117034)
* feat(audit): add opt-in execution identity inspection

* fix(audit): gate recovery identity retention

* fix(audit): keep recovery identity type private

* test(audit): type internal recovery fixture

* test(audit): split recovery identity coverage

* docs(audit): define operator read trust boundary

* test(qa): register identity scenario child

* fix(audit): enforce shared identity retention bounds

* fix(audit): seal public ingress identity boundary

* fix(audit): keep ingress guard lint-clean

* fix(gateway): preserve advertised method order

* chore(protocol): sync advertised method order

* fix(protocol): encode audit selector invariants

* test(audit): prove exact execution guard

* fix(audit): keep identity storage lazy
2026-08-04 20:05:15 -05:00
Peter Steinberger 58025dd33c fix(fs): adopt fs-safe 0.5.2 untrusted filename sanitization (#119363)
* fix(fs): adopt fs-safe 0.5.2 untrusted filename sanitization

* fix(media): classify pre-open identity drift as access denial

* chore(checks): refresh SDK baseline and env-var budget for fs-safe adoption

* test(media): compact sanitizer cases under max-lines

* fix(agents): keep workspace symlink contract under fs-safe 0.5.2

* fix(infra): align path normalization and atomic-write proofs with fs-safe 0.5.2

* fix(fs): keep operator symlink contracts on config, control-ui, skills, hooks

* fix(fs): restore sandbox and session-lock contracts under fs-safe 0.5.2

* test(claws): expect symlink diagnostic for tampered plan parents

* fix(agents): canonicalize apply-patch mutations through contained aliases

* test(agents): split alias-update regression into focused file

---------

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-04 17:53:44 -07:00
Arthur Lacoste f207e14d92 fix(telegram): keep commands responsive during Codex login
Release Telegram’s chat lane after structured Codex device-code delivery while account-owned authentication completes safely in the background.

Co-authored-by: Arthur Lacoste <arthurlacoste@users.noreply.github.com>
2026-08-05 05:59:13 +05:30
Vincent Koc cbde3c1945 perf(memory): defer session backfill runtime (#119372)
Punchcard-Session: coral-workshop-workshop-3f
2026-08-05 08:16:20 +08:00
Vincent Koc fb81d03d8e fix(commands): restore tool inventory for dynamic models (#119306)
* fix(qa): scale Telegram compact command timeout

* fix(qa): surface Telegram compact reply failures

Punchcard-Session: amber-workshop-river-yr

* fix(commands): prepare tool inventory model context

Punchcard-Session: amber-workshop-river-yr

* test(commands): type runtime context mock

Punchcard-Session: amber-workshop-river-yr

* docs(changelog): note tool inventory repair

Punchcard-Session: amber-workshop-river-yr

* chore(release): defer tool inventory note

Punchcard-Session: amber-workshop-river-yr

* fix(ci): lower environment variable budget

Punchcard-Session: amber-workshop-river-yr
2026-08-05 06:57:21 +08:00
Peter Steinberger 702e0277bd test(agents): realpath apply-patch temp dir fixture (#119353)
withTempDir used a raw fs.mkdtemp(os.tmpdir()) path. On macOS os.tmpdir()
is a /var -> /private/var symlink while the production sandbox guard
compares against canonical paths, so the symlink-delete test failed with
"Path escapes sandbox root". Realpath the mkdtemp result so the fixture
matches the canonical form the guard expects.

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-04 15:07:03 -07:00
Peter Steinberger 63f4acbbc8 fix(exec): leave safe builtins unrewritten in enforced mode (#119351)
Enforced-mode command rendering resolved every executable to an absolute
path, including POSIX shell builtins (cd, :, true, false, pwd, test).
Builtins are executed by the shell itself, not via a filesystem binary,
so rewriting cd -> /usr/bin/cd is semantically wrong and adds no
PATH-shadowing protection (the whole point of enforced-mode resolution
for real external executables). shouldRewriteCandidate now returns
satisfiedBy !== "safeBuiltins" in enforced mode, leaving real external
executables pinned to their resolved absolute path.

Adds a regression test locking that enforced mode renders cd . as-is.

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-04 15:02:03 -07:00
Heming Zeng 9bfe292c86 fix(sessions): keep gateway responsive while large transcript archives are built (#112424)
* fix(sessions): keep gateway responsive during transcript archiving

* test(sessions): strengthen archive worker coverage

* fix(sessions): bound archive worker concurrency

* test(sessions): normalize rollback paths on Windows

* fix(sessions): load source archive worker on node 22

* fix(sessions): align archive fencing with session windows

* test(sessions): adapt cleanup race to archive worker

* fix(sessions): harden archive worker lifecycle

* style(sessions): format archive lifecycle tests

* fix(sessions): release writer lane during archive work

---------

Co-authored-by: Josh Lehman <josh@martian.engineering>
2026-08-04 14:40:59 -07:00
Vincent Koc bfcce12e6b fix(tui): restore provider auth in installed local mode (#119283)
* test(tui): cover local recovery and auth flows

* fix(tui): restore installed local auth

* test(qa): allow TUI scenario teardown margin

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): constrain local CLI launcher ownership

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): satisfy local auth validation gates

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): strip inspector flags from auth child

Punchcard-Session: ember-workshop-lantern-bs
2026-08-05 05:40:13 +08:00
Vincent Koc 11027a3712 fix(sessions): preserve recorder-owned user turns (#119307)
Punchcard-Session: coral-workshop-workshop-3f
2026-08-05 04:12:16 +08:00
Vincent Koc 6293b54250 perf(cli): split plugin registry startup timing (#119318)
* perf(cli): split plugin registry startup timing

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

* test(cli): use managed temp directory cleanup

Punchcard-Session: coral-workshop-workshop-3f
2026-08-05 04:08:35 +08:00
Vincent Koc 832459d2ae perf(agents): reuse provider policy manifest registry (#119305) 2026-08-05 02:25:11 +08:00