You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 201994f
Browse filesBrowse the repository at this point in the historyBrowse files
hzq
committed
Preserve observed bytes in bounded gateway downloads
Detach transport views before the next read, release readers without waiting for cleanup, and distinguish size refusals from unfinished requests. Return only complete JSON, metadata and artifact responses.
Improvement-Round: 3/10 after v0.0.74
Output text has lossless cursors; large results no longer hide response IDs or artifact references behind a truncated JSON preview. Artifact links are authenticated `oaa://files/{id}` resources. MCP resource reads are limited to 4 MiB to keep base64 frames bounded; larger files use authenticated HTTP or `oaa download` (up to the existing 8 MiB file limit). Access still requires file scope and the originating agent grant. There are no tokens in resource URLs.
156
156
157
+
The gateway client copies each response chunk when it reads it. Files, skill resources and JSON are returned only after the body ends and the actual bytes fit the limit. A smaller or missing `Content-Length` does not authorize a larger body. A confirmed overflow is `gateway_response_too_large`; an interrupted 2xx body is `invalid_gateway_response`, not a successful download. If an error body breaks, the client keeps the HTTP status but does not report details from a partial document or resend the request.
158
+
157
159
CLI callers can complete the same workflow without the console: `oaa upload SELECTED_FILE`, `oaa invoke ... --idempotency-key KEY`, `oaa wait RESPONSE_ID`, `oaa output RESPONSE_ID`, `oaa artifacts RESPONSE_ID`, and `oaa download FILE_ID --out NEW_FILE`. Use `--url` and `--token-file` or `OAA_GATEWAY_URL` / `OAA_TOKEN_FILE`. Downloads never overwrite an existing file.
158
160
159
161
Publishing a native agent requires an enabled worker adapter as well as the MCP entry. Merely reading an MCP server does not export the caller's process, private plugins, or desktop login state.
gateway_response_too_large: ['The gateway response exceeds the client read limit.'],
303
303
gateway_timeout: ['The gateway request ended before confirmation; an accepted task may still be running.','Submit again with the same Idempotency-Key.'],
304
304
invalid_gateway_path: ['The request path leaves the configured gateway origin.'],
305
-
invalid_gateway_response: ['The gateway returned invalid JSON.'],
305
+
invalid_gateway_response: ['The gateway response is incomplete or contains invalid JSON.'],
306
306
request_cancelled: ['The caller cancelled the gateway request.'],
307
307
token_required: ['No API key file was given.','Add --token-file: admin commands use .oaa/admin.token from oaa init; calls use a key file from oaa key create.'],
308
308
gateway_unreachable: ['Cannot reach the gateway.','Start it first (oaa serve --detach; from a source checkout, npm run oaa -- serve --detach), or point --url at a running gateway.'],
0 commit comments