Refactor interaction memory seams
This commit is contained in:
parent
1856123451
commit
d56e8c435d
9 changed files with 1216 additions and 1168 deletions
|
|
@ -23,12 +23,13 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
|
|||
- `owner_codex` and `local_llm` are the active reply lanes.
|
||||
- The owner Codex lane is no longer one swollen file; orchestration, runtime/parsing, rendering, and shared helpers are split under `packages/providers/src/owner-codex-*.ts`.
|
||||
- The Discord bot lane is no longer one swollen entrypoint; gateway wiring remains in `apps/bot/src/discord-bot.ts` while command/prompt handlers and Discord-shape support helpers now live under `apps/bot/src/discord-bot-*.ts`.
|
||||
- Interaction-memory logic is no longer one thousand-line slab; event/tone analysis, shared constants, and profile synthesis are split across `packages/core/src/interaction-memory-*.ts`.
|
||||
- Ops health, backup verification, offsite sync, and dashboard surfaces already exist.
|
||||
- The new state/notes surfaces are now the continuity spine for future nontrivial work.
|
||||
|
||||
## Likely Next Bounded Move
|
||||
|
||||
- The next good structural cut is probably `packages/core/src/interaction-memory-logic.ts` or `packages/core/src/state-storage.ts`.
|
||||
- The next good structural cut is probably `packages/core/src/state-storage.ts`, `apps/worker/src/mcp-server.ts`, or `packages/providers/src/local-llm-provider.ts`.
|
||||
- Prefer the seam with the clearest concern split rather than chasing line count for its own sake.
|
||||
- Do not broaden scope into a heroic "refactor everything" binge. One organ at a time.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ This note is the source-grounded description of how the live VoidBot stack is sh
|
|||
- read-only retrieval tools and resource surfaces for archived history, indexed repos, lore, and owner notifications.
|
||||
- `packages/core/src/state-storage.ts`
|
||||
- Postgres-backed durable state for jobs, audit events, interaction memory, and Void usage rate-limit counters.
|
||||
- `packages/core/src/interaction-memory-analysis.ts`
|
||||
- Event construction, tone/tag analysis, repetition detection, and persistence gating for remembered interactions.
|
||||
- `packages/core/src/interaction-memory-profile.ts`
|
||||
- Profile synthesis, disposition, psychological read, inferred traits, interaction dimensions, and response-guidance construction.
|
||||
- `packages/core/src/context-builder.ts`
|
||||
- request context assembly, including interaction-memory/profile attachment.
|
||||
- `packages/providers/src/owner-codex-provider.ts`
|
||||
|
|
@ -43,9 +47,10 @@ This note is the source-grounded description of how the live VoidBot stack is sh
|
|||
2. Permission checks run through `packages/core/src/permission-engine.ts`.
|
||||
3. Void usage limits are applied through `packages/core/src/void-usage-rate-limiter.ts` backed by `packages/core/src/state-storage.ts`.
|
||||
4. `apps/bot/src/discord-bot-support.ts` adapts Discord message/interaction shapes, ambient-memory events, and source-grounding hints.
|
||||
5. `packages/core/src/context-builder.ts` assembles request context, including recent interaction profile and any retrieval hints.
|
||||
6. Provider selection goes through `packages/providers/src/index.ts`.
|
||||
7. The bot either:
|
||||
5. `packages/core/src/interaction-memory-analysis.ts` turns direct prompts or ambient mentions into normalized remembered events; `packages/core/src/interaction-memory-profile.ts` distills remembered events into a reusable social read.
|
||||
6. `packages/core/src/context-builder.ts` assembles request context, including recent interaction profile and any retrieval hints.
|
||||
7. Provider selection goes through `packages/providers/src/index.ts`.
|
||||
8. The bot either:
|
||||
- answers directly through `local_llm`, or
|
||||
- queues an owner job for the worker / `owner_codex` path.
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Use the persistent project-state surfaces to keep future work source-grounded an
|
|||
### 4. Legibility Hardening
|
||||
|
||||
- continue splitting oversized runtime files where concern boundaries are already obvious
|
||||
- likely next cuts: `packages/core/src/interaction-memory-logic.ts` or `packages/core/src/state-storage.ts`
|
||||
- likely next cuts: `packages/core/src/state-storage.ts`, `apps/worker/src/mcp-server.ts`, or `packages/providers/src/local-llm-provider.ts`
|
||||
- keep behavior stable while moving concerns into smaller organs
|
||||
|
||||
### 5. The Still-Scaffolded Paths
|
||||
|
|
|
|||
Loading…
Reference in a new issue