Repository navigation
Fix Express gen2 envd framing and port 9000 auth - #20
Merged
Merged
Conversation
Merged
2 of 3 tasks
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
process.Process/Start). The engine was sending raw JSON, which envd rejected asinvalid_argument: protocol error: promised N bytes in enveloped message. Streaming calls are enveloped. Unary calls stay raw JSON and useContent-Type: application/json(generation 2 returns HTTP 415 forapplication/connect+jsononListDir). Generation-1 envd 0.5.x still gets raw streaming JSON andapplication/connect+json.EnvdRpcErrorwith the envd code and message, including across the engine gRPC boundary.commands.runacceptson_stdoutandon_stderr.Sandbox.server,server_at(), andsandbox.run()do not send the sandbox access token. On the current Express image, an unconfiguredagent-sandbox-serverreturns HTTP 401 whenX-Access-TokenorAuthorizationis present.get_access_headers()staysX-Access-Tokenonly, for the platform gateway. A server with noABX_SERVER_TOKENnow treats an unmatched presented credential as anonymous, so a later image tolerates a forwarded gateway token.Fixes #15
Fixes #16
Fixes #17
Verified on Express (2026-10-15, provider alicloud-express, SDK 0.3.0)
hello-x(envd 0.6.1,agent-sandbox-serveron port 9000):Sandbox.create,commands.runstdout/stderr/exit code andon_stdout,files.write/read/list,run("hello", name="Bob") == "Hello, Bob!",network.get_url(9000)plusGET /healthwithget_access_headers()(200),kill().base(envd 0.5.2):commands.runandfiles.write/read/list. The image entrypoint cannot start the server.Guide:
docs/en/guide/express-quickstart.md(zh mirror linked from both docs indexes).Test plan
ruff checkandruff format --checkon client-sdk and server-sdkmypy src/agent_sandboxandmypy src/agent_sandbox/serverpytest -m 'not integration'(1873 passed)pytest(855 passed)