{"_id":"@afterquery/compute","_rev":"12-0cc98abcd33b1adb6d9f7951482b99da","name":"@afterquery/compute","dist-tags":{"latest":"0.6.1"},"versions":{"0.1.0":{"name":"@afterquery/compute","version":"0.1.0","license":"MIT","_id":"@afterquery/compute@0.1.0","maintainers":[{"name":"sakshamaq","email":"saksham@afterquery.com"},{"name":"boatsidejawn","email":"agustin@afterquery.com"}],"homepage":"https://github.com/AfterQuery/compute#readme","bugs":{"url":"https://github.com/AfterQuery/compute/issues"},"dist":{"shasum":"bff95c0b15dcdd51da379f6c9016cb8ee314e9a9","tarball":"https://registry.npmjs.org/@afterquery/compute/-/compute-0.1.0.tgz","fileCount":14,"integrity":"sha512-mytayJU/2Mw19Z0uTj4PTapg87TcEBSD1arIBWEmPEbBmsQgvqDXPz8NmsUWI5rNHv6Yniqaz2xLdlMCF9lEYQ==","signatures":[{"sig":"MEUCIQD+M4PYrkJgFIxY4qCTULPyoEKzgO4ZQyzhM7v0CbE8xwIgVGswX23zU5jp21uM8/CKmTqvMAq/p07Z0u2Uh8zt2tA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48334},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"415d294dda01e07030ae4fa3dc5d0d3896fce22d","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"sakshamaq","email":"saksham@afterquery.com"},"repository":{"url":"git+https://github.com/AfterQuery/compute.git","type":"git","directory":"packages/sdk"},"_npmVersion":"11.11.0","description":"TypeScript SDK for the AfterQuery compute API — isolated sandboxes for AI agent pipelines","directories":{},"_nodeVersion":"25.8.1","dependencies":{"ws":"^8.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","@types/ws":"^8.5.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/compute_0.1.0_1783467326550_0.7896684298062875","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@afterquery/compute","version":"0.2.0","license":"MIT","_id":"@afterquery/compute@0.2.0","maintainers":[{"name":"sakshamaq","email":"saksham@afterquery.com"},{"name":"boatsidejawn","email":"agustin@afterquery.com"}],"homepage":"https://github.com/AfterQuery/compute#readme","bugs":{"url":"https://github.com/AfterQuery/compute/issues"},"dist":{"shasum":"906631b7d507739aec89321d0c98850393910372","tarball":"https://registry.npmjs.org/@afterquery/compute/-/compute-0.2.0.tgz","fileCount":14,"integrity":"sha512-cqCUnidT+YPGgWqXrR0UV9dFndsLMz3Mzm1O8arB/BkLitI0MjKm3XBg6TtR5Fj5pcBpDXs0hDGTO3XDN2xVGg==","signatures":[{"sig":"MEYCIQChflcf/Vaf+S2scqxXHOS+29IjERnD01cZZBUh0TsWygIhAOXvv/CHvqKzRQ5I37UwFgzBsSiUcTOv7NZyhR8MwTrF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54528},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"11888eaacf66ed66ae15aa516672e726f8aed1ed","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"sakshamaq","email":"saksham@afterquery.com"},"repository":{"url":"git+https://github.com/AfterQuery/compute.git","type":"git","directory":"packages/sdk"},"_npmVersion":"11.11.0","description":"TypeScript SDK for the AfterQuery compute API — isolated sandboxes for AI agent pipelines","directories":{},"_nodeVersion":"25.8.1","dependencies":{"ws":"^8.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","@types/ws":"^8.5.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/compute_0.2.0_1783580184427_0.8416294079422051","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@afterquery/compute","version":"0.4.0","license":"MIT","_id":"@afterquery/compute@0.4.0","maintainers":[{"name":"sakshamaq","email":"saksham@afterquery.com"},{"name":"boatsidejawn","email":"agustin@afterquery.com"}],"homepage":"https://github.com/AfterQuery/compute#readme","bugs":{"url":"https://github.com/AfterQuery/compute/issues"},"dist":{"shasum":"d9e03df59205fbe3a12d74c69cc53e6302727a08","tarball":"https://registry.npmjs.org/@afterquery/compute/-/compute-0.4.0.tgz","fileCount":15,"integrity":"sha512-0GIB9VvF7RyZ4wiip+ajyY00ztzpyZThdcdCGw5L8F3sMWEBlRxBilICHMpq6TDr5MyChYAvPgqi3/XCNai6zQ==","signatures":[{"sig":"MEQCICx5P2zBDhCO+rjLXEOXihuzv0xzMVKI3z0V54LROQHEAiAz9HZ2ZzksI4W6xzOwdMjjp9f+2Tpa0CeiCjAZ9XaZjA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72825},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"09e544a6a415b90b299956ab214e1c9b3bbc910b","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest","test:node18":"node scripts/node18-smoke.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"sakshamaq","email":"saksham@afterquery.com"},"repository":{"url":"git+https://github.com/AfterQuery/compute.git","type":"git","directory":"packages/sdk"},"_npmVersion":"11.11.0","description":"TypeScript SDK for the AfterQuery compute API — isolated sandboxes for AI agent pipelines","directories":{},"_nodeVersion":"25.8.1","dependencies":{"ws":"^8.18.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","@types/ws":"^8.5.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/compute_0.4.0_1786400264919_0.8712080728722029","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@afterquery/compute","version":"0.4.1","license":"MIT","_id":"@afterquery/compute@0.4.1","maintainers":[{"name":"sakshamaq","email":"saksham@afterquery.com"},{"name":"tylerbakke","email":"tyler@afterquery.com"},{"name":"aryaf","email":"arya@afterquery.com"},{"name":"igorafterquery","email":"igor@afterquery.com"}],"homepage":"https://github.com/AfterQuery/compute#readme","bugs":{"url":"https://github.com/AfterQuery/compute/issues"},"dist":{"shasum":"9dc8d8666f234db929d281be17428604b635f701","tarball":"https://registry.npmjs.org/@afterquery/compute/-/compute-0.4.1.tgz","fileCount":15,"integrity":"sha512-mo3s8Ivp1kVYsjVxv9NF1mvejZ9tQyyo4tj4slmnOim9fNM6xWfV/gfc8AurfUcvk1X31yRxflTe5WPLtBPYVw==","signatures":[{"sig":"MEQCIAp0rySwDtT8odOkEKtRCJXWF8ZDhW6hwWUjCD7gi2jbAiBczxFtV7XnBM3fLILdO/YpoDJ9+0L5qWkES7QQM+OCLA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCOYeOgleX6WKtHvuB+tvQ31OO7o4ohoEfdisSiQcONJwIhALAFqJJ7EIfD/AyajdRWbhnyICud0ZNZaVjgZHpDMoJp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75753},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"52a8c7e74d9957f50d464def75740e5d5e201d28","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest","test:node18":"node scripts/node18-smoke.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"sakshamaq","email":"saksham@afterquery.com"},"repository":{"url":"git+https://github.com/AfterQuery/compute.git","type":"git","directory":"packages/sdk"},"_npmVersion":"11.11.0","description":"TypeScript SDK for the AfterQuery compute API — isolated sandboxes for AI agent pipelines","directories":{},"_nodeVersion":"25.8.1","dependencies":{"ws":"^8.18.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","@types/ws":"^8.5.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/compute_0.4.1_1789432436664_0.8563499082066872","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@afterquery/compute","version":"0.5.0","license":"MIT","_id":"@afterquery/compute@0.5.0","maintainers":[{"name":"sakshamaq","email":"saksham@afterquery.com"},{"name":"aqbot","email":"bot+npm@afterquery.com"},{"name":"tylerbakke","email":"tyler@afterquery.com"},{"name":"aryaf","email":"arya@afterquery.com"},{"name":"igorafterquery","email":"igor@afterquery.com"}],"homepage":"https://github.com/AfterQuery/compute#readme","bugs":{"url":"https://github.com/AfterQuery/compute/issues"},"dist":{"shasum":"a973492e485ca1add0d3ffaca62e89a048afe815","tarball":"https://registry.npmjs.org/@afterquery/compute/-/compute-0.5.0.tgz","fileCount":15,"integrity":"sha512-k0T6vh1ktD+oNr9Cv8e6/kJbqu4Kk6w/mHP1qEtbH1vr0/u6lnYzDBodDlcee18IIrkImgLAXh+X7PqfGBDj6w==","signatures":[{"sig":"MEUCIQCA5IQIIkqL+pSsXAz8zhWtfnte8n3lH/gSNsyToMsrHwIgKw3+oMY6t/nX47kHZHsE7pubc0Infm8eMdjkB3LJByk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIDbqJ7JOjwv1lSsdpQIkZNB8DwN8fmDJnGn1AUkG/8PCAiEAz2NijfF8qHaJggzEXknyAnMaWAlSpnWMHlX0jhy7/PE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81490},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"40f48eddd13ec9dd795f887044510cd34b211cac","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest","test:node18":"node scripts/node18-smoke.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"sakshamaq","email":"saksham@afterquery.com"},"repository":{"url":"git+https://github.com/AfterQuery/compute.git","type":"git","directory":"packages/sdk"},"_npmVersion":"11.11.0","description":"TypeScript SDK for the AfterQuery compute API — isolated sandboxes for AI agent pipelines","directories":{},"_nodeVersion":"25.8.1","dependencies":{"ws":"^8.18.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","@types/ws":"^8.5.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/compute_0.5.0_1789550299030_0.8712107484783815","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@afterquery/compute","version":"0.6.0","license":"MIT","_id":"@afterquery/compute@0.6.0","maintainers":[{"name":"sakshamaq","email":"saksham@afterquery.com"},{"name":"aqbot","email":"bot+npm@afterquery.com"},{"name":"tylerbakke","email":"tyler@afterquery.com"},{"name":"aryaf","email":"arya@afterquery.com"},{"name":"igorafterquery","email":"igor@afterquery.com"}],"homepage":"https://github.com/AfterQuery/compute#readme","bugs":{"url":"https://github.com/AfterQuery/compute/issues"},"dist":{"shasum":"e367b2318b043477c216cb87ced63dc3af0da9f4","tarball":"https://registry.npmjs.org/@afterquery/compute/-/compute-0.6.0.tgz","fileCount":15,"integrity":"sha512-QCOvumj0LauXAw7nFsqJVjdgOQUFDvH084AVcb2XReyQGmGVL3VG3snb3kLJI15IsvLuoD8YJd0ADzhhuiPRaQ==","signatures":[{"sig":"MEQCIAVx23m63KIGZkOVzlSJAGB7ClJZvl1CdFdrpSGL/FsUAiBqWCiyW2r139+Gn57Xt2RsMarsMl1MP3hHVZitDVt5WQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIFdPm72sTvwSX1SwYnrThGtAP+p2+Uu6qd3bhIAQUwj9AiA2T7gHEPRGJSxhg7ewsUuQinlWX+niyfQU9i7Ihfhf9g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92493},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"6a21892e4762664ae24f315493cca82034f69656","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest","test:node18":"node scripts/node18-smoke.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"sakshamaq","email":"saksham@afterquery.com"},"repository":{"url":"git+https://github.com/AfterQuery/compute.git","type":"git","directory":"packages/sdk"},"_npmVersion":"11.11.0","description":"TypeScript SDK for the AfterQuery compute API — isolated sandboxes for AI agent pipelines","directories":{},"_nodeVersion":"25.8.1","dependencies":{"ws":"^8.18.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","@types/ws":"^8.5.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/compute_0.6.0_1789599174921_0.9143233508640474","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"_id":"@afterquery/compute@0.6.1","dist":{"shasum":"81c6d7c39029ed77124f89e5f698b6e92beb2ef3","tarball":"https://registry.npmjs.org/@afterquery/compute/-/compute-0.6.1.tgz","fileCount":9,"integrity":"sha512-PbcYm7VIiHzjNxfczse9/kyqzmarel2N6kGl5H/d2mKuAmCCWer2X9sQm67jnKuPw9a6RaADX2pEugN7LPLgWA==","signatures":[{"sig":"MEUCIHyFKFStt0x6jP+Pbxl2AfERlm2tgIGl9zSU2ouR+o5OAiEAt0CsFGDjY6U01cD1uNqfqWMKYtymLZV9EAaZgQkTaT0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC0WvbHjhRjHjUv5BlJ5HUKwlDEtmhnC+c7JlQ/MFP7iAiAOrhPmAT7sPv7wfT59UIigWCQCsEZzDt0CHDaM0kbb4w=="}],"unpackedSize":55374},"main":"dist/index.js","name":"@afterquery/compute","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"170a2e6d5152ec4912bb26d8eb29e1d9212e73c0","license":"MIT","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest","test:node18":"node scripts/node18-smoke.mjs","prepublishOnly":"npm run build"},"version":"0.6.1","_npmUser":{"name":"sakshamaq","email":"saksham@afterquery.com"},"homepage":"https://compute.afterquery.com/docs","_npmVersion":"11.11.0","description":"TypeScript SDK for the AfterQuery compute API — isolated sandboxes for AI agent pipelines","directories":{},"maintainers":[{"name":"sakshamaq","email":"saksham@afterquery.com"},{"name":"aqbot","email":"bot+npm@afterquery.com"},{"name":"tylerbakke","email":"tyler@afterquery.com"},{"name":"aryaf","email":"arya@afterquery.com"},{"name":"igorafterquery","email":"igor@afterquery.com"}],"_nodeVersion":"25.8.1","dependencies":{"ws":"^8.18.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.1","@types/ws":"^8.5.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/compute_0.6.1_1789618579764_0.5400476600378092"}}},"time":{"created":"2026-07-07T23:35:26.390Z","modified":"2026-09-17T04:16:20.121Z","0.1.0":"2026-07-07T23:35:26.700Z","0.2.0":"2026-07-09T06:56:24.562Z","0.4.0":"2026-08-10T22:17:45.069Z","0.4.1":"2026-09-15T00:33:56.818Z","0.5.0":"2026-09-16T09:18:19.112Z","0.6.0":"2026-09-16T22:52:55.022Z","0.6.1":"2026-09-17T04:16:19.856Z"},"license":"MIT","homepage":"https://compute.afterquery.com/docs","description":"TypeScript SDK for the AfterQuery compute API — isolated sandboxes for AI agent pipelines","maintainers":[{"name":"sakshamaq","email":"saksham@afterquery.com"},{"name":"aqbot","email":"bot+npm@afterquery.com"},{"name":"tylerbakke","email":"tyler@afterquery.com"},{"name":"aryaf","email":"arya@afterquery.com"},{"name":"igorafterquery","email":"igor@afterquery.com"}],"readme":"# AfterQuery Compute TypeScript SDK\n\nNode.js 18+ client for the AfterQuery Compute API.\n\n```ts\nimport { Compute, GpuCreateError } from '@afterquery/compute'\n\nconst compute = new Compute({ apiKey: '...' })\n\ntry {\n  const sandbox = await compute.create(\n    {\n      image: 'registry.example.com/team/image:tag',\n      resources: { gpu: { type: 'l4', count: 1 } },\n    },\n    { idempotencyKey: 'job-42-attempt-1' },\n  )\n} catch (error) {\n  if (error instanceof GpuCreateError) {\n    // Preserve these values when reconciling an ambiguous create outcome.\n    console.error(error.idempotencyKey, error.sandboxId)\n  }\n  throw error\n}\n```\n\nGPU creates require a stable idempotency key. If one is not supplied, the SDK\ngenerates one and exposes it through `GpuCreateError` on any create or readiness\nfailure. GPU batch creation is intentionally unsupported.\n\nFor an ambiguous failure without a sandbox ID, call\n`cancelGpuCreate(error.idempotencyKey)` to request cleanup using the stable key.\nThe SDK retries one transport-ambiguous cancellation request with the same key.\n`Deleted` and `Failed` are immutable terminal history; `CleanupPending` means\ncleanup is still converging, so call `cancelGpuCreate` again until a terminal\nstate is returned. A same-key `create` retry may also return a terminal handle\nwithout starting or waiting for a new sandbox.\n\nSee the [repository](https://github.com/AfterQuery/compute) for API setup and\nthe complete SDK surface.\n\n## Cleaning up from inside a sandbox\n\nCode running **inside** a sandbox can delete its own sandbox as its final\nact, so a finished one-shot job never lingers (and Kubernetes never\nrestarts it):\n\n```ts\nimport { Compute } from '@afterquery/compute'\n\n// ... do the work ...\nawait new Compute().selfDelete()   // remove me; nothing left running\n```\n\nNo API key is needed: the platform injects `COMPUTE_SELF_TOKEN` and\n`COMPUTE_API_URL` into every sandbox, and that token can only delete the\nsandbox it belongs to. Outside a sandbox the call throws.\n","readmeFilename":"README.md"}