Commit Graph

259 Commits

Author SHA1 Message Date
Peter Steinberger 538605ff44 [codex] Extract filesystem safety primitives (#77918)
* refactor: extract filesystem safety primitives

* refactor: use fs-safe for file access helpers

* refactor: reuse fs-safe for media reads

* refactor: use fs-safe for image reads

* refactor: reuse fs-safe in qqbot media opener

* refactor: reuse fs-safe for local media checks

* refactor: consume cleaner fs-safe api

* refactor: align fs-safe json option names

* fix: preserve fs-safe migration contracts

* refactor: use fs-safe primitive subpaths

* refactor: use grouped fs-safe subpaths

* refactor: align fs-safe api usage

* refactor: adapt private state store api

* chore: refresh proof gate

* refactor: follow fs-safe json api split

* refactor: follow reduced fs-safe surface

* build: default fs-safe python helper off

* fix: preserve fs-safe plugin sdk aliases

* refactor: consolidate fs-safe usage

* refactor: unify fs-safe store usage

* refactor: trim fs-safe temp workspace usage

* refactor: hide low-level fs-safe primitives

* build: use published fs-safe package

* fix: preserve outbound recovery durability after rebase

* chore: refresh pr checks
2026-05-06 02:15:17 +01:00
Peter Steinberger 7188e4f4ad refactor: centralize agent run pending status 2026-05-05 18:21:58 +01:00
Peter Steinberger a224810a7f fix(gateway): bound sessions list responses
Bound default Gateway sessions.list responses to 100 rows when callers omit limit, with response metadata for totalCount, limitApplied, and hasMore.\n\nFixes #77062.
2026-05-04 06:51:56 +01:00
Marvinthebored a64b30705f fix(usage): serve usage from durable transcript aggregate cache
Serve usage.cost and sessions.usage from a durable transcript aggregate cache with guarded refreshes, cache-status UI localization, and regression coverage. Thanks @Marvinthebored.
2026-05-03 20:04:26 +01:00
Peter Steinberger db06fcd990 refactor: unify lazy module loaders 2026-05-02 10:15:25 +01:00
Peter Steinberger 9180173f9a fix: preserve exec event routing and sanitize tool XML 2026-05-02 09:16:11 +01:00
Peter Steinberger bf67976ea5 refactor: hide core helper internals 2026-05-02 08:47:11 +01:00
Peter Steinberger 2f0c9358b1 refactor: hide shared constants 2026-05-02 08:29:21 +01:00
Peter Steinberger b8a991a665 fix: strip heartbeat tool marker replies 2026-05-02 02:51:42 +01:00
Peter Steinberger 0ecda680c8 fix: strip legacy tool-call text from replies 2026-05-02 02:38:26 +01:00
Vincent Koc 04cd861732 fix(shared): redact repeated URL userinfo 2026-05-01 16:13:42 -07:00
Peter Steinberger 42d73fd955 refactor: remove dead private helpers 2026-05-01 06:55:26 +01:00
Agustin Rivera b8372a714c fix(auth): bound bootstrap handoff scopes (#72919)
* fix(auth): bound bootstrap handoff scopes

Co-authored-by: zsx <git@zsxsoft.com>

* fix(auth): log stripped bootstrap scopes

* docs: add changelog entry for bootstrap handoff scope bounds

---------

Co-authored-by: zsx <git@zsxsoft.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-29 14:11:16 -06:00
Jeff 9b6670d5c9 fix(ssrf): allow IPv6 fake-ip SSRF opt-in
Allow trusted fake-IP proxy stacks to opt into IPv6 unique-local SSRF resolution without opening broader private-network access.
2026-04-29 20:31:17 +01:00
jacky 0544c6d493 fix: suppress raw JSON parse errors from leaking to Discord channels (#59076) [AI-assisted] (#59118)
Merged via squash.

Prepared head SHA: b8b3686445
Co-authored-by: singleGanghood <156392444+singleGanghood@users.noreply.github.com>
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Reviewed-by: @hxy91819
2026-04-29 21:59:46 +08:00
Logan Ye ef7c528c8a fix(agents): recognize flat JSON billing payloads and snake_case error codes (#74188)
* fix(agents): recognize flat JSON billing payloads and snake_case error codes

Two independent fixes for billing error detection:

1. isErrorPayloadObject/parseApiErrorInfo now recognize flat JSON like
   {"error":"string_code","message":"..."} where error is a string code
   at the top level, not just nested {"error":{"type":"...","message":"..."}}
   envelopes.

2. isBillingErrorMessage now matches "insufficient_balance" (underscore)
   and "Insufficient MBT balance" (one word between insufficient/balance)
   via two new patterns in the billing pattern list.

Together these prevent raw JSON from leaking to user-facing chat when
providers return 402-style flat payloads.

Fixes #74079

* fix(agents): remove redundant billing pattern and fix misleading regex comment
2026-04-29 07:15:45 -04:00
Peter Steinberger 34ec184dcb refactor: reuse shared dedupe helpers 2026-04-29 12:14:59 +01:00
Vincent Koc 8b71d2347f docs(types): mark remaining deprecated aliases 2026-04-29 00:04:17 -07:00
Ke He e3bc985a6e fix(shared): preserve unicode slug labels
Fixes #58932.

Carries forward #58942 and #58995.

Thanks @fengqing-git, @Starhappysh, and @koen666.
2026-04-28 21:56:56 -07:00
Rubén Cuevas 652f34103a fix(whatsapp): sanitize tool XML and hide configured error text (#71830)
Merged via squash.

Prepared head SHA: 184d4a25e4
Co-authored-by: rubencu <4742789+rubencu@users.noreply.github.com>
Co-authored-by: mcaxtr <7562095+mcaxtr@users.noreply.github.com>
Reviewed-by: @mcaxtr
2026-04-29 01:43:25 -03:00
Peter Steinberger e5dc0e6d15 fix: expose agent runtime status metadata 2026-04-29 05:02:04 +01:00
Peter Steinberger bdba90a20b feat: add authenticated iOS background presence beacon (#73330)
* feat: add iOS background presence beacon

Co-authored-by: ngutman <1540134+ngutman@users.noreply.github.com>

* fix: keep iOS background reconnects ahead of beacon throttle

* build: refresh gateway protocol swift models

* fix: emit swift protocol string enums

---------

Co-authored-by: ngutman <1540134+ngutman@users.noreply.github.com>
2026-04-28 08:10:35 +01:00
Peter Steinberger c0ea89cfd2 fix(agents): recover unclosed reasoning-only replies 2026-04-27 12:45:11 +01:00
Peter Steinberger 8e14f5c749 fix(agents): drop malformed reasoning before orphan close tags 2026-04-27 12:06:37 +01:00
Peter Steinberger cf499101a2 fix(agents): normalize Windows runtime imports (#72731)
* fix(agents): normalize Windows runtime imports

* test(providers): align manifest contract coverage
2026-04-27 10:34:25 +01:00
Peter Steinberger f9181835e8 fix(agents): warn on fake local tool calls 2026-04-27 09:14:59 +01:00
Peter Steinberger da55212c6e fix(lmstudio): promote bracketed tool calls 2026-04-27 08:38:53 +01:00
Peter Steinberger 556c3e87df fix(agents): strip Gemma reasoning from local replay 2026-04-27 08:26:28 +01:00
Peter Steinberger 5f2273e81e fix(gateway): unify chat display projection 2026-04-26 05:33:58 +01:00
Val Alexander fc5920fb51 fix(ui): polish assistant identity settings
Polishes the basic config identity layout, aligns assistant avatar rendering with chat, and adds a Control UI assistant avatar override with IDENTITY.md fallback.
2026-04-25 06:27:22 -05:00
Peter Steinberger 996e9226e5 fix(skills): restore legacy skill metadata fallback (#71346) 2026-04-25 03:30:51 +01:00
chen-zhang-cs-code bb5f523068 fix(skills): honor legacy clawdbot metadata 2026-04-25 03:30:51 +01:00
Tak Hoffman cc57d56b92 fix: Align silent reply prompt guidance (#70954)
* Align silent reply prompt guidance

* Pass explicit silent reply conversation types

* Handle dm alias in direct prompt guidance

* Respect policy session type for routed replies

* Preserve routed silent reply policy type

* Propagate silent reply dispatcher chat type

* Align prompt silent reply target policy

* Avoid direct silent fallback prompt token

* Use inbound key for prompt silent policy

* Rewrite direct silent replies in dispatcher
2026-04-24 12:06:54 -05:00
Peter Steinberger 4ad8ed2cbe refactor: type config schemas as typebox-compatible 2026-04-23 05:22:16 +01:00
Gustavo Madeira Santana 28818f9140 Improve gateway diagnostics export for support reports (#70324)
Merged via squash.

Prepared head SHA: 3d6ee85993
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-22 20:47:14 -04:00
Gustavo Madeira Santana 24db09a19b fix(cli): keep channel status checks off plugin runtimes (#69479)
Merged via squash.

Prepared head SHA: 63f6e416a9
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 13:53:08 -04:00
Tak Hoffman 1303b03241 fix: add silent reply policy by conversation type (#68644)
Thanks @Takhoffman.
2026-04-21 05:17:55 +01:00
Peter Steinberger 7b1f7b179f refactor: share thread binding lifecycle 2026-04-21 01:07:09 +01:00
Peter Steinberger 7e28caa637 refactor: share fast mode normalization 2026-04-21 00:54:08 +01:00
Peter Steinberger 85c1c59c5f refactor: share message content block visitor 2026-04-20 14:53:42 +01:00
Peter Steinberger f006678f3c refactor: share balanced json extraction 2026-04-20 14:40:21 +01:00
Peter Steinberger eaea16f166 refactor: share google turn ordering sanitizer 2026-04-20 14:29:16 +01:00
Peter Steinberger a1bd02fdfd refactor: share human list formatting 2026-04-20 13:54:24 +01:00
Ayaan Zaidi 9de39accdb fix(shared): model pairing approval state from effective access 2026-04-20 13:08:04 +05:30
Peter Steinberger 2e1ddedc58 refactor: share chat content text coercion 2026-04-18 21:35:05 +01:00
Peter Steinberger 85912849cc refactor: move extension markers into manifests 2026-04-18 20:16:44 +01:00
Ziy 4b5987829d fix: redact credentials in browser.cdpUrl config paths (#67679)
Merged via squash.

Prepared head SHA: 77bc2c50ce
Co-authored-by: Ziy1-Tan <49604965+Ziy1-Tan@users.noreply.github.com>
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Reviewed-by: @hxy91819
2026-04-18 14:22:58 +08:00
Chris Yau 59caf03d67 Avoid rescanning HTML challenge pages during error formatting
The HTML challenge fix already keeps standalone CDN block pages out of the DNS transport path. This follow-up caches the HTML classification so status-prefixed non-HTML failures do not pay for the same scan twice and the control flow stays simpler.

Constraint: Keep behavior identical for both status-prefixed HTML pages and standalone HTML challenge pages
Rejected: Inline the helper into the status branch only | would duplicate the standalone HTML branch logic
Confidence: high
Scope-risk: narrow
Directive: If this formatter grows more branches, keep a single HTML classification result and reuse it through the decision tree
Tested: oxfmt --check src/shared/assistant-error-format.ts
Tested: node scripts/test-projects.mjs src/agents/pi-embedded-helpers.formatassistanterrortext.test.ts src/agents/pi-embedded-helpers.isbillingerrormessage.test.ts
2026-04-16 12:47:12 -07:00
Chris Yau 36dd58ac2a Prevent Codex HTML challenge pages from looking like DNS failures
Cloudflare challenge pages from chatgpt.com/backend-api can arrive as raw HTML without an HTTP status prefix. The transport sanitizer scanned for generic "dns" substrings before HTML detection, so these pages could surface as DNS lookup failures instead of the existing HTML/CDN block message.

Constraint: Must preserve DNS transport classification for real ENOTFOUND/getaddrinfo failures
Rejected: Treat every bare HTML document as an upstream HTML error | too broad for arbitrary model text/errors
Confidence: high
Scope-risk: narrow
Directive: Keep standalone HTML challenge detection ahead of generic transport keyword matching so CDN block pages do not regress into DNS copy
Tested: oxfmt --check on changed files; targeted node --import tsx verification for standalone Cloudflare HTML classification and DNS control case
Not-tested: Full Vitest shard run in this environment
2026-04-16 12:47:12 -07:00
OfflynAI 78df859e15 fix: strip standalone <function> tool call tags from visible text (#67318) (thanks @joelnishanth)
* fix: strip standalone <function> tool call tags from visible text (#67093)

Models like Gemma emit tool calls as standalone <function> blocks with
nested <parameter> XML instead of wrapping them in <tool_call>. The
existing stripToolCallXmlTags only recognized tool_call, tool_result,
function_call, function_calls, and tool_calls — so bare <function> and
</function> tags leaked through to the user as raw syntax on Discord
and other channels.

Add "function" to TOOL_CALL_TAG_NAMES and extend the payload detection
for <function> tags to check XML payloads (not just JSON), matching the
same behavior already applied to <tool_call>. Other tag types keep the
more conservative JSON-only check to avoid stripping prose examples.

Made-with: Cursor

* Text: harden standalone <function> stripping

* fix: strip standalone <function> tool call tags from visible text (#67318) (thanks @joelnishanth)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-16 09:53:35 +05:30