tpmjs/templates/vercel-executor/app/page.tsx
Ajax Davis 846676ba15 refactor(executor): use Vercel Sandbox SDK for isolated VM execution
- Replace community Deno runtime with @vercel/sandbox SDK
- Next.js API routes create ephemeral sandbox VMs per execution
- Each tool execution: create VM → npm install → run → cleanup
- node22 runtime in sandbox handles npm packages natively
- Region pinned to iad1 (only region with Sandbox support)
- Proper authentication support via EXECUTOR_API_KEY

This provides true isolation - each tool runs in its own VM that's
destroyed after execution. More secure than shared serverless.
2026-01-09 01:35:22 +10:00

31 lines
792 B
TypeScript

export default function Home() {
return (
<main style={{ fontFamily: 'system-ui', padding: '2rem', maxWidth: '600px', margin: '0 auto' }}>
<h1>TPMJS Executor</h1>
<p>This is a custom TPMJS tool executor using Vercel Sandbox.</p>
<h2>Endpoints</h2>
<ul>
<li>
<code>GET /api/health</code> - Health check
</li>
<li>
<code>POST /api/execute-tool</code> - Execute a tool
</li>
</ul>
<h2>Documentation</h2>
<p>
See the{' '}
<a
href="https://tpmjs.com/docs/tutorials/custom-executor"
target="_blank"
rel="noreferrer noopener"
>
Custom Executor Tutorial
</a>{' '}
for setup instructions.
</p>
</main>
);
}