feat: support remote runtime hints and artifact retrieval#199
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bf0ea20f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const authResult = await runHttpAuthHook(authHook, { | ||
| headers: req.headers, | ||
| rpcRequest: syntheticRpc, | ||
| daemonRequest: syntheticDaemon, | ||
| }); |
There was a problem hiding this comment.
Require daemon token before serving artifact downloads
This endpoint authorizes downloads only via runHttpAuthHook, so when AGENT_DEVICE_HTTP_AUTH_HOOK is not configured (the default), it never verifies the bearer/header token against the daemon token the way /rpc requests are verified in handleRequest. In that configuration, any caller who learns an artifact ID can fetch screenshots/recordings from /artifacts/:id without daemon authentication.
Useful? React with 👍 / 👎.
| const request = transport.request( | ||
| { | ||
| protocol: artifactUrl.protocol, | ||
| host: artifactUrl.hostname, | ||
| port: artifactUrl.port, |
There was a problem hiding this comment.
Add timeout handling for remote artifact downloads
Remote artifact materialization uses a separate HTTP GET with no timeout or abort logic, so once the RPC response is parsed, commands like screenshot/record stop can hang indefinitely if /artifacts/{id} stalls or never completes. This bypasses the existing daemon request timeout behavior and can leave CLI calls blocked on flaky networks.
Useful? React with 👍 / 👎.
Summary
Apply session-scoped runtime transport hints during
openso remote React Native dev-build flows work without proxy-specific execution.Materialize remote screenshots and recordings back to caller-local paths, and secure artifact downloads with daemon-token checks plus timeout handling.
Update docs and tests for the remote daemon runtime/artifact behavior.
Validation
pnpm typecheck
pnpm test:unit
pnpm test:smoke