Commit Graph

40896 Commits

Author SHA1 Message Date
Yuval Dinodia edf4aca7bc fix(agents): apply_patch destroys an existing file when a patch creates that path (#114911)
* fix(agents): stop apply_patch from silently overwriting existing files

An "*** Add File:" hunk wrote its target unconditionally. When the path
already existed, apply_patch replaced the entire file, returned Success,
and listed the path under "added", so neither the model nor the UI got
any signal that existing content had been destroyed. The "*** Move to:"
destination of an update hunk had the same gap and reported the clobbered
path as merely modified.

The add and move-to branches now check the destination through the patch
file ops before writing and fail closed when it exists. Routing the check
through fileOps keeps it correct on all three backends (workspace-scoped
fs-safe root, raw fs, sandbox bridge). The check runs per hunk in patch
order, so deleting a path earlier in the same patch and recreating it
still works.

* fix(agents): make apply_patch destination creation atomic

The previous guard checked that an add or move-to destination was absent
and then wrote it. A competing writer could create the path in that gap,
after which the write still replaced it, so the no-clobber guarantee did
not hold under contention.

Destination creation now goes through a single exclusive create-if-absent
operation on every patch backend: Root.create for the workspace-scoped
default, an O_EXCL write for the raw filesystem, and a new pinned create
operation in the sandbox mutation helper that opens the target with
O_CREAT|O_EXCL and reports a reserved exit code when it already exists.
PatchFileOps drops its separate existence check.

Resolving the host ops behind an early return removes the repeated
workspaceOnly branch inside each operation and the optional-call dance
that let a missing root silently skip a write.

* fix(agents): complete atomic apply-patch creation

* fix(agents): preserve raced create replacements

* fix(agents): handle fs-safe patch collisions

* fix(agents): publish sandbox creates atomically

* test(agents): cover exclusive create provenance rollback

* fix(agents): use typed exclusive-create signal

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-29 20:17:54 +08:00
Peter Steinberger bfb7ff189e docs(codex): replace stale app/list wording with app/installed (#115867) 2026-07-29 08:09:44 -04:00
Peter Steinberger ef63df8afd fix(memory): preserve taint across transcript runtimes (#115850)
* fix(memory): propagate taint across transcript owners

* test(copilot): consolidate taint journal coverage

* fix(codex): keep event projector within lint budget

* fix(codex): preserve projector merge-head budget
2026-07-29 08:06:17 -04:00
Vincent Koc 38abf500ba fix(update): stabilize cross-version dev upgrades (#115651)
* fix(e2e): stabilize cross-version Parallels upgrades

* fix(e2e): avoid inline macOS guest probes

* fix(e2e): detach Windows dev updates

* fix(e2e): detach macOS guest updates with Node

* fix(e2e): initialize skipped upgrade config

* fix(update): use partial clone for dev checkout

* fix(update): keep Windows dev checkouts clean

* fix(e2e): pin Parallels dev update targets

* fix(e2e): own Parallels gateway restarts

* fix(e2e): verify pinned Parallels checkouts

* fix(e2e): forward Parallels update budgets

* fix(e2e): use canonical provider auth choices

* chore: leave changelog to release automation

* test(ui): stabilize route waits on loaded runners
2026-07-29 19:52:34 +08:00
Peter Steinberger 8915f9c337 fix(gateway): prevent overlapping setup after wizard cancellation (#115856)
* fix(wizard): retain cancelled sessions until runner settles

* fix(wizard): purge cancelled sessions after settlement

* test(gateway): cover settled wizard replacement

* test(gateway): split wizard cancellation e2e

* test(gateway): fix wizard e2e env key types

* fix(gateway): forward daemon choice through wizard RPC

Co-authored-by: TheAngryPit <16145902+TheAngryPit@users.noreply.github.com>

* test(gateway): harden wizard cancellation cleanup

Co-authored-by: TheAngryPit <16145902+TheAngryPit@users.noreply.github.com>

* chore: drop changelog edit (release generation owns it)

---------

Co-authored-by: TheAngryPit <16145902+TheAngryPit@users.noreply.github.com>
2026-07-29 07:49:25 -04:00
Peter Steinberger ac9d0ceab8 refactor: simplify TOOLS.md doctor migration recovery (#115857)
* refactor: prototype simpler tools migration recovery

Not landable until shipped interrupted-claim compatibility is decided.

* fix: diagnose waived beta migration artifacts
2026-07-29 07:47:37 -04:00
dandriscoll f0379468ff fix(config): materialize snapshot mode with the same defaults as load (#114759)
* fix(config): materialize snapshot mode with the same defaults as load

* test(config): prove snapshot-injected defaults stay out of persisted config

* test(cli): keep unknown-command process test hermetic

---------

Co-authored-by: Kevin Lin <kevin@dendron.so>
2026-07-29 04:34:13 -07:00
Peter Steinberger a2ead0a929 fix(memory): recover divergent dreaming journals (#115855)
* fix(memory): recover divergent dreaming journals

Co-authored-by: brokemac79 <martin_cleary@yahoo.co.uk>

* chore: drop changelog edit (release generation owns it)

---------

Co-authored-by: brokemac79 <martin_cleary@yahoo.co.uk>
2026-07-29 07:32:26 -04:00
Peter Steinberger 4c4aa2ed12 feat(gateway): manage audio and video attachments end to end (#115842)
* feat(gateway): manage audio and video attachments

* feat(gateway): preserve generated media metadata

* fix(gateway): align seeded managed media

* fix(gateway): scope pending media trust by URL

* fix(gateway): split managed media by trust

* fix(gateway): require terminal media trust unanimity

* fix(gateway): align managed media metadata types

* fix(gateway): refresh managed media contracts

* chore(ci): model managed media test seams

* test(sessions): expect canonical media kinds
2026-07-29 07:27:36 -04:00
ACD_RD4駱俊馳 e7f0fdfd9b fix: CJK replies are silently dropped instead of recovered when the model skips message(action=send) (#115556)
* fix(auto-reply): count CJK sentence terminators in stranded private-final detection

* fix(auto-reply): compare private-final substance thresholds with the CJK-aware estimator

* fix(auto-reply): detect CJK sentence boundaries

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 07:23:33 -04:00
Vincent Koc f6e874835c fix(gateway): stop managed crash loops for pending agent DB migrations (#115631)
* fix(gateway): recover managed services after agent DB migration

* test(infra): use managed temp directory cleanup
2026-07-29 19:21:46 +08:00
zhanxingxin1998 943ebc012e fix(plugins): validate constrained empty config schemas (#109569)
Route pattern, dependency, and active conditional schemas through the real plugin config validator while keeping standalone conditional annotations on the empty-config path.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 07:20:52 -04:00
Totó Busnello d7864458a7 fix(cli-runner): scope bundle-MCP cleanup to the run's session, not the process-wide loopback server (#110251)
* fix(cli-runner): scope bundle-MCP cleanup to the run's session, not the process-wide loopback server

On run end, runCliAgentInternal handled cleanupBundleMcpOnRunEnd by calling
closeMcpLoopbackServer(), which tears down the process-wide MCP loopback HTTP
server for the whole gateway. Any concurrent CLI turn or restart-recovered live
session that already baked that loopback port into its --mcp-config is left
pinned to a dead port ("Unable to connect"), while the gateway still reports the
session as recovered. This is the same hazard the embedded-runner (run-loop.ts)
and CLI dispatch (cli-backend-dispatch.ts) paths already avoid by retiring only
session-scoped MCP runtimes.

Retire only this run's session-scoped MCP runtime here too (by session key, with
a session-id fallback), leaving the shared loopback server up for other sessions.
Every CLI spawn/respawn already re-derives the current loopback port and rewrites
mcp.json via prepareCliRunContext, so removing this teardown keeps recovered
sessions on a live transport instead of stranding them.

Fixes #98435

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMPjCgbgHTiB8X3R9XACPW

* fix(cli): preserve rebound MCP session owners

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 07:18:50 -04:00
Peter Steinberger bc3a4c6757 fix(compaction): drop context-engine fallback on codex ownership skip (#114155) (#115666)
Co-authored-by: HOYALIM <HOYALIM@users.noreply.github.com>
2026-07-29 07:11:21 -04:00
Leon-SK668 7c024cad48 fix(usage): guard malformed DeepSeek payloads (#110785)
Co-authored-by: Leon-SK668 <17695126+Leon-SK668@users.noreply.github.com>
2026-07-29 07:02:44 -04:00
Peter Steinberger f20fc70cb4 test(cli): isolate unknown-command process validation (#115848) 2026-07-29 06:49:55 -04:00
loong 7bdd1f646b fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (#99318)
* fix(memory): survive Homebrew Node upgrades

Co-authored-by: 袁龙辉0668001277 <yuan.longhui@xydigit.com>

* test(whatsapp): isolate last-route coverage

* fix(deepinfra): preserve offline model compatibility

* test(memory): isolate migration cleanup lifecycle

* test: stabilize aggregate extension gates

* ci: retrigger pull request workflow

* test: preserve inherited Node options

* test(cli): tolerate cold hosted startup

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 06:49:02 -04:00
krissding ee820b185c fix(acp): attach error listener to spawned ACP agent process (#109529)
The spawned agent child process in createAcpClient had no error
listener. If the agent binary failed to start, the error event
would be unhandled and could crash the process.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 06:40:34 -04:00
Peter Steinberger 1f4f1bbc33 fix(sessions): deliver agent announcements to direct message sessions (#115811)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: avatasia <eric.tomcat@gmail.com>
2026-07-29 06:35:42 -04:00
Peter Steinberger 662abec754 feat(gateway): push session PR indicators to subscribed clients (#115643)
* feat(gateway): push session PR indicators to subscribed clients

* test(gateway): fix PR indicator drift

* chore(protocol): allowlist PR-indicator event for native apps (Control UI surface)

* test: align PR indicator lifecycle coverage

* fix(ui): scope session PR store listeners to active watchers
2026-07-29 06:30:01 -04:00
Vincent Koc b6f70ea440 fix(setup): make Gemini recovery actionable (#115835) 2026-07-29 18:29:32 +08:00
Peter Steinberger 986e5d1758 refactor(channels): share ingress retention defaults (#115824) 2026-07-29 06:24:30 -04:00
stevenlee-oai a00438a867 fix(codex): restore connected apps for token-authenticated runs (#115075)
* fix(codex): restore connected apps for token-authenticated runs

* fix(codex): keep app inventory protocol types private

* fix(codex): align native runtime with Codex 0.146.0

Co-authored-by: Steven Lee <stevenlee@openai.com>

* fix(codex): clean up latest app-server integration

Co-authored-by: Steven Lee <stevenlee@openai.com>

* fix(codex): keep internal protocol types private

* fix(ci): repair current main Codex landing gates

* fix(ci): format inherited code mode matrix

* fix(codex): reconcile native app-server contracts with main

Prepare a verified GitHub-hosted mainline merge while preserving the reviewed Codex 0.146.0 fixes and canonical OpenAI authentication.

Co-authored-by: Steven Lee <stevenlee@openai.com>

* fix(codex): keep QA evidence in its owning plugin

Resolve the current-main Code Mode test rename without resurrecting the retired core test path.

Co-authored-by: Steven Lee <stevenlee@openai.com>

* fix(codex): enforce canonical OpenAI app-server auth

Reject retired provider aliases without runtime compatibility, direct operators to the doctor migration, and remove the redundant OpenAI API-key predicate.

Co-authored-by: Steven Lee <stevenlee@openai.com>

* chore(codex): reconcile latest main dependency graph

Preserve current main dependency changes while preparing the original Codex PR for an ancestry-preserving signed mainline merge.

Co-authored-by: Steven Lee <stevenlee@openai.com>

* fix(codex): unify bundled Codex 0.146 runtimes

Keep the ACP adapter on the same 0.146.0 Codex release as the managed runtime, remove obsolete 0.145.0 platform artifacts and unused semver compatibility, and preserve the latest main dependency upgrades.

Co-authored-by: Steven Lee <stevenlee@openai.com>

---------

Co-authored-by: Peter Steinberger <peter@steipete.me>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 06:21:25 -04:00
Peter Steinberger bed7014273 fix(agents): preserve tool-result middleware identity (#115821)
Fixes #106910.

Preserve the contributor design from #107000 while updating both the normal and current compaction owner paths.

Co-authored-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-07-29 06:13:50 -04:00
Peter Steinberger 9721ca15d2 refactor(meetings): consolidate runtime facades (#115819)
* refactor(meetings): consolidate runtime facades

* fix(meetings): keep facade contracts acyclic
2026-07-29 06:13:37 -04:00
Peter Steinberger 4f31ba97c2 fix(sandbox): repair workspace state without crossing agent owners (#115784)
* fix(sandbox): safely repair sandbox workspace state

Fixes #111661. Repair active agent, shared, session, and global sandbox workspace state through the existing canonical SQLite registry without importing inactive or unrelated agent state.

Preserves and builds on the original sandbox doctor migration and regression from #111812.

Co-authored-by: TianT1209 <55179364+TianT1209@users.noreply.github.com>

* fix(sandbox): isolate doctor sandbox state by profile

Resolve exact sandbox scope ownership from the state directory requested by doctor, not ambient process state, and cover cross-profile SQLite registry isolation.

Co-authored-by: TianT1209 <55179364+TianT1209@users.noreply.github.com>

* test(sandbox): preserve typed workspace ownership proof

Keep exact inactive and active sandbox fixture paths non-optional under the repository core-test typecheck.

Co-authored-by: TianT1209 <55179364+TianT1209@users.noreply.github.com>

* fix(sandbox): ignore stale non-session workspace scopes

Validate canonical registered session ownership before Doctor migrates sandbox workspace state; preserve exact profile isolation and leave the existing registry untouched.

Co-authored-by: TianT1209 <55179364+TianT1209@users.noreply.github.com>

* fix(doctor): derive sandbox ownership from durable sessions

Read the existing agent-owned SQLite session store without opening writable handles. Repair pruned, global and unscoped sandbox workspaces and resolve omitted sandbox roots from the selected state profile. Retire the transient runtime registry reader.

Co-authored-by: TianT1209 <55179364+TianT1209@users.noreply.github.com>

* test(doctor): derive overlap workspace from agent owner

Honor current main workspace-qualified sandbox scope contract when proving non-default agent ownership in hosted CI.

Co-authored-by: TianT1209 <55179364+TianT1209@users.noreply.github.com>

---------

Co-authored-by: TianT1209 <55179364+TianT1209@users.noreply.github.com>
2026-07-29 06:06:21 -04:00
Peter Steinberger 20668eed03 fix(memory): quarantine writes from tainted agent turns (#115818)
* feat(memory): taint writes after network tools

* fix(memory): keep provenance mutations recoverable

* fix(memory): roll back failed provenance writes

* fix(memory): serialize provenance mutations

* docs(memory): explain flush provenance boundary

* refactor(memory): share provenance mutation wrapper

* docs(memory): clarify flush provenance fallback

* fix(memory): canonicalize provenance paths
2026-07-29 06:02:06 -04:00
qingminlong 0063e46069 fix(gateway): show recovery guidance when context overflow hides replies (#114909)
* fix(gateway): show overflow recovery guidance in chat display

* fix(gateway): reuse context overflow classifier

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 05:45:07 -04:00
Vincent Koc 25c375e47f refactor: reuse canonical record guards (#115810)
* docs(agents): standardize canonical record guards

* refactor(model-catalog): use canonical record guard

* refactor(scripts): use canonical record guard

* refactor(ui): use canonical record guard

* refactor(codex): use canonical record guard

* refactor(agents): use canonical record guard

* refactor(sessions): use canonical record guard

* refactor(doctor): use canonical record guard

* refactor(infra): use canonical record guard
2026-07-29 11:43:36 +02:00
Peter Steinberger 1464da8edd fix(gateway): keep Responses replacement streams consistent (#115799)
Preserve append-only text, fail impossible rewritten streams after usage resolves, and keep required client-tool output buffered until validation.

Refs: #85261

Co-authored-by: Achyut Mukund <143781487+cropsgg@users.noreply.github.com>
2026-07-29 05:42:36 -04:00
Peter Steinberger 1dd28f1bca fix(gateway): hosted setup exits no longer stop the gateway (#115671)
Keep successful and failed setup/channel wizard exits inside their owning session. Preserve the shared Gateway and existing protocol; prove both flows with authenticated WebSocket E2E.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: TheAngryPit <16145902+TheAngryPit@users.noreply.github.com>
2026-07-29 05:40:45 -04:00
Peter Steinberger 56e488a30f fix(cron): protect sessions throughout model preparation (#115804) 2026-07-29 05:39:55 -04:00
Peter Steinberger 90ab06b631 fix(web-fetch): release abandoned fallback response bodies (#115759)
Co-authored-by: NIO <nocodet@mail.com>
2026-07-29 05:37:32 -04:00
Peter Steinberger bde6b166c0 refactor(channels): deduplicate ingress monitor shells (#115792)
* refactor(channels): deduplicate ingress monitor shells

* fix(channels): preserve ingress error overload types

* fix(channels): type ingress error overload implementation

* chore(plugin-sdk): ratchet ingress error surface
2026-07-29 05:33:00 -04:00
Peter Steinberger 1f537c36c6 fix(agents): expose CLI tool summaries in terminal results (#115797)
* fix(agents): preserve CLI tool summaries

* fix(agents): cover Codex collaboration tools
2026-07-29 05:30:39 -04:00
Hannes Rudolph 6dc55fa65e fix(plugins): recover user turns with scoped reply hooks (#114836)
Allow before_agent_reply plugins to declare host-enforced trigger eligibility so scheduled-only hooks do not block interrupted user-turn recovery. Keep omitted and malformed scopes fail-closed, scope both memory-core maintenance hooks, and cover three runner reload cycles through the public registration contract.

Refs: #111442

Source: #114836

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-29 17:22:16 +08:00
Peter Steinberger 20764dae6d fix(mattermost): preserve private-channel origin identity (#115726)
Preserve the authoritative inbound group origin for private Mattermost channels without changing public channels, direct messages, thread keys, or the native channel delivery target. Prove both Bot API channel types over real HTTP, gateway discovery, and SQLite-backed outbound persistence.

Credit the original group-origin observation in #95669.

Co-authored-by: hansraj <hansraj136@gmail.com>
2026-07-29 05:18:17 -04:00
Peter Steinberger 4232126bba chore: update dependencies across workspace (#115677)
* chore(deps): update dependencies

* fix(deps): restore CI compatibility
2026-07-29 05:16:42 -04:00
Lidang Jiang 8acadc6990 fix(hooks): exclude outbound Gmail labels (#56720)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-29 17:16:31 +08:00
Peter Steinberger a37a5a6575 feat(agents): add per-session tool overrides (#115785)
* feat(agents): per-session tool overrides (mcp/skills/web-search)

* test(agents): use tracked MCP temp dirs
2026-07-29 05:13:56 -04:00
Peter Steinberger 05516e7a5f fix(plugins): stop repeated manifest realpath scans (#115783)
Fixes #115524 by keeping path canonicalization scoped to each manifest and persisted registry build.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 05:10:49 -04:00
Vincent Koc a27e5ee607 refactor(skills): isolate workshop draft ingestion (#115791)
* origin/refactor-workshop-draft-ingestion:
  refactor(skills): keep workshop validation internals private
  test(skills): prove shipped workshop upgrade path
  refactor(skills): centralize workshop record validation
  refactor(skills): unify workshop draft preparation
  refactor(skills): extract workshop draft ingestion
2026-07-29 17:09:53 +08:00
Peter Steinberger f32242e62f fix(cli): scope dns setup timeout to brew prefix probe with SIGKILL (#115782)
Make the subprocess timeout opt-in so long-running setup steps (brew
install, service restart, sudo writes) keep their unbounded wait, and
apply a 15s SIGKILL-backed deadline only to the fast brew --prefix probe
so a signal-resistant hung shim cannot block dns setup.

Also fix the regression test on Linux CI: stub process.platform via
withMockedPlatform (the action does not consult os.platform()) and point
the mocked brew prefix at a real temp dir so un-mocked fs writes succeed
without sudo. Add focused coverage that non-probe subprocesses stay
unbounded.

(cherry picked from commit 469ae1db40)

Co-authored-by: thomas.szbay <thomas.szbay@example.com>
2026-07-29 05:03:20 -04:00
Peter Steinberger ed17774f3f fix(agents): strip leading BOM from file reads (#115781)
Co-authored-by: luyifan <al3060388206@gmail.com>
2026-07-29 05:00:00 -04:00
Peter Steinberger fb788b79cf feat(memory): retain recent project scopes per session (#115731)
* feat(memory): retain active project set

* refactor(memory): require prepared active set

* docs(memory): explain active project set
2026-07-29 04:58:14 -04:00
Vincent Koc e9d08afce1 Merge remote-tracking branch 'origin/main' into refactor-workshop-draft-ingestion
* origin/main:
  fix(feishu): reject unsupported initial document content (#115697)
  feat(media): probe duration and dimensions for playback metadata (#115728)
  fix(sandbox): scope runtimes by workspace (#115766)
  fix(ui): guide users through missing or broken AI setup (#115716)
  fix(sessions): return direct-agent replies to their active session (#115756)
  fix(zalo): stop provider startup after gateway shutdown (#115763)
  fix(agents): bound completed background process retention (#115760)
  fix(plugins): bound hook execution and retire stale registrations (#115695)
  fix(ui): collapse custodian startup error gap (#115720)
  fix(gateway): reload edited hook transforms (#107875)
  refactor: centralize channel streaming config hints (#115739)
2026-07-29 16:54:03 +08:00
Peter Steinberger c402688894 feat(media): probe duration and dimensions for playback metadata (#115728)
* feat(media): probe playback metadata

* fix(media): satisfy CI gates

* fix(media): satisfy lint rules
2026-07-29 04:52:17 -04:00
Vincent Koc 30346f9788 fix(sandbox): scope runtimes by workspace (#115766)
Qualify non-shared sandbox identities by resolved workspace while preserving shared runtime names. Existing non-shared runtimes reset once under the new identity.

Related: #51363

Co-authored-by: Tayoun <39609208+tayoun@users.noreply.github.com>
2026-07-29 16:50:38 +08:00
Vincent Koc cc6b766079 fix(ui): guide users through missing or broken AI setup (#115716)
* fix(ui): block chat until inference is configured

* fix(ui): gate new sessions on configured inference

* fix(ui): gate custodian before inference starts

* fix(ui): clarify custodian setup navigation

* fix(ui): explain missing AI provider setup

* fix(ui): distinguish unavailable configured AI

* fix(ui): align inference setup fixtures

* test(ui): default mock gateway to working inference

* test(ui): align startup send gate coverage

* test(ui): inherit inference in gateway fixtures

* test(ui): normalize deferred gateway agents

* test(ui): update model setup sidebar fixture
2026-07-29 16:48:48 +08:00
Peter Steinberger 81171d04bd fix(sessions): return direct-agent replies to their active session (#115756)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: 程科0668000771 <cheng.ke@xydigit.com>
2026-07-29 04:48:15 -04:00