{"_id":"@achiral/chiro","_rev":"2-9a72c444050107caf892e30ba994588d","name":"@achiral/chiro","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@achiral/chiro","version":"0.1.0","keywords":["achiral","memory","ai-memory","agent-memory","act-r","sdk","typescript"],"license":"Apache-2.0","_id":"@achiral/chiro@0.1.0","maintainers":[{"name":"achiral_md","email":"marvin@achiral.ai"}],"homepage":"https://achiral.ai/memory-api","bugs":{"url":"https://github.com/Achiral-AI/chiro/issues"},"dist":{"shasum":"a60bfa641eb5123e02648ada092d1b1af2e70845","tarball":"https://registry.npmjs.org/@achiral/chiro/-/chiro-0.1.0.tgz","fileCount":10,"integrity":"sha512-rh5DCsFKqzt2w+0dUx65WnvReSGu0LNLaNUpL2oQYwGVU/HwecSZ7ZK1fwD4S6H2Lh9Y1atobawBlifSW7b0Uw==","signatures":[{"sig":"MEYCIQDh+An6zG8MsCFzCuPwkteF+rborQPe8DjcTnRyDbJrkQIhANgmigUjSLoaALbCqgVTh3DpabfoW3Xi4IUt2+WKVk4n","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@achiral%2fchiro@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":36392},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ce0abb33a1b1b6cfa3f7cbc44ab72f1585b8389d","scripts":{"test":"pnpm build && tsc -p tsconfig.test.json && node dist-test/index.test.js","build":"tsc -p tsconfig.json","prepack":"pnpm build","pack:dry":"npm pack --dry-run","typecheck":"tsc --noEmit -p tsconfig.json","publish:npm":"npm publish --access public --provenance"},"_npmUser":{"name":"achiral_md","email":"marvin@achiral.ai"},"repository":{"url":"git+https://github.com/Achiral-AI/chiro.git","type":"git"},"_npmVersion":"11.17.0","description":"TypeScript SDK for the Achiral Memory API","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.9.0","devDependencies":{"typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/chiro_0.1.0_1787064878342_0.9049555475698596","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@achiral/chiro","version":"0.2.0","description":"TypeScript SDK for the Achiral Memory API","type":"module","packageManager":"pnpm@11.9.0","license":"Apache-2.0","homepage":"https://achiral.ai/memory-api","repository":{"type":"git","url":"git+https://github.com/Achiral-AI/chiro.git"},"bugs":{"url":"https://github.com/Achiral-AI/chiro/issues"},"keywords":["achiral","memory","ai-memory","agent-memory","act-r","sdk","typescript"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"types":"./dist/index.d.ts","main":"./dist/index.js","scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json","test":"pnpm build && tsc -p tsconfig.test.json && node dist-test/index.test.js","prepack":"pnpm build","pack:dry":"npm pack --dry-run","publish:npm":"npm publish --access public --provenance"},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"devDependencies":{"typescript":"^5.5.0"},"gitHead":"cea8b3a5a8c417f55ec2e547125f40b11e4fc552","_id":"@achiral/chiro@0.2.0","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-p4aL/oRDjf3Ye1r2Gm5z7dUmmCybI9ZiTpK3DuUk5FRQuFsp5OQ7aol2qm/n/r057z93k7jJn4MHl8oJ59Ikcg==","shasum":"0caf78686fef58bbb1624463db53cede3ab8525b","tarball":"https://registry.npmjs.org/@achiral/chiro/-/chiro-0.2.0.tgz","fileCount":10,"unpackedSize":37580,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@achiral%2fchiro@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDF3I+6NZ/AxO6u2efM+pFXC1do3COcYwSSTOvae8xg0QIgfjY0G7wjorFq0c3WwsmPHDj+2ZmAWEpRx415l2jiNak="}]},"_npmUser":{"name":"achiral_md","email":"marvin@achiral.ai"},"directories":{},"maintainers":[{"name":"achiral_md","email":"marvin@achiral.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chiro_0.2.0_1787076101835_0.5004158802350529"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-18T14:54:38.040Z","modified":"2026-08-18T18:01:47.620Z","0.1.0":"2026-08-18T14:54:38.473Z","0.2.0":"2026-08-18T18:01:41.986Z"},"bugs":{"url":"https://github.com/Achiral-AI/chiro/issues"},"license":"Apache-2.0","homepage":"https://achiral.ai/memory-api","keywords":["achiral","memory","ai-memory","agent-memory","act-r","sdk","typescript"],"repository":{"type":"git","url":"git+https://github.com/Achiral-AI/chiro.git"},"description":"TypeScript SDK for the Achiral Memory API","maintainers":[{"name":"achiral_md","email":"marvin@achiral.ai"}],"readme":"# @achiral/chiro\n\nTypeScript SDK for the [Achiral Memory API](https://achiral.ai/memory-api).\n\n`@achiral/chiro` is the official TypeScript SDK for adding Achiral Memory API retrieval, encoding, events, reinforcement, suppression, explanation, and deletion to AI-native applications.\n\n## Install\n\n```bash\nnpm install @achiral/chiro\n```\n\n```bash\npnpm add @achiral/chiro\n```\n\n## Quickstart\n\n```ts\nimport { Chiro } from \"@achiral/chiro\";\n\nconst memory = new Chiro({\n  apiKey: process.env.ACHIRAL_API_KEY,\n  baseURL: \"https://your-org.achiral.ai/v1\",\n});\n\nconst retrieval = await memory.retrieve({\n  query: \"What should this app remember?\",\n  includeContext: true,\n});\n\nawait memory.encode({\n  content: \"User prefers release notes as bullet points.\",\n  source: \"product-event\",\n});\n```\n\n## Agent-scoped memory\n\n```ts\nconst agentMemory = new Chiro({\n  apiKey: process.env.ACHIRAL_API_KEY,\n  baseURL: \"https://your-org.achiral.ai/v1\",\n  agent: \"api-sentinel\",\n});\n\nawait agentMemory.encode({\n  content: \"The auth service rotates JWT signing keys every 7 days.\",\n  memoryKind: \"architecture\",\n});\n```\n\nWhen `agent` is configured, `retrieve`, `encode`, `reinforce`, `suppress`, `explain`, and `delete` use agent-scoped Memory API paths by default. Without `agent`, they use organization-level memory. `recall()` and `remember()` remain natural aliases for `retrieve()` and `encode()`.\n\n## Bring your own model\n\n```ts\nconst retrieval = await memory.retrieve({\n  query: \"Draft a migration plan for auth.\",\n  namespace: \"identity\",\n  intent: \"plan auth migration\",\n  includeContext: true,\n});\n\nawait openai.chat.completions.create({\n  model: \"gpt-5\",\n  messages: [\n    { role: \"system\", content: retrieval.context?.systemBlock ?? \"\" },\n    { role: \"user\", content: \"What should we do next?\" },\n  ],\n});\n```\n\n## API\n\n- `memory.retrieve(input)`; natural alias: `memory.recall(input)`\n- `memory.encode(input, options)`; natural alias: `memory.remember(input, options)`\n- `memory.events.ingest(input, options)`\n- `memory.reinforce(id, input)`\n- `memory.suppress(id, input)`\n- `memory.explain(id)`\n- `memory.delete(id)`\n- `memory.chat(input)`\n- `memory.streamChat(input)`\n\nUse `namespace` to keep memory for different apps, services, teams, or environments separate. Use `intent` to say why the current retrieval or encoding is happening.\n\n## Streaming chat\n\n```ts\nconst stream = await memory.streamChat({\n  model: \"chiro\",\n  messages: [\n    { role: \"user\", content: \"What should I know before touching auth?\" },\n  ],\n});\n\nfor await (const chunk of stream) {\n  console.log(chunk);\n}\n```\n\n## Environment\n\n```bash\nexport ACHIRAL_API_KEY=acm_...\nexport ACHIRAL_BASE_URL=https://your-org.achiral.ai/v1\n```\n\n## Package status\n\nThis package is the canonical V1 SDK for the Achiral Memory API. Framework packages should be thin adapters around this SDK and are intentionally deferred until the core API is stable.\n\n## Release\n\nThis package uses SemVer. Publishing runs from GitHub Actions after a merge to `main`.\n\nRequired repository secret:\n\n- `NPM_TOKEN`: npm automation token with publish access to `@achiral/chiro`\n\nUpdate the version in `package.json` as part of the release PR. After merge, the workflow runs tests, checks the npm tarball, tags the package version, publishes to npm with provenance, and creates a GitHub release.\n\nPrimary registry for V1 is npm. GitHub Packages and JSR are deferred until there is a clear developer need for those channels.\n\n## Resources\n\n- Product page: https://achiral.ai/memory-api\n- API docs: https://achiral.ai/docs/memory/api\n- SDK docs: https://achiral.ai/docs/memory/api/sdk\n- Shelby Memory Agents: https://achiral.ai/ai-agent-memory\n","readmeFilename":"README.md"}