Repository navigation
Deliver account screenshots to Nessie within the job result budget - #173
Merged
Merged
Conversation
The ledger refused completions whose output exceeded 768 KiB, so the platform saw a null decision: desktop dropped the connection and Apple and Android reported a misleading generic failure, while the reserved attempt never reached a truthful terminal state. Record a bounded failed event instead, and accept local completions larger than one wire frame so they reach that bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… budget Nessie requests canonical tab.screenshot as a viewport PNG, but a photographic or large viewport exceeds the 768 KiB job result once base64 encoded, so the image never reached the agent. Account screenshots now recapture from the same fenced tab as JPEG 80/60/40 until the image fits, reporting the real format, and refuse with SCREENSHOT_TOO_LARGE otherwise. iOS shares the Apple implementation. The legacy includeScreenshot path passed quality 0.5 to handlers that take 0-100: Apple encoded at 0.5% and Android ignored it. It now uses 80 within the same budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BrowserScreenshot now carries the requested encoding, and the CDP capture, DevTools params and screenshot route accept png or jpeg with a 1-100 quality. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Account tab.screenshot jobs on Windows and Linux retake an oversized viewport PNG as JPEG 80/60/40 under the same job lease and authorization, returning image/jpeg or a read-only SCREENSHOT_TOO_LARGE. Legacy snapshot screenshots share the same ladder. Local HTTP/MCP screenshots are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…budget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS 0.1.33 (27), iOS 0.1.18 (18), Android 0.1.17 (17). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto claude/nessie-screenshot-access-8b0d51
The shared gateway mapped every failed native step to COMMAND_FAILED, so the Apple and Android budget refusal reached Nessie as an unknown failure while desktop worked around it by cancelling the gateway. The gateway now preserves this one definite read refusal for tab.screenshot, and desktop returns it as an ordinary native error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nshot delivery Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Nessie agent can now receive a screenshot from an account-connected Kelpie even when the viewport PNG is larger than one job result.
Before this change, Nessie's canonical
tab.screenshotreturned a viewport PNG. A photographic or large page goes over the connect ledger's 768 KiB output limit once base64-encoded. The ledger then refused the completion (kelpie_connect_executereturned null). The image never arrived:Desktop dropped the connection, and the attempt stayed reserved until a restart turned it into
UNKNOWN_EFFECTS.Apple and Android reported a generic "Browser action failed".
native/core-connectledger: an oversized result now ends its attempt as a boundedfailedevent. The error starts withRESULT_TOO_LARGEand the output is discarded, so the attempt is no longer stranded. Local completions larger than one wire frame (1 MiB) are accepted so they can reach that limit. Wire frames are still capped at 1 MiB.ConnectScreenshotBudget(Apple, shared by macOS and iOS throughapps/macos/Kelpie/Connect; Androidconnect/ConnectScreenshotBudget.kt):tab.screenshotdispatch (ConnectBrowserControlJob.dispatch,ConnectBrowserAccountControl).image/jpeg.SCREENSHOT_TOO_LARGE.Unchanged: local HTTP/MCP
tab.screenshotbehaviour and the gateway's canonical PNG-only request validation.Legacy
snapshot+includeScreenshot: this path passedquality: 0.5to handlers that take 0–100. Apple encoded at 0.5% and Android ignored the value. It now requests quality 80, reduced if needed under the same limit.Docs:
docs/nessie-connect.mdanddocs/functionality.md.Versions: macOS 0.1.33 (27), iOS 0.1.18 (18), Android 0.1.17 (17), Windows 0.1.14, Linux 0.1.13.
Windows/Linux (
native/engine-chromium-desktop,native/desktop-connect):tab.screenshotuses the same budget. The sharedkelpie/screenshot_fit.hhelper runs the JPEG ladder, enabled per server byConfig::screenshot_base64_limit, which only the Windows and Linux account callbacks set.ScopedBrowserControlLease.BrowserScreenshot,DesktopDevToolsSession::ScreenshotParams,screenshot_handler.cpp) now supports CDP JPEG with an integerqualityfrom 1 to 100. As a result, local/v1/screenshotand thekelpie_screenshotextension on Windows/Linux also acceptformat:"jpeg"/quality, matchingdocs/api/core.md.includeScreenshotuses the same ladder instead of failing above 640 KiB.linux_app_api.cppPNG endpoint is unchanged.native/core-mcpgateway: a nativeSCREENSHOT_TOO_LARGEfrom atab.screenshotstep is returned as that canonical code (mayHaveCompleted:false) instead ofCOMMAND_FAILED, so every platform reports the same refusal.The Nessie side that stores the image and shows it to the model is UnlikeOtherAI/Nessie#1197.
Testing
kelpie_connect_test(host CMake/Ninja, Mac): new case where a result over 1 MiB terminates asfailed/RESULT_TOO_LARGE, withterminalStatepersisted.KelpieTests: full suite 203/203 passed. This includes newConnectScreenshotBudgetTestsand a real-WebKit test where a random-noise viewport comes back asimage/jpegwithin 640 KiB while a normal page staysimage/png.ConnectScreenshotBudgetTestsandConnectAuthorizationTests, 14/14 passed.make lint-swift: 0 violations../gradlew buildon Minis (ktlint, lint, unit tests including the newConnectScreenshotBudgetTest) passed.test_browser_gateway(including the newSCREENSHOT_TOO_LARGEpassthrough, while other methods still map toCOMMAND_FAILED),test_desktop_screenshot_fit,test_desktop_handlers,test_desktop_mcp_serverandkelpie_connect_testall passed.kelpie-linuxbuild and 35/35 CTest cases passed on the desktop changes, before the gateway passthrough simplification.scripts/build-windows.ps1, sandboxed CEF): full build and 53/54 CTest cases passed. The failingkelpie_windows_browser_view_testneeds an interactive desktop session, and itswin32_browser_view.cppis not touched here.🤖 Generated with Claude Code