Context
Supersedes #6, which was closed as completed although apps/engine-hermes/src/server.ts still runs a single hermes -dump-bytecode invocation.
Two things are being left on the table:
Artifact is part of the API contract (apps/api/src/types.ts), documented in README, and every engine returns artifacts: []. There is no way to download anything.
engines/dockerfiles/Dockerfile.hermes builds and installs hbcdump (lines 31, 52, 57) and nothing ever calls it. hbcdump reads a compiled .hbc bundle and prints the function table, the string table, literal buffers, and a pretty disassembly — an inspector nothing on the web offers.
Proposal
- Compile the snippet with
hermesc -emit-binary into the temp dir, return the .hbc as a real Artifact (kind: "bytecode", base64), and let the UI offer it as a download.
- Add a second Hermes mode driven by
hbcdump: function table, string table, literal buffers, -pretty-disassemble.
- Surface the mode as a tab in the Hermes output pane.
- Keep
artifacts optional and empty for the other engines, so the contract stays as documented.
Acceptance criteria
- A Hermes run returns a non-empty
artifacts array and the file downloads and loads in hbcdump locally.
- The inspector tab renders the function and string tables for a small snippet.
- Output stays inside
MAX_OUTPUT_BYTES; oversized bundles are reported, not truncated silently.
Context
Supersedes #6, which was closed as completed although
apps/engine-hermes/src/server.tsstill runs a singlehermes -dump-bytecodeinvocation.Two things are being left on the table:
Artifactis part of the API contract (apps/api/src/types.ts), documented in README, and every engine returnsartifacts: []. There is no way to download anything.engines/dockerfiles/Dockerfile.hermesbuilds and installshbcdump(lines 31, 52, 57) and nothing ever calls it.hbcdumpreads a compiled.hbcbundle and prints the function table, the string table, literal buffers, and a pretty disassembly — an inspector nothing on the web offers.Proposal
hermesc -emit-binaryinto the temp dir, return the.hbcas a realArtifact(kind: "bytecode", base64), and let the UI offer it as a download.hbcdump: function table, string table, literal buffers,-pretty-disassemble.artifactsoptional and empty for the other engines, so the contract stays as documented.Acceptance criteria
artifactsarray and the file downloads and loads inhbcdumplocally.MAX_OUTPUT_BYTES; oversized bundles are reported, not truncated silently.