{"_id":"@agent-wasm/core","name":"@agent-wasm/core","dist-tags":{"latest":"0.4.0"},"versions":{"0.4.0":{"name":"@agent-wasm/core","version":"0.4.0","description":"Node.js in your browser. Just like that.","type":"module","license":"MIT","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"repository":{"type":"git","url":"git+https://github.com/BLamy/agent-wasm.git"},"homepage":"https://github.com/BLamy/agent-wasm#readme","bugs":{"url":"https://github.com/BLamy/agent-wasm/issues"},"author":"","engines":{"node":">=20.0.0"},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./internal":{"import":{"types":"./dist/internal.d.ts","default":"./dist/internal.mjs"},"require":{"types":"./dist/internal.d.ts","default":"./dist/internal.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}}},"sideEffects":false,"dependencies":{"@aws-sdk/client-ec2":"^3.1022.0","@aws-sdk/client-s3":"^3.1022.0","@aws-sdk/client-sso":"^3.1022.0","@aws-sdk/client-sso-oidc":"^3.1022.0","@aws-sdk/client-sts":"^3.1022.0","@napi-rs/wasm-runtime":"^1.1.2","@smithy/protocol-http":"^5.3.12","acorn":"^8.15.0","acorn-jsx":"^5.3.2","brotli":"^1.3.3","brotli-wasm":"^3.0.1","comlink":"^4.4.2","css-tree":"^3.1.0","fflate":"^0.8.2","isomorphic-git":"^1.37.2","just-bash":"^2.13.1","pako":"^2.1.0","resolve.exports":"^2.0.3","sha.js":"^2.4.12","vite-plugin-top-level-await":"^1.6.0","vite-plugin-wasm":"^3.5.0","@agent-wasm/tailscale-connect":"1.39.98-t02582083d"},"devDependencies":{"@playwright/test":"^1.58.0","@types/css-tree":"^2.3.11","@types/node":"^25.0.10","@types/pako":"^2.0.4","dotenv":"^17.3.1","esbuild":"^0.27.2","jsdom":"^27.4.0","typescript":"^5.9.3","vite":"^5.4.0","vitest":"4.0.18"},"publishConfig":{"access":"public"},"private":false,"scripts":{"build":"node --max-old-space-size=8192 ./node_modules/vite/bin/vite.js build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","build:publish":"npm run build && npm run build:types","dev":"vite --config vite.examples.config.js","test":"vitest run","test:watch":"vitest","type-check":"tsc --noEmit","e2e":"playwright test","sandbox":"vite --port 3002 --config vite.sandbox.config.js"},"_id":"@agent-wasm/core@0.4.0","_integrity":"sha512-AyyxD2QblxQGrow3NrQHfEwdKj2WTnIgHiGoSFaUg88d/GM2uI7ooPH6fOyM+xD/vxWnvBA4hp6gTpedjGoUCw==","_resolved":"/private/var/folders/xj/jvddkcmd6y9_f79xzk2z_rd00000gn/T/989cd4a9f8e68a03b8864cb365429659/agent-wasm-core-0.4.0.tgz","_from":"file:agent-wasm-core-0.4.0.tgz","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-AyyxD2QblxQGrow3NrQHfEwdKj2WTnIgHiGoSFaUg88d/GM2uI7ooPH6fOyM+xD/vxWnvBA4hp6gTpedjGoUCw==","shasum":"0e519b550ceb7923bef41c38802c9047fe9dc701","tarball":"https://registry.npmjs.org/@agent-wasm/core/-/core-0.4.0.tgz","fileCount":266,"unpackedSize":296228274,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD8STMUaGOM4Pmzq9ZCepuv7hlEGJ+JIhkwtjav6/xk8AIgXOvyOHtepxc5igQTyd1a28K59AmoJTHQTeYSMWR18M0="}]},"_npmUser":{"name":"bel423","email":"bel423@gmail.com"},"directories":{},"maintainers":[{"name":"bel423","email":"bel423@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.4.0_1784961613338_0.26769385775097154"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-25T06:40:13.129Z","0.4.0":"2026-07-25T06:40:14.667Z","modified":"2026-07-25T06:40:14.893Z"},"maintainers":[{"name":"bel423","email":"bel423@gmail.com"}],"description":"Node.js in your browser. Just like that.","homepage":"https://github.com/BLamy/agent-wasm#readme","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"repository":{"type":"git","url":"git+https://github.com/BLamy/agent-wasm.git"},"bugs":{"url":"https://github.com/BLamy/agent-wasm/issues"},"license":"MIT","readme":"# @agent-wasm/core\n\nNode.js in your browser. Just like that.\n\nThe core runtime behind [agent-wasm](https://github.com/BLamy/agent-wasm): a\nbrowser-native Node.js environment with an in-memory filesystem, a real npm\npackage manager (downloaded + ESM→CJS transformed via esbuild-wasm), HTTP servers\nintercepted through a service worker, and dev servers for Vite and Next.js.\n\n```bash\nnpm install @agent-wasm/core\n```\n\n```ts\nimport { createContainer } from \"@agent-wasm/core\";\n\nconst container = createContainer();\ncontainer.vfs.writeFileSync(\"/index.js\", \"console.log('hello from the browser')\");\nawait container.run(\"node index.js\");\n```\n\n## What's in the box\n\n- **`VirtualFS`** — in-memory filesystem, exposed to code as `require('fs')`.\n- **`Runtime` / `createRuntime` / `WorkerRuntime` / `SandboxRuntime`** — the JS\n  execution engine with `require()`, ESM→CJS transforms, and 43 built-in module\n  shims (`fs`, `path`, `http`, `net`, `stream`, `crypto`, `child_process`, …).\n- **`PackageManager`** — installs real npm packages, served via `/_npm/`.\n- **`ViteDevServer` / `NextDevServer`** — React + HMR, Next Pages + App Router.\n- **`electron` shim + `setElectronHost` / `launchElectronApp`** — emulate the Electron\n  main process (`app`, `BrowserWindow`, `ipcMain`) and run modern (contextIsolation +\n  preload) Electron apps from source; each `BrowserWindow` renders as a host-supplied\n  iframe with postMessage IPC. See `examples/electron-demo.*`.\n- **`createContainer` / `ContainerInstance`** — orchestration: vfs, workspace,\n  git, terminal sessions.\n- **`ServerBridge`** — service-worker network interception for in-VFS servers.\n- **`network`** — Tailscale-backed networking namespace.\n\n## Subpaths\n\n| Import | Purpose |\n| --- | --- |\n| `@agent-wasm/core` | the runtime API above |\n| `@agent-wasm/core/internal` | internal helpers (OXC linter, Fly/Infisical, auth shims) |\n| `@agent-wasm/core/vite` | `almostnodePlugin()` — serve the service worker in dev |\n| `@agent-wasm/core/next` | `getServiceWorkerContent()` / `getServiceWorkerPath()` |\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-bce7a37f3a6eb7348cb31c6638cdea4a"}