{"_id":"@luxorai/sandbox","_rev":"15-63daca8c00f92f23df114d217f72b060","name":"@luxorai/sandbox","dist-tags":{"latest":"1.9.1"},"versions":{"0.0.0-stage":{"name":"@luxorai/sandbox","version":"0.0.0-stage","_id":"@luxorai/sandbox@0.0.0-stage","stub":true,"maintainers":[{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"dist":{"shasum":"85537d677cf4391901de28416530137a187a4bea","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-0gKi/D9D+/cAMNlwou4IOO7xgOkzTAMDBXDsaht9vu/t8kDX+czTCNbpT2OiyNwqDpsF858MhmTCdxlX3b9z9w==","signatures":[{"sig":"MEUCIBGB4cuby7EZfNlBDpN82ihZYbMJnXj4nmQzMo4yFhQeAiEAmMPz0KmZBPQt35B5V3OHpDld0xikcwe5CnBk+iLxbR8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":338},"_npmUser":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"1.4.3":{"name":"@luxorai/sandbox","version":"1.4.3","keywords":["tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.4.3","maintainers":[{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://tenki.cloud/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"807927cf2effd482a78ed2972bbd08d640662e93","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.4.3.tgz","fileCount":60,"integrity":"sha512-mfSGJm9SSwmjd113OOmSfHtcWHZboqJP5d3DDsEJLCKXssvEVbwCjaqdNA2OJYv11CfbA4QRd2Sgv0hVjibMyA==","signatures":[{"sig":"MEUCIEqsd3JlUAKeIJea1FmiagKLMb2jng0d2xWR7L/Raj5XAiEAoMd56KedAliYAXkeIFNWQX3kLkWil6Kj0z/ya3b11VE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCcp5whhU6hjU37RSrvuzbRUVUhfgO2hDlTuvjaZIGQnQIgIUgbGj0yftBKDIXCpSMDt9pHxGscN7nxx1PbukIYW6I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4324597},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"rm -rf dist && tsup && tsc --emitDeclarationOnly --declarationMap false","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.20.0","description":"TypeScript SDK for Tenki Sandbox","directories":{},"_nodeVersion":"26.13.0","dependencies":{"ws":"8.21.3","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"9.0.0","vitest":"4.1.12","@types/ws":"8.18.1","typescript":"npm:@typescript/typescript6@6.0.2","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.4.3_1794313716483_0.4276637564443839","host":"s3://npm-registry-packages-npm-production"}},"1.4.4":{"name":"@luxorai/sandbox","version":"1.4.4","keywords":["tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.4.4","maintainers":[{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://tenki.cloud/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"9eedd9dd12dd6a2355a45301813cfcbb1214451c","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.4.4.tgz","fileCount":60,"integrity":"sha512-RJ07u7idtOs9fuvQgd3WA7jHRG9+gZvmnLrw9goStnfYw31DCCoMjZS6LeL02rYGet2wgLbpuR9235qWR1m3aw==","signatures":[{"sig":"MEQCIGqREfvZgW2sWeyak5usJA2eYMLs9ukb0hR4zYCdIEhXAiBoB95498sLMnsQoH1RanPxri6ml4XESLP4osbqFRREFQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.4.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4325184},"main":"./dist/index.cjs","type":"module","_from":"file:luxorai-sandbox-1.4.4.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"rm -rf dist && tsup && tsc --emitDeclarationOnly --declarationMap false","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"}},"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.4.4.tgz","_integrity":"sha512-RJ07u7idtOs9fuvQgd3WA7jHRG9+gZvmnLrw9goStnfYw31DCCoMjZS6LeL02rYGet2wgLbpuR9235qWR1m3aw==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Tenki Sandbox","directories":{},"_nodeVersion":"24.22.2","dependencies":{"ws":"8.21.3","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"9.0.0","vitest":"4.1.12","@types/ws":"8.18.1","typescript":"npm:@typescript/typescript6@6.0.2","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.4.4_1794321326900_0.5824630518417998","host":"s3://npm-registry-packages-npm-production"}},"1.5.1":{"name":"@luxorai/sandbox","version":"1.5.1","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.5.1","maintainers":[{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://luxor.ai/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"0b07e677c4179757502733413b126cf6239a149e","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.5.1.tgz","fileCount":60,"integrity":"sha512-EIArYbz4D2ZTY2P/u3uGkxUrclmLZ88azFXCqLRHbVQ3Pc2DOj5AjkSAh2rmyGcnAVNYmBt9xtI+xt18JtR+Cw==","signatures":[{"sig":"MEUCIQDm3J1ptDpVClq45jGQVAevJc3C7ATRGqYULccVvxZZRwIgJ0yeuQXrdVTJnqIWsM8g7pffLO6AKXtSA6cjhaTEpRk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4383082},"main":"./dist/index.cjs","type":"module","_from":"file:luxorai-sandbox-1.5.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"rm -rf dist && tsup && tsc --emitDeclarationOnly --declarationMap false","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"}},"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.5.1.tgz","_integrity":"sha512-EIArYbz4D2ZTY2P/u3uGkxUrclmLZ88azFXCqLRHbVQ3Pc2DOj5AjkSAh2rmyGcnAVNYmBt9xtI+xt18JtR+Cw==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","directories":{},"_nodeVersion":"24.22.2","dependencies":{"ws":"8.21.3","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"9.0.0","vitest":"4.1.12","@types/ws":"8.18.1","typescript":"npm:@typescript/typescript6@6.0.2","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.5.1_1794426317214_0.3404469362001281","host":"s3://npm-registry-packages-npm-production"}},"1.5.2":{"name":"@luxorai/sandbox","version":"1.5.2","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.5.2","maintainers":[{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://luxor.ai/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"fe9b1698cc52ac5837e4dd7f4c30bcbf1846b3c2","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.5.2.tgz","fileCount":60,"integrity":"sha512-JSe9ScfBQpLlpvEi7qXJgGh2GwTXtcmUio7sFyywqt4pxsbBAEdweGB4UTgZqezijcaXmyyKsuNz6TTOOv/iig==","signatures":[{"sig":"MEUCIQDl9AQnaNsAwRAmtSAmh5TW1xTkCMjyQwY5mRU4H74nRAIgJ56UbtnXxL56B4489CArZX3UZvPORt7WoaCprboymFk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.5.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4385316},"main":"./dist/index.cjs","type":"module","_from":"file:luxorai-sandbox-1.5.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"rm -rf dist && tsup && tsc --emitDeclarationOnly --declarationMap false","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"}},"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.5.2.tgz","_integrity":"sha512-JSe9ScfBQpLlpvEi7qXJgGh2GwTXtcmUio7sFyywqt4pxsbBAEdweGB4UTgZqezijcaXmyyKsuNz6TTOOv/iig==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","directories":{},"_nodeVersion":"24.22.2","allowScripts":{"esbuild":false,"fsevents":false},"dependencies":{"ws":"8.21.3","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"9.0.0","vitest":"4.1.12","@types/ws":"8.18.1","typescript":"npm:@typescript/typescript6@6.0.2","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.5.2_1794842073139_0.6204749309057265","host":"s3://npm-registry-packages-npm-production"}},"1.5.3":{"name":"@luxorai/sandbox","version":"1.5.3","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.5.3","maintainers":[{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://luxor.ai/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"09a224d287bc6471a896e1c8579e7014ce45f930","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.5.3.tgz","fileCount":60,"integrity":"sha512-XeHXcfjkXGNb5Gj1yablmILgF7zjN7rnj43WToWFbRMCL1e3qO06YIpSQltjemhbKcuRRy277p0x0pY/EyyWJA==","signatures":[{"sig":"MEQCIBN75o5Kn4LOx2ZbDWiKU27Rw9HfF1B9cusl1r4VvVDVAiB4py5QF+vUBg113tvezSxdJ1LRwaCoThz58KCJ6nat8g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.5.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4386146},"main":"./dist/index.cjs","type":"module","_from":"file:luxorai-sandbox-1.5.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"rm -rf dist && tsup && tsc --emitDeclarationOnly --declarationMap false","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"}},"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.5.3.tgz","_integrity":"sha512-XeHXcfjkXGNb5Gj1yablmILgF7zjN7rnj43WToWFbRMCL1e3qO06YIpSQltjemhbKcuRRy277p0x0pY/EyyWJA==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","directories":{},"_nodeVersion":"24.22.2","allowScripts":{"esbuild":false,"fsevents":false},"dependencies":{"ws":"8.21.3","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"9.0.0","vitest":"4.1.12","@types/ws":"8.18.1","typescript":"npm:@typescript/typescript6@6.0.2","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.5.3_1794920800585_0.07407708320140671","host":"s3://npm-registry-packages-npm-production"}},"1.6.0":{"name":"@luxorai/sandbox","version":"1.6.0","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.6.0","maintainers":[{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://luxor.ai/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"884ed0db1f9f4b4823a1f7979effec36851da7f6","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.6.0.tgz","fileCount":61,"integrity":"sha512-jIWdCPgzD+JPuKVvhel+GgxR7Fw/X247jON/iaaHoskeHsXEcsEFU1xZxAoKtzye0U7yrpRoOhT/zrZDS+QzLw==","signatures":[{"sig":"MEYCIQC1MK9+9zGTkXrYqsxUhz7rJWo3oPHCIu7Gi/xiWzxKgwIhAJSpZmw6BDJESw31QotP93A02YK7oYn5AjZ/F0Z6CqB+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4542777},"main":"./dist/index.cjs","type":"module","_from":"file:luxorai-sandbox-1.6.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"rm -rf dist && tsup && tsc --emitDeclarationOnly --declarationMap false","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"}},"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.6.0.tgz","_integrity":"sha512-jIWdCPgzD+JPuKVvhel+GgxR7Fw/X247jON/iaaHoskeHsXEcsEFU1xZxAoKtzye0U7yrpRoOhT/zrZDS+QzLw==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","directories":{},"_nodeVersion":"24.22.3","allowScripts":{"esbuild":false,"fsevents":false},"dependencies":{"ws":"8.21.3","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"9.0.0","vitest":"4.1.12","@types/ws":"8.18.1","typescript":"npm:@typescript/typescript6@6.0.2","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.6.0_1795613267440_0.43563885850020545","host":"s3://npm-registry-packages-npm-production"}},"1.7.0":{"name":"@luxorai/sandbox","version":"1.7.0","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.7.0","maintainers":[{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://luxor.ai/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"c2a0b8b93d0cc673211b6a903079ea895e63e693","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.7.0.tgz","fileCount":364,"integrity":"sha512-1BVDy69qHsyO0HCQs0kqi2eehwPbRD/WMuSw+/LXbmnC0RT3OkMeqR+sFwRMOF+wf53KDx06vDDus8zz6DXC6Q==","signatures":[{"sig":"MEYCIQDTBdEpmhxVivDdtpHmE/+FDyFJ3nJPCPDDoBryvPeEpQIhANKpuvyrkTtBCRezhgzy6E/YdWB5UXA+y9B0yqb27vCX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6423886},"main":"./dist/cjs/index.js","type":"module","_from":"file:luxorai-sandbox-1.7.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"test":"vitest run","build":"node scripts/build.mjs","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"}},"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.7.0.tgz","_integrity":"sha512-1BVDy69qHsyO0HCQs0kqi2eehwPbRD/WMuSw+/LXbmnC0RT3OkMeqR+sFwRMOF+wf53KDx06vDDus8zz6DXC6Q==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","directories":{},"_nodeVersion":"24.22.3","allowScripts":{"fsevents":false},"dependencies":{"ws":"8.21.3","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.12","@types/ws":"8.18.1","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.7.0_1796050698664_0.7489219477462246","host":"s3://npm-registry-packages-npm-production"}},"1.8.0":{"name":"@luxorai/sandbox","version":"1.8.0","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.8.0","maintainers":[{"name":"conard_luxor_tech","email":"conard@luxor.tech"},{"name":"cbascom","email":"calvin.bascom@luxor.tech"},{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://luxor.ai/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"47f56731877dba0a35838766843e7e525abfa989","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.8.0.tgz","fileCount":364,"integrity":"sha512-Fd365bQXb2esLaBPuad//fX115U5SPqfzdRpxVDfKRfqsSLYyF/KDab0qP5P34kxa+IO2FjHBQEtGrA90XN7GA==","signatures":[{"sig":"MEQCIAcDyYWRvusJGXktbmoL0dMw6sM7HIO/9zhMrSGznqbJAiBtbkXG+iZ8T9pEivLywwCDnHMzCvzDssQtBc4mzi4i5g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6480035},"main":"./dist/cjs/index.js","type":"module","_from":"file:luxorai-sandbox-1.8.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"test":"vitest run","build":"node scripts/build.mjs","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"albertilagan","email":"albertilagan0018@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"}},"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.8.0.tgz","_integrity":"sha512-Fd365bQXb2esLaBPuad//fX115U5SPqfzdRpxVDfKRfqsSLYyF/KDab0qP5P34kxa+IO2FjHBQEtGrA90XN7GA==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","directories":{},"_nodeVersion":"24.22.3","allowScripts":{"fsevents":false},"dependencies":{"ws":"8.23.1","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.12","@types/ws":"8.18.1","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.8.0_1796209678783_0.900715022731853","host":"s3://npm-registry-packages-npm-production"}},"1.9.0":{"name":"@luxorai/sandbox","version":"1.9.0","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"license":"MIT","_id":"@luxorai/sandbox@1.9.0","maintainers":[{"name":"conard_luxor_tech","email":"conard@luxor.tech"},{"name":"cbascom","email":"calvin.bascom@luxor.tech"},{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"homepage":"https://luxor.ai/docs/sandbox/sdk","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"d86bdde65964fa4c7cce750d2f5fc9ba74d20e1b","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.9.0.tgz","fileCount":364,"integrity":"sha512-w3juvUOFi1UVbxzI+mNqr637Xla+hfUvRL7vvpKP264CxYTFXqpYTSZu7XVfW3gEYPvKoLuOkm/QVe/O/6bKzA==","signatures":[{"sig":"MEQCIDgkKOWxnVFihiwIdyqKMFpUCKogJSW9lLrlg5RU7XIBAiAIz06bLU9AhU6qVGK8k5qsc7ZcWRmvRuM1pfT5H2t4Zg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6563789},"main":"./dist/cjs/index.js","type":"module","_from":"file:luxorai-sandbox-1.9.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"test":"vitest run","build":"node scripts/build.mjs","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"cbascom","email":"calvin.bascom@luxor.tech"},"trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"}},"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.9.0.tgz","_integrity":"sha512-w3juvUOFi1UVbxzI+mNqr637Xla+hfUvRL7vvpKP264CxYTFXqpYTSZu7XVfW3gEYPvKoLuOkm/QVe/O/6bKzA==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","directories":{},"_nodeVersion":"24.22.3","allowScripts":{"fsevents":false},"dependencies":{"ws":"8.23.1","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.12","@types/ws":"8.18.1","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sandbox_1.9.0_1796318662348_0.6273458246614441","host":"s3://npm-registry-packages-npm-production"}},"1.9.1":{"_id":"@luxorai/sandbox@1.9.1","bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"dist":{"shasum":"d638c4352bd80d030a89c3b8db1e9a50bdd4e44a","tarball":"https://registry.npmjs.org/@luxorai/sandbox/-/sandbox-1.9.1.tgz","integrity":"sha512-zqKyx3YupkoGlho8OrPOq3mpDIJ+N4mookDr0V/WWlGMOUR8trv7Wvlieb+w9ytDhrQ2jXBs+edilrym7illOQ==","fileCount":364,"unpackedSize":6564209,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@luxorai%2fsandbox@1.9.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCcqr6BXp7CjVZP/VTzSbzC3r837unl+ONiipJ6eLbRQgIhAKSCEGmBa35aPzAtoqOn96w2XKM8i/w+KjPoEe60rezJ"}]},"main":"./dist/cjs/index.js","name":"@luxorai/sandbox","type":"module","_from":"file:luxorai-sandbox-1.9.1.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"license":"MIT","scripts":{"test":"vitest run","build":"node scripts/build.mjs","typecheck":"tsc --noEmit","test:watch":"vitest"},"version":"1.9.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"740a54da-f185-45de-b3f0-9c4ec4a35572"},"approver":{"name":"luciocorrallx","email":"lucio.corral@luxor.tech"}},"homepage":"https://luxor.ai/docs/sandbox/sdk","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"_resolved":"/home/runner/work/tenki-sdk-es/tenki-sdk-es/luxorai-sandbox-1.9.1.tgz","_integrity":"sha512-zqKyx3YupkoGlho8OrPOq3mpDIJ+N4mookDr0V/WWlGMOUR8trv7Wvlieb+w9ytDhrQ2jXBs+edilrym7illOQ==","repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","directories":{},"maintainers":[{"name":"conard_luxor_tech","email":"conard@luxor.tech"},{"name":"cbascom","email":"calvin.bascom@luxor.tech"},{"name":"eddiewang","email":"bonjour@eddiewang.me"},{"name":"luciocorrallx","email":"lucio.corral@luxor.tech"},{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"_nodeVersion":"24.22.3","allowScripts":{"fsevents":false},"dependencies":{"ws":"8.23.1","@bufbuild/protobuf":"2.12.1","@connectrpc/connect":"2.1.2","@connectrpc/connect-node":"2.1.2"},"devDependencies":{"vitest":"4.1.12","@types/ws":"8.18.1","@types/node":"24.19.2","@typescript/native":"npm:typescript@7.0.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sandbox_1.9.1_1796391753739_0.23235943259874048"},"_hasShrinkwrap":false}},"time":{"created":"2026-11-10T12:26:58.510Z","modified":"2026-12-04T13:42:34.147Z","0.0.0-stage":"2026-11-10T12:26:58.510Z","1.4.3":"2026-11-10T12:28:36.685Z","1.4.4":"2026-11-10T14:35:27.012Z","1.5.1":"2026-11-11T19:45:17.324Z","1.5.2":"2026-11-16T15:14:33.364Z","1.5.3":"2026-11-17T13:06:40.726Z","1.6.0":"2026-11-25T13:27:47.578Z","1.7.0":"2026-11-30T14:58:18.775Z","1.8.0":"2026-12-02T11:07:58.880Z","1.9.0":"2026-12-03T17:24:22.477Z","1.9.1":"2026-12-04T13:42:33.850Z"},"bugs":{"url":"https://github.com/LuxorLabs/tenki-sdk-es/issues"},"license":"MIT","homepage":"https://luxor.ai/docs/sandbox/sdk","keywords":["luxor","luxor-ai","tenki","sandbox","microvm","ai-agents","agents","code-execution","code-interpreter","cloud"],"repository":{"url":"git+https://github.com/LuxorLabs/tenki-sdk-es.git","type":"git"},"description":"TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud","maintainers":[{"name":"conard_luxor_tech","email":"conard@luxor.tech"},{"name":"cbascom","email":"calvin.bascom@luxor.tech"},{"name":"eddiewang","email":"bonjour@eddiewang.me"},{"name":"luciocorrallx","email":"lucio.corral@luxor.tech"},{"name":"albertilagan","email":"albertilagan0018@gmail.com"}],"readme":"# @luxorai/sandbox\n\nTypeScript SDK for [Luxor Sandbox](https://luxor.ai/docs/sandbox/sdk), programmatic cloud sandboxes for AI agents on Luxor Agent Cloud.\n\n## Install\n\n```bash\nnpm install @luxorai/sandbox\n```\n\nRequires Node.js 22 or newer. Bun 1.3 or newer also works.\n\n> This package was published as `@tenkicloud/sandbox`. That name keeps working and\n> publishes the same code at the same version, and `TenkiSandbox` remains an alias\n> of `LuxorSandbox`.\n\n## Streaming without retaining output\n\nPass `{ streamOnly: true }` to `session.run(argv, options)` to receive stdout and stderr chunks without retaining them in the final result.\nConsume both readable streams while the command runs.\nStreaming-only mode bounds each unread output queue and pauses the producer when that queue is full until its reader frees capacity.\nWaiting without consuming stdout and stderr can block completion.\nCancel an unused readable stream with `proc.stdout.cancel()` or `proc.stderr.cancel()`, or pass an `AbortSignal` to abandon the run.\nAwaiting the handle still returns exit status, timing, and disk metadata, with empty stdout and stderr.\nThe default remains output collection, including `session.exec(...)`.\n\n## Releasing a session handle\n\nCall `session.release()` after finishing active commands to stop credential renewal and free this handle's local data-plane connection while the sandbox keeps running.\nRelease is idempotent and prevents `await using` disposal from terminating the sandbox.\nThe released handle cannot start new data-plane operations; use `client.get(session.id)` to obtain another handle.\nAn explicit `session.close()` still terminates the sandbox after release.\nRelease does not close the shared SDK client.\n\n## Quick Start\n\n```typescript\nimport { LuxorSandbox } from \"@luxorai/sandbox\";\n\nconst sandbox = new LuxorSandbox(); // reads LUXOR_AUTH_TOKEN\n// create() waits by default via a single server-held request and returns a\n// run-ready sandbox with data-plane access primed.\nconst session = await sandbox.create({\n  cpuCores: 2,\n  memoryMb: 4096,\n});\n\ntry {\n  const result = await session.run([\"echo\", \"hello\"]);\n  console.log(result.exitCode); // 0\n} finally {\n  await session.close();\n}\n```\n\n`Session` also implements `AsyncDisposable`, so `await using` works in runtimes that support explicit resource management.\n\n### Tailnet attachment\n\nUse `TailnetAuthKey` so string, JSON, and Node debug formatting redact the credential.\n`waitForOnline` keeps the session in creation until Luxor verifies the registered node.\n\n```typescript\nimport { LuxorSandbox, TailnetAuthKey } from \"@luxorai/sandbox\";\n\nconst session = await new LuxorSandbox().create({\n  tailnet: {\n    authKey: new TailnetAuthKey(process.env.TAILNET_AUTH_KEY!),\n    tags: [\"tag:sandbox\"],\n    exposePorts: [3000],\n    exposedPorts: [{ port: 6081, protocol: \"udp\" }],\n    acceptRoutes: true,\n    waitForOnline: true,\n  },\n});\nconsole.log(session.tailnetStatus?.state, session.tailnetStatus?.fqdn);\n```\n\nThe direct key is write-only and never appears on `Session`.\nThe server may reject options from later milestones, including wake-on-connect and recreate-on-resume.\n\n## Authentication\n\nPass an API key or service token starting with `lx_` (`tk_` is still accepted) explicitly, or set `LUXOR_AUTH_TOKEN` or `LUXOR_API_KEY` (`TENKI_AUTH_TOKEN` and `TENKI_API_KEY` are still read when no `LUXOR_*` token is set). Every `LUXOR_*` variable takes precedence over its `TENKI_*` equivalent:\n\n```typescript\nconst sandbox = new LuxorSandbox({ authToken: \"lx_...\" });\n```\n\n`apiKey` is an alias for `authToken`. If both are supplied, `authToken` wins.\nSet `baseUrl`, `LUXOR_API_ENDPOINT` or `LUXOR_API_URL` to point the client at another API host such as `https://api.luxor.ai`;\n`TENKI_API_ENDPOINT` and `TENKI_API_URL` are still read when no `LUXOR_*` URL is set.\nBlank or whitespace-only values count as absent.\n`LUXOR_API_KEY` is only used when it starts with `lx_` or `tk_`; any other value is ignored.\n\nThe credential determines the Workspace automatically; ordinary Sandbox calls do not require a Workspace ID.\n\n### Migrating to v0.7.0\n\nVersion 0.7.0 removes the generated workspace settings and pause-retention RPCs.\nUse `getUsage()` for read-only workspace usage and limit data. Its shared\nconcurrency entry now uses the `max_concurrent_jobs` key.\n\n### Migrating to v0.6.0\n\nVersion 0.6.0 removes `ClientOptions.cookieName` and support for Ory session\ntokens and browser cookie values. Pass an `lx_` API key or service token through\n`authToken`; the SDK sends it as an `Authorization: Bearer` credential.\n\n## Sessions\n\n```typescript\nconst session = await sandbox.create({\n  name: \"my-sandbox\",\n  cpuCores: 4,\n  memoryMb: 8192,\n  diskSizeGb: 10,\n  allowInbound: true,\n  allowOutbound: true,\n  env: { NODE_ENV: \"production\" },\n  metadata: { purpose: \"ci\" },\n  tags: [\"ci\"],\n  cloneRepoUrl: \"https://github.com/org/repo\",\n  githubToken: process.env.GITHUB_TOKEN,\n  sticky: true,\n});\n\nawait session.refresh();\nawait session.extend(10 * 60 * 1000);\nawait session.update({ name: \"renamed\", tags: [\"ci\", \"kept\"] });\nawait session.pause();\nawait session.resume();\nawait session.close();\n```\n\n`idleTimeoutMinutes` is deprecated and ignored: sandboxes do not auto-pause on\nidle. Use `maxDurationMs`, or `session.pause()` to pause explicitly.\n\nWithout `maxDurationMs`, a session times out 30 minutes after creation;\nactivity does not extend it. `maxDurationMs` at create, or\n`session.update({ sticky: false, maxDurationMs })`, is capped at 24 hours and\nreturns `MAX_DURATION_CAPPED`. One `session.extend()` call adds at most 24\nhours; a longer request is truncated without a warning. `session.extend()` can\nbe called repeatedly; total lifetime is not capped. At timeout, a used session\nis paused and kept for its pause retention; a never-used or tailnet-attached\nsession is terminated.\n\n`pauseRetentionMs` sets how long a paused session is kept resumable. It must be\nat most the workspace's pause retention limit, which is also the default when\nunset; a larger value is rejected with `InvalidArgument`.\n\n`sticky: true` discards `maxDurationMs` and runs the session until it is\nterminated. Manual pause and resume do not clear sticky. The returned\n`session.warnings` array retains the structured warning. By default,\n`LuxorSandbox` writes each warning to `console.warn`. Set `warningHandler` to\nroute warnings through your logger, or pass `null` to suppress emission:\n\n```typescript\nconst sandbox = new LuxorSandbox({\n  warningHandler: (warning) => process.emitWarning(warning.message),\n});\n\nconst session = await sandbox.create({ sticky: true, maxDurationMs: 60 * 60 * 1000 });\nif (session.warnings[0]?.code === \"STICKY_OVERRIDES_MAX_DURATION\") {\n  console.log(\"maxDurationMs was discarded\");\n}\n```\n\nCreate from an image or snapshot:\n\n```typescript\nawait sandbox.create({ image: \"workspace/name:tag\" });\nawait sandbox.create({ snapshotId: \"snap_...\" });\n```\n\n### Durable pause\n\n`pause()` resolves once the session is `PAUSED`: the memory checkpoint is on the host and the RBD rootfs image is finalized.\nCeph and R2 replication continue in the background after it resolves.\nIt submits the pause like `pauseAsync()` and then waits like `waitPaused()`, so a slow pause does not hold a request open.\nIt throws `PauseFailedError` if a verified rollback restores `RUNNING`.\n`pauseAsync()` returns after the service durably accepts the request and moves the session to `PAUSING` on a node that supports asynchronous pause.\nAcceptance does not mean the VM has stopped, so call `waitPaused()` before resuming or relying on the checkpoint.\n`waitPaused()` resolves at `PAUSED` and throws `PauseFailedError` if a verified rollback restores `RUNNING`.\nPass `0` as `timeoutMs` to wait until an abort signal cancels the call.\n\nA `LOCAL_READY` pause snapshot resumes on the host that captured it.\n`DURABLE_CEPH` snapshots can resume on a capability-matched host in the same datacenter while R2 replication continues.\n`DURABLE` snapshots are portable to eligible hosts.\n\n### Resume\n\n`resume()` resolves once the session is `RUNNING`, so the next call can use it right away.\nIt throws `ResumeFailedError` with the restore error if the session falls back to `PAUSED`.\nIf the call's deadline passes first, it throws `ResumeWaitTimeoutError`; the resume may still land, so call `waitResumed()` to keep waiting.\nCalling `resume()` on a session that is already `RESUMING` joins that resume instead of failing.\n`resumeAsync()` returns once the service accepts the resume, usually with the session in `RESUMING`.\nCall `waitResumed()` before running commands.\nIt resolves at `RUNNING`, throws `ResumeFailedError` if the resume fails, and throws `ResumeWaitTimeoutError` after the timeout.\n\n```typescript\nawait session.resumeAsync();\nawait session.waitResumed();\n```\n\n### What survives a pause\n\nPause captures the VM's full memory, not only its disk: a resumed session is the\nsame running machine, not a reboot. Processes keep their PIDs and their in-memory\nstate, and the guest clock stops for the duration of the pause.\n\n`/tmp` is cleared across a pause. Keep durable state under `/home/tenki`, which\nis preserved.\n\nThe kernel boot ID (`/proc/sys/kernel/random/boot_id`) changes on every resume,\nso it can't tell a resume from a restart. Memory-backed paths such as `/dev/shm`\nsurvive a pause but not a restart, so a token written there can.\n\nWhile a session is paused it serves no traffic: preview requests return `404`\nuntil it resumes. The client connection itself is not dropped — a held\nkeep-alive connection returns `200` again after resume — so treat a paused\nsession as unavailable rather than disconnected.\n\nSSH is different: a held transport fails on use while paused and does not\nrecover after resume, so reconnect rather than retry on it. A fresh\nconnection succeeds as soon as the session is `RUNNING` again.\n\n```typescript\nasync function text(cmd: string): Promise<string> {\n  const result = await session.exec([\"bash\", \"-lc\", cmd]);\n  return new TextDecoder().decode(result.stdout).trim();\n}\n\nawait text(\"echo hello > ~/marker\");\nawait text(\"setsid nohup sleep 3600 >/dev/null 2>&1 </dev/null &\");\nconst pid = await text(\"pgrep -n sleep\");\n\nawait session.pause();\nawait session.resume();\n\nconsole.log(await text(\"cat ~/marker\")); // \"hello\" - the marker file survived\nconsole.log(await text(`kill -0 ${pid} && echo alive`)); // \"alive\" - same process, same memory\n```\n\n## Commands\n\n```typescript\nconst proc = session.run([\"npm\", \"test\"], { cwd: \"app\", env: { CI: \"true\" } });\n\nconst reader = proc.stdout.getReader();\ntry {\n  for (;;) {\n    const { done, value } = await reader.read();\n    if (done) break;\n    process.stdout.write(value);\n  }\n} finally {\n  reader.releaseLock();\n}\n\nconst result = await proc;\nconsole.log(result.exitCode);\n```\n\n`exec` takes argv either as a command plus `options.args` or as a single array:\n\n```typescript\nawait session.exec(\"sh\", { args: [\"-c\", \"echo hi\"] });\nawait session.exec([\"sh\", \"-c\", \"echo hi\"]); // equivalent\n```\n\nFor simple commands, you can await `run` directly:\n\n```typescript\nconst result = await session.run([\"echo\", \"hello\"]);\nconsole.log(new TextDecoder().decode(result.stdout));\n```\n\nProcess `cwd` values follow the guest contract: relative paths are normalized\nunder the sandbox guest workdir (`/home/tenki` by default), absolute paths are\nused unchanged, and missing or non-directory targets fail before the process\nstarts.\n\n`cwd` sets the spawned process's directory. A login shell (`bash -lc`) sources\nthe guest's startup files first, so a `cd` in `~/.bashrc` or `~/.profile` runs\nbefore your command and wins over `cwd`; use `bash -c` when the directory must\nhold.\n\n### Timeouts and cancellation\n\nCommands are unbounded by default. Pass `timeoutMs` for a budget, or a `signal`\nto cancel.\n\nThe budget is enforced by the guest-agent, which signals the process on expiry\n(`SIGTERM`, escalating to `SIGKILL`) and reports the run as timed out. That is\n**not** an exception — it resolves with `status: \"TIMED_OUT\"`, carrying the output\ncaptured before the budget expired:\n\n```typescript\nconst result = await session.exec(\"bash\", { args: [\"-lc\", \"npm ci\"], timeoutMs: 120_000 });\nif (result.status === \"TIMED_OUT\") {\n  // result.reason is \"timeout\", or \"grace_timeout\" when the guest could not reap\n  // the process. Partial output usually shows where it stalled.\n  console.error(result.reason, new TextDecoder().decode(result.stdout));\n}\n```\n\nAborting **is** an exception — the call rejects with the signal's reason:\n\n```typescript\nconst controller = new AbortController();\nconst pending = session.exec(\"bash\", { args: [\"-lc\", \"make build\"], signal: controller.signal });\ncontroller.abort();\n```\n\nThe guest caps the request at its own configured maximum command timeout, and\nolder guest-agents accept `timeoutMs` but ignore it, leaving the run unbounded.\n\n### Output size\n\n`exec` keeps all output by default. Pass `maxOutputBytes` to keep only the first\nthat many bytes of each of stdout and stderr. The command keeps running and the\nrest of its output is read and dropped; `onOutput` and `stream` still receive every chunk.\n`stdoutTruncated` and `stderrTruncated` report whether anything was dropped:\n\n```typescript\nconst result = await session.exec([\"bash\", \"-lc\", \"make test\"], { maxOutputBytes: 1024 * 1024 });\nif (result.stdoutTruncated) console.warn(\"stdout was cut at 1 MiB\");\n```\n\nA negative or non-integer `maxOutputBytes` throws `InvalidArgumentError` before the command starts.\n\n### Background processes and long-running services\n\nA command returns when its **stdout and stderr reach EOF**, not when the shell\nexits. A backgrounded process inherits both streams and holds them open, so this\nwaits for the server rather than the shell:\n\n```typescript\n// Hangs: the server inherits stdout/stderr.\nawait session.exec(\"sh\", { args: [\"-lc\", \"python3 -m http.server 3000 &\"] });\n```\n\nRedirect **both** streams to detach it:\n\n```typescript\nawait session.exec(\"sh\", { args: [\"-lc\", \"python3 -m http.server 3000 >/home/tenki/http.log 2>&1 &\"] });\n```\n\nRedirecting only stdout is not enough — stderr still holds the stream open — and\n`nohup` does not help, because it blocks `SIGHUP` rather than stream inheritance.\nThis is standard POSIX behavior, the same as Node's own `child_process.exec`.\n\nTo keep hold of a service instead, use `session.run()` and read from the handle\nrather than awaiting it; for services you always want running, start them from a\ntemplate `startCmd` instead.\n\nThat last option is the durable one. Every exec child runs inside the\nguest-agent's own systemd cgroup, so a guest-agent restart kills it, and `nohup`\ndoes not change that. Pause and resume restore VM memory, so a backgrounded\nprocess does survive a pause with the same PID — which makes an ad-hoc service\nlook more durable than it is. Anything load-bearing belongs in a template start\ncommand with a readiness probe.\n\n### Stopping a process\n\n`signal()` and `kill()` enqueue a signal frame and resolve immediately — they do\n**not** wait for the process to die, matching Node's `child_process.kill()`.\nAwaiting the handle is what resolves once the process has actually exited:\n\n```typescript\nconst proc = session.run([\"sleep\", \"3600\"]);\nawait proc.signal(\"SIGTERM\"); // resolves once the frame is queued\nconst result = await proc; // resolves once the process has exited\nconsole.log(result.signal); // \"terminated\"\n```\n\n`result.signal` carries the guest's own name for the signal, not the name you\npassed: SIGTERM reports `\"terminated\"` and SIGKILL reports `\"killed\"`. Compare\nagainst those values, not against `\"TERM\"`/`\"KILL\"`.\n\nSignalling before the guest acknowledges the spawn is safe: the SDK may still be\nretrying the stream open, and a signal queued during that window is replayed onto\nthe replacement stream rather than being dropped.\n\n`kill()` takes no argument and always sends SIGKILL; use `signal(name)` for\nanything else. Only `KILL`, `TERM`, `INT`, `HUP`, `USR1` and `USR2` are\nsupported (with or without the `SIG` prefix), and **any unrecognized name is\nsilently sent as SIGTERM** — a typo like `signal(\"SIGTRM\")` stops the process\ngracefully instead of throwing, and so does `signal(\"unspecified\")`, which is a\nharmless no-op in the Python SDK. (Python raises `ValueError` for unknown names\ninstead.) Signalling a process that has already exited is a no-op, not an error,\nso the result of `signal()`/`kill()` is best-effort by design.\n\nProcess lifetime is bound to the Run stream, not to the handle. Once that stream\ntears down — the connection breaks, or the edge times the idle connection out\n(~30s) — the platform sends SIGTERM, escalates to SIGKILL after 5s if the process\nis still alive, and reaps it within 10s.\n\nDropping the handle does **not** close the stream on its own: the outbound queue\nis closed only once the result settles. An abandoned process can keep running,\nand one that keeps writing output keeps its own stream alive indefinitely. To\nstop a process, signal it and await the handle rather than abandoning it. There\nis no reattach — a caller that loses the handle must respawn.\n\n## Files\n\nSimple helpers:\n\n```typescript\nawait session.writeFile(\"/tmp/config.json\", '{\"key\":\"value\"}');\nconst data = await session.readFile(\"/tmp/config.json\");\nconsole.log(new TextDecoder().decode(data));\n```\n\nFilesystem API:\n\n```typescript\nawait session.fs.mkdir(\"/tmp/example\");\nawait session.fs.stat(\"/tmp/example\");\nconst entries = await session.fs.list(\"/tmp\");\nawait session.fs.remove(\"/tmp/example\");\n```\n\n### Disk space\n\nThe root disk defaults to 5 GiB and holds the base image as well as your work, so a fresh\nsandbox already reports around 56% used. It is fixed at create time and cannot be grown in\nplace — pass `diskSizeGb` (5–100) to `create` if you need more. Budget for it before a\nlarge install.\n\nEvery `ExecResult` carries `disk`. `isDiskExhausted(result.disk)` reports whether the\nsandbox ran out of space at any point during the command — check it even when the command\nexited 0, since npm reports `ENOSPC` as a warning and still exits successfully with a\nbroken install.\n\n## Networking\n\n`allowInbound` and `allowOutbound` both default to `true`, so a session reaches the internet and can expose\nports without passing either option. They are create-time settings and cannot be changed on an existing\nsession; `session.inboundEnabled` / `session.outboundEnabled` report what a session was created with.\n\n### Egress allowlist\n\nRestrict outbound access with `allowDomains` and `allowCidrs`. A session that may only reach PyPI:\n\n```typescript\nconst session = await client.create({\n  allowDomains: [\"pypi.org\", \"*.pypi.org\", \"files.pythonhosted.org\"],\n});\n```\n\n`allowOutbound: false` still blocks everything, regardless of `allowDomains`/`allowCidrs`.\nThe allowlist is checked against the names the sandbox resolves, the TLS server name (SNI), and the plaintext HTTP `Host`.\n`*.example.com` matches one subdomain label and `**.example.com` matches subdomains at any depth; neither matches `example.com` itself.\nConnections can only reach addresses that an allowed name resolved to or that fall in an allowed CIDR; traffic to an allowed CIDR is not inspected unless the sandbox uses outbound secret injection.\nUDP port 443 (HTTP/3, QUIC) is blocked for sandboxes with a domain allowlist, so clients fall back to HTTPS over TCP.\nUnless the sandbox uses outbound secret injection, HTTPS is not decrypted, so another site on the same CDN as an allowed name can be reached by sending its name in the encrypted `Host` header.\nWithout HTTPS interception, other ports remain open to addresses an allowed name resolves to.\nRead the allowlist back from `session.egress`.\n\n### Restricted network\n\nNew sessions in a workspace that hasn't purchased credits can only reach a list of common developer services (package registries, Git hosting, container registries, AI model providers) on TCP ports 80, 443 and 22.\nCreating one returns a `RESTRICTED_NETWORK` warning, and `session.networkMode` is `\"RESTRICTED\"` with `session.networkRestrictionReason` `\"NEVER_PURCHASED\"`; otherwise `networkMode` is `\"FULL\"`.\n`allowDomains` narrows that list: domains outside it are dropped, and create fails when none remain. `allowCidrs` is rejected.\n`session.egress` still returns only the allowlist you passed.\nTo get full network access, purchase credits and create a new session.\n\n### Inspecting HTTPS requests\n\nWith `interceptHttps: true`, the egress proxy terminates the session's HTTPS with a managed CA the guest trusts, and a request whose `Host` differs from the TLS server name gets 421.\nIt requires `allowDomains`.\nThe `httpRules` then decide which requests pass: each HTTP request must match one rule's domains, methods and path, or it gets 403 `egress_http_rule_denied`.\nDomains use the allowlist grammar plus `*`, empty methods match any method, and the path is exact, a prefix, or an RE2 regex that must match the whole escaped path (the query is not matched).\nWithout rules, every request to an allowed domain passes.\n\nRead-only access to package registries, plus `git clone` (but not `git push`) from GitHub:\n\n```typescript\nconst session = await client.create({\n  allowDomains: [\"github.com\", \"codeload.github.com\", \"pypi.org\", \"files.pythonhosted.org\"],\n  interceptHttps: true,\n  httpRules: [\n    { domains: [\"github.com\", \"codeload.github.com\", \"pypi.org\", \"files.pythonhosted.org\"], methods: [\"GET\", \"HEAD\"] },\n    { domains: [\"github.com\"], methods: [\"POST\"], pathRegex: \"^/[^/]+/[^/]+(\\\\.git)?/git-upload-pack$\" },\n  ],\n});\n```\n\nWith interception enabled, public traffic is limited to TCP 80/443 through the proxy.\nOther public ports and protocols are blocked by default.\nInterception speaks HTTP/1.1 only, and WebSocket upgrades get 501.\nGit smart HTTP, pip, npm, cargo, Go modules and Maven all work over HTTP/1.1.\nThe CA is installed at `/usr/local/share/ca-certificates/tenki-egress.crt` and added to the system bundle; unless you set them, `NODE_EXTRA_CA_CERTS` points at the CA and `SSL_CERT_FILE` and `REQUESTS_CA_BUNDLE` at the system bundle.\nThe JVM reads none of those: for Maven or Gradle, import the CA into the JVM truststore (`keytool -importcert -cacerts -noprompt -alias tenki-egress -file /usr/local/share/ca-certificates/tenki-egress.crt`) or pass a truststore that has it through `JAVA_TOOL_OPTIONS`.\n\n### Additional public ports\n\nUse `allowedPorts` to allow extra TCP ports with HTTPS interception enabled.\nThe policy accepts up to 64 ports from 1 to 65535.\nDestination and workspace restrictions still apply; ports 80/443 always use the proxy, and DNS stays on the controlled resolver.\nAdditional ports bypass HTTP inspection, so allowing port 22 permits Git over SSH, including pushes.\nTailnet traffic and internal services keep their existing access rules.\n\n```typescript\nconst session = await client.create({\n  allowDomains: [\"github.com\"],\n  interceptHttps: true,\n  allowedPorts: [22],\n});\n```\n\n### Named egress policies\n\nSave a policy once per workspace, from the SDK or with `luxor sandbox egress-policies create`:\n\n```typescript\nconst policy = await client.createEgressPolicy(\"registries\", {\n  allowDomains: [\"github.com\", \"pypi.org\", \"files.pythonhosted.org\"],\n  interceptHttps: true,\n  httpRules: [{ domains: [\"*\"], methods: [\"GET\", \"HEAD\"] }],\n});\n```\n\n`getEgressPolicy`, `listEgressPolicies`, `updateEgressPolicy` and `deleteEgressPolicy` take a name or ID; update and delete need the current `revision` and fail with `Aborted` when another change landed first.\nThen pin policies by name:\n\n```typescript\nconst session = await client.create({\n  egressPolicies: [\"registries\", \"github-read\"],\n  allowDomains: [\"api.example.com\"],\n});\n```\n\nThe server merges the named policies with the inline options: domains, CIDRs and additional ports are combined, HTTPS interception is on if any of them asks for it, and the HTTP rules are concatenated.\nThe merged policy must pass the same checks and limits as an inline one.\nAn unknown name fails the create with `NotFound` naming every missing policy.\nThe session keeps the merged copy, so editing or deleting a named policy later does not change it.\n`session.egress.policyNames` reads the pinned names back, and the other fields of `session.egress` hold the merged policy.\n\nExpose a sandbox port:\n\n```typescript\nconst port = await session.exposePort(3000, { ttlMs: 60 * 60 * 1000, slug: \"my-preview\" });\nconsole.log(port.previewUrl);\n\nconst ports = await session.listExposedPorts();\nawait session.unexposePort(3000);\n```\n\nDial from your program into the sandbox:\n\n```typescript\nconst conn = await session.dial(\"/var/run/docker.sock\");\n// conn has Web Streams: { readable, writable }.\n```\n\nExpose a local host port to the sandbox:\n\n```typescript\nconst tunnel = await session.resilientHostPortTunnel(\"127.0.0.1\", 3000, {\n  sandboxPort: 8080,\n});\n\nconst [address, port] = tunnel.endpoint();\nawait tunnel.close();\n```\n\n## Git\n\n```typescript\nawait session.git.clone(\"https://github.com/org/repo\", { depth: 1, directory: \"/home/tenki/repo\" });\nawait session.git.checkout(\"feature-branch\");\nconst diff = await session.git.diff({ base: \"main\", head: \"HEAD\" });\nconst log = await session.git.log({ maxCount: 10 });\nawait session.git.fetchPR(42, { remote: \"origin\", directory: \"/home/tenki/repo\" });\n```\n\n## Snapshots\n\n```typescript\nconst snapshot = await sandbox.createSnapshotAndWait(session.id, {\n  name: \"after-setup\",\n  expiresAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),\n});\n\nconst restored = await sandbox.create({ snapshotId: snapshot.id });\n```\n\n### Forking a session\n\n`session.fork()` snapshots a running session and starts new sessions that continue from its memory and disk while the source keeps running.\nEach child inherits the source's size, network policy, lifetime settings and tags, and carries `fork_of_session_id` and `fork_snapshot_id` metadata.\n`count` accepts 1 to 10 and defaults to 1.\nChildren are named `<namePrefix>-1` to `<namePrefix>-N`, and an unset prefix derives one from the source name.\n`wait: true` resolves once every child is `RUNNING`.\n\n```typescript\nimport { ForkFailedError } from \"@luxorai/sandbox\";\n\ntry {\n  const children = await session.fork({ count: 3, namePrefix: \"trial\", wait: true });\n  console.log(children.map((child) => child.name)); // trial-1, trial-2, trial-3\n} catch (err) {\n  // Children created before the failure keep running.\n  if (err instanceof ForkFailedError) console.log(err.snapshotId, err.sessions.length);\n  throw err;\n}\n```\n\nThe fork snapshot is a regular snapshot that counts toward snapshot storage.\nA session with attached volumes cannot be forked, because the children would need the source's volume images and only the source can use them.\nDetach the volumes first.\nDelete it once every session started from it has terminated.\n\n## Registry\n\n```typescript\nconst published = await sandbox.publishRegistryImage({\n  fromSnapshotId: snapshot.id,\n  workspaceId: \"ws_...\",\n  name: \"my-image\",\n  tag: \"latest\",\n  visibility: \"private\",\n});\n\nconst resolved = await sandbox.resolveRegistryRef(\"my-image:latest\");\nconst next = await sandbox.create({ image: resolved.resolvedRef });\n\n// Only untagged, non-latest, unshared versions can be deleted.\nawait sandbox.deleteRegistryImageVersion(\n  \"01900000-0000-7000-8000-000000000001\",\n  \"01900000-0000-7000-8000-000000000002\",\n);\n```\n\n## Templates\n\nTemplates are typed, immutable recipes built from a Git context into private digest-addressed images. `TemplateSpec` is a fluent immutable builder: every method returns a new spec, the default base is the Luxor image `sandbox`, and `copy` sources are always relative to the checked-out Git context - nothing is uploaded from your local filesystem.\n\n```typescript\nimport { TemplateSpec } from \"@luxorai/sandbox\";\n\nconst spec = new TemplateSpec()\n  .fromImage(\"sandbox-v2\") // or .fromTemplate(parent) / .fromSnapshot(snapshot)\n  .withGitContext({ repo: \"https://github.com/acme/node-api\", ref: \"main\" })\n  .workdir(\"/home/tenki/app\")\n  .run(\"npm ci\", { name: \"Install dependencies\" })\n  .runtimeEnv({ NODE_ENV: \"production\" })\n  .startArgs([\"npm\", \"start\"], {\n    runAt: \"boot\",\n    readyWhen: [{ http: \"http://localhost:3000/health\" }],\n  });\n\nconst violations = spec.validate(); // local [{ field, message }]; the server stays authoritative\n\nconst template = await sandbox.createTemplate({\n  name: \"node-api\",\n  spec,\n});\n```\n\nBuild it, observing ordered log/progress events. Build secrets are explicit request-time values: they never land in the template, spec hash, provenance, or logs. Interrupting the observer (handler error, AbortSignal, Ctrl-C) stops watching only; cancelling the remote build is always explicit via `cancelTemplateBuild`.\n\n```typescript\nconst build = await sandbox.buildTemplate(template, {\n  buildSecrets: { GITHUB_TOKEN: token },\n  waitForCompletion: true,\n  onEvent(event) {\n    // Discriminated union, delivered in order; async handlers are awaited sequentially.\n    if (event.type === \"log\") process.stdout.write(event.data);\n    else console.log(`[${event.phase}] ${event.state}`, event.step?.label);\n  },\n});\n\nconsole.log(build.specHash, build.image?.digestRef); // e.g. acme/node-api@sha256:...\n```\n\nA waited build failure throws `TemplateBuildFailedError` carrying the final build. `waitForTemplateBuild(build)` reconnects to an in-flight build with the same ordered, deduplicated event delivery.\n\nLaunch sandboxes from the built image. `waitForRuntime: true` also waits for the declared runtime to become READY; runtime failure leaves the sandbox RUNNING and throws `TemplateRuntimeFailedError` carrying the session and redacted failure.\n\n```typescript\nconst session = await sandbox.create({ image: build.image, waitForRuntime: true });\n```\n\nFilesystem snapshots (the default) capture the built filesystem and start the runtime on boot. `snapshotMode: \"memory\"` (with `runAt: \"build\"` and a `readyWhen` deadline) captures the running process for near-instant restore; when memory restore is unavailable or incompatible the platform cold-boots the same image rootfs, starts the declared runtime, and waits on the same `readyWhen` contract - never silently falling back to a clean base image.\n\n```typescript\nconst memorySpec = new TemplateSpec()\n  .withGitContext({ repo: \"https://github.com/acme/node-api\", ref: \"main\" })\n  .run(\"npm ci\")\n  .startArgs([\"npm\", \"run\", \"dev\"], {\n    runAt: \"build\",\n    snapshotMode: \"memory\",\n    readyWhen: { timeoutSeconds: 60, checks: [{ port: 3000 }] },\n  });\n```\n\nSpecs round-trip through strict authored JSON with `JSON.stringify(spec)` / `TemplateSpec.fromJSON(json)`. Enum fields use short lowercase values: checkout `mode` is `\"contents\"` or `\"directory\"`; runtime `runAt`, `restartPolicy`, and `snapshotMode` use values such as `\"build\"`, `\"on-failure\"`, and `\"memory\"`. Existing full protobuf enum names remain accepted, unknown fields are rejected, and the canonical spec hash is computed server-side only.\n\n## SSH\n\nUse `session.run()` for normal command execution. `session.ssh()` is a low-level,\nbidirectional byte transport for SSH protocol implementations that accept a\ncustom stream. It does not open a shell or execute command text itself.\n\nA custom SSH integration needs a caller-owned key pair; the private key stays\nwith your application. Pass the public key in OpenSSH `authorized_keys` format\nto Luxor, then authenticate the SSH client with the matching private key and\nreturned certificate. The minimal SDK sequence is:\n\n```typescript\nconst credentials = await sandbox.issueSandboxSSHCert(session.id, publicKey);\nconst transport = await session.ssh();\ntry {\n  // Adapt transport.read(), write(), and close() to your SSH client.\n  // Authenticate with the matching private key and credentials.sshCert.\n} finally {\n  transport.close();\n}\n```\n\n`credentials.expiresAt` is the absolute certificate expiry.\n`credentials.renewalAfterMs` is an optional elapsed-time hint for minting a new\ncertificate before opening a later connection. `credentials.permissions`\nreports the SSH features allowed for the certificate.\n\nFor OpenSSH, save `credentials.sshCert` beside the private key as\n`<key>-cert.pub`, or pass it with `CertificateFile`. OpenSSH cannot consume\n`session.ssh()` directly because the SDK transport is not a TCP socket; it\nrequires a transport adapter such as a ProxyCommand.\n\nGateway selection is automatic. Most users should not set `gatewayAddress` or\n`LUXOR_SANDBOX_GATEWAY_URL` (or `TENKI_SANDBOX_GATEWAY_URL`); they are advanced overrides for environments with\na custom SSH gateway address. Setting either disables automatic selection.\n`sshAuthorizedKeys` installs public keys inside the sandbox, but connections\nthrough Luxor's SSH gateway also require a short-lived certificate from\n`issueSandboxSSHCert`.\n\n## Identity\n\n```typescript\nconst me = await sandbox.whoAmI();\nconsole.log(\n  me.ownerId,\n  me.workspaces.map((w) => w.id),\n);\n```\n\n## Error Handling\n\nAll SDK errors extend `SandboxError`:\n\n```typescript\nimport { SandboxError } from \"@luxorai/sandbox\";\n\ntry {\n  await session.run([\"false\"]);\n} catch (err) {\n  if (err instanceof SandboxError) {\n    console.error(err.message);\n  }\n}\n```\n\n## Size Constants\n\n```typescript\nimport { GB, GiB, KB, KiB, MB, MiB, TB, TiB } from \"@luxorai/sandbox\";\n```\n\n## Workspace secrets\n\n`WorkspaceClient` exposes workspace resources through `workspace.secrets`, independently of sandbox Sessions:\n\n```typescript\nimport { WorkspaceClient } from \"@luxorai/sandbox\";\n\nawait using workspace = new WorkspaceClient({ workspaceId });\nconst secret = await workspace.secrets.create(\"TOKEN\", valueBytes, { description: \"Deploy token\", requestId });\n```\n\nAuthentication uses `LUXOR_AUTH_TOKEN` or `LUXOR_API_KEY` (`TENKI_AUTH_TOKEN` and `TENKI_API_KEY` are still accepted).\nSet `baseUrl` or `LUXOR_CLOUD_API_URL` (or `TENKI_CLOUD_API_URL`) to override the cloud API endpoint independently of sandbox\nconfiguration. Set `workspaceId` once on the client. An omitted or empty workspace ID uses the authenticated workspace key's scope;\nother callers must specify one.\n\n`create`, `update`, `get`, `list`, `listVersions`, `revoke`, and `delete` return metadata only.\nValues are `Uint8Array`; an empty array creates an empty value. A string third argument to `create`\nis the request ID. Update, revoke, and delete require `expectedRevision`. Update changes only what\nyou set, at least one of `value`, `activeVersion`, `description`, or `availability`: a new value or an\nexisting `activeVersion` becomes active and restores a revoked secret, while description and\navailability changes don't. An empty `description` clears it. Revoking without `version` revokes\nevery version. Revoking the active version revokes the secret until a new value or an unrevoked\nversion is made active.\n\n`create(\"TOKEN\", valueBytes, { repository: \"acme/api\" })` creates a secret that only Luxor CI jobs in\nthat repository receive, replacing a workspace secret with the same name. The repository must be\nconnected to the workspace; `listRepositories` pages through the connected repositories and can\nfilter them with `search`. `update` moves a secret with `availability: \"workspace\"`, or with\n`availability: \"repository\"` and a `repository`; `list` filters by the same `availability` and `repository`.\n`repository` is undefined on workspace secrets. Managed runtimes and secret policies use workspace\nsecrets only.\n\nMutations generate a request ID when none is supplied. For retries after an\nuncertain result, supply and reuse the same request ID and identical arguments.\nThe SDK does not retry mutations automatically. `WorkspaceSecretError.code`\npreserves the RPC status, including revision conflicts.\n\nWorkspace secrets can be referenced by a managed runtime without passing their values:\n\n```typescript\nconst runtime = new TemplateSpec().start(\"npm start\", {\n  secretEnv: { API_TOKEN: \"app-token\" },\n});\nconst session = await sandbox.create({\n  image: \"team/base:v1\",\n  directRuntime: runtime,\n  secretOverrides: { \"app-token\": \"development-token\" },\n});\n```\n\nThe same `secretEnv` option works with `startArgs` and `processCompose` in stored\ntemplates. Names resolve in the launching workspace. `directRuntime` accepts a\nruntime-only `TemplateSpec` and starts at boot; use create options for the image\nand resources. Secret targets cannot also appear in ordinary runtime/session env.\n`session.hasRuntimeSecrets` and `snapshot.hasRuntimeSecrets` are read-only markers.\n\n`variableEnv` maps targets to workspace variables of the launching workspace the\nsame way, for example `{ API_BASE_URL: \"PROD_API_BASE_URL\" }`. Variable values are\nnot secret, so keep sensitive values in `secretEnv`. A target can come from only\none of the runtime env, the session env, `secretEnv`, and `variableEnv`.\n\n## Workspace variables\n\n`workspace.variables` manages workspace variables: plain-text configuration for Luxor CI jobs\n(`${{ vars.NAME }}`) and sandboxes. It shares the client, authentication, and workspace scope with\n`workspace.secrets`:\n\n```typescript\nconst variable = await workspace.variables.create(\"API_URL\", \"https://api.acme.dev\", {\n  repository: \"acme/web\",\n  description: \"Staging API\",\n});\nawait workspace.variables.update(variable.id, { value: \"https://api.acme.com\" });\n```\n\n`create`, `update`, `get`, `list`, and `delete` return the value, a string of up to 64 KiB that can be\nempty or multiline, so keep credentials in secrets. `update`, `get`, and `delete` take the ID that\n`create` and `list` return; a name cannot change. `update` changes only what you set, at least one of\n`value`, `description`, `availability`, or `repository`; an empty `description` clears it. There are no versions or\nrequest IDs: the last write wins, and a deleted variable cannot be restored. `repository`,\n`availability`, and `listRepositories` work as they do for secrets. `WorkspaceVariableError.code`\npreserves the RPC status, for example `Code.AlreadyExists` when the name is taken.\n\n## Runtime secret files\n\nPut `secrets://API_TOKEN` in any text file, regardless of filename or extension. Built templates capture unresolved source text from the guest image; direct launches supply content read on the caller. Values resolve from the launching workspace before managed startup.\n\n```typescript\nimport { readFile } from \"node:fs/promises\";\n\n// Built template: source is already inside the image.\nconst spec = new TemplateSpec().start(\"python3 /app/server.py\", {\n  secretFiles: [{ source: \"/app/env.tpl-sandbox\", path: \"/app/.env\" }],\n});\n\n// Direct launch: read on the caller and upload unresolved text.\nconst session = await client.create({\n  image: \"my-template:latest\",\n  secretFiles: [{ path: \"/app/.env\", content: await readFile(\"./env.tpl-sandbox\", \"utf8\") }],\n  secretOverrides: { API_TOKEN: \"STAGING_API_TOKEN\" },\n});\n```\n\nRendering performs one literal pass, without YAML/JSON/dotenv escaping, environment expansion, or recursive substitution. A backslash before a marker escapes it. Authors must ensure the actual consumer accepts the result; do not shell-source rendered secret text. Use a raw reference for exact-byte credentials, including binary values.\n\nAllowed destinations are under `/home/tenki/`, `/home/sandbox/`, `/workspace/`, or `/app/`. Files are private, owned by tenki, and replaced atomically. Duplicate destinations, unsafe paths, and missing references fail startup. Limits: 64 KiB per secret, 256 KiB per source/output file, 1 MiB total source/output, 32 files, and 64 references across environment and files.\n\nGuest values remain frozen across retries, restart, and ordinary resume; replacement Sessions adopt updates. Escape a file marker as `\\secrets://NAME` to preserve `secrets://NAME` for separately authorized outbound injection; the marker grants no authority by itself. See [the file delivery contract](../../../docs/sandbox-secret-files.md) for lifecycle and path details.\n\n## Transparent HTTPS secrets\n\nCreate `API_TOKEN` through the workspace Secrets client, then save and select a request policy:\n\n```typescript\nawait workspaceClient.secrets.policies.create(\"example\", [\n  {\n    origin: \"https://api.example.com\",\n    methods: [\"POST\"],\n    pathPrefix: \"/v1/\",\n    header: \"Authorization\",\n    secrets: [\"API_TOKEN\"],\n  },\n]);\nconst sandbox = await client.create({ secretPolicies: [\"example\"] });\n```\n\nUse `secretPolicies` in template `start`, `startArgs`, or `processCompose` options for required policies.\n\nSend `Authorization: Bearer secrets://API_TOKEN` from the sandbox. The reference uses the actual secret name. No alias or injection override is required. Rules can instead select a `queryParameter` or `jsonPointer`, with one location per rule and one or more names in `secrets`.\n\nPolicies belong to a workspace and apply only to sessions that select them. Template-required names resolve in the launching workspace; explicit selections add to them. Policy edits and deletion affect subsequent requests on attached sessions. Rotation uses the active value, and revoked or deleted secrets are denied. Deleting and recreating a name does not retarget existing bindings.\n\nEvery referenced location must match a selected policy before the request is forwarded. Existing egress rules still apply. An unavailable resolver fails closed. Ordinary values and absent fields remain unchanged.\n\nHTTPS interception requires a capable node and guest trust in the managed CA. Permit only trusted origins and paths: an upstream that echoes credentials can expose a value to the guest. See the [workspace secrets guide](../../../docs/src/product/workspace-secrets.md) for location limits and lifecycle behavior.\n\n## Session injection credentials\n\nThis feature is gated per workspace (`sandbox-session-credentials`); it defaults to off.\nUse credential create explicitly, even with an empty list, to bind session ownership atomically.\nOrdinary create and the existing GitHub token option keep their current behavior. There is no\nfallback to guest environment variables or to ordinary create if the RPC is unavailable.\n\nRules specify an origin, methods, path prefix, and destination header. Values are bytes;\nreturned metadata contains only credential ID, name, revision, and revoked status. Keep the\nreturned revision for conditional updates: omitted means unconditional, zero means create-only,\nand a positive revision means compare-and-set. Revoke accepts the same revision presence.\n\nThe guest sends `secrets://NAME` in the configured header. For git, store the **base64-encoded\nbytes of `user:token`** and configure the guest header as `Authorization: Basic secrets://GIT`.\nThe proxy replaces the marker with the pre-encoded value; it does not decode Basic credentials.\nThe examples below assume `gitCredentialBytes` (Python: `git_credential_bytes`) already contains\nthat base64 text, obtained outside the guest.\n\n```ts\nimport { InjectionCredentialInput } from \"@tenkicloud/sandbox\";\n\nconst input = new InjectionCredentialInput(\"GIT\", gitCredentialBytes, [\n  {\n    origin: \"https://github.com\",\n    methods: [\"GET\", \"POST\"],\n    pathPrefix: \"/your-org/your-repo.git\",\n    header: \"Authorization\",\n  },\n]);\nconst { session, credentials } = await client.createWithInjectionCredentials([input], { name: \"review\" });\nconst updated = await session.setInjectionCredential(input, credentials[0].revision);\nawait session.revokeInjectionCredential(\"GIT\", updated.revision);\n```\n\nPass `undefined` (or omit the argument), `0`, or a positive integer for the three revision states.\nUse the input class to keep values out of JSON and debug inspection. Create accepts the normal\noptions and uses the normal readiness wait; `WaitReadyFailedError` and `TemplateRuntimeFailedError`\nretain the admitted session for cleanup. On credential creates, their optional `credentials` field\ncontains returned metadata, including revisions after a readiness failure. Template runtime failure\ndetails do not include credential metadata, so that field is empty for those failures.\n\n## GitHub token injection (opt-in)\n\n```typescript\nconst session = await client.create({ githubToken: token, githubTokenInjection: true });\nawait session.rotateGitHubToken(replacementToken);\n```\n\nThe option defaults to false: absent or false preserves the existing raw `GH_TOKEN` and\n`GIT_TOKEN` environment behavior. Opting in requires the workspace feature\n`sandbox-session-credentials` and nodes supporting HTTPS interception. All of the\nsession's HTTPS traffic is intercepted, including traffic to unrelated hosts; clients\nmust trust the guest CA and be compatible with the interceptor. Unsupported servers,\ndisabled features, or unavailable capable nodes fail creation without falling back to\nraw tokens. RPC error status is preserved through the SDK's existing redacted errors.\n\nThe guest sees `GH_TOKEN=secrets://SDK_GITHUB_API` and the same `GIT_TOKEN` value.\nThe SDK stores a raw API credential named `SDK_GITHUB_API` and a pre-encoded Git\ncredential named `SDK_GITHUB_GIT`. Neither actual value is placed in the guest environment.\n`gh` uses the API placeholder; SDK Git helpers and direct `git clone`, `git fetch`,\nand `git push` inherit `GIT_CONFIG_*` session environment settings for\n`Authorization: Basic secrets://SDK_GITHUB_GIT`, HTTP/1.1, an empty credential helper,\nand disabled redirects, scoped to `https://github.com/`. Do not override those settings\nor use `gh auth setup-git` / `gh auth login` to replace this configuration. Processes\nthat discard the session environment must supply the same Git settings themselves.\n\nOnly github.com is supported; a non-default `GH_HOST` is rejected. No token is granted\nto Enterprise, redirects, LFS storage hosts, or other hosts. Repositories are selected\nby Git helpers after creation, so credential rules are host-scoped: API methods\nGET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS at `https://api.github.com/`, and GET/POST at\n`https://github.com/`. The current injection selector only supports path prefixes, so\nit cannot restrict an unknown repository to the `info/refs`, `git-upload-pack`, and\n`git-receive-pack` suffixes. The Git rule covers those endpoints but also other paths\non that host. Use explicit injection credentials with repository path prefixes if\nnarrower scope is required.\n\nA nonempty token is required. Caller-supplied `GIT_CONFIG*` environment entries are\nrejected to prevent ambiguous authentication. Create-time `cloneRepoUrl` (Go\n`WithCloneRepo`, Python `clone_repo_url`) is rejected with this option because older\nnode-side cloning embeds the token in a URL; call the SDK Git clone helper after\ncreation instead. The option does not rewrite credentials independently supplied in\nother environment variables, URLs, setup scripts, or template secrets.\n\nRotation is for sessions created with this opt-in. It updates API then Git credentials\nusing two audited RPCs and does not change the guest environment. The updates are not\natomic: on failure, the first may already have succeeded. Retry the method with the\nsame replacement token to update both; no automatic retry or environment fallback occurs.\nKeep the `SDK_GITHUB_API` and `SDK_GITHUB_GIT` names reserved when combining this option\nwith explicit injection credentials.\n\n## Managed tailnet DNS\n\nSet `tailnet.acceptDns: true` to resolve short MagicDNS names through the attachment.\nThis requires a guest with the unchanged Luxor systemd-resolved configuration.\nOmitting the option preserves existing DNS behavior; explicit `false` disables managed short-name search.\nManaged DNS must be enabled for your workspace.\n","readmeFilename":"README.md"}