{"uid":"cap_UPbr7ZJe1u-e5IWsv-Mdr","slug":"trollbridge-code-run-sandboxed-javascript-executor-09470451","name":"TrollBridge Code Run — Sandboxed JavaScript Executor","description":"The insurance booth for AI agents, with Mini's Agent Supply Store on the side of the road. One hundred checkpoints: pre-transaction safety lanes (honeypot, approval-risk, rug-score, receipt-check, tx-dryrun, permit-scan, airdrop-verdict, deployer-history, wallet-watch, secret-scan at $0.02 USDC per call; the protection tier — /contract-check, /approval-screen, /tx-plain-english, /honeypot-check, /tx-simulate, /redteam, /skill-scan, /verdict, /egress-audit, /tool-gate, /airlock, /repo-scan, /prove, /task-scope — at $0.10; the one-call /shield don't-get-rugged screen at $0.25; the full /preflight bundle at $0.05), bounty intel (bounties, fresh, verdicts, deadlines, sweepstakes, opportunities) at $0.02 USDC per call, trader intel (/prices and /quant at $0.02; /enrich and /token-check at $0.05; /contract-check and /honeypot-check at $0.10; /sec-facts at $0.05), market intel (/markets and /search at $0.05; /grants at $0.02), DeFi intel (/yields and /new-pairs at $0.05; /gas and /defi at $0.02), AI intel (/models at $0.02), agent-ops intel (/prompt-cost, /model-picks, /rpc-speed, /terms-tldr, /scrape, /gigs, /retry-verify, /idempotency, /verify-independent at $0.02; /site-watch, /wallet-check, /code-run, /regulatory-pack, /sage, /cron-watch, /caveat-check, /tripwire, /escrow, /trust, /bridge-fees, /dao-votes, /dev-activity, /dex-arb, /dydx-perps, /funding-rates, /gas-predict, /hack-tracker, /long-short-ratio, /lp-yields, /mev-scan, /open-interest, /perp-basis, /polymarket-odds, /rwa-watch, /sentiment, /stablecoin-flows, /tokenomics, /top-movers, /whale-watch, and /yield-stable at $0.05; /approval-screen, /tx-plain-english, /tx-simulate, and /task-scope at $0.10; /scam-scan deep scan at $5.00 or 30-day subscription at $30.00), supply store (/road-pack combo meal at $0.05; curated datasets, the /audit-prep pre-audit review, and the /prove-state symbolic-execution run at $1.00; the /audit AI-agent audit at $25.00). Every lane answers before money moves — heuristic verdicts, not audits. Don't get rugged.","url":"https://mini-tollbooth.onrender.com/code-run?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"JavaScript snippet to run (max 50KB). Synchronous JS only in v1."},"lang":{"type":"string","description":"Language — only \"js\" is supported in v1."},"timeout_ms":{"type":"string","description":"Max wall-clock ms before the sandbox is killed (1000–10000, default 5000)."},"max_output_chars":{"type":"string","description":"Cap for captured logs + result (100–20000, default 4000)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"lane":"/code-run","lang":"js","logs":"","result":"7","verdict":"ok","timeout_ms":5000,"description":"Sandboxed JS execution ($0.05) — run a JavaScript snippet in an isolated child process (64MB heap cap, no network, no filesystem) and get the result plus captured logs. Pragmatic sandbox, not a hardened enclave.","execution_ms":11}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-M8ewoNRTVE6FcYYUkTwW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes a JavaScript snippet in an isolated sandbox and returns the result plus captured logs, with a 64MB heap cap and no network or filesystem access.","exampleAgentPrompt":"Run this JavaScript snippet for me in a safe sandbox and give me the result: `function fib(n){return n<=1?n:fib(n-1)+fib(n-2);} fib(10);` — use a 5-second timeout.","exampleUseCases":[{"title":"On-the-fly math computation","prompt":"Calculate the compound interest for a $10,000 principal at 5% annual rate over 10 years — just run the JavaScript formula for me and return the number."},{"title":"Validate a sorting algorithm","prompt":"Run this JavaScript bubble sort on the array [5,3,8,1,9,2] for me in a sandbox and tell me what comes out: `function sort(a){for(let i=0;i<a.length;i++)for(let j=0;j<a.length-i-1;j++)if(a[j]>a[j+1])[a[j],a[j+1]]=[a[j+1],a[j]];return a;} sort([5,3,8,1,9,2]);`"},{"title":"Test string processing logic","prompt":"I need to check if this JavaScript regex replacement works correctly — run `'hello world 123'.replace(/[0-9]+/g, '#')` in a safe isolated sandbox and show me what it outputs."}],"resultDescription":"A JSON object containing: the lane name ('/code-run'), the language used ('js'), any console logs captured during execution, the final result value as a string, a verdict ('ok' or error state), the timeout setting in milliseconds, a human-readable description of the sandbox, and the actual wall-clock execution time in milliseconds.","failureModes":["Code exceeds 50KB input limit — rejected before execution","Execution exceeds timeout_ms wall-clock limit — sandbox killed, timeout error returned","Code attempts network or filesystem access — blocked silently or returns undefined","Heap usage exceeds 64MB cap — process killed with memory error","Syntax errors in submitted JS — returns parse/runtime error in result","Unsupported language specified (anything other than 'js') — error returned","Output exceeds max_output_chars cap — response truncated"],"whenToPreferThis":"Choose this endpoint when you need to safely evaluate a JavaScript snippet without a local runtime, especially when the code is untrusted or computationally bounded. It is ideal for quick formula evaluation, testing algorithmic logic, or computing derived values on the fly. Prefer it over a general compute service when you need a metered, pay-per-call sandbox with explicit heap and timeout controls and no side effects.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:45:35.258Z","isFirstParty":false,"canonicalSlug":"trollbridge-code-run-sandboxed-javascript-executor-09470451"}