{"_id":"@capsule-run/adapter","_rev":"9-249e8d49c74b6c5d0652bf535046dd7a","name":"@capsule-run/adapter","dist-tags":{"latest":"0.3.5"},"versions":{"0.1.0":{"name":"@capsule-run/adapter","version":"0.1.0","author":"","license":"Apache-2.0","_id":"@capsule-run/adapter@0.1.0","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-adapter":"dist/index.js"},"dist":{"shasum":"8f0350da2b2776cdc72915750913476d497fa82a","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.1.0.tgz","fileCount":8,"integrity":"sha512-NIB9t5U5kRqhiPZ4sNXK5plZ+xr8a5IU4rOqTemiHzj+xrgLqawPcRyRZHGQSHW+UhzGsAWPtMSLrK4vcP3FoA==","signatures":[{"sig":"MEYCIQCygtjiUEh2fiVnFVMvREZ4rx19Pmu1pNLaTZXn2agpzgIhAI+m7VhLTYeO7HBO2Msz3JLAho5KQcL4sCIAB0gSVZPS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56474912},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"d4c829367804de3a3cad7bfdbfd4b4d72260b32e","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"Capsule adapter for typescript applications","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@capsule-run/cli":"latest","@capsule-run/sdk":"latest"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter_0.1.0_1773355915740_0.7976104708849558","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capsule-run/adapter","version":"0.1.1","author":"","license":"Apache-2.0","_id":"@capsule-run/adapter@0.1.1","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-adapter":"dist/index.js"},"dist":{"shasum":"5f9ead7bfbab833f1cddb94a3e42118441efa57d","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.1.1.tgz","fileCount":8,"integrity":"sha512-iv0GsidW7udgbk8EzPNXQoYi7wMKCsqQyOlDG2t8M5X15fHWv6O4JVCGIqrqiU3lI8w14+rWS/gplQUNENY1Yw==","signatures":[{"sig":"MEQCIBiYBSYwhyMaW/0N1jXgVAiBrZn6CRfVVxv+nkJXcNr7AiBNX5vYX75cL5oskrTdkAOOYvDd72r9oN8g9a/oN6t1/Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56511851},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"df6fd447888a47df4380cb4eb8976f7781050d63","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"Capsule adapter for typescript applications","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@capsule-run/cli":"latest","@capsule-run/sdk":"latest"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter_0.1.1_1773397382629_0.4121324908058239","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@capsule-run/adapter","version":"0.2.0","author":"","license":"Apache-2.0","_id":"@capsule-run/adapter@0.2.0","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-adapter":"dist/index.js"},"dist":{"shasum":"0052c9d6ee52b3235e8c6e7ca2bc7590975bee3b","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.2.0.tgz","fileCount":8,"integrity":"sha512-AhFpn/hZZAajVVhVJDZVsvWF0sjPyBpJakZZcQk2ZVktNqeLZixUekal+0Vhu1KopV40x79FY460xOTTLs09fQ==","signatures":[{"sig":"MEUCIAwfMPgl6d/o+5sYEgx+8uMVUbQGAb8wnqjD+1I+8Q3wAiEAn+QJzpVfgads/0fJo3KH2EDV8D3wDWESlnxS0zXtgCY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58357292},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"c37fd27ac55c81f7ad002068d6872c297b1363de","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"Capsule adapter for typescript applications","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@capsule-run/cli":"latest","@capsule-run/sdk":"latest"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter_0.2.0_1774257367933_0.9973648453410797","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@capsule-run/adapter","version":"0.3.0","author":"","license":"Apache-2.0","_id":"@capsule-run/adapter@0.3.0","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-adapter":"dist/index.js"},"dist":{"shasum":"a0632698e8d397b960063e119f3458ebb360c3a6","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.3.0.tgz","fileCount":16,"integrity":"sha512-kbrgqIx7VpCqwjchjXmCwiwH15qrEDjMWkh/HmWCYWLpVJgCjXTdpdm/SkpkzZ7DUtxdi7meOrEmcw+RFnFrDA==","signatures":[{"sig":"MEQCIH1bvzxCnVRqMsHaUvYCW81m42Nrlac4w2ee+qBn8rBMAiASiu1Nro9JE6ZB8ZkGlvyetZ+SUB898imYUFM3rGZO2Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58630512},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"47cc9d6d31b883009641f2601457d5a8f94ca4ed","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"Capsule adapter for typescript applications","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@capsule-run/cli":"latest","@capsule-run/sdk":"latest"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter_0.3.0_1774908249908_0.6344640376275275","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@capsule-run/adapter","version":"0.3.1","author":"","license":"Apache-2.0","_id":"@capsule-run/adapter@0.3.1","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-adapter":"dist/index.js"},"dist":{"shasum":"016c88950af69df574aefbcdd0954f63e776b9e4","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.3.1.tgz","fileCount":16,"integrity":"sha512-DlDKH3y4LbD1QE6vjEkEO+1dk+82tFsCq+SpH7zOaGDEiG3X99DXd+c7Thrc8piPJk7XfqPouIEZCaQ9LiIHpg==","signatures":[{"sig":"MEQCIFiu+FfnZW8YrtUSU8zNlGGhaQx5Bgot9t6NDjmIC6yYAiAcXPL/y92Z4469rQWjUfs3PLORMJKYBqCnQDylCfmPAg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58558804},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"c421d106ae7f83bc1dd382a4dc6c804df4305f8d","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"Capsule adapter for typescript applications","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@capsule-run/cli":"latest","@capsule-run/sdk":"latest"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter_0.3.1_1774973539686_0.7302908955874929","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@capsule-run/adapter","version":"0.3.2","author":"","license":"Apache-2.0","_id":"@capsule-run/adapter@0.3.2","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-adapter":"dist/index.js"},"dist":{"shasum":"36e05d1236dd4e505b6ea8885802aecc30eee873","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.3.2.tgz","fileCount":16,"integrity":"sha512-aQCL6LOPF3XR4/rgK5ut7y7YWBCZPD0Y2ipBf8xQ2zkUceK19697eZ/TSxomFTQ9RgiV7n0c10KDpM41TWKt8A==","signatures":[{"sig":"MEQCIChGuJk+TB9gFKHuPAHIxfSEikUmpl1cY8XlJqs+K2k5AiBXzk4bnEjjC8edRSq9uuVMipIc9B/yIihfxzhG64nKZQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58566796},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"b4a15351f6d887e095e181b03feee2673309a6e4","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"Capsule adapter for typescript applications","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@capsule-run/cli":"latest","@capsule-run/sdk":"latest"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter_0.3.2_1774975667964_0.20802886548162647","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@capsule-run/adapter","version":"0.3.3","author":"","license":"Apache-2.0","_id":"@capsule-run/adapter@0.3.3","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-adapter":"dist/index.js"},"dist":{"shasum":"c67bbbb5c63e61b34f37a7e7478eb99743d963a5","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.3.3.tgz","fileCount":16,"integrity":"sha512-6lqRfUzTSPcS4ijFxdcXVw11/nsIw2WfhC6y/40UFGBRN/nUTAu54U4F7jvnefyqOsZCubudD4gmJcGeUX/+kA==","signatures":[{"sig":"MEUCIQDDtXqjFkjjz/dPwsIOusjUghjIbsGHQuIriC3fj3mVvAIgLnnpzoEcJGpfsNJ3DkJ4xhDRUIYYIEKO+R4FNDW2uXY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58564993},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"5f1c04c1698f94e57d8f614690cca0f49cb1a094","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"Capsule adapter for typescript applications","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@capsule-run/cli":"latest","@capsule-run/sdk":"latest"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter_0.3.3_1774994239472_0.6419219075615328","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@capsule-run/adapter","version":"0.3.4","author":"","license":"Apache-2.0","_id":"@capsule-run/adapter@0.3.4","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-adapter":"dist/index.js"},"dist":{"shasum":"5e945c63d38713bded39af9886bbbe571e9d9883","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.3.4.tgz","fileCount":16,"integrity":"sha512-04Uj54d/AYt1m7F3KCDbSoXkwovnIaI5WP/GYhj1TQcOqQQFD/QbeLL01kKYJAdLkGfyzmFZGJN8ihDhk2q8NQ==","signatures":[{"sig":"MEUCIQDA8enk36zTyIl+eigP+Zz/qH1sHGgWxN14WgcCflij5gIgI1CAUB7s67p9n6ZNs1tA6Aysq00MnaNWkZgJgjDP6GM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34174162},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"d841cf51b7b47a9f1b1264c8cc1072011d38f59c","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"Capsule adapter for typescript applications","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@capsule-run/cli":"latest","@capsule-run/sdk":"latest"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter_0.3.4_1775072514388_0.42667388602444967","host":"s3://npm-registry-packages-npm-production"}},"0.3.5":{"name":"@capsule-run/adapter","version":"0.3.5","description":"Capsule adapter for typescript applications","license":"Apache-2.0","author":"","type":"module","main":"dist/index.js","bin":{"capsule-adapter":"dist/index.js"},"repository":{"type":"git","url":"git+https://github.com/mavdol/capsule.git"},"homepage":"https://github.com/mavdol/capsule","scripts":{"build:ts":"tsc","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build":"npm run build:wasm && npm run build:ts"},"dependencies":{"@capsule-run/sdk":"latest","@capsule-run/cli":"latest"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.7.0"},"_id":"@capsule-run/adapter@0.3.5","gitHead":"bc4355ed50241767eb7f8b18129d2efda1c27f7c","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-79eOCRaiTHvxixRu2XMTbfbDF7Om4TuAzW/phQMisDF+ysJPJh1AoO3eSGXPGxR6/1tvP+lXMH9Pnu2oTsywig==","shasum":"dbfa13d5f8de978e74dc4eae7b60c8fdfad9d0c0","tarball":"https://registry.npmjs.org/@capsule-run/adapter/-/adapter-0.3.5.tgz","fileCount":16,"unpackedSize":34294120,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFc28XQZHweb4fF85GOiq9VFiPzhf3pEWM6YXGpp1JoVAiBpF/m6M58WCFrxGZySDlVJp7ZNvSiF1HQ2C8aTARyu6Q=="}]},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"directories":{},"maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adapter_0.3.5_1775165467486_0.749727902696228"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-12T22:51:55.623Z","modified":"2026-04-02T21:31:08.135Z","0.1.0":"2026-03-12T22:51:56.460Z","0.1.1":"2026-03-13T10:23:03.403Z","0.2.0":"2026-03-23T09:16:08.661Z","0.3.0":"2026-03-30T22:04:10.715Z","0.3.1":"2026-03-31T16:12:20.397Z","0.3.2":"2026-03-31T16:47:48.619Z","0.3.3":"2026-03-31T21:57:20.151Z","0.3.4":"2026-04-01T19:41:54.934Z","0.3.5":"2026-04-02T21:31:07.991Z"},"bugs":{"url":"https://github.com/mavdol/capsule/issues"},"license":"Apache-2.0","homepage":"https://github.com/mavdol/capsule","repository":{"type":"git","url":"git+https://github.com/mavdol/capsule.git"},"description":"Capsule adapter for typescript applications","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"readme":"# `Capsule` TypeScript Adapter\n\n[![TypeScript Adapter Release](https://github.com/mavdol/capsule/actions/workflows/typescript-adapter-release.yml/badge.svg)](https://github.com/mavdol/capsule/actions/workflows/typescript-adapter-release.yml)\n\nExecute Python and JavaScript code securely inside Capsule sandboxes from your TypeScript/JavaScript applications.\n\n## Installation\n\n```bash\nnpm install @capsule-run/adapter\n```\n\n## Usage\n\n### Execute Python Code\n\n```typescript\nimport { runPython } from '@capsule-run/adapter';\n\nconst result = await runPython(`\nprint(\"Hello from Python!\")\nx = 5 + 3\nx * 2\n`);\n\nconsole.log(result); // \"Hello from Python!\\n16\"\n```\n\n### Execute JavaScript Code\n\n```typescript\nimport { runJavaScript } from '@capsule-run/adapter';\n\nconst result = await runJavaScript(`\nconsole.log(\"Hello from JavaScript!\");\nconst x = 5 + 3;\nx * 2;\n`);\n\nconsole.log(result); // \"Hello from JavaScript!\\n16\"\n```\n\n### Preload Sandboxes (Optional)\n\nThe first execution of a sandbox has a cold start (~1 second). You can preload sandboxes to warm them up for faster subsequent executions (~10ms):\n\n```typescript\nimport { loadSandboxes, runPython } from '@capsule-run/adapter';\n\n// Preload both sandboxes in parallel\nawait loadSandboxes();\n\n// Now executions will be faster\nconst result = await runPython('print(\"Fast!\")');\n```\n\nOr preload individually:\n\n```typescript\nimport { loadPythonSandbox, loadJavaScriptSandbox } from '@capsule-run/adapter';\n\nawait loadPythonSandbox();      // Warm up Python only\nawait loadJavaScriptSandbox();  // Warm up JavaScript only\n```\n\n## Sessions (Persistent State)\n\nUse `Session` to run code across multiple calls while preserving state. Each session gets an isolated workspace directory that is automatically cleaned up when the session ends.\n\n```typescript\nimport { Session } from '@capsule-run/adapter';\n\nawait using s = new Session(\"python\");\nawait s.run(\"x = 1\");\nconst result = await s.run(\"x += 1; x\");\nconsole.log(result); // 2\n```\n\nJavaScript sessions work the same way:\n\n```typescript\nawait using s = new Session(\"javascript\");\nawait s.run(\"x = 1\");\nconst result = await s.run(\"x += 1; x\");\nconsole.log(result); // 2\n```\n\n> `await using` automatically cleans up the session when it goes out of scope. You can also call `[Symbol.asyncDispose]()` manually if needed.\n\n#### Import Files\n\nCopy a file or directory from your filesystem into the session workspace. The sandbox code can then access it at the destination path under `workspace/`.\n\n```typescript\nawait using s = new Session(\"python\");\n\n// Import a single file\nawait s.importFile(\"./notes.txt\", \"notes.txt\");\n\n// Import a directory\nawait s.importFile(\"./data/\", \"data/\");\n\nconst result = await s.run(`\nwith open(\"workspace/notes.txt\") as f:\n    content = f.read()\ncontent\n`);\n```\n\n#### Export Files\n\nExport file from the session workspace to your filesystem.\n\n```typescript\nawait using s = new Session(\"python\");\nawait s.importFile(\"./notes.txt\", \"notes.txt\");\n\n// Export a single file\nawait s.exportFile(\"notes.txt\", \"./exported_notes.txt\");\n```\n\n#### Delete Files\n\nRemove a file from the session workspace:\n\n```typescript\nawait using s = new Session(\"python\");\nawait s.importFile(\"./notes.txt\", \"notes.txt\");\n// ... do some work ...\nawait s.deleteFile(\"notes.txt\");\n```\n\n#### Reset State\n\nClear the session's variable state without touching workspace files:\n\n```typescript\nawait using s = new Session(\"python\");\nawait s.run(\"x = 42\");\ns.reset();\nconst result = await s.run(\"x\"); // throws\n```\n\n\n## How It Works\n\nThe adapter compiles Python and JavaScript sandboxes into WebAssembly modules during the build step. When you call `runPython()` or `runJavaScript()`, the adapter invokes these pre-built sandboxes using Capsule's runner with the code you provide.\n\nLearn more about [Capsule](https://github.com/mavdol/capsule).\n","readmeFilename":"README.md"}