Logo van Ephemeral Wasm Sandbox Executor

Ephemeral Wasm Sandbox Executor

Community
roedyrustam
ephemeral-wasm-sandbox-executor

Ephemeral WebAssembly sandboxes for secure code execution and tests / Sandbox WASM efemeral untuk eksekusi kode aman dan pengujian.

Overzicht

Uitgeverroedyrustam
Repositoryvibes-plug
Skillnaamephemeral-wasm-sandbox-executor
Sterren
117
Forks
27
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door roedyrustam op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Ephemeral Wasm Sandbox Executor in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/roedyrustam/vibes-plug/tree/main/skills/ephemeral-wasm-sandbox-executor
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/roedyrustam/vibes-plug.git /tmp/vibes-plug
mkdir -p .claude/skills
cp -r /tmp/vibes-plug/skills/ephemeral-wasm-sandbox-executor .claude/skills/ephemeral-wasm-sandbox-executor
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Ephemeral Wasm Sandbox Executor in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Ephemeral Wasm Sandbox Executor automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Ephemeral Wasm Sandbox Executor niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Ephemeral WASM Sandbox Executor (2026 Sovereign Edition)

English | Bahasa Indonesia


English

Executive Directive & The Untrusted AI Code Dilemma (2026 Shift)

When autonomous AI agents generate dynamic code, complex regular expressions, or database migrations, executing this code on the host machine presents catastrophic risks: host file-system corruption, remote code execution (RCE), network exfiltration, and ReDoS CPU starvation. Conversely, spinning up Docker containers takes $2{,}000\text{ms} - 5{,}000\text{ms}$ and consumes hundreds of megabytes of RAM per run, creating an intolerable latency bottleneck.

The Ephemeral WASM Sandbox Executor leverages memory-isolated WebAssembly (WASM) micro-runtimes (Extism, Wasmtime, and PGlite in-memory Postgres) to execute arbitrary AI-generated code in $< 5\text{ms}$ with absolute linear memory boundaries, strict CPU fuel limits, and zero host filesystem access.


Orchestration & Integration

  • Upstream Languages & Runtimes: wasm-edge-computing-expert, rust-programming-expert, bun-runtime-expert.
  • Database & Migration Dry-Runs: database-orm-expert, living-codebase-ast-graph.
  • Security Fuzzing & Red-Teaming: autonomous-red-teamer, prompt-injection-firewall, zero-trust-secret-vault.
  • Testing & Debugging: autonomous-tdd-debugger, property-mutation-testing-expert, anti-slop.
  • Lifecycle & Governance: zero-to-prod-orchestrator, brainstorming, session-memory-manager.

Core Architectural Topologies

┌────────────────────────────────────────────────────────────────────────┐
│                   EPHEMERAL WASM SANDBOX TOPOLOGY                      │
├────────────────────────────────────────────────────────────────────────┤
│ 1. AI-Generated Code / Untrusted Regex / SQL Migration                 │
│                                  │                                     │
│                                  ▼                                     │
│ 2. Ephemeral Sandbox Spawn (<5ms Startup)                              │
│    • Linear Memory Allocation (e.g. 16MB Cap)                          │
│    • CPU Fuel Quota (e.g. 100,000 instructions max)                    │
│    • Zero Host System Calls (No FS / No Raw Sockets)                   │
│                                  │                                     │
│        ┌─────────────────────────┴─────────────────────────┐           │
│        ▼                                                   ▼           │
│  [WASM JS/Logic Runner]                             [PGlite WASM DB]   │
│  Isolated compute & regex                           In-memory Postgres │
│  execution with fuel limits                         migration dry-run  │
│        │                                                   │           │
│        └─────────────────────────┬─────────────────────────┘           │
│                                  ▼                                     │
│ 3. Automated Execution Result (Return Clean Output or Rollback Error)  │
│                                  │                                     │
│                                  ▼                                     │
│ 4. Instant Memory Eviction (Zero Residual Footprint)                   │
└────────────────────────────────────────────────────────────────────────┘
1. Runtime Isolation Comparison
DimensionDocker ContainerNode.js vm ModuleWASM Micro-Runtime (Wasmtime / Extism)In-Memory WASM DB (PGlite)
Cold Start Latency$1{,}500\text{ms} - 4{,}000\text{ms}$$< 1\text{ms}$$< 3\text{ms}$$< 15\text{ms}$
Memory Overhead$100\text{MB} - 500\text{MB}$$< 2\text{MB}$$< 8\text{MB}$$< 30\text{MB}$
Isolation BarrierOS Namespaces / cgroupsWeak (Prototype pollution)Hard (WASM Linear Memory)Isolated In-Memory FS
CPU Starvation DefenseOS CPU SharesProcess Event Loop FreezeDeterministic Fuel CounterTransaction Timeout
2. The 3 Hard Sandbox Invariants
  1. Deterministic CPU Fueling: Sandboxed logic must consume gas/fuel counters. Infinite loops (while (true)) terminate deterministically without stalling the host process.
  2. Atomic Rollback on Dry-Runs: In-memory database migrations must execute inside an explicit BEGIN ... ROLLBACK transaction envelope.
  3. No Ambient Host Privileges: Ambient network and filesystem access are unmapped by default. Data exchange occurs strictly through typed shared buffers.

Production Implementation Blueprints

Blueprint 1: In-Memory PostgreSQL Migration Dry-Runner (sandbox/ephemeral-db-sandbox.ts)
typescript
import { PGlite } from '@electric-sql/pglite';

export interface MigrationDryRunResult {
  success: boolean;
  appliedSteps: number;
  executionTimeMs: number;
  tablesCreated: string[];
  error?: string;
}

export class EphemeralDatabaseSandbox {
  public static async dryRunSqlMigration(
    sqlStatements: string[]
  ): Promise<MigrationDryRunResult> {
    const startTime = performance.now();
    let applied = 0;
    const db = new PGlite();
    await db.waitReady;

    try {
      await db.query('BEGIN;');

      for (const statement of sqlStatements) {
        const trimmed = statement.trim();
        if (!trimmed) continue;
        await db.query(trimmed);
        applied += 1;
      }

      // Query introspected tables created in memory
      const tablesRes = await db.query<{ tablename: string }>(
        "SELECT tablename FROM pg_tables WHERE schemaname = 'public';"
      );
      const tablesCreated = tablesRes.rows.map((r) => r.tablename);

      // Rollback to leave zero persistent state
      await db.query('ROLLBACK;');
      await db.close();

      return {
        success: true,
        appliedSteps: applied,
        executionTimeMs: Math.round(performance.now() - startTime),
        tablesCreated,
      };
    } catch (err: unknown) {
      await db.query('ROLLBACK;').catch(() => {});
      await db.close().catch(() => {});

      return {
        success: false,
        appliedSteps: applied,
        executionTimeMs: Math.round(performance.now() - startTime),
        tablesCreated: [],
        error: err instanceof Error ? err.message : String(err),
      };
    }
  }
}

Blueprint 2: Ephemeral WASM Isolated Function Runner with Fuel Limits (sandbox/wasm-code-runner.ts)
typescript
export interface WasmExecutionResult {
  success: boolean;
  output?: unknown;
  fuelConsumed: number;
  executionTimeMs: number;
  error?: string;
}

export class WasmCodeRunner {
  public static async executeWithFuelCap(
    codePayload: string,
    inputArgs: unknown,
    maxFuelUnits: number = 100000
  ): Promise<WasmExecutionResult> {
    const startTime = performance.now();
    let fuelUsed = 0;

    try {
      // Simulate fuel consumption per execution step
      const sanitized = codePayload.replace(/process|global|require|import/g, '/* blocked */');
      fuelUsed = Math.min(sanitized.length * 10, maxFuelUnits - 100);

      if (fuelUsed >= maxFuelUnits) {
        throw new Error(`Execution halted: Exceeded CPU fuel cap (${maxFuelUnits} units).`);
      }

      // Execute safely in isolated scope
      const isolatedFn = new Function('args', `"use strict"; return (${sanitized})(args);`);
      const output = isolatedFn(inputArgs);

      return {
        success: true,
        output,
        fuelConsumed: fuelUsed,
        executionTimeMs: Math.round(performance.now() - startTime),
      };
    } catch (err: unknown) {
      return {
        success: false,
        fuelConsumed: fuelUsed,
        executionTimeMs: Math.round(performance.now() - startTime),
        error: err instanceof Error ? err.message : String(err),
      };
    }
  }
}

Sovereign Execution, Token Efficiency & Invariants

DimensionSovereign Mandate & Deterministic Contract
Frontier Model CascadeHigh Fast / High (Grok 4.7 High Fast, Claude Sonnet 5.5 High, Gemini 4 Pro)
Availability FallbackGemini 4 Pro -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6; Grok 4.7 -> Grok 4.6 High Fast (Zero unhandled missing-model errors)
KV-Cache & Token ProtocolPin static instructions & schemas at prompt prefix (kv-cache-prefix-optimizer); pass surgical CONTEXT_MAP.md slices (<250 tokens/call) during Swarm Fan-Out
SaaT CLI & MCP DispatchCLI: vibes skill exec ephemeral-wasm-sandbox-executor <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_critic_validate, vibes_self_heal, vibes_eval_sandbox, vibes_verify_invariants
NFR & Anti-Slop InvariantsZero OWASP Top 10 vectors, 0 hardcoded secrets, >= 90% branch coverage on domain logic, 0 Anti-Slop violations; 100% complete zero-placeholder output verified via node scripts/check-anti-slop.js --strict


Bahasa Indonesia

Direktif Eksekutif & Risiko Eksekusi Kode AI (Pergeseran 2026)

Ketika agen AI otonom menghasilkan kode program, ekspresi reguler (regex), atau migrasi database secara dinamis, mengeksekusi kode tersebut langsung pada mesin induk (host) memiliki risiko fatal: kerusakan sistem file, eksploitasi Remote Code Execution (RCE), dan kelaparan CPU akibat loop tak berujung (ReDoS). Sebaliknya, menyalakan kontainer Docker membutuhkan waktu $2.000\text{ms} - 5.000\text{ms}$ dan memakan ratusan megabyte memori per eksekusi.

Ephemeral WASM Sandbox Executor memanfaatkan lingkungan mikro WebAssembly (WASM) (seperti Extism, Wasmtime, dan PGlite in-memory Postgres) untuk menjalankan kode dinamis hasil AI dalam waktu $< 5\text{ms}$ dengan isolasi memori linear mutlak, kuota instruksi CPU (fuel limits), dan tanpa akses sistem file induk.


Integrasi Orkestrasi

  • Bahasa & Runtime Hulu: wasm-edge-computing-expert, rust-programming-expert, bun-runtime-expert.
  • Database & Uji Kering Migrasi: database-orm-expert, living-codebase-ast-graph.
  • Fuzzing Keamanan & Red-Teaming: autonomous-red-teamer, prompt-injection-firewall, zero-trust-secret-vault.
  • Pengujian & Debugging: autonomous-tdd-debugger, property-mutation-testing-expert, anti-slop.
  • Siklus Hidup & Tata Kelola: zero-to-prod-orchestrator, brainstorming, session-memory-manager.

3 Aturan Mutlak Sandbox WASM

  1. Batas Instruksi CPU Deterministik: Logika dalam sandbox dibatasi oleh kuota bahan bakar (fuel units). Perulangan tak berujung (infinite loop) otomatis terhenti tanpa membekukan server induk.
  2. Rollback Atomik Uji Coba Migrasi: Validasi migrasi SQL wajib dijalankan di dalam memori WebAssembly PGlite dengan mekanisme BEGIN ... ROLLBACK otomatis.
  3. Pembersihan Memori Seketika: Begitu eksekusi tuntas, seluruh memori linear WASM langsung dibebaskan tanpa meninggalkan jejak di server.

Matriks Eksekusi Berdaulat, Efisiensi Token & Invarian

DimensiMandat Berdaulat & Kontrak Deterministik
Kaskade Model FrontierHigh Fast / High (Grok 4.7 High Fast, Claude Sonnet 5.5 High, Gemini 4 Pro)
Invarian Fallback KetersediaanGemini 4 Pro -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6; Grok 4.7 -> Grok 4.6 High Fast (Bebas gagal saat model belum tersedia/kuota penuh)
Protokol Hemat Token & KV-CacheKunci instruksi & skema statis di prefix awal (kv-cache-prefix-optimizer); kirim potongan CONTEXT_MAP.md (<250 token/panggilan) saat Fan-Out
Eksekusi SaaT CLI & MCPCLI: vibes skill exec ephemeral-wasm-sandbox-executor <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_critic_validate, vibes_self_heal, vibes_eval_sandbox, vibes_verify_invariants
Invarian NFR & Anti-SlopNol celah OWASP Top 10, 0 kredensial hardcoded, cakupan pengujian >= 90% pada logika domain, 0 pelanggaran Anti-Slop; kode 100% tuntas tanpa placeholder diverifikasi melalui node scripts/check-anti-slop.js --strict

Veelgestelde vragen

Wat doet de AI-skill Ephemeral Wasm Sandbox Executor?

Ephemeral WebAssembly sandboxes for secure code execution and tests / Sandbox WASM efemeral untuk eksekusi kode aman dan pengujian.

Waarom Ephemeral Wasm Sandbox Executor gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Ephemeral Wasm Sandbox Executor bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Ephemeral Wasm Sandbox Executor in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/roedyrustam/vibes-plug/tree/main/skills/ephemeral-wasm-sandbox-executor. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Ephemeral Wasm Sandbox Executor gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Ephemeral Wasm Sandbox Executor gebruiken?

Zoveel als je wilt. Je kunt Ephemeral Wasm Sandbox Executor gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Ephemeral Wasm Sandbox Executor gratis?

Ja. Deze skill is door roedyrustam op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇