{"_id":"@ariacompute/ariaengine-ts","name":"@ariacompute/ariaengine-ts","dist-tags":{"latest":"1.19.0"},"versions":{"1.19.0":{"name":"@ariacompute/ariaengine-ts","version":"1.19.0","description":"TypeScript/Node SDK for Aria Engine","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p .","test":"node --test test/binding.test.mjs test/download.test.mjs"},"license":"MIT","dependencies":{"koffi":"^2.8.0"},"devDependencies":{"@types/node":"^20.11.0","typescript":"^5.4.0"},"_id":"@ariacompute/ariaengine-ts@1.19.0","gitHead":"36859bb07cd3e8673af8e234ccb3b8bc49077ac2","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-CqOkiaLCZeAJqQRqZ9kfXJGWpJ0cAO1aNGpU6vhNruOTHN2sc2HQe7fcywTOguBv6YywV3r5M098S77xBXAc4Q==","shasum":"549973f6b5acb3d63ef7cda299bb1bb3dd8dc417","tarball":"https://registry.npmjs.org/@ariacompute/ariaengine-ts/-/ariaengine-ts-1.19.0.tgz","fileCount":4,"unpackedSize":32781,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC3a/vFUnaKEt8AK3akfDSqTTCFJodnhuWN+gMw3eZZJgIgNRdsyfDV8GpYdx8cyFdVX5b8lKxajYgKGpzFTSxCy+8="}]},"_npmUser":{"name":"ariacompute.jia","email":"jia@ariacompute.com"},"directories":{},"maintainers":[{"name":"ariacompute.jia","email":"jia@ariacompute.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ariaengine-ts_1.19.0_1788311674677_0.030603404799377065"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-02T01:14:34.576Z","1.19.0":"2026-09-02T01:14:34.813Z","modified":"2026-09-02T01:14:35.353Z"},"maintainers":[{"name":"ariacompute.jia","email":"jia@ariacompute.com"}],"description":"TypeScript/Node SDK for Aria Engine","license":"MIT","readme":"# @ariacompute/ariaengine-ts\n\n```bash\nnpm i @ariacompute/ariaengine-ts\n```\n\n`libariaengine_ffi` is resolved as `ARIAENGINE_FFI_LIB` → package-bundled `dist/lib/` → `~/.ariacompute/lib/` (same as `ariaengine upgrade`). If none exist, `Engine.open` downloads the latest stable `libariaengine_ffi_{ver}_{os}.tar.gz` from regional Releases. `ARIAENGINE_FFI_LIB` remains an optional override.\n\n```ts\nimport { Engine } from \"@ariacompute/ariaengine-ts\";\nconst eng = new Engine(\"/path/to/bundle\");\nconsole.log(eng.complete([{ role: \"user\", content: \"hi\" }]));\neng.close();\n```\n\n## Auto-download by model name\n\n`Engine.open(modelRef, { token, site })` accepts a local bundle path **or** an\nAria model name (e.g. `gemma-4-e2b-it_q4`). A value containing `/` or already on\ndisk is loaded directly; otherwise the SDK downloads it from the regional public\nhub (same as `ariaengine download`: `.com` → Hugging Face, `.cn` → ModelScope;\n`site` defaults to `https://ariacompute.com`) into `~/.ariacompute/models/{model}`\nand then loads it. Dashboard is not used. A Dashboard `sk-` / `bfvk-` token is\nignored for hub auth. Token is optional for public models. A valid cached bundle\nis reused without re-downloading.\n\nGated files: call `eng.setup({ hf_token })` (`.com`) or `eng.setup({ modelscope_api_token, site_url })` (`.cn`) **before** `open`. Same keys as `ariaengine setup`. Instance-only; does not write `engine.yml`. If omitted, the SDK reads `~/.ariacompute/engine.yml`.\n\n```ts\nconst eng = await Engine.open(\"gemma-4-e2b-it_q4\");\n\nconst gated = new Engine();\ngated.setup({ hf_token: \"hf_...\" });\nawait gated.open(\"gemma-4-e2b-it_q4\");\n```\n","readmeFilename":"README.md","_rev":"1-20ee4550d6bced114a79add5dcb55b0f"}