Skip to content

fix(stash): return top-level response fields - #66

Open
SajoLuo wants to merge 1 commit into
Yu9191:mainfrom
SajoLuo:agent/fix-stash-response-output
Open

fix(stash): return top-level response fields#66
SajoLuo wants to merge 1 commit into
Yu9191:mainfrom
SajoLuo:agent/fix-stash-response-output

Conversation

@SajoLuo

@SajoLuo SajoLuo commented Jul 22, 2026

Copy link
Copy Markdown

What changed

  • Return status, headers, and body at the top level for Stash response scripts.
  • Preserve the existing nested response output used by request-script-style clients.
  • Add a Node VM regression test that executes the distributed script as Stash 3.2.5.

Why

Stash only accepts response as a request-script field used to synthesize a response. A response script must pass status, headers, and body directly to $done. The existing finalizer wrapped the patched WLOC response in { response: ... }, so the script logged successful protobuf patches but Stash did not apply the modified response.

Impact

Stash users receive the patched WLOC binary response instead of the original response being left in place. Other clients keep their existing output shape.

Related to #5, #44, and #45.

Validation

  • cd worker && npm test
  • VM simulation verifies the Stash $done payload has no response wrapper and retains status, headers, and binary body.
  • Confirmed against Stash 3.2.5 on-device.

@SajoLuo
SajoLuo marked this pull request as ready for review July 22, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant