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
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
e9f389a8b7
feat(backend): add 11 telemetry events for Smart Actions
2026-04-06 11:13:50 -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
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
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
saravanakumardb1
9e3a7206b9
feat(backend): add note-prompts module with Smart Actions LLM integration
...
- Add @bytelyst/llm dependency (file: ref) + llm.ts singleton wrapper
- Add LLM env vars to config (LLM_PROVIDER, LLM_DEFAULT_MODEL, LLM_VISION_MODEL, LLM_EMBEDDING_MODEL)
- Create note-prompts module: types, repository, runner, routes, seed (20 built-in templates)
- Built-in templates: 8 transform, 3 extract, 3 generate, 2 analyze, 2 vision, 2 export
- Prompt runner supports text, image, and text+image inputs via @bytelyst/llm vision
- Upgrade copilot-transform.ts to use @bytelyst/llm directly (with local heuristic fallback)
- Add reading-time endpoint (GET /api/notes/:id/reading-time)
- Extend agent-action types with smart_action and auto_enrich
- Add note_prompts Cosmos container to cosmos-init
- Register notePromptRoutes in server.ts
- 15 new tests (CRUD, run, slug resolution, seed validation, reading-time)
2026-04-06 08:01:42 -07:00