Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
064f7bc
feat(sandbox): add sandbox.ts and step.sandbox.ts
jpwilliams Oct 13, 2026
6394e82
docs(sandbox): name both runners in the runners module comment
jpwilliams Oct 13, 2026
c87309f
Merge jack/sandbox-python-runner into jack/sandbox-ts-runner
jpwilliams Oct 14, 2026
b43aa43
Merge jack/sandbox-python-runner (with origin/main) into jack/sandbox…
jpwilliams Oct 14, 2026
d6cb2ee
Merge commit 'd8302d34' into HEAD
jpwilliams Oct 14, 2026
27258fc
Merge jack/sandbox-python-runner into jack/sandbox-ts-runner
jpwilliams Oct 14, 2026
b106838
Merge jack/sandbox-python-runner into jack/sandbox-ts-runner
jpwilliams Oct 14, 2026
75173df
Merge remote-tracking branch 'origin/jack/sandbox-python-runner' into…
jpwilliams Oct 14, 2026
bcb2d35
feat(sandbox): name the TypeScript runner typescript
jpwilliams Oct 14, 2026
974d0db
Merge remote-tracking branch 'origin/jack/sandbox-python-runner' into…
jpwilliams Oct 14, 2026
fa6df43
test(sandbox): run the new runner tests for both languages
jpwilliams Oct 14, 2026
361aa3d
Merge jack/sandbox-python-runner into jack/sandbox-ts-runner
jpwilliams Oct 14, 2026
8021a52
test(sandbox): add a live suite for the Python and TypeScript runners
jpwilliams Oct 14, 2026
c8e926f
Merge commit 'b91c1f17' into HEAD
jpwilliams Oct 14, 2026
fd577ac
test(sandbox): drop the enum from the live TypeScript types case
jpwilliams Oct 14, 2026
c9ceb9c
Merge remote-tracking branch 'origin/jack/sandbox-python-runner' into…
jpwilliams Oct 14, 2026
13f51ab
test(sandbox): live case for TypeScript the runner can't strip
jpwilliams Oct 14, 2026
c0e0c1d
test(sandbox): --keep leaves the live suite's Dev Server running
jpwilliams Oct 14, 2026
966ece5
Merge jack/sandbox-python-runner into jack/sandbox-ts-runner
jpwilliams Oct 14, 2026
093cf87
fix(sandbox): print the Dev Server run URL the UI serves in the live …
jpwilliams Oct 14, 2026
c3e6a41
Merge branch 'jack/sandbox-python-runner' into jack/sandbox-ts-runner
jpwilliams Oct 14, 2026
0fbada6
Kill `live/`; internal tool
jpwilliams Oct 14, 2026
d75c583
Merge origin/jack/sandbox-python-runner into jack/sandbox-ts-runner
jpwilliams Oct 15, 2026
bc1bc0e
Merge remote-tracking branch 'origin/jack/sandbox-python-runner' into…
jpwilliams Oct 15, 2026
8a44bac
Merge branch 'jack/sandbox-python-runner' into jack/sandbox-ts-runner
jpwilliams Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/sandbox-ts-runner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"inngest": patch
---

Experimental: you can now run TypeScript in a sandbox with `step.sandbox.typescript`, available with `sandboxMiddleware()`. `input` keys become variables, a top-level `return` gives the result back, and top-level `await` works. It takes the same `schema.output` as `step.sandbox.python` to validate and type the result. The sandbox image needs Node 22.13 or later.

```ts
const total = await step.sandbox.typescript(
"sum",
`return numbers.reduce((a: number, b: number) => a + b, 0)`,
{ input: { numbers: [1, 2, 3] } },
);
```
1 change: 1 addition & 0 deletions packages/inngest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build": "tsc -p tsconfig.build.json && tsdown --config tsdown.config.ts",
"test": "vitest run",
"test:integration": "vitest run --config vitest.config.integration.ts",
"test:sandbox-live": "pnpm run pb:version && tsx src/components/sandbox/live/run.ts",
"itest": "tsx scripts/integrationTestRunner.ts",
"test:examples": "vitest run --dir src/test/functions",
"test:types": "tsc --noEmit --project tsconfig.types.json",
Expand Down
6 changes: 5 additions & 1 deletion packages/inngest/src/components/sandbox/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ import {
} from "./types.ts";

type SandboxStepExtension = {
sandbox: DurableSandboxTools & { python: OneShotRunner };
sandbox: DurableSandboxTools & {
python: OneShotRunner;
typescript: OneShotRunner;
};
};

type SandboxGroupExtension = {
Expand Down Expand Up @@ -173,6 +176,7 @@ export class SandboxMiddleware extends Middleware.BaseMiddleware {
sandbox: {
...sandbox,
python: createOneShotRunner(sandbox, "python"),
typescript: createOneShotRunner(sandbox, "typescript"),
},
},
group: { ...arg.ctx.group, sandbox: createGroupSandbox(sandbox) },
Expand Down
Loading
Loading