- Add gzip/x-gzip support to the shared request body decoder with the configured decoded-size cap, and drop Content-Encoding after a successful decode so nothing downstream decodes or forwards it again.
- Switch ClaudeMessages and ClaudeCountTokens to handlers.ReadRequestBody, and mirror the change in the plugin auth pre-decode path (gzip support, plus /v1/messages and /v1/messages/count_tokens in handlerDecodesBody) and the request-log capture decoder.
Closes: #7711
- Select the highest-priority visible API-supported model with a priority service tier when synthesizing the `gpt-5.5` baseline entry in `fetch_codex_models`, decoupling `minimal_client_version` and regenerating `codex_client_models.json`.
- Normalize non-template fallback `minimal_client_version` and `input_modalities` in the Codex client catalog builder and check for the `priority` service tier explicitly in `TestModelsWithClientVersionReturnsCodexCatalog`.
- Wait for pre-connected test servers to become visible via `waitServersVisible` before asserting the `server_list` snapshot in `TestHubAuth_MethodAndCredentials`.
Closes: #7697
- Add Kind as the leading field on pluginapi.ResponseInterceptRequest with model_list, execution, and count_tokens constants, and document fallback and open-map metadata rules.
- Populate Kind across all five response interceptor construction sites (auth-manager execute/count, plugin-executor execute/count, and WriteModelListResponse) and verify leading-byte RPC serialization and /v1/models/{id} detail routing.
Closes: #7655
- Add oauth.providers.claude.oauth-include-create-api-key (defaulting to true) and keep it scoped to OAuth across v8 config validation, layout migration, comment-preserving YAML saves, and management API updates.
- Wire the resolved authorization scope through ClaudeAuth into GenerateAuthURL for both CLI and management login paths while keeping token refresh scopes unchanged.
- Add regression tests covering default and disabled OAuth scopes, v8 config round-trips, and management OAuth authorization URL generation.
Closes: #7651
- Add silent layout normalization and archived-comment filtering helpers so read-only v8 projections do not log unrecognized-section warnings.
- Defer v8 migration warnings in ConfigV8, WriteConfig, and SaveConfigPreserveComments until the migrated YAML is written to disk and matches actually archived sections.
- Add regression tests covering repeated v8 GET requests, failed writes, I/O errors, whole-document PUT variants, and whitespace/quoting edge cases.
Closes: #7650
Store bounded local read, dial, and stream errors as diagnostics
instead of rendering them inside API RESPONSE sections, and render
them in the downstream RESPONSE section after status selection.
Prevent handler-synthesized payloads from appending to executor
capture or fabricating upstream responses for failed attempts.
- Reconcile v8 credential uploads through SynthesizeAuthFile without redundant local store rewrites, preserving plugin-assigned IDs, FileName values, multi-record expansions, and symlinked destinations while retiring stale records from overwritten files.
- Pass synthesis fallback AuthDir out-of-band during plugin parsing so omitted IDs resolve relative to AuthDir without mutating AuthParseRequest.Host or overriding explicit path-based IDs.
- Remove all in-memory auth records backed by a deleted file in v8 credential deletion and snapshot handler config under lock for race-free synthesis.
Closes: #7557
- Add sensitive-patterns-replace configuration rules with load-time RE2 validation, comment-preserving YAML persistence, config diffing, and bounded matcher caching across Antigravity, Devin, and Claude cloak paths.
- Apply ordered non-cascading regex replacements against original text boundaries while preserving Devin original-line drop ownership and existing sensitive-words-replace semantics.
Closes: #7540
- Resolve and validate the target Codex credential proxy_url in StartSIWCBind and construct the OAuth client via codex.NewCodexAuthWithProxyURL so account proxy takes precedence over global proxy without falling back on failure.
- Update siwcOAuthFactory to pass the resolved account proxy URL and add regression tests covering account proxy precedence, global proxy inheritance, direct bypass, unreachable proxy failure, and credential field preservation.
Closes: #7531
- Detect the 403 PERMISSION_DENIED ErrorInfo reason=TOS_VIOLATION signature and mark the credential StatusDisabled + Disabled so it is excluded from rotation and persisted across restarts, while OAuth refresh stays intact; carry appeal_url/appeal_url_link_text through Error.Metadata to auth.Metadata and the management API.
- Add an optional pool-wide protective pause (antigravity.tos-pause-window, default 6h) armed only by TOS results, never by transient 429s, covering all Antigravity request paths including SSE mid-stream error frames and CountTokens.
- Distinguish terminal TOS results from stale/superseded results using a new Result.RefreshToken account hint so a same-account OAuth refresh applies the suspension while a genuine credential replacement discards it safely.
Closes: #7515
- Add Priority *int to pluginListEntry, populated from the host RegisteredPlugins snapshot so clients can verify effective ordering, including zero and negative values.
- Gate exposure to the maintained v8 route while leaving the deprecated v0 response shape unchanged, and add RegisterPluginWithPriorityForTest to cover non-default priorities in tests.
Closes: #7522
- Cache verified management secret HMAC-SHA256 digests bound to the active bcrypt hash for a one-hour TTL while coalescing concurrent cold-cache verifications.
- Invalidate cached verification entries on management secret changes in SetConfig and ConfigV8 while preserving failure counting, IP ban checks, and non-caching of invalid keys.
- Add deterministic unit tests, a ConfigV8 HTTP integration test, and a benchmark covering TTL expiration, rotation, concurrency coalescing, and ban preservation.
Closes: #7519
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Add Builder.WithPluginInterceptorHost so embedders can install a custom PluginInterceptorHost that survives startup and reload; the server wraps it to keep plugin model routing, executor dispatch, lifecycle, and websocket observers delegated to the internal plugin host.
- Add Hooks.OnConfigApplied invoked after each successful config apply so embedders can reinstall executor wrappers and other caller-owned runtime state.
- Cover the delegated interceptor host with nil-safety, skip-forwarding, capability-detection, and real execute-chain regression tests.
Closes: #7499
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Add a lightweight per-request in-flight tracker on the auth manager that covers selection, upstream calls, retry waits, and the full stream lifetime; it stays disabled in Home mode where the execution registry is authoritative.
- Register GET /v8/management/observability/requests/in-flight returning counts only (in_flight, oldest_started_at, by_provider) with no request bodies or credential identifiers.
Closes: #7476
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Add server.shutdown-timeout config (default 0 = immediate close, preserving #6094 behavior); positive values drain in-flight HTTP requests via http.Server.Shutdown bounded by the configured seconds, then force-close the rest.
- Bound the drain by the configured timeout even when the caller's context is more generous, while a tighter parent deadline still wins; hijacked WebSocket connections remain managed by their own handlers.
- Cover drain completion, budget-expiry fallback, tighter parent ctx, zero default, and v8/legacy config parsing in tests.
Closes: #7475
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Run the reauthorization regression test with request logging both enabled and disabled.
- Drain WebSocket handlers and verify logging leaves no temporary files and records the revoked credential.
- Require and validate a free-form type for server peers, accepting it from the query string or `X-Tunnel-Type` header.
- Include server types in server lists and online/offline events.
- Update tunnel documentation and integration coverage.
- Introduce internal/wstunnel implementing a multi-tenant, many-to-many
opaque WebSocket data exchange hub over GET /v1/tunnel.
- Enforce strict access.api-keys authentication across all five standard
credential sources, rejecting unconfigured keys with 401, isolating
tenants per API key, and revoking removed keys on hot reload with
WebSocket close code 1008.
- Enforce per-tenant cross-role device UUID uniqueness (409 Conflict on
duplicates, generation-bound handshake reservations) while allowing
duplicate human-readable device names.
- Multiplex discovery and data exchange over a single WebSocket per
device: UTF-8 JSON TextMessage control frames (*ojson.Doc single-exit
serialization for server_list, server_online, server_offline,
list_servers, and error) and BinaryMessage frames carrying a 4-byte
header, source/destination UUIDs, and up to 64 MiB opaque payloads
with anti-spoofing and cross-role routing checks.
- Guard upgraded transports against post-upgrade socket deadlines
(including wrapped non-ALPN TLS connections and RFC 6455 protocol
error paths), enforce per-peer and per-tenant outbound byte budgets
retained across in-flight writes, and bound non-blocking close
reclamation.
- Mount /v1/tunnel on internal/api.Server (405 Allow: GET for non-GET
methods while preserving CORS OPTIONS) and add English and Chinese
integration guides under docs/websocket-tunnel.md and
docs/websocket-tunnel_CN.md.
- Capture bounded per-attempt upstream status, masked headers, response chunks, and transport or stream errors when request-log is false.
- Bind synchronized deferred capture to the HTTP request context and preserve partial HTTP bodies and WebSocket dial or reconnect failures.
- Mask Cookie headers alongside Set-Cookie so forced error logs do not expose session credentials.
Closes: #7420
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Exclude unrouted 404 responses without upstream activity or API error evidence from per-request and forced error log dumps so high-frequency probes cannot evict diagnostic dumps from the error-logs-max-files ring.
- Avoid initializing or retaining streaming log writers and temporary part files when Gin matches no route for a 404 response while preserving routed 404 and panic error dumps.
Closes: #7363
Co-authored-by: Dylan <1990016@gmail.com>
- Accept refresh=true or refresh=1 on the plugin store listing endpoint to bypass the 1-hour latest-release cache TTL for installed plugins.
- Track last check timestamps on release cache entries with a 10-second per-key refresh floor while preserving GitHub rate-limit cooldowns and in-flight coalescing.
- Add unit tests and update v8 management API documentation for the refresh query parameter.
Closes: #7333
Use a Claude-specific 256-bit base64url state for CLI and management logins. Include the native Console scope only during authorization while preserving existing token refresh scopes. Cover callback state preservation and case-sensitive session checks. Refs #7316.
Report the OAuth login entry a credential was signed in through, resolved
from Attributes then Metadata via oauth_provider and portal and normalized
the way sign-in and re-login already resolve it. A console can then group
credentials of a multi-entry plugin by entry instead of by provider.
The field is v8-only, so the deprecated /v0/management/auth-files response
keeps its frozen shape, and it is omitted when a credential carries no
entry, leaving built-in providers, single-entry plugins and files written
before #7126 unchanged. type and provider stay as they are because routing
and quota lookup key on them.
Fixes#7307
- Unify Gemini filter blocks and Claude policy/cyber stop_details refusals under internal/clienterror as HTTP 400 request faults so single-prompt triggers do not cool down credentials.
- Detect Gemini mid-stream filter blocks across Antigravity, Gemini, and Gemini Vertex executors and Claude cyber policy refusals in Claude streaming diagnostics.
- Record LoggingAPIResponseError across streaming/WebSocket terminal error paths even when request-log is disabled.
- Override streaming response log status with actionable API_RESPONSE_ERROR status and prefix error-*.log files in both request-log modes.
- Replace tidwall/gjson and tidwall/sjson with github.com/MoeForge/moego/ojson
and encoding/base64 with github.com/MoeForge/moego/base64 across the main
module and examples
- Introduce cross-method *ojson.Doc request rewriting pipelines across
thinking, signature, client/codex, runtime/executor/helps, pluginhost, and
all provider executors with FinalizePayloadDoc as the final semantic barrier
- Convert all consecutive JSON mutations (>= 2 Set/SetRaw/Delete operations)
to batch edits on ojson.Doc
- Upgrade read-only byte paths to ojson.GetBytesNoCopy,
ojson.GetManyBytesNoCopy, and util.ParseGJSONBytesNoCopy with explicit
strings.Clone ownership protection across streaming and persistent state
- Use base64.StdEncoding.ValidateString for zero-allocation signature checks
and base64.EncodeDataURL for single-allocation data URL construction
- Add AuthProviderEntry and AuthProviderEntries in sdk/pluginapi, forward entries over auth.identifier RPC, and send multi_auth_providers in lifecycle requests.
- Normalize per-entry OAuth display metadata with plugin metadata fallbacks in RegisteredPluginInfo while preserving legacy fields when entries are omitted.
- Expose HTML-sanitized oauth_provider_entries in management plugin list responses alongside oauth_provider and oauth_providers.
Closes: #7170
Defer wrapper.Finalize(c) in RequestLoggingMiddleware, stamp a 500 status when
a handler panics before writing a response, and mark the wrapper finalized so
outer recovery middleware does not reopen a second streaming log writer. Also
pass the chunk channel and stream writer by value to processStreamingChunks to
avoid racing with Finalize clearing wrapper fields.
Fixes#7161
Include normalized per-credential connection-pool settings in Gemini/Interactions
and Vertex-compatible API key deduplication keys so entries that differ only in
connection-pool configuration are not silently dropped during sanitization.
Fixes#7163
- Hash the original email or subject into the xAI credential filename so distinct accounts that sanitize identically no longer overwrite each other.
- Migrate pre-hash and identity-subset predecessors on re-login, keeping the richest known filename and preserved settings without claiming foreign files.
Closes: #7145
- Fail forced refreshes when rejected refresh tokens remain unchanged without disk rotation and preserve rejected access token markers across no-op refreshes.
- Require a valid active access token when sign-in is required before restoring active routing status during refresh and lifecycle updates.
- Return the redacted credential entry view from the v8 management credential refresh endpoint.
Closes: #7135
- Add Capabilities.AuthProviders and MultiAuthProvider (Identifiers() []string) in sdk/pluginapi, bump sdk/pluginabi.SchemaVersion to 10, and forward AuthProviders in sdk/pluginhost
- Extend internal/pluginhost to register, expose, and route multiple OAuth login identifiers per plugin across StartLogin, PollLogin, RefreshAuth, ParseAuths, and ExchangeCallback, while preserving per-credential oauth_provider/portal attribution for shared credential providers
- Expose oauth_providers alongside primary oauth_provider in RegisteredPluginInfo and GET /v0/management/plugins, and support target-credential re-login (StartOAuthV8) across sibling portals
Closes: #7126
Skip registering the AI Studio websocket gateway in Home
mode since it is not supported there, and force websocket
authentication in the Home runtime config.