From 0c3dfb35641d76eda6f1e7d3fb33afa409905eb8 Mon Sep 17 00:00:00 2001 From: Roberto Date: Thu, 30 Apr 2026 00:11:39 +0200 Subject: [PATCH] Update note management from db vector to index --- .claude/CLAUDE.md | 8 ++++---- adiuvAI | 2 +- api | 2 +- docs/executive_assistant_scout.md | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 1a7fbe1..e2d4421 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -68,7 +68,6 @@ Preload (contextBridge: window.electronTRPC + window.electronAI) Main Process (Node.js) ├── tRPC router (all CRUD + AI procedures) ├── SQLite (better-sqlite3 + Drizzle ORM, WAL mode) - ├── LanceDB (vector embeddings, 1536-dim text-embedding-3-small) └── LangGraph orchestrator (3 specialist agents, pluggable LLM providers) ``` @@ -83,7 +82,7 @@ Main Process (Node.js) - `src/main/ipc.ts` — Custom tRPC↔IPC bridge - `src/main/router/index.ts` — All tRPC routers (~600 LOC) - `src/main/ai/orchestrator.ts` — LangGraph intent routing + 3 agents (~991 LOC) -- `src/main/db/schema.ts` — 6 tables (clients, projects, tasks, checkpoints, notes, taskComments) +- `src/main/db/schema.ts` — 7 tables (clients, projects, tasks, checkpoints, notes, noteEdits, taskComments) - `src/renderer/routes/` — File-based routing (TanStack Router auto-generates `routeTree.gen.ts`) - `src/renderer/components/ui/` — shadcn/ui primitives (new-york theme, neutral colors) - `src/main/auth/auth-manager.ts` — Login, register, logout, OAuth flow (singleton) @@ -95,10 +94,11 @@ Main Process (Node.js) **Non-obvious details**: - `electron-trpc` NOT used — custom IPC bridge in `ipc.ts` + `ipcLink.ts` because electron-trpc bundles tRPC v10 internals - Vite configs use `.mts` extension to avoid ESM/CJS conflicts with electron-forge -- `forge.config.ts` has complex cross-compilation hooks (downloads platform-specific native binaries for better-sqlite3 and LanceDB) +- `forge.config.ts` has complex cross-compilation hooks (downloads platform-specific native binaries for better-sqlite3) - DB has no foreign key constraints — cascade deletes in tRPC procedures - Timestamps are milliseconds (`Date.getTime()`), not ISO strings -- Notes auto-embed to LanceDB on create/update (fire-and-forget, errors swallowed) +- Notes use `aiSummary` index (≤250 char, backend gpt-4o-mini) for AI navigation — LanceDB fully removed +- AI note edits go through `noteEdits` HITL table; AI calls `propose_note_edit`, user approves/rejects in UI **Settings Page (shared Electron + Web)**: - Settings page runs in **both** Electron and standalone web SPA (future landing-page portal). Same React components — no duplication. diff --git a/adiuvAI b/adiuvAI index d0b344b..df8cbb5 160000 --- a/adiuvAI +++ b/adiuvAI @@ -1 +1 @@ -Subproject commit d0b344beece9eb22f787bdc1ee7c46f302515fb5 +Subproject commit df8cbb5c35464a02ed9d84f7c3b888002ca13843 diff --git a/api b/api index c20c6d7..6f4c68b 160000 --- a/api +++ b/api @@ -1 +1 @@ -Subproject commit c20c6d7853ec5259a92ab7c01841c90e39382fee +Subproject commit 6f4c68b3593a54aed3898c3f79892f43e1f32088 diff --git a/docs/executive_assistant_scout.md b/docs/executive_assistant_scout.md index 314c94e..7085d48 100644 --- a/docs/executive_assistant_scout.md +++ b/docs/executive_assistant_scout.md @@ -1,3 +1,5 @@ +Ho bisogno che mi analizzi il documento `./docs/executive_assistant_scout.md`. Si tratta di una proposta di evoluzione del _UNIFIED_PROCESSING. Dovresti valutarla in funzione dell'attuale implementazione e rispondere alle domande nel file. Una volta consolidate le domande, devi generarmi un piano per l'implementazione. + ### Gestione Agenti Autonomi L'utente deve avere la possibilità di creare degli *Executive Assistant Scout*. Questi agenti devono essere autonomi nella ricerca e nell'estrapolazione di: