feat: add conversation memory pipeline
All checks were successful
npm release / verify (push) Successful in 13s
npm release / publish to npm (push) Successful in 11s

This commit is contained in:
2026-05-11 23:12:02 +09:00
parent baea23b8b0
commit 4baf056cd9
5 changed files with 506 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ The project is framework-first rather than product-first. The current core libra
- availability snapshots with current + next transition calculation
- DM-style conversation orchestration for inbound replies and proactive openings
- delegated mandatory/contextual memory retrieval pipelines for conversation turns
- optional two-stage conversation memory extraction pipeline for durable inbound/outbound memories
- human-like first-reply delay and typing delay utilities
- farewell-style refusal flows that can trigger availability-changing tool calls
@@ -49,6 +50,16 @@ The library is now grouped by domain under `src/`:
Each domain now exposes a class-based service API in addition to the existing functional helpers so consumers can organize stateful integrations more cleanly.
## Conversation memory pipeline
Conversation turns can now optionally run a two-stage durable-memory pipeline:
1. a `classifierModel` decides whether each inbound or first-pass outbound message is worth remembering
2. an `extractorModel` converts only approved messages into IdentityDB-ready fact drafts
3. extracted facts are stored back into the persona space with conversation-turn trace metadata
The optional `memoryPipeline` input is available on both `replyToConversation(...)` and `startConversation(...)`, so app integrations can enable long-term relationship memory without changing their storage layer.
## Release
Tagging `vX.Y.Z` or `X.Y.Z` triggers the Gitea npm release workflow under `.gitea/workflows/npm-release.yml`.