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
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
4af86b43f7
feat(phase3): add notelett trail report import
2026-04-03 19:49:46 -07:00
saravanakumardb1
623d02c32f
test(notes): verify phase1 transcript→note import against @bytelyst/events schemas
...
- Add @bytelyst/events dependency for contract validation
- Expand ecosystem-phase1 tests from 1 to 13 focused tests:
- transcript artifact import from disk
- transcript capture event load + missing file graceful
- note creation with productId, sourceType, links, tags
- note artifact doc for internal persistence
- artifact.created event with upstream causation propagation
- artifact.linked event chained from artifact.created
- provenance lineage preservation (lysnrai→notelett)
- NoteArtifactEnvelopeSchema conformance (no contract drift)
- ArtifactCreatedEventSchema conformance
- ArtifactLinkedEventSchema conformance
- disk persistence + index file verification
- graceful degradation without capture event
- Fix server.test.ts route count (7→8) for ecosystem-phase1 route
2026-04-03 19:13:55 -07:00
9ecc7c6bf5
fix(notes): preserve phase1 transcript event lineage
2026-04-03 17:40:59 -07:00
6ffc2f8755
feat(notes): import phase1 transcript artifacts
2026-04-03 16:36:54 -07:00
a697752d15
feat: implement WEB_AI_FAST_ROADMAP (web + backend + docs)
...
Phase 1: Command palette (⌘K), editor autosave with quiet auto-saves, dashboard
saved views from API + quick links + onboarding seed CTA, explicit task scan panel.
Phase 2: Context pack formatter with YAML frontmatter, copy on note + workspace .md export.
Phase 3: ADR for hybrid search without embeddings; POST /notes/search (lexical +
ranked hybrid); search UI mode toggle.
Phase 4: POST copilot + suggest-title; in-editor copilot actions; /chat retrieval
answers with citations (backend chat.rag_enabled).
Phase 5: Settings MCP snippet, offline queue note, API token deferral; DEEP_LINKS.md.
Phase 6: Note shares + public GET; share page; POST onboarding-seed.
Phase 7: note_versions on PATCH; version panel; create-note templates; PWA manifest.
Flags: search.hybrid_enabled, copilot.enabled, chat.rag_enabled, onboarding.seed_enabled.
Made-with: Cursor
2026-03-31 13:00:36 -07:00
saravanakumardb1
6acd1a70d4
fix(backend): fix trackEvent call signature and route registration tests
...
- auth.ts: type requireWriter param as { headers: { authorization?: string } } instead of unknown
- notes/routes.ts: fix 3 trackEvent calls from object form to positional args (event, userId, properties)
- workspaces/routes.ts: fix 1 trackEvent call from object form to positional args
- 5 route registration tests: add missing delete mock to app object for Phase 2 DELETE endpoints
2026-03-31 01:00:32 -07:00
8d84bcb841
feat: add DELETE endpoints, role enforcement, telemetry and feature flags
...
Phase 2 of the execution roadmap:
- Add DELETE endpoints for notes (soft-delete), workspaces, tasks, artifacts, relationships
- Add requireWriter() role enforcement on all write routes (POST/PATCH/DELETE)
- Activate trackEvent() telemetry on note.created, note.updated, note.archived, workspace.created
- Gate notes search behind isFeatureEnabled('notes.enabled')
- Update all test mocks to include role and new auth exports
Made-with: Cursor
2026-03-29 20:47:12 -07:00
saravanakumardb1
20cc3e4e49
feat(backend): admin-panel encryption toggle via initEncryption()
...
- FIELD_ENCRYPT_ENABLED env var (default: true, fallback only)
- initEncryption(productId) polls encryption_enabled from platform-service
- Admin panel toggle takes precedence, 3s timeout graceful fallback
2026-03-21 15:25:41 -07:00
saravanakumardb1
e85cfeb0f1
feat(notelett): encrypt note body with @bytelyst/field-encrypt
...
- Add field-encrypt dependency + config env vars (FIELD_ENCRYPT_*)
- Create backend/src/lib/field-encrypt.ts encryptor singleton
- Update notes repository: encrypt body on create/update, decrypt on read
- Backward-compatible: isEncryptedField guard handles plaintext during migration
- All 86 tests passing
2026-03-21 09:29:44 -07:00
saravanakumardb1
8a1234a460
feat(backend): add GET /api/bootstrap route + test
...
- Returns productId, displayName, backendPort for client bootstrapping
- Integration test validates response shape and types
2026-03-20 21:15:41 -07:00
saravanakumardb1
21ad6ed978
feat(backend): add @bytelyst/backend-flags + backend-telemetry, fix config defaults
...
- Add @bytelyst/backend-flags and @bytelyst/backend-telemetry packages
- Create feature-flags.ts and telemetry.ts wrappers using shared packages
- Add TELEMETRY_ENABLED, FEATURE_FLAGS_ENABLED, DB_PROVIDER=memory, JWT_SECRET dev default
- 80/80 tests pass (integration tests now work without env vars)
2026-03-20 17:31:53 -07:00
saravanakumardb1
cc91e3dac7
fix(backend): use config.DB_PROVIDER instead of process.env.DB_PROVIDER in datastore.ts
...
- Reads validated DB_PROVIDER from Zod config instead of raw env
- Removes stale isTest fallback logic (now handled by config defaults)
2026-03-20 08:29:36 -07:00
saravanakumardb1
b04189df3f
refactor(backend): migrate config.ts to @bytelyst/backend-config base schema
...
- Extends baseBackendConfigSchema with product-specific overrides
- DB_PROVIDER now declared in all repos (was missing in 3)
2026-03-20 07:56:29 -07:00
saravanakumardb1
942d00cc25
refactor(backend): migrate auth.ts + request-context.ts to @bytelyst/fastify-auth
...
- auth.ts: 80→18 lines, delegates to createAuthMiddleware()
- request-context.ts: delegates to createRequestContext()
- Re-exports JwtPayload, AuthPayload from shared package
2026-03-20 07:45:59 -07:00
saravanakumardb1
2a32a54ae7
refactor(backend): remove errors.ts re-export, import @bytelyst/errors directly
2026-03-20 07:19:29 -07:00
saravanakumardb1
e5535252c7
feat(backend+web): note summarization + export endpoints [B3, B6]
...
- backend: POST /notes/:id/summarize — calls extraction-service, stores summary artifact
- backend: GET /notes/export — JSON + Markdown format support
- backend: extraction-client.ts for extraction-service integration
- backend: 4 new integration tests (summarize, export JSON, export MD, invalid format)
- web: summarizeNote + exportNotes client functions
- web: Summarize button on note detail page
- web: Export Notes button on workspaces page
- web: exclude e2e/ from vitest config
- Total: 80 backend, 14 web, 23 mobile = 117 tests
2026-03-19 08:59:26 -07:00
saravanakumardb1
4ffe7569b0
fix(auth): JWKS URL-tracking singleton + expanded test coverage
2026-03-12 11:22:04 -07:00
saravanakumardb1
8e2a1b37c3
feat(auth): RS256 JWKS verification — NoteLett backend
2026-03-12 11:15:06 -07:00
saravanakumardb1
d09259c42e
docs: update AGENTS.md + ROADMAP.md with all completed features, register saved_views container
...
- AGENTS.md: added saved-views module, lib/platform.ts, batch-review endpoint, saved-views endpoints, blob-client to shared packages, 7 Cosmos containers, keyboard shortcuts + debounce hooks
- ROADMAP.md: 6 new commit entries, all blockers/deferrals marked resolved
- cosmos-init.ts: registered saved_views container with /userId partition
All 3 surfaces verified: backend 18/18, web 6/6, mobile typecheck pass.
2026-03-10 19:45:13 -07:00
saravanakumardb1
e1fde25afd
feat(identity): lock NoteLett product identity across all surfaces
...
- productId: notelett
- displayName: NoteLett
- domain: notelett.app
- iOS bundle: com.bytelyst.notelett
- Android bundle: com.notelett.app
- backend port: 4016
- token namespace: --nl-* (CSS), NoteLettTheme (native)
Rippled through:
- shared/product.json (canonical source)
- backend package.json, config, cosmos-init, all 10 test files
- web package.json, landing page, notes-client test
- mobile app.json, package.json, auth screen
- docs: PRD, ROADMAP, architecture review, foundations, web/mobile roadmaps
- registered in learning_ai_common_plat/products/notelett/
Verification: backend typecheck + 18 tests, web typecheck + 6 tests, mobile typecheck — all pass.
2026-03-10 18:47:01 -07:00
saravanakumardb1
b73d5e9a96
fix(config): complete phase-a identity alignment
2026-03-10 11:59:12 -07:00
saravanakumardb1
4fb859c81c
feat(notes): scaffold product surfaces and backend MCP slices
2026-03-10 08:53:07 -07:00