Skip to content

fix: add mc8yp-no-sandbox header/query to disable server-mode sandbox - #50

Closed
schplitt wants to merge 1 commit into
mainfrom
fix/no-sandbox-opt-out
Closed

fix: add mc8yp-no-sandbox header/query to disable server-mode sandbox#50
schplitt wants to merge 1 commit into
mainfrom
fix/no-sandbox-opt-out

Conversation

@schplitt

Copy link
Copy Markdown
Owner

Summary

  • Adds a per-connection opt-out for the server-mode scratch sandbox workspace, mirroring the existing mc8yp-no-mcp opt-out: mc8yp-no-sandbox header or noSandbox query param (empty, *, or true).
  • This was previously missing — there was no way to disable the sandbox for a connection short of it being absent by mode (CLI never has it, server always did if a session id was present).
  • Parsed once per request in src/index.ts into ctx.custom.noSandbox, and read at the buildSandboxApi call site in src/codemode/execute.ts — opted-out sessions get no sandbox global at all, same as CLI mode.

Test plan

  • pnpm test:run — added coverage in test/restrictions.test.ts (source collection + parsing) and test/excute.test.ts (sandbox global absent when opted out)
  • pnpm lint:fix
  • pnpm typecheck

Mirrors the existing mc8yp-no-mcp opt-out: a connection can now disable
the scratch sandbox workspace entirely instead of only relying on the
implicit CLI-mode absence.
@schplitt

Copy link
Copy Markdown
Owner Author

Superseded by #51 — flipping the sandbox to disabled-by-default with an opt-in header made this opt-out mechanism obsolete.

@schplitt schplitt closed this Jul 26, 2026
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