Files
luodaoyi 21cbeeefe0 respire-memory 0.3.6: per-turn recall and policy reads, verified background archival (luodaoyi)
Adds the respire-memory gateway middleware (packages/respire-memory, 0.3.6) by luodaoyi, with its registry.json entry and README row. It recalls from a loopback Respire Runtime on each new turn, reads the engine policy each turn and puts it in the history once (again only when it changes), keeps turn state in an encrypted store, and optionally archives turns in a detached worker through a user-configured Chat Completions service. Diary writes are confirmed by a bounded fragment readback.

Run at 7aba754 on mote (Node 22.22.0, Bun 1.4.2):
- packages/respire-memory: `node scripts/check.mjs` ok (4 protocol, policy dedup/change/revert, byte-identical prefixes, failed read, diary readback); `bun test` 1 pass.
- root: `HOME=$(mktemp -d) bun test` 4187 pass, 9 skip, 0 fail (4196 tests, 328 files); `bun scripts/check.mjs` exit 0.
- Review probe (fake loopback Runtime, 2000-byte policy, six chat turns with a host restart at turn 3, a policy change, then the Runtime down), Bun and Node: per-turn overhead grows ~524 bytes a turn (the read receipt), not the policy; no earlier prefix changed; one policy read per turn; two policy blocks after the change; with the Runtime down the latest turn is unchanged. With no Runtime at all the body passes through unchanged.
- Capture probe: with capture on, a turn whose JSON exceeds the ~4000-char readback budget is written and then recorded unconfirmed, and archival skips it. The PR's check asserts this and the README documents it.
- Harm check: no new dependencies, install scripts or workflow changes; network only to the loopback Runtime and the user's own generation URL.

Not tried: a real Respire Runtime.
2026-10-31 21:36:56 +08:00

15 lines
879 B
Plaintext

conversation.mjs is adapted from magpie-community/plugins, packages/powercontext/conversation.mjs.
Upstream blob: dc97399af3c41f569c188dd449b8e2750b52e0f3
https://github.com/magpie-community/plugins/blob/main/packages/powercontext/conversation.mjs
Copyright (c) 2026 magpie-community contributors. MIT License (included in LICENSE).
The gateway-hook architecture was informed by PowerContext and Magpie's released hook contract.
Respire-specific integration and configuration: Copyright (c) 2026 Respire contributors.
Respire icons originate from the 1memory/icon directory. The adaptive page/icon.svg
reuses the Respire DSH composition of the same light and dark source images.
archive-context.mjs, memory-tools.mjs and policy.mjs reuse Respire Codex's
evidence preparation, restricted memory tools and memory policy respectively.
https://github.com/risense-ai/respire-codex