Commit Graph

315 Commits

Author SHA1 Message Date
saravanakumardb1
97662d1dc0 fix(palace): deleteMemory now decrements wing/room memoryCount 2026-04-10 01:40:34 -07:00
saravanakumardb1
471660b771 docs(palace): mark Phase N6 complete in roadmap 2026-04-10 01:37:47 -07:00
saravanakumardb1
c7c1ebad74 feat(palace): MCP memory tools — search, store, wake-up, KG query, timeline, list wings (N6) 2026-04-10 01:37:31 -07:00
saravanakumardb1
5ce5a4b3cc docs(palace): mark Phase N5 complete in roadmap 2026-04-10 01:35:44 -07:00
saravanakumardb1
be2f4ff0ad feat(palace): REST API routes with search, CRUD, KG, wake-up, maintenance (N5) 2026-04-10 01:35:20 -07:00
saravanakumardb1
793c25cded docs(palace): mark Phase N3 complete in roadmap 2026-04-10 01:30:33 -07:00
saravanakumardb1
31bdb0ada9 feat(palace): knowledge graph triple CRUD with temporal queries, contradiction detection (N3) 2026-04-10 01:30:02 -07:00
saravanakumardb1
aa675e855b docs(palace): mark Phase N2 complete in roadmap 2026-04-10 01:27:31 -07:00
saravanakumardb1
a5dbeac77e feat(palace): wake-up context builder with L0/L1/L2 layers, L1 cache regeneration (N2) 2026-04-10 01:27:13 -07:00
saravanakumardb1
37fba5d4a5 docs(palace): mark Phase N4 complete in roadmap 2026-04-10 01:25:25 -07:00
saravanakumardb1
0af5f875bb feat(palace): auto-save hooks — extract memories on note create/update (N4) 2026-04-10 01:25:00 -07:00
saravanakumardb1
d9d0cffc8d docs(palace): mark Phase N1 complete in roadmap 2026-04-10 01:20:08 -07:00
saravanakumardb1
632b5df1ac feat(palace): add 30 tests with cross-user isolation, fix extractor regex fallback 2026-04-10 01:19:35 -07:00
saravanakumardb1
13020bc72f feat(palace): add LLM memory extractor with regex fallback 2026-04-10 01:16:55 -07:00
saravanakumardb1
44d8867aa5 feat(palace): add user-isolated repository with CRUD, search, dedup, prune, encryption 2026-04-10 01:15:41 -07:00
saravanakumardb1
38006af1a3 feat(palace): add @bytelyst/palace dep, palace types, 6 cosmos containers, config vars 2026-04-10 01:14:00 -07:00
saravanakumardb1
69a3706615 docs(palace): mark Phase N0 done — @bytelyst/palace d1c6cf4 (91 tests) 2026-04-10 01:07:14 -07:00
saravanakumardb1
b7bdfd97bc fix(test): resolve all TS lint errors in note-collaborators routes test — properly typed mock fns 2026-04-06 20:56:20 -07:00
saravanakumardb1
338e80fc33 fix(intake): support comma-separated status filter in GET /intake/jobs — fixes mobile polling contract mismatch 2026-04-06 20:48:26 -07:00
saravanakumardb1
e5f287c7ea feat(web): add intake URL bar, share dialog, intake API client — dashboard + enhanced sharing UI 2026-04-06 20:35:02 -07:00
saravanakumardb1
599d68e116 feat(sharing): add collaborative shares, export-text, deep-link helper — note-collaborators module (11 new tests) 2026-04-06 20:31:31 -07:00
saravanakumardb1
0e16714da1 feat(intake): add URL intake pipeline — classifier, extractors, rules engine, routes, 6 new prompt templates (27 total), 26 new tests 2026-04-06 20:28:36 -07:00
saravanakumardb1
6f262a5218 fix: register missing note_shares+note_versions containers, add multi-note input type 2026-04-06 20:20:12 -07:00
saravanakumardb1
18646fac6d fix(tests): fix all failing tests — server mock, ecosystem schema stubs, CreateNoteModal body assertion 2026-04-06 19:13:35 -07:00
saravanakumardb1
96015be313 fix: add /userId partition key to scheduler schedule+webhook collections 2026-04-06 16:29:24 -07:00
saravanakumardb1
d4cc696e02 fix: align PromptTemplateEditor, SmartActionsPanel, prompts page with backend enums; fix RunPromptModal type cast 2026-04-06 16:27:22 -07:00
saravanakumardb1
192c7baf2f fix: align web+mobile types with backend (categories, output types, field names, durationMs telemetry) 2026-04-06 16:24:31 -07:00
saravanakumardb1
f1c08d1a83 docs: update AGENTS.md test counts and SMART_ACTIONS_ROADMAP Phase 6 status (G20) 2026-04-06 13:44:41 -07:00
saravanakumardb1
6095f1d985 feat(smart-actions): add prompt-result screen, capture sub-routes, Cmd+Shift+A shortcut, telemetry events (G16-G19) 2026-04-06 13:43:47 -07:00
saravanakumardb1
63ee00037e test(e2e): expand smart-actions spec to 9 tests (G15) 2026-04-06 13:36:39 -07:00
saravanakumardb1
406153eeda test(mobile): add note-prompts API client and prompt-store tests (G14) 2026-04-06 13:36:00 -07:00
saravanakumardb1
4fd6994fb0 test(web): add prompt-client, SmartActionsPanel, RunPromptModal, NoteEditor tests (G10-G13) 2026-04-06 13:34:04 -07:00
saravanakumardb1
2a7cfbb73e test(backend): add runner, reading-time, copilot-transform, note-hooks tests (G6-G9) 2026-04-06 13:29:33 -07:00
saravanakumardb1
093da76eee feat(smart-actions): add run-stream SSE, history endpoint, weekly-digest template, web client functions (G1-G5) 2026-04-06 13:27:02 -07:00
saravanakumardb1
4bb2d84152 test(mobile): add API config unit tests 2026-04-06 11:18:29 -07:00
saravanakumardb1
9ff2348e1e docs: align AGENTS.md and README.md with Smart Actions implementation 2026-04-06 11:17:08 -07:00
saravanakumardb1
6bff2d3e2e chore(devops): add LLM env vars to .env.example, docker-compose, docker-prep 2026-04-06 11:15:36 -07:00
saravanakumardb1
e9f389a8b7 feat(backend): add 11 telemetry events for Smart Actions 2026-04-06 11:13:50 -07:00
saravanakumardb1
3f903a7a70 docs: mark 7 open review findings as resolved in SMART_ACTIONS_ROADMAP
- #8 (embeddings): @bytelyst/llm embed() already implemented in all providers
- #9 (voice transcription): POST /api/transcribe added to extraction-service
- #10 (URL-extract phase): already implemented in Phase 1
- #11 (webhook container): note_prompt_webhooks already in cosmos-init.ts
- #12 (LLM factory vs config): clarified, no conflict
- #13 (streaming): chatCompletionStream() already in OpenAI/Azure/Mock
- #14 (CopilotAction expansion): fix-rewrite, change-tone, continue, explain added

All 18 findings now resolved or noted. Zero open items remain.
2026-04-06 11:12:24 -07:00
saravanakumardb1
1b4b5af995 feat(backend): register 8 Smart Actions feature flags with route gating 2026-04-06 11:11:25 -07:00
saravanakumardb1
c71b01681f fix(backend): harden LLM error handling — retry, timeout, missing key guards 2026-04-06 11:09:08 -07:00
saravanakumardb1
b8bc096adb test(smart-actions): add scheduler, webhook, copilot integration tests 2026-04-06 11:05:42 -07:00
saravanakumardb1
0aad04f91a fix(mobile): align PromptCategory with backend, add tone param, remove dead import
- note-prompts.ts: fix PromptCategory ('analysis' → 'analyze', remove nonexistent 'vision'/'custom')
- note-prompts.ts: add CopilotTone type and optional tone param to copilotTransform
- capture.tsx: remove unused copilotTransform import (copilot requires real noteId)
2026-04-06 10:47:38 -07:00
saravanakumardb1
b424b490be fix(web): close tone dropdown on outside click
Add useRef + useEffect mousedown listener to dismiss the Change Tone
dropdown when clicking outside. Prevents stale dropdown from lingering.
2026-04-06 10:46:03 -07:00
saravanakumardb1
f2c3258b53 fix(backend): review fixes — persist requiresApproval, shutdown hook, productId check, GET by ID
- repository.ts: persist requiresApproval field in createPromptTemplate (was silently dropped)
- server.ts: register onClose hook to call stopSchedulerLoop() on graceful shutdown
- scheduler.ts: add productId check in webhook trigger note lookup
- scheduler.ts: add GET /prompt-schedules/:id and GET /prompt-webhooks/:id endpoints
2026-04-06 10:45:03 -07:00
saravanakumardb1
3260b7ea0a feat(smart-actions): F1-F4 inline editor AI, F15-F19 mobile capture modes, F25-F27 scheduler/webhooks/approval
F1-F4: Inline editor AI
- Backend: expand CopilotAction with fix-rewrite, change-tone, continue, explain
- Backend: add tone parameter to copilot route for change-tone action
- Web: copilot-client adds CopilotTone type and tone parameter
- Web: NoteEditor toolbar gains AI row with Fix & Rewrite, Change Tone dropdown,
  Continue Writing (appends at cursor), Explain (inline popover)

F15-F19: Mobile capture enhancements
- Backend: POST /note-prompts/url-extract endpoint (fetch, strip HTML, LLM summarize)
- Mobile API: extractFromUrl() and copilotTransform() client functions
- Mobile: capture tab rewritten with 6 capture modes grid (text, photo, voice,
  URL, scan, paste) — URL extract + clipboard paste fully wired, camera/voice/scan
  surface native permission prompts (require expo-av/expo-image-picker)
- expo-clipboard added as dependency

F25-F27: Scheduled actions, webhook triggers, approval-gated actions
- New scheduler.ts module with PromptScheduleDoc + PromptWebhookDoc types
- Schedule CRUD: GET/POST/PATCH/DELETE /prompt-schedules
- Webhook CRUD: GET/POST/PATCH/DELETE /prompt-webhooks
- POST /prompt-webhooks/:id/trigger — execute template against note
- Scheduler loop (60s tick) with cron next-run calculation
- Diagnostics endpoint: GET /prompt-schedules/diagnostics
- Cosmos containers: note_prompt_schedules, note_prompt_webhooks
- PromptTemplateDoc gains requiresApproval field (F27)
- Runner produces approvalState: proposed|applied based on template flag
- Create/Update schemas accept requiresApproval boolean
2026-04-06 10:25:34 -07:00
saravanakumardb1
511c36d87e feat(mcp): add Smart Action MCP tools — suggest_tags, check_duplicates, suggest_links
Phase 5 of Smart Actions Roadmap — Agent & workflow intelligence:

- Add 3 new MCP tool contracts to note-tool-contracts.ts:
  - notes.intelligence.suggest_tags: LLM-powered tag suggestion
  - notes.intelligence.check_duplicates: embedding-based duplicate detection
  - notes.intelligence.suggest_links: embedding-based related note suggestions
- Add Zod schemas and SmartActionMcpToolDefinitions export
- Implement executeSuggestTags, executeCheckDuplicates, executeSuggestLinks
- Wire all 3 into NotesExecutableMcpTools array (now 11 tools total)
- Update note-tools.test.ts to expect 11 tool names
- All 131 tests pass, typecheck clean
2026-04-06 08:45:38 -07:00
saravanakumardb1
37d7284730 feat(mobile): add Smart Actions — API client, prompt store, note detail integration
Phase 4 of Smart Actions Roadmap:

- Create mobile/src/api/note-prompts.ts: typed API client
  - listPromptTemplates, runPrompt, suggestTags, getReadingTime
- Create mobile/src/store/prompt-store.ts: Zustand store
  - fetchTemplates, runPrompt, clearResult, clearError
- Enhance note detail screen (mobile/src/app/note/[id].tsx):
  - Collapsible Smart Actions section with toggle
  - Reading time display on expand
  - Suggest tags button with inline tag display
  - Prompt template list (top 6) with one-tap execution
  - ActivityIndicator during prompt execution
  - Inline result card with model/token info and dismiss
- Mobile typecheck passes
2026-04-06 08:23:55 -07:00
saravanakumardb1
564e8f72dc feat(web): add Smart Actions UI — prompt client, SmartActionsPanel, prompts page
Phase 3 of Smart Actions Roadmap:

- Create web/src/lib/prompt-client.ts: typed API client for all prompt endpoints
  - listPromptTemplates, getPromptTemplate, createPromptTemplate, deletePromptTemplate
  - runPrompt, suggestTags, checkDuplicates, suggestLinks, getReadingTime
  - compareNotes, mergeNotes, getKnowledgeGaps
- Add Smart Actions types to web/src/lib/types.ts:
  - PromptTemplate, RunPromptInput, RunPromptOutput, SimilarNote, KnowledgeGap
- Create SmartActionsPanel component:
  - Reading time display, tag suggestion with accept/dismiss
  - Category filter tabs, 2-column template grid
  - One-click prompt execution with loading state
  - Inline result display with copy/dismiss
- Create /prompts template library page:
  - Browse built-in + custom templates with category filter
  - Grid layout with input/output type badges
  - Delete custom templates
- Wire SmartActionsPanel into note detail sidebar (above MetadataPanel)
- Add 'Prompts' nav item to Sidebar (Sparkles icon)
- Web typecheck passes, all 131 backend tests pass
2026-04-06 08:19:35 -07:00
saravanakumardb1
fe3b0f9b3e feat(backend): add note intelligence — embeddings, auto-summarize, duplicates, suggest-links, knowledge gaps
Phase 2 of Smart Actions Roadmap:

- Create lib/embeddings.ts: embedText(), cosineSimilarity(), stripHtmlForEmbedding()
- Add embedding + summaryArtifactId fields to NoteDoc
- Create lib/note-hooks.ts: runPostSaveHooks() for background AI enrichment
  - backgroundEmbed: compute and store note embedding vectors
  - backgroundAutoSummarize: generate summary artifact for notes > 300 words
  - Both gated behind feature flags (notelett_auto_embed_enabled, notelett_auto_summarize_enabled)
- Add intelligence endpoints to note-prompts routes:
  - POST /api/notes/:id/suggest-tags (F5) — LLM-generated tag suggestions
  - POST /api/notes/:id/check-duplicates (F8) — cosine similarity duplicate detection
  - POST /api/notes/:id/suggest-links (F9) — related note suggestions
  - POST /api/workspaces/:wsId/knowledge-gaps (F12) — workspace gap analysis
  - POST /api/notes/compare (F14) — multi-note comparison
  - POST /api/notes/merge (F13) — multi-note merge
- Add 4 feature flags for intelligence features
- 9 new tests in embeddings.test.ts (cosine similarity, HTML stripping, embedText)
2026-04-06 08:10:26 -07:00