{"_id":"@atisse/memory-inmemory","_rev":"3-ffe99507d72c1af768d27ef271b0bca9","name":"@atisse/memory-inmemory","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@atisse/memory-inmemory","version":"1.0.0","_id":"@atisse/memory-inmemory@1.0.0","maintainers":[{"name":"softendo","email":"kadirkaradas5@gmail.com"}],"dist":{"shasum":"36dd1439e1ce851e19d2a625a52f3d321b2352d9","tarball":"https://registry.npmjs.org/@atisse/memory-inmemory/-/memory-inmemory-1.0.0.tgz","fileCount":5,"integrity":"sha512-M1u/ojm6JaHXvRf+j78LguZmmJUebLW5qDvngZORwNtIDu0DYYt1x5d1o1UcKvavr9Th1VgPdlCratOpLtqhsA==","signatures":[{"sig":"MEUCIDNsmX5klDKc4ol9ww9QTHqrKntZ12kBDzPqaxQUEwWyAiEAjtF4WXJLCbL/IEebiAR/H7CUNbz32heOvlK5LaBiOh0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6879},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"766fc1f9364cd3ca6750ca4c1dc4110f5b613b73","scripts":{"lint":"eslint src/","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"softendo","email":"kadirkaradas5@gmail.com"},"_npmVersion":"11.17.0","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"packageManager":"pnpm@11.5.0","devDependencies":{"vitest":"^4.1.8","@types/node":"^25.9.3"},"peerDependencies":{"@atisse/core":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/memory-inmemory_1.0.0_1781528309059_0.9644156025259001","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@atisse/memory-inmemory","version":"1.0.1","keywords":["llm","ai","memory","in-memory","adapter","typescript","orchestration","conversation"],"author":"Abdulkadir Karadas(saferias)","license":"MIT","_id":"@atisse/memory-inmemory@1.0.1","maintainers":[{"name":"softendo","email":"kadirkaradas5@gmail.com"}],"homepage":"https://github.com/abdulkadirkaradas/atisse#readme","bugs":{"url":"https://github.com/abdulkadirkaradas/atisse/issues"},"dist":{"shasum":"c182d2446ae03462b2525d3400ad53e885e0f859","tarball":"https://registry.npmjs.org/@atisse/memory-inmemory/-/memory-inmemory-1.0.1.tgz","fileCount":7,"integrity":"sha512-TNWAjyZaYq13JqesYjd/Yzr188BoJJxbToiTGInwZLH9T6WWXVKPH34XJbjPsT8BQeTPpsw+56gV2kcUf26qrw==","signatures":[{"sig":"MEUCICLreLkRk+hsxuewbo5ayxGUJHF3cNIRBeA6005bK8b6AiEAqxtkzBs/LbwzlEBemuPk9Msq+zy/lSGSKKwAOexjQPU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12242},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"lint":"eslint src/","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"softendo","email":"kadirkaradas5@gmail.com"},"repository":{"url":"git+https://github.com/abdulkadirkaradas/atisse.git","type":"git","directory":"packages/memory-inmemory"},"directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.9","@types/node":"^25.9.3"},"peerDependencies":{"@atisse/core":"1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/memory-inmemory_1.0.1_1781790864541_0.28200096139503095","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"_id":"@atisse/memory-inmemory@1.0.2","bugs":{"url":"https://github.com/abdulkadirkaradas/atisse/issues"},"dist":{"shasum":"e736acf0f960600f97584945aabda1ef27b3da47","tarball":"https://registry.npmjs.org/@atisse/memory-inmemory/-/memory-inmemory-1.0.2.tgz","fileCount":7,"integrity":"sha512-aw1JgcI5kyzgldsz+Bzrg2xnK3bg/lv9uUEyHq8QsNvDlv3NptiCNq5WGNMFdq52ymypC5cl77sOK/gAgINKaQ==","signatures":[{"sig":"MEYCIQDiCCxr8J+FbmzMeOd0arVTe0XbzJCjFvthdrxpz15MfQIhALu47N+598xGGDge0QnPPqXx7YUWTfD2fafb3kaf1k1K","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCXy8RiIt8BTTnNUYzDUN5139e/8ZjfCG28iBtGo6pE3QIgTGmEW3A09Dq0EuQMbbgpoenh2Mr8Y3cPtnAWPslJmRA="}],"unpackedSize":12242},"main":"./dist/index.js","name":"@atisse/memory-inmemory","type":"module","types":"./dist/index.d.ts","author":"Abdulkadir Karadas(saferias)","module":"./dist/index.js","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"license":"MIT","scripts":{"lint":"eslint src/","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"version":"1.0.2","_npmUser":{"name":"softendo","email":"kadirkaradas5@gmail.com"},"homepage":"https://github.com/abdulkadirkaradas/atisse#readme","keywords":["llm","ai","memory","in-memory","adapter","typescript","orchestration","conversation"],"repository":{"url":"git+https://github.com/abdulkadirkaradas/atisse.git","type":"git","directory":"packages/memory-inmemory"},"directories":{},"maintainers":[{"name":"softendo","email":"kadirkaradas5@gmail.com"}],"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^5.0.0","@types/node":"^26.5.1"},"peerDependencies":{"@atisse/core":"1.1.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/memory-inmemory_1.0.2_1789407405743_0.13157118665577805"}}},"time":{"created":"2026-06-15T12:58:28.919Z","modified":"2026-09-14T17:36:46.026Z","1.0.0":"2026-06-15T12:58:29.196Z","1.0.1":"2026-06-18T13:54:24.679Z","1.0.2":"2026-09-14T17:36:45.853Z"},"bugs":{"url":"https://github.com/abdulkadirkaradas/atisse/issues"},"author":"Abdulkadir Karadas(saferias)","license":"MIT","homepage":"https://github.com/abdulkadirkaradas/atisse#readme","keywords":["llm","ai","memory","in-memory","adapter","typescript","orchestration","conversation"],"repository":{"url":"git+https://github.com/abdulkadirkaradas/atisse.git","type":"git","directory":"packages/memory-inmemory"},"maintainers":[{"name":"softendo","email":"kadirkaradas5@gmail.com"}],"readme":"# @atisse/memory-inmemory\n\n[![npm version](https://img.shields.io/npm/v/@atisse/memory-inmemory.svg)](https://www.npmjs.com/package/@atisse/memory-inmemory)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../../LICENSE)\n\nAn in-memory implementation of the `MemoryAdapter` interface for `@atisse/core`. Stores conversation history in a JavaScript `Map` keyed by session ID. Intended for development, testing, and prototyping — not for production use.\n\n## Features\n\n- Simple Map-based storage — no external dependencies\n- Append semantics on `save()` — preserves existing session history\n- Cross-session isolation via per-session keys\n- Lightweight and instant setup, ideal for unit tests and local development\n\n## Installation\n\n```bash\nnpm install @atisse/memory-inmemory\n# or\npnpm add @atisse/memory-inmemory\n```\n\n> `@atisse/core` is a peer dependency. Install it alongside this package.\n\n## Quick Start\n\n```typescript\nimport { Orchestrator } from '@atisse/core';\nimport { InMemoryAdapter } from '@atisse/memory-inmemory';\n\nconst memory = new InMemoryAdapter();\n\nconst orchestrator = new Orchestrator({\n  provider: myProvider,\n  memoryAdapter: memory,\n});\n\n// First turn — saves messages to session-1\nawait orchestrator.run({\n  prompt: 'What is my name?',\n  sessionId: 'session-1',\n});\n\n// Second turn — loads previous messages from session-1\nawait orchestrator.run({\n  prompt: 'Do you remember my name now?',\n  sessionId: 'session-1',\n  // Core pipeline loads existing history and appends it to the generate request\n});\n\n// Clear session when done\nawait memory.clear('session-1');\n```\n\n## API Reference\n\n### `InMemoryAdapter`\n\nImplements `MemoryAdapter` from `@atisse/core`. Uses a private `Map<string, Message[]>` for storage.\n\n**Constructor**\n\n```typescript\nnew InMemoryAdapter();\n```\n\nNo configuration required.\n\n**Methods**\n\n| Method  | Signature                                                   | Description                                                                                         |\n| ------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |\n| `load`  | `(sessionId: string) => Promise<Message[]>`                 | Returns all messages for the session, or an empty array if the session does not exist.              |\n| `save`  | `(sessionId: string, messages: Message[]) => Promise<void>` | Appends messages to the session's existing history. Creates the session if it does not exist.       |\n| `clear` | `(sessionId: string) => Promise<void>`                      | Deletes all messages for the session. Idempotent — succeeds silently if the session does not exist. |\n\n### Important notes\n\n- This adapter is backed by a `Map` scoped to the adapter instance. Data is lost when the process exits.\n- `save()` uses **append semantics** — existing messages are preserved and new messages are added to the end.\n- The adapter does not enforce any maximum session size. Long-running sessions will accumulate all messages.\n- For production workloads, use `@atisse/memory-redis` or another persistent memory adapter.\n\n## Monorepo Ecosystem\n\n`@atisse/*` packages are part of the [atisse](https://github.com/abdulkadirkaradas/atisse) monorepo.\n\n- **[@atisse/core](../core)** — Execution kernel (required peer dependency)\n- **[@atisse/context-rag](../context-rag)** — RAG context provider\n- **[@atisse/memory-redis](../memory-redis)** — Redis memory adapter\n- **[@atisse/provider-anthropic](../provider-anthropic)** — Anthropic Claude provider\n- **[@atisse/provider-openai](../provider-openai)** — OpenAI GPT provider\n\n## License\n\nMIT © [Abdulkadir Karadas(saferias)](https://github.com/abdulkadirkaradas)\n","readmeFilename":""}