* fix(frontend): use curl fallback for +Variable/+Resource in bash sandbox mode
When a bash script uses `# sandbox <image>` or `# docker`, the body runs
inside a custom container image that does not have the `wmill` CLI
installed, so the `wmill variable get` / `wmill resource get` snippets
inserted by the +Variable and +Resource pickers fail.
Detect `# sandbox`/`# docker` in the editor code and insert a curl-based
snippet using the BASE_INTERNAL_URL, WM_TOKEN and WM_WORKSPACE env vars
(available in sandbox) instead.
Fixes WIN-2215
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(frontend): mirror worker grammar and use curl/wget fallback in sandbox mode
Address review of the bash sandbox picker fallback:
- Extract detection into `bashRunsInCustomImage`, mirroring the worker's
BashAnnotations grammar (leading comment lines only; `# sandbox <image>`
or bare `# docker`). A bare `# sandbox` is the nsjail-bash modifier that
still runs on the worker rootfs where `wmill` is available, so it now
correctly keeps the `wmill` snippet. This also fixes the substring
false positives (`# sandboxed`, `# docker` in prose/body) and false
negatives (`#sandbox <image>`).
- The default `# sandbox alpine:latest` image ships busybox `wget`, not
`curl`, so the snippet now tries `curl` then falls back to `wget`.
- `variables/get_value` returns a JSON-quoted string; strip the outer
quotes with `sed` so the sandbox snippet matches the `jq -r .value`
output of the non-sandbox branch. Resources return JSON either way.
- Add focused unit tests for the detection grammar.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>