You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7d3a1a4
Browse filesBrowse the repository at this point in the historyBrowse files
feat(mothership): grep-pipe on sim_cli + persistent per-chat session sandbox
sim_cli accepts a trailing | grep (native, sim-side, chainable; flags
-i -v -c -n -E -m N), validated before the CLI runs so a mutating
command never executes and then fails on a malformed pipe.
The mothership code sandbox (run_code/run_function) is now persistent
per chat: a session lease in the remote-sandbox layer reconnects to the
chat's live E2B sandbox (metadata key mothership-chat:<chatId>), holds a
20-minute idle TTL refreshed per execution, is never metered or
abort-killed, and stamps sandboxSession: created|reused on every result.
Fresh sessions bootstrap the sim CLI detached; the delegation token is
minted sim-side per execution and injected into the exec env only, so a
stopped sandbox never holds a live credential.
Fixes found by e2e, each with regression tests: transformResponse
dropped sandboxSession (field whitelist), and run_code timeouts sent as
strings skipped the seconds conversion into z.coerce (a "90"s request
armed a 90ms abort).
Claude-Session: https://claude.ai/code/session_01CgaxNAaeD3taGdghbXn17w
E2B_FUNCTION_TEMPLATE_ID: z.string().refine(isImmutableE2BTemplateRef,{message: `E2B_FUNCTION_TEMPLATE_ID ${IMMUTABLE_E2B_TEMPLATE_REF_ERROR}`}).optional(),// Immutable dedicated E2B build for Function JavaScript/Python/Shell and workspace sandbox layers; no Mothership fallback
568
568
E2B_FUNCTION_TEMPLATE_GENERATION: z.string().refine(isValidSandboxReleaseGeneration,{message: `E2B_FUNCTION_TEMPLATE_GENERATION ${SANDBOX_RELEASE_GENERATION_ERROR}`}).optional(),// Monotonic release epoch printed by the Function E2B builder
569
569
MOTHERSHIP_E2B_TEMPLATE_ID: z.string().optional(),// Mothership code-tool template; never a Function-base fallback
570
+
MOTHERSHIP_SANDBOX_CLI_ENDPOINT: z.string().optional(),// Sim API base the sandboxed sim CLI calls back to; defaults to NEXT_PUBLIC_APP_URL (set when the public URL is not reachable from the sandbox network)
570
571
MOTHERSHIP_E2B_DOC_TEMPLATE_ID: z.string().optional(),// Dedicated E2B template with python-pptx/docx/openpyxl/reportlab for document generation; when set (and E2B enabled), docs compile via Python instead of the JS isolated-vm path
571
572
E2B_PI_TEMPLATE_ID: z.string().optional(),// E2B template ID/alias with the Pi CLI + git baked in (Create PR, its Babysit continuation, and Review Code)
572
573
PI_SANDBOX_LIFETIME_MS: z.string().optional(),// Lower the Pi sandbox lifetime (ms) below the default; E2B caps a sandbox at 1h on Hobby accounts and 24h on Pro
0 commit comments