{"_id":"@azrtydxb/novamem","_rev":"6-27e880cf5a70f35a156df8c507462af2","name":"@azrtydxb/novamem","dist-tags":{"latest":"1.1.3"},"versions":{"0.1.0":{"name":"@azrtydxb/novamem","version":"0.1.0","license":"MIT","_id":"@azrtydxb/novamem@0.1.0","maintainers":[{"name":"piwi3910","email":"pascal@watteel.be"}],"homepage":"https://github.com/azrtydxb/novamem#readme","bugs":{"url":"https://github.com/azrtydxb/novamem/issues"},"dist":{"shasum":"f219c7a834a4444ffab8ff0c454277977b0848a3","tarball":"https://registry.npmjs.org/@azrtydxb/novamem/-/novamem-0.1.0.tgz","fileCount":6,"integrity":"sha512-jQv+rfb3p8jq1ui16PK0v6H7EIlK/562UyNeFmVl0OoyMhWVKA30iDSdtD5Minya7SjXQLG4Cj1nUc5y+/tsFQ==","signatures":[{"sig":"MEQCIC0iPlVoBdIEdfptJGs8KslEh2hnK4ggDZ539pGvtFysAiBxn9PpmCGLCzN5CYI1LuQ9oNYRgrKN/P1dmOES3mBC6A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@azrtydxb%2fnovamem@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28564},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":"./dist/index.js"},"gitHead":"eda7fddc27ce8d12ae1d27259f86e0d2d2a9288c","scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"piwi3910","email":"pascal@watteel.be"},"repository":{"url":"git+https://github.com/azrtydxb/novamem.git","type":"git","directory":"packages/client"},"_npmVersion":"10.8.2","description":"TypeScript client for the novamem memory service","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/novamem_0.1.0_1777910066538_0.12324129476744572","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@azrtydxb/novamem","version":"1.0.0","license":"Apache-2.0","_id":"@azrtydxb/novamem@1.0.0","maintainers":[{"name":"piwi3910","email":"pascal@watteel.be"}],"homepage":"https://github.com/azrtydxb/novamem#readme","bugs":{"url":"https://github.com/azrtydxb/novamem/issues"},"dist":{"shasum":"01893f6cace096cec7c4903e6be76b4cfaa929c9","tarball":"https://registry.npmjs.org/@azrtydxb/novamem/-/novamem-1.0.0.tgz","fileCount":6,"integrity":"sha512-wwkkEHlSHg/pbRIMk2L8XMuqkc0nfEeZrrBH2aIWKWMTFYYgvc0/vHt2Li1nJxli1xgHNoq5qhiUEcDtchSy5w==","signatures":[{"sig":"MEUCICqznocz8o1klRTjfd/IxVh95we3jazSAcTRxhk7P+lMAiEAkOeORI7ZuiGauFhKCorsyfQ5QsaTujZyD7I/QiqSfKE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@azrtydxb%2fnovamem@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28169},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.19"},"exports":{".":"./dist/index.js"},"gitHead":"e4425e89fadc069c657c2f8ecb737b63b49c49c7","scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4879d1b1-9902-4f14-a93a-6a87a4f5948d"}},"repository":{"url":"git+https://github.com/azrtydxb/novamem.git","type":"git","directory":"packages/client"},"_npmVersion":"11.11.0","description":"TypeScript client for the novamem memory service","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/novamem_1.0.0_1777974412446_0.47631130917182873","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@azrtydxb/novamem","version":"1.1.0","license":"Apache-2.0","_id":"@azrtydxb/novamem@1.1.0","maintainers":[{"name":"piwi3910","email":"pascal@watteel.be"}],"homepage":"https://github.com/azrtydxb/novamem#readme","bugs":{"url":"https://github.com/azrtydxb/novamem/issues"},"dist":{"shasum":"68b1deaefc4860f066333484535309ec639e0f74","tarball":"https://registry.npmjs.org/@azrtydxb/novamem/-/novamem-1.1.0.tgz","fileCount":6,"integrity":"sha512-jOpH+fxPg4xRxzrqsOvAL3bTCJ2YMWDULS0Yzbr7qfvegFU5nUJrDOIToNQfgWlq3M7MFsleFO8Rg7DKbBPrNw==","signatures":[{"sig":"MEUCIBcUW4vnRjzmUCp5Ty3de5NdCHvJbvlDRiOD7hFhx93zAiEAqjUoIr+rFJjo3FYGkYAn+ceaYWCf9VmdVjnA3c/mHfo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@azrtydxb%2fnovamem@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28202},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.19"},"exports":{".":"./dist/index.js"},"gitHead":"d438dcd7e4b2b3ac36d882e3188cedb9095bc8f8","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4879d1b1-9902-4f14-a93a-6a87a4f5948d"}},"repository":{"url":"git+https://github.com/azrtydxb/novamem.git","type":"git","directory":"packages/client"},"_npmVersion":"11.11.0","description":"TypeScript client for the novamem memory service","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4"},"_npmOperationalInternal":{"tmp":"tmp/novamem_1.1.0_1777977282975_0.22295938350957112","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@azrtydxb/novamem","version":"1.1.1","license":"Apache-2.0","_id":"@azrtydxb/novamem@1.1.1","maintainers":[{"name":"piwi3910","email":"pascal@watteel.be"}],"homepage":"https://github.com/azrtydxb/novamem#readme","bugs":{"url":"https://github.com/azrtydxb/novamem/issues"},"dist":{"shasum":"6d2ea7274b201dbd8979acbe7ee202a4937893a0","tarball":"https://registry.npmjs.org/@azrtydxb/novamem/-/novamem-1.1.1.tgz","fileCount":6,"integrity":"sha512-iXDcOu5hH/cpX0A8tPeH/1jn9LUxCdUqw1LqNPGsZ0kg30XZrVhBFe5U6VGbWMBfuJF6DcuQ/3J+1lKnutk9UA==","signatures":[{"sig":"MEQCIEL9BjCW0XR4l7A3hZ8szo+KqyC7U5XLWaPgZJkDVwLdAiA0zddZrtbA63Rgn3SkGrdWaeS2ny2miZ4XZ1K7i3dgOw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@azrtydxb%2fnovamem@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28202},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.19"},"exports":{".":"./dist/index.js"},"gitHead":"de7027fe93a6bc6a4bb1bb141c66ac1ea473f765","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4879d1b1-9902-4f14-a93a-6a87a4f5948d"}},"repository":{"url":"git+https://github.com/azrtydxb/novamem.git","type":"git","directory":"packages/client"},"_npmVersion":"11.11.0","description":"TypeScript client for the novamem memory service","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4"},"_npmOperationalInternal":{"tmp":"tmp/novamem_1.1.1_1777980457566_0.04593096508761163","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@azrtydxb/novamem","version":"1.1.2","license":"Apache-2.0","_id":"@azrtydxb/novamem@1.1.2","maintainers":[{"name":"piwi3910","email":"pascal@watteel.be"}],"homepage":"https://github.com/azrtydxb/novamem#readme","bugs":{"url":"https://github.com/azrtydxb/novamem/issues"},"dist":{"shasum":"1dd1b0c0b3dbc93ed0bb786b0938f2c22e6fe266","tarball":"https://registry.npmjs.org/@azrtydxb/novamem/-/novamem-1.1.2.tgz","fileCount":6,"integrity":"sha512-dsY8I06JdARDqdVII+94/hsG9+75+XClI4PdPXEWWmyaJohY6emnKVnQuzfvtK9VqN5KMZRePIvWBOl/NE4+RA==","signatures":[{"sig":"MEYCIQDFHNzhuo0GjVFWzaQGqUEbzzLeakBN8s9PCcH9qCHhEQIhAMzlGZfC4iulY6b8x/5+itI1l2YYCMEFoOqn8rlLesNh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@azrtydxb%2fnovamem@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28202},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.19"},"exports":{".":"./dist/index.js"},"gitHead":"fef337eb04b11053f2185b11be3c8df0297bd612","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4879d1b1-9902-4f14-a93a-6a87a4f5948d"}},"repository":{"url":"git+https://github.com/azrtydxb/novamem.git","type":"git","directory":"packages/client"},"_npmVersion":"11.11.0","description":"TypeScript client for the novamem memory service","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4"},"_npmOperationalInternal":{"tmp":"tmp/novamem_1.1.2_1777981892399_0.07231001267056847","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@azrtydxb/novamem","version":"1.1.3","description":"TypeScript client for the novamem memory service","license":"Apache-2.0","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":"./dist/index.js"},"publishConfig":{"access":"public","provenance":true},"engines":{"node":">=20.19"},"repository":{"type":"git","url":"git+https://github.com/azrtydxb/novamem.git","directory":"packages/client"},"homepage":"https://github.com/azrtydxb/novamem#readme","bugs":{"url":"https://github.com/azrtydxb/novamem/issues"},"devDependencies":{"vitest":"^3.2.4"},"scripts":{"build":"tsc -p tsconfig.json","test":"vitest run","typecheck":"tsc --noEmit"},"_id":"@azrtydxb/novamem@1.1.3","_integrity":"sha512-jaiWG9zC2Ui0h//sRtO9iljJYelkvba2gaRx2MOcNSOOR00zG/6y7hkggXvy+m62tnmTAYw+dtf1gZh06L64Iw==","_resolved":"/tmp/33324cc28b6c6f1c94a2f6ea129cbaa2/azrtydxb-novamem-1.1.3.tgz","_from":"file:azrtydxb-novamem-1.1.3.tgz","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-jaiWG9zC2Ui0h//sRtO9iljJYelkvba2gaRx2MOcNSOOR00zG/6y7hkggXvy+m62tnmTAYw+dtf1gZh06L64Iw==","shasum":"2f548426a204cbecdee7ebdf65bbc2cfdaee3b4d","tarball":"https://registry.npmjs.org/@azrtydxb/novamem/-/novamem-1.1.3.tgz","fileCount":7,"unpackedSize":39416,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@azrtydxb%2fnovamem@1.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID9MeK9BVFona6hrA2H0yyaExgs0pkCadW/xN4m7sO8jAiAzkbh6nxhGe6V7HVmWfvnMMN793F/WIQSXcN2zAFp0qQ=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4879d1b1-9902-4f14-a93a-6a87a4f5948d"}},"directories":{},"maintainers":[{"name":"piwi3910","email":"pascal@watteel.be"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/novamem_1.1.3_1777983490935_0.528162372759367"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-04T15:54:26.447Z","modified":"2026-05-05T12:18:11.438Z","0.1.0":"2026-05-04T15:54:26.776Z","1.0.0":"2026-05-05T09:46:52.574Z","1.1.0":"2026-05-05T10:34:43.135Z","1.1.1":"2026-05-05T11:27:37.717Z","1.1.2":"2026-05-05T11:51:32.532Z","1.1.3":"2026-05-05T12:18:11.103Z"},"bugs":{"url":"https://github.com/azrtydxb/novamem/issues"},"license":"Apache-2.0","homepage":"https://github.com/azrtydxb/novamem#readme","repository":{"type":"git","url":"git+https://github.com/azrtydxb/novamem.git","directory":"packages/client"},"description":"TypeScript client for the novamem memory service","maintainers":[{"name":"piwi3910","email":"pascal@watteel.be"}],"readme":"# @azrtydxb/novamem\n\nTypeScript client for [novamem](https://github.com/azrtydxb/novamem), a tiered memory service with hybrid search, per-user isolation, and project (sub-brain) scoping.\n\n```bash\nnpm install @azrtydxb/novamem\n```\n\n## Quickstart\n\n```ts\nimport { NovamemClient } from \"@azrtydxb/novamem\";\n\nconst memory = new NovamemClient({\n  baseUrl: \"http://localhost:7778\",\n  token: process.env.NOVAMEM_TOKEN, // user bearer `nm_…`\n});\n\nawait memory.remember({ content: \"User prefers dark roast\" });\nconst hits = await memory.search({ query: \"coffee preference\", k: 5 });\n```\n\nA `nm_…` bearer carries every right the owning user has — the user's whole memory plus every project they're a member of. Mint one from the dashboard's API Tokens page.\n\n## Project-scoped operations\n\nEach entry can belong to a **project** (sub-brain). Pass `project` (id or human name) to scope:\n\n```ts\nawait memory.remember({ content: \"phoenix sprint plan\", project: \"Phoenix\" });\nawait memory.search({ query: \"sprint\", project: \"Phoenix\" });\n```\n\nWhen the user has an active project set (`setActiveProject`), memory_* calls without an explicit `project` arg default to it: search/recent/neighbors union user-global with the active project; remember/forget/update target the active project directly.\n\n## Memory.update — rewriting facts\n\nWhen a fact changes (user moved cities, decision reversed, …) update the existing entry instead of forget+remember; preserves the entry's id, hit count, and graph edges.\n\n```ts\nconst oldId = \"01KQ…\";\nawait memory.updateMemory(oldId, {\n  content: \"User profile: Pascal Watteel lives in Singapore.\",\n  confidence: 1.0,\n});\n```\n\n## API surface\n\n### Memory data plane\n\n| Method | Description |\n|---|---|\n| `search(req)` | Hybrid keyword + vector + graph search |\n| `remember(req)` | Store a new entry; subject to the worthiness gate (pass `force: true` to bypass) |\n| `updateMemory(id, req)` | Rewrite an entry in place; preserves id + hits + edges |\n| `recent(opts)` | Newest entries by namespace |\n| `today(opts)` | Last-24h entries (sugar over `recent`) |\n| `neighbors(opts)` | Graph-neighbour traversal from a seed id |\n| `forget(id, opts?)` | Hard delete |\n| `stats()` | Per-namespace counts |\n| `health()` | Public liveness probe — returns `{ ok }` only. Per-dependency status lives behind the admin-gated `/v1/admin/health/deep` route, which the client does not expose |\n| `decay(opts?)` | Run the warm→cold demotion pass on demand |\n\n### Projects\n\n| Method | Description |\n|---|---|\n| `listProjects()` | Projects the user is a member of |\n| `createProject({name})` | Caller becomes owner; id is server-assigned (ULID) |\n| `deleteProject(id)` | Owner-only; purges all project data |\n| `listProjectMembers(id)` | Members of a project |\n| `addProjectMember(id, {username, role?})` | Owner-only; `username` must be the invitee's **exact email address** (the server resolves via `findUserByExactEmail`) |\n| `removeProjectMember(id, userId)` | Owner removes anyone; non-owner self-leave only |\n| `removeProjectMemberByUsername(id, username)` | Convenience — resolves the username via members listing |\n\n### Active project\n\n| Method | Description |\n|---|---|\n| `getActiveProject()` | Current pointer or `{ active: null }` |\n| `setActiveProject(project)` | Set active project (id or name); membership-checked |\n| `clearActiveProject()` | Drop the pointer |\n\n### Tokens\n\n| Method | Description |\n|---|---|\n| `mintToken({label?})` | Plaintext shown once |\n| `listTokens()` | sha256 hashes + metadata |\n| `revokeMyToken(tokenHash)` | Hard-delete a bearer by sha256 hash (`DELETE /v1/me/tokens/:hash`) |\n\n### Dashboard auth (browser-style flow)\n\nFor non-browser callers that prefer a username + password flow over minting a `nm_…` bearer, the client also exposes `login({ email, password })` / `logout()` / `me()` — these talk to Better Auth's `/api/auth/*` and store the resulting session bearer on the client. Most non-browser callers should use a `nm_…` token directly instead.\n\n## Notes\n\n- The client uses native `fetch` (Node ≥ 20 or any modern browser).\n- `setToken(t)` lets you swap the bearer in place (e.g. after a token rotation).\n- Pass `fetch` in the constructor for testing or to use a different fetch impl.\n- Errors throw with `Error(\"novamem <status>: <body>\")` — handle as you would any fetch error.\n\nSee the main repo for the full API + dashboard documentation.\n","readmeFilename":"README.md"}