{"_id":"@alvei/arc-host","_rev":"2-f3add5ac1dd3ca704bbc842aa89f43f0","name":"@alvei/arc-host","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@alvei/arc-host","version":"0.1.0","keywords":["arc","vcs","version-control","server","remote"],"license":"MIT","_id":"@alvei/arc-host@0.1.0","maintainers":[{"name":"amir-azev","email":"admin@alvei.net"}],"homepage":"https://github.com/alvei/riva#readme","bugs":{"url":"https://github.com/alvei/riva/issues"},"bin":{"arc-host":"index.js"},"dist":{"shasum":"359a240b21dd9e9af306dce39370975e9a15e2f5","tarball":"https://registry.npmjs.org/@alvei/arc-host/-/arc-host-0.1.0.tgz","fileCount":6,"integrity":"sha512-48vwT1SRkSJrzQA2Icx3Pv5pG2W4ndKRDoM7dftrMFnyX2E9ZuxYTfM31p9e/7g26ifn900LU+j1NKjq7tcekA==","signatures":[{"sig":"MEQCIHmZNec5c9fyLJ7LDG7aoMzNroHdfgmy6YhKRqyZ6anRAiAXfmHx3dJ75D2CC3/N0RSKwNl4OmyerolPuWsueKR6Gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19386},"main":"index.js","type":"module","engines":{"node":">=22.0.0"},"gitHead":"7ff87d167f7474697653a821ec13264c64a769b7","_npmUser":{"name":"amir-azev","email":"admin@alvei.net"},"repository":{"url":"git+https://github.com/alvei/riva.git","type":"git","directory":"packages/arc-host"},"_npmVersion":"11.9.0","description":"Lightweight Arc VCS remote server — zero dependencies","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/arc-host_0.1.0_1772587286754_0.46944677451100314","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@alvei/arc-host","version":"0.1.1","description":"Lightweight Arc VCS remote server — zero dependencies","type":"module","main":"index.js","bin":{"arc-host":"index.js"},"engines":{"node":">=22.0.0"},"keywords":["arc","vcs","version-control","server","remote"],"homepage":"https://arc-vcs.com","license":"MIT","repository":{"type":"git","url":"git+https://github.com/alvei/riva.git","directory":"packages/arc-host"},"gitHead":"7ff87d167f7474697653a821ec13264c64a769b7","_id":"@alvei/arc-host@0.1.1","bugs":{"url":"https://github.com/alvei/riva/issues"},"_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-tPyQO/XUwOqUfM2ZfGuP65t6ViLTV8YCbz2ANN/B34nrEF3PKr59W/nsO6sljdyfxSQt/9K7OYWZg9VVlMgPxw==","shasum":"055a991cb8f3811f484935f844a520f856db4ef8","tarball":"https://registry.npmjs.org/@alvei/arc-host/-/arc-host-0.1.1.tgz","fileCount":6,"unpackedSize":19423,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCJJrW6U54bngFCzzDKYq/eD/xO0l7+r6oCMfaRqtoyYgIhAKibZs2it8BtMEO412OTPBgoZSqErRn13wQaKjGbvdnO"}]},"_npmUser":{"name":"amir-azev","email":"admin@alvei.net"},"directories":{},"maintainers":[{"name":"amir-azev","email":"admin@alvei.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/arc-host_0.1.1_1772587319457_0.3530921431932277"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-04T01:21:26.622Z","modified":"2026-03-04T01:21:59.772Z","0.1.0":"2026-03-04T01:21:26.898Z","0.1.1":"2026-03-04T01:21:59.619Z"},"bugs":{"url":"https://github.com/alvei/riva/issues"},"license":"MIT","homepage":"https://arc-vcs.com","keywords":["arc","vcs","version-control","server","remote"],"repository":{"type":"git","url":"git+https://github.com/alvei/riva.git","directory":"packages/arc-host"},"description":"Lightweight Arc VCS remote server — zero dependencies","maintainers":[{"name":"amir-azev","email":"admin@alvei.net"}],"readme":"# arc-host\n\nLightweight remote server for [Arc VCS](https://arc-vcs.com). Zero dependencies — uses only Node.js built-ins (`http`, `node:sqlite`, `node:zlib`, `node:crypto`).\n\nRequires **Node.js 22+** (for built-in SQLite support).\n\n## Quick Start\n\n```bash\nnpx @alvei/arc-host --port 3000\n```\n\nOr install globally:\n\n```bash\nnpm i -g @alvei/arc-host\narc-host --port 3000\n```\n\n## Setup\n\n### 1. Create a project\n\n```bash\narc-host project create --name my-project\n# Created project: a1b2c3d4e5f6g7h8 (my-project)\n```\n\n### 2. Generate tokens\n\n```bash\narc-host token create --project a1b2c3d4e5f6g7h8 --role writer\n# Token (writer): arc_...\n\narc-host token create --project a1b2c3d4e5f6g7h8 --role reader\n# Token (reader): arc_...\n```\n\n### 3. Connect from Arc\n\n```bash\narc remote add origin http://localhost:3000 --token arc_...\narc sync\n```\n\n## Server Options\n\n```\narc-host [--port 3000] [--db ./arc-host.db]\n```\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--port` | `3000` | HTTP port |\n| `--db` | `./arc-host.db` | SQLite database path |\n\n## Auth Roles\n\n| Role | Permissions |\n|------|-------------|\n| `reader` | Fetch checkpoints, blobs, refs |\n| `writer` | Reader + push checkpoints, blobs, update branches, create tags |\n| `owner` | Writer + admin (future: delete projects, manage tokens) |\n\n## API\n\nAll endpoints require `Authorization: Bearer <token>` except `/health`.\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/health` | Health check (no auth) |\n| `GET` | `/api/refs` | List branches and tags |\n| `POST` | `/api/checkpoints/batch` | Fetch checkpoints by ID |\n| `POST` | `/api/checkpoints/have` | Check which checkpoint IDs exist |\n| `POST` | `/api/checkpoints` | Upload checkpoints |\n| `POST` | `/api/blobs/batch` | Fetch blobs by hash |\n| `POST` | `/api/blobs/have` | Check which blob hashes exist |\n| `POST` | `/api/blobs` | Upload blobs |\n| `POST` | `/api/branches/cas` | Compare-and-swap branch tip |\n| `POST` | `/api/tags` | Create a tag |\n\n## How It Works\n\narc-host is a dumb object store. It stores checkpoints and blobs as opaque data — all VCS logic (manifests, diffing, merging) lives in the Arc client. The only \"smart\" endpoint is `/api/branches/cas`, which atomically updates branch tips using compare-and-swap to handle concurrent pushes.\n\nData is stored in a single SQLite database with gzip compression.\n\n## Learn More\n\n- [Arc VCS](https://arc-vcs.com) — checkpoint-based version control\n- [Alvei](https://alvei.com) — the team behind Arc\n","readmeFilename":"README.md"}