{"_id":"@cage-bro/sdk","_rev":"3-a47638e1e8d8b2038384de4dd68acf03","name":"@cage-bro/sdk","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@cage-bro/sdk","version":"0.1.0","license":"Apache-2.0","_id":"@cage-bro/sdk@0.1.0","maintainers":[{"name":"aeroxy","email":"aero.windwalker@gmail.com"}],"dist":{"shasum":"cb7e0b07676f3ae4041ede351476da6a1109b3d7","tarball":"https://registry.npmjs.org/@cage-bro/sdk/-/sdk-0.1.0.tgz","fileCount":3,"integrity":"sha512-zhVtwqRsFCvIgiUDFV+S+09Xmr6/0LBdwujXWxTP/2xfaSGIhAFys6LI1gEwU0QrBRiRAfL0ZFSj1/rOO6CxfQ==","signatures":[{"sig":"MEQCIGmt/9huNdFYYp5jYjizkCYl3O/Wi0XcGXT7FOUaKi4mAiBDG/sQgHlGeWEWK9Xps4CnlNyQZT81TqMn1S7GPWTacg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7196},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"432767597c27765e88a26ce5b014bc6192a6a180","scripts":{"build":"bun build:js && bun build:types","build:js":"bun build src/index.ts --outdir dist --target node --format cjs","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"aeroxy","email":"aero.windwalker@gmail.com"},"_npmVersion":"11.7.0","description":"TypeScript SDK for cage-bro sandbox","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1779002531559_0.7349651974218829","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@cage-bro/sdk","version":"0.1.1","license":"Apache-2.0","_id":"@cage-bro/sdk@0.1.1","maintainers":[{"name":"aeroxy","email":"aero.windwalker@gmail.com"}],"dist":{"shasum":"3c40c383c08a5cb04a87eeb98d06bc8c3d5a976f","tarball":"https://registry.npmjs.org/@cage-bro/sdk/-/sdk-0.1.1.tgz","fileCount":4,"integrity":"sha512-nZsTefVrBz7uZdCQJadkmNJDWHTcEIk4vs9C5TEd0IBf5+QgO4IMu7/he7Ahp9TEuzzQl9Z8ReLG8jnuXm2hTA==","signatures":[{"sig":"MEUCIQDz9IUd4nhmjpCWMxaIPaCSooXmX83UJPTyOfp4FMf96wIgVqt2moq0ElddCUJI+7bdab2+McKyXWifqhyL3xr63Iw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10189},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"4335edf16a6a11e2fdd9300a68fdb7c6aae12ee1","scripts":{"build":"bun build:js && bun build:types","build:js":"bun build src/index.ts --outdir dist --target node --format cjs","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"aeroxy","email":"aero.windwalker@gmail.com"},"_npmVersion":"11.7.0","description":"TypeScript SDK for cage-bro sandbox","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1779004619056_0.8512305890118061","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@cage-bro/sdk","version":"0.2.0","description":"TypeScript SDK for cage-bro sandbox","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"bun build:js && bun build:types","build:js":"bun build src/index.ts --outdir dist --target node --format cjs","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"npm run build"},"license":"Apache-2.0","devDependencies":{"typescript":"^5.0.0"},"gitHead":"77af018b0e23e0c5cd1fe1f9659b58a02bea82d8","_id":"@cage-bro/sdk@0.2.0","_nodeVersion":"25.2.1","_npmVersion":"11.7.0","dist":{"integrity":"sha512-XEdjmAyFFhOlzRvnP2pwo1UyoN/V1FC1YZCA843bkPkqj8zEk3NaJqJCPbzyB2qd+t1BzshnCPd0cEFW8keMcQ==","shasum":"01e0a1a582dd2d6972ee22420924eef98795ae65","tarball":"https://registry.npmjs.org/@cage-bro/sdk/-/sdk-0.2.0.tgz","fileCount":4,"unpackedSize":10189,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDN6mQ9OOaR9054X0G6sgeYiDXMx3/M5y2HLtAR9QvxSQIgd13ydgSqkEQV8LtTTjfeUDgDlXLh576bBX7qJrkSTgg="}]},"_npmUser":{"name":"aeroxy","email":"aero.windwalker@gmail.com"},"directories":{},"maintainers":[{"name":"aeroxy","email":"aero.windwalker@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.2.0_1780895786310_0.36258002636607545"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-17T07:22:11.492Z","modified":"2026-06-08T05:16:26.575Z","0.1.0":"2026-05-17T07:22:11.685Z","0.1.1":"2026-05-17T07:56:59.200Z","0.2.0":"2026-06-08T05:16:26.434Z"},"license":"Apache-2.0","description":"TypeScript SDK for cage-bro sandbox","maintainers":[{"name":"aeroxy","email":"aero.windwalker@gmail.com"}],"readme":"# cage-bro TypeScript SDK\n\n[![npm](https://img.shields.io/npm/v/@cage-bro/sdk)](https://www.npmjs.com/package/@cage-bro/sdk)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)\n\nTypeScript/JavaScript SDK for [cage-bro](https://github.com/aeroxy/cage-bro) — a sandboxed execution environment for AI agents with browser, shell, code execution, file ops, and MCP support.\n\n## Install\n\n```bash\nnpm install @cage-bro/sdk\n```\n\nRequires a running cage-bro server. See the [main project](https://github.com/aeroxy/cage-bro) for installation instructions.\n\n## Quick Start\n\n```typescript\nimport { CageBro } from \"@cage-bro/sdk\";\n\nconst cage = new CageBro({ baseUrl: \"http://localhost:8080\" });\n\n// Shell commands\nconst result = await cage.shellExec(\"ls -la\");\nconsole.log(result.stdout);\n\n// Code execution\nconst output = await cage.python(\"print(2 + 2)\");\nconsole.log(output.stdout);\n\n// File operations\nawait cage.fileWrite(\"hello.txt\", \"world\");\nconst content = await cage.fileRead(\"hello.txt\");\n\n// Browser automation\nawait cage.browserLaunch();\nawait cage.browserNavigate(\"https://example.com\");\nconst screenshot = await cage.browserScreenshot();\n```\n\n## Configuration\n\n```typescript\nconst cage = new CageBro({\n  baseUrl: \"http://localhost:8080\", // default\n  timeout: 30000,                    // request timeout in ms\n});\n```\n\n## API Reference\n\n### Sandbox\n\n| Method | Description |\n|---|---|\n| `info()` | Get sandbox info |\n| `health()` | Health check |\n\n### Shell\n\n| Method | Description |\n|---|---|\n| `shellExec(command, timeoutMs?)` | Execute a shell command |\n| `shellCreateSession(shell?)` | Create a persistent shell session |\n\n### Files\n\n| Method | Description |\n|---|---|\n| `fileRead(path)` | Read a file and return its content |\n| `fileWrite(path, content)` | Write content to a file |\n| `fileEdit(path, oldText, newText)` | Edit a file (find and replace) |\n| `fileList(path?)` | List directory contents |\n| `fileSearch(query, path?)` | Search files for text |\n| `fileDelete(path)` | Delete a file or directory |\n\n### Code Execution\n\n| Method | Description |\n|---|---|\n| `python(code, timeoutMs?)` | Execute Python code in the sandbox |\n| `node(code, timeoutMs?)` | Execute Node.js code in the sandbox |\n\n### Browser\n\n| Method | Description |\n|---|---|\n| `browserLaunch(port?, stealth?)` | Launch the headless browser |\n| `browserNavigate(url)` | Navigate to a URL |\n| `browserScreenshot()` | Take a screenshot of the current page |\n| `browserClick(selector)` | Click an element by CSS selector |\n| `browserType(selector, text)` | Type text into an input element |\n| `browserEvaluate(expression)` | Evaluate JavaScript in the browser |\n| `browserContent()` | Get the current page HTML content |\n| `browserClose()` | Close the browser |\n\n## Links\n\n- [cage-bro main project](https://github.com/aeroxy/cage-bro)\n- [Python SDK](https://pypi.org/project/cage-bro/)\n- [API documentation](https://github.com/aeroxy/cage-bro#api)\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}