diff --git a/.daemon/logs/signet-2026-02-22.log b/.daemon/logs/signet-2026-02-22.log index 3d374cd8e..ed777fb45 100644 --- a/.daemon/logs/signet-2026-02-22.log +++ b/.daemon/logs/signet-2026-02-22.log @@ -3110,3 +3110,9 @@ {"timestamp":"2026-02-22T11:10:06.020Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/debug.log"}} {"timestamp":"2026-02-22T11:10:08.711Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/debug.log"}} {"timestamp":"2026-02-22T11:10:08.711Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/debug.log"}} +{"timestamp":"2026-02-22T11:10:13.733Z","level":"info","category":"git","message":"Auto-committed","data":{"message":"2026-02-22T11-10-13_auto_memory/debug.log, memory/debug.log","filesChanged":2}} +{"timestamp":"2026-02-22T11:10:13.713Z","level":"warn","category":"git","message":"Git add failed"} +{"timestamp":"2026-02-22T11:10:45.473Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/debug.log"}} +{"timestamp":"2026-02-22T11:10:45.473Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/MEMORY.md"}} +{"timestamp":"2026-02-22T11:10:45.473Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/debug.log"}} +{"timestamp":"2026-02-22T11:10:45.473Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/MEMORY.md"}} diff --git a/memory/MEMORY.md b/memory/MEMORY.md index 4cece7369..9eb4a1882 100644 --- a/memory/MEMORY.md +++ b/memory/MEMORY.md @@ -1,70 +1,39 @@ - + Current Context -Actively implementing the Signet memory pipeline (Phase D) - focusing on explicit mutation APIs and end-to-end testing with concurrent sessions. The daemon's memory system is transitioning from shadow writes to controlled writes with proper safety gates. +The current focus is on optimizing the Signet daemon's embedding processing pipeline by migrating UMAP dimensionality reduction from the client-side browser to the server-side daemon, and ensuring the openclaw application maintains a healthy port configuration. Active Projects -Signet Memory Pipeline - Phase D -Location: `packages/daemon/src/transactions.ts`, `packages/daemon/src/daemon.ts`, `docs/wip/memory-pipeline-plan.md` -- Status: Just completed D1 (mutation APIs), ready to start D2 (optimistic concurrency + policy guards) -- Next steps: Implement D2/D3 from spec section 14.5-14.8, add full integration tests -- Current state: Handlers and transaction closures for `PATCH /api/memory/:id`, `DELETE /api/memory/:id`, `POST /api/memory/forget`, `POST /api/memory/modify` are in place. Need to add optimistic concurrency and policy validation. +UMAP Server-Side Migration + Location: `/home/nicholai/signet/signetai` (Bun monorepo) + Status: Parallelization underway. Backend worker is processing tasks #1-4 (Migration creation, Projection module, API endpoint registration, Cache invalidation hooks). Frontend worker has completed rewriting the dashboard client to use the new server projection API and removing `umap-js`. + Blockers: Waiting for backend worker completion of tasks #1-4 before final build/typecheck. + Next Steps: Backend worker must finish implementation; remove `umap-js` from dashboard `package.json`; run final build and typecheck. -UI Development -Location: Any frontend component work -- Status: In progress -- Critical rule: Never delegate UI work to subagents. Must be done directly by Opus, passing same image references provided by user. (See: [fact]) - -Qwen3-14B Model Setup -Location: Ollama / local model -- Status: Just configured with custom Modelfile for high-reasoning work -- Next steps: Integration with daemon or other services +Openclaw Port Configuration + Location: System level. + Status: Resolved. Port 8788 conflict between `workerd` and the `nextcloud-talk` plugin has been fixed. + Next Steps: Monitor application health. Recent Work -Feb 21, 2026: -- Completed Phase C of memory pipeline - dual-mode worker (shadow vs controlled-write), minFactConfidenceForWrite config, extended decision outputs with fact context -- Implemented D1 mutation APIs with thin Hono handlers calling pure DB transaction closures -- Validated txIngestEnvelope writes all v2 memory columns (normalized_content, is_deleted, extraction_status, embedding_model, extraction_model) -- Set up Ollama model `teichai-qwen3-14b` for local inference - -Key decisions: -- Keep mutation logic in pure DB transaction closures (`txModifyMemory`, `txForgetMemory`, etc.) - handlers are thin validators -- Transaction boundaries must be respected - no provider calls in transaction closures -- Use normalized/hash-derived content for consistent embeddings -- Maintain audit trail via `reason` and `if_version` fields - -Problems solved: -- Fixed v2 column population in txIngestEnvelope - both daemon remember path and pipeline derived-memory path now populate metadata correctly -- Established safety gates pattern with `applyPhaseCWrites` pure DB closure + UMAP Performance Optimization: Successfully decomposed the migration task into parallelized sub-tasks. The migration file `010-umap-cache.ts` has been created and registered. The daemon endpoint `GET /api/embeddings/projection` is being implemented. Cache invalidation hooks are being added to `syncVecInsert` and related vector operations in `db-helpers.ts`. + Dashboard Client Rewrite: The dashboard `api.ts` has been updated to fetch projection coordinates from the daemon instead of running UMAP locally. The `umap-js` package has been removed from `packages/cli/dashboard/package.json`. Technical Notes -Codebase: -- Go/TypeScript daemon with SQLite database -- Transaction system: `transactions.ts` contains closures like `txIngestEnvelope`, `txApplyDecision`, `txModifyMemory` -- Hono for HTTP routing with thin handlers delegating to transaction closures - -Database Schema: -- Memory table has v2 columns: `normalized_content`, `is_deleted`, `extraction_status`, `embedding_model`, `extraction_model` -- IngestEnvelope struct has optional fields for different metadata sources -- Concurrency via `if_version` field and optimistic locking - -Models: -- Qwen3-14B-Claude-4.5-Opus-High-Reasoning-Distill (Q8_0 quant, 15.7GB) via Ollama -- Custom Modelfile with system prompt and tool definitions - -Testing: -- Integration tests for mutation APIs, audit trail, and recovery semantics needed -- End-to-end pipeline validation completed for Phase C + Code Standards: Strict TypeScript discipline: no `any` types, no `as` assertions (use typed variables), explicit return types on all exports. + Monorepo Structure: Bun-based monorepo located at `/home/nicholai/signet/signetai`. + Cache Invalidation: The `syncVecInsert` function in `db-helpers.ts` requires specific cache invalidation hooks to be added. + Timeline Aggregation: The daemon processes `memory_history`, `memories`, and `connectors` tables with ISO timestamps. + Signet Agent Profile: Confirmed location is `~/.agents/`. Rules & Warnings -- UI Work Rule: Never delegate UI/frontend work to subagents. Must be handled directly by the current model (Opus) passing identical image references as provided by user. This is critical for maintaining context and fidelity. -- Architecture: Keep transaction closures pure (no async, no provider calls). Handlers validate and call closures. -- Phase Order: Follow spec order - D1 (mutation APIs) → D2 (concurrency/policy) → D3 (integration tests). -- Safety Gates: minFactConfidenceForWrite must be respected in all write paths. -- Content Normalization: Use normalized/hash-derived content for consistent embeddings across different sources. -- Audit Trail: Always include `reason` and `if_version` fields in mutation operations. \ No newline at end of file + UI Image Handling: For any frontend image rendering or design tasks, Opus must handle the image context directly. Never delegate UI image work to subagents. + Database Safety: Never delete from the production database without a backup. + Refactoring Limits: Adhere to strict file size (max 700 LOC) and indentation (max 3 levels) constraints. + Logging: Keep journal entries updated in the memory database regularly. +- Agent Locations: The Signet agent profile resides at `~/.agents/`. \ No newline at end of file diff --git a/memory/debug.log b/memory/debug.log index 464214dc6..9a9f3ad92 100644 --- a/memory/debug.log +++ b/memory/debug.log @@ -703,3 +703,5 @@ We are synthesizing a WORKING MEMORY document for Nicholai. Focus is on CURRENT 2026-02-22T04:10:06.019443 [regenerate] starting regeneration 2026-02-22T04:10:08.710724 [regenerate] found 452 transcripts, 50 memories 2026-02-22T04:10:08.710838 [regenerate] trying model: glm-4.7-flash +2026-02-22T04:10:45.473163 [regenerate] success with glm-4.7-flash (2794 chars) +2026-02-22T04:10:45.473410 [regenerate] wrote 2831 chars to MEMORY.md