{"_id":"@djasdh/interest-memory-dsh-bridge","_rev":"2-9f7a78be7c8eac8bbc56cd69795e11cb","name":"@djasdh/interest-memory-dsh-bridge","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@djasdh/interest-memory-dsh-bridge","version":"0.1.0","keywords":["dsh","deepseek-harness","cordis","memory","agent","rag"],"author":{"name":"djasdh"},"license":"MIT","_id":"@djasdh/interest-memory-dsh-bridge@0.1.0","maintainers":[{"name":"djasdh","email":"2902641434@qq.com"}],"homepage":"https://github.com/djasdh/interest-memory#readme","bugs":{"url":"https://github.com/djasdh/interest-memory/issues"},"dist":{"shasum":"8421d272b6331e5e074321cbd09ab3a34a558528","tarball":"https://registry.npmjs.org/@djasdh/interest-memory-dsh-bridge/-/interest-memory-dsh-bridge-0.1.0.tgz","fileCount":4,"integrity":"sha512-5Sxf4EP2O/twDlJroimkwsbU4/gsT4wK36zS2MFdb10FRGs0UugqcZGjxV4LwNZrB+TpbAcz4Ll7pb55nJjEAQ==","signatures":[{"sig":"MEQCIF0yYkA3UVgy9sIsLamN6XDqf5F4HNV8AHwYZ8o1se6tAiAN3JeQ/qeK6zbC7bNeuRpwL/Af6AR7m6hdr26eojD2Ag==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19708},"main":"lib/index.js","type":"module","engines":{"node":">=22"},"gitHead":"eda6742c569248901782446e7161d6c91fbea92f","scripts":{"test":"node --test lib/lib.test.mjs"},"_npmUser":{"name":"djasdh","email":"2902641434@qq.com"},"repository":{"url":"git+https://github.com/djasdh/interest-memory.git","type":"git"},"_npmVersion":"12.0.2","description":"interest-memory ↔ DeepSeek Harness (DSH) bridge: zero-lag recall injection, session-end transcript ingest, and memory_search/memory_logs/memory_ingest tools for DSH agents.","directories":{},"_nodeVersion":"26.5.1","dependencies":{"@deepseek-ai/dsh-tools":"^0.1.0-rc.6","@deepseek-ai/schemastery":"^3.18.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/interest-memory-dsh-bridge_0.1.0_1786635041074_0.877249687074058","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@djasdh/interest-memory-dsh-bridge","version":"0.1.1","description":"interest-memory ↔ DeepSeek Harness (DSH) bridge: zero-lag recall injection, session-end transcript ingest, and memory_search/memory_logs/memory_ingest tools for DSH agents.","type":"module","main":"lib/index.js","scripts":{"test":"node --test lib/lib.test.mjs"},"keywords":["dsh","deepseek-harness","cordis","memory","agent","rag"],"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dependencies":{"@deepseek-ai/dsh-tools":"^0.1.0-rc.6","@deepseek-ai/schemastery":"^3.18.1"},"engines":{"node":">=22"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/djasdh/interest-memory.git"},"author":{"name":"djasdh"},"_id":"@djasdh/interest-memory-dsh-bridge@0.1.1","gitHead":"b02199beef58273a56299f3a7e223683a70679e7","bugs":{"url":"https://github.com/djasdh/interest-memory/issues"},"homepage":"https://github.com/djasdh/interest-memory#readme","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-MuGORfTTHJASq1zPjV6EyXVcyUtZcqJdau54bi1/2TjABxZGi+OEfTN6sLY6B0obTWKAnppeq6FZf38FhYxT+A==","shasum":"b858ac91b9c75535c172e14e995df437a8c4d7bc","tarball":"https://registry.npmjs.org/@djasdh/interest-memory-dsh-bridge/-/interest-memory-dsh-bridge-0.1.1.tgz","fileCount":5,"unpackedSize":20698,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC9GFL+bQGdQYdu7RwQEO36qDncZtm4ugLse3ZQzkyQXAiAcVwvMv0nBaM7JYnmtOgJ2TUfPRsTf+WdBtdJ+xK5/Lg=="}]},"_npmUser":{"name":"djasdh","email":"2902641434@qq.com"},"directories":{},"maintainers":[{"name":"djasdh","email":"2902641434@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/interest-memory-dsh-bridge_0.1.1_1787336710550_0.2684046871051611"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T15:30:40.700Z","modified":"2026-08-21T18:25:10.891Z","0.1.0":"2026-08-13T15:30:41.204Z","0.1.1":"2026-08-21T18:25:10.722Z"},"bugs":{"url":"https://github.com/djasdh/interest-memory/issues"},"author":{"name":"djasdh"},"license":"MIT","homepage":"https://github.com/djasdh/interest-memory#readme","keywords":["dsh","deepseek-harness","cordis","memory","agent","rag"],"repository":{"type":"git","url":"git+https://github.com/djasdh/interest-memory.git"},"description":"interest-memory ↔ DeepSeek Harness (DSH) bridge: zero-lag recall injection, session-end transcript ingest, and memory_search/memory_logs/memory_ingest tools for DSH agents.","maintainers":[{"name":"djasdh","email":"2902641434@qq.com"}],"readme":"# @djasdh/interest-memory-dsh-bridge\n\ninterest-memory ↔ **DeepSeek Harness (DSH)** bridge. Gives DSH agents a real\nlong-term memory layer:\n\n- **Zero-lag recall injection** — on every user message the bridge fetches\n  `/api/v1/{agent}/recall` with that message and injects the memory as an\n  **owned runtime-context snapshot** in the *same* model step (no phantom user\n  messages, no system-prompt churn, stable KV-cache prefix).\n- **Session-end ingest** — the session transcript is pushed to\n  `POST /api/v1/{agent}/sessions` once the session ends (owned snapshots\n  filtered out, so the injected memory is never ingested back).\n- **Tools** — `memory_search` / `memory_logs` / `memory_ingest` (force a\n  checkpoint for long-running sessions).\n\nFailure isolated: a dead interest-memory service never blocks a turn\n(timeouts degrade to \"no memory\").\n\n## Install\n\nDSH ships a pnpm-forwarding CLI for profile plugins. With the interest-memory\nservice already running (see the repo root README), a user installs the\npackage into their profile:\n\n```bash\ndsh plugin --profile web add @djasdh/interest-memory-dsh-bridge\n```\n\n`dsh plugin` forwards to pnpm inside the profile directory\n(`$DSH_HOME/profiles/<name>/`), so the package lands in the profile's\n`node_modules` and the loader resolves the row's `name:` from there. The\npackage is plain JS — no build step, no `allowBuilds` entry needed.\n\nThe package also ships a **bundle patch** (`dsh.bundle.patch` →\n`cordis.patch.yml`), so harnesses that mount bundles can register the\n`interest-memory` row in one step. Manual row mounting below still works and\nis the recommended path for per-session (preset) memory.\n\n## Mount\n\n### As an agent preset row (per-session memory — recommended)\n\nAdd the row to a preset's `agent.cordis.yml`, then start sessions from that\npreset:\n\n```yaml\n- id: interest-memory\n  name: '@djasdh/interest-memory-dsh-bridge'\n  config:\n    baseUrl: http://127.0.0.1:8899   # optional (default shown)\n    agent: dsh                        # optional; the interest-memory namespace\n```\n\nCopying a shipped preset (e.g. `standard` or `cordis`) and adding this row is\nthe fastest path.\n\n### As a host row (shared service across sessions)\n\nAdd to the profile patch, e.g. `~/.dsh/profiles/web/cordis.patch.yml`:\n\n```yaml\n- insert:\n    - id: interest-memory\n      name: '@djasdh/interest-memory-dsh-bridge'\n      config:\n        baseUrl: http://127.0.0.1:8899\n        agent: dsh\n```\n\nRecall state is keyed **per agent**, so one host row serves every session\n(each agent id maps to its interest-memory namespace).\n\n## Config\n\n| field | default | meaning |\n|---|---|---|\n| `baseUrl` | `http://127.0.0.1:8899` | interest-memory service URL |\n| `agent` | `dsh` | interest-memory namespace (`/api/v1/{agent}/...`) |\n| `recallTimeoutMs` | `5000` | per-recall HTTP timeout (never blocks a turn longer than this) |\n| `ingestTimeoutMs` | `15000` | per-ingest HTTP timeout |\n| `traceDir` | `''` | optional directory for JSON traces (empty = off) |\n\n## How recall works\n\nDSH's turn loop assembles the system prompt *before* the current user message\nis available to plugins, which makes naive \"inject at request time\" land one\nstep late. The bridge uses two seams instead:\n\n1. `agent/inbox/claimed` fires at message-claim time, *before* assembly — the\n   bridge starts the recall fetch with the **current** message there.\n2. `system-prompt/assemble` waterfall awaits the in-flight fetch and pushes\n   the memory as a **context contribution**. The DSH runtime-context\n   projection then materialises it as an *owned* user-role snapshot\n   (`source.kind='plugin'`, `@deepseek-ai/dsh-system-prompt`) appended after\n   the user message — zero lag, and the snapshot is reused afterwards so the\n   prefix stays byte-stable.\n\n## Development\n\n```bash\nnpm test                       # node --test lib/  (pure helpers, no DSH runtime)\n```\n\nThe plugin itself is a plain Cordis plugin (`{ name, inject, Config, apply }`)\n— the same shape as the shipped `@deepseek-ai/dsh-*` packages.\n","readmeFilename":"README.md"}