Commit Graph

200 Commits

Author SHA1 Message Date
saravanakumardb1
d1c6cf47c8 feat(palace): add @bytelyst/palace shared package — MemPalace primitives (91 tests)
New shared package: packages/palace/ (@bytelyst/palace)

Modules:
- types.ts — BasePalaceWingDoc, RoomDoc, MemoryDoc, TunnelDoc, KGTripleDoc, DiaryDoc
- halls.ts — HallType union, HALL_PRESETS (notelett/mindlyst/coding), hallFromLabel()
- cosine.ts — cosineSimilarity(), topKByCosine(), normalizeVector()
- dedup.ts — isContentDuplicate(), isExactDuplicate(), findClosestMatch()
- decay.ts — computeDecayedRelevance(), boostRelevance()
- extraction.ts — buildExtractionPrompt(), parseExtractionResponse(), regexFallbackExtraction()
- kg.ts — findContradictions(), mergeTriples(), isTripleCurrent()
- wakeup.ts — buildWakeUpLayers(), truncateToTokenBudget(), WAKEUP_PRESETS
- config.ts — palaceConfigSchema (Zod)

7 test files, 91 tests passing.
Consumed by NoteLett, MindLyst, and future palace-enabled products.
2026-04-10 00:57:00 -07:00
saravanakumardb1
031e910607 fix(extraction-service): review fixes — locale mapping, model passthrough, content-type validation
BUG 1: Azure locale derivation produced 'en-EN' (invalid) for 2-letter codes.
  → Added toAzureLocale() with 28-language mapping table (en→en-US, pt→pt-BR, etc.)
  → Exported for testing; falls back to code-CODE for unmapped languages.

BUG 2: model field from request schema was silently dropped after provider refactor.
  → Added optional model field to TranscriptionInput interface.
  → OpenAI provider now uses input.model override (falls back to config.model).
  → Route passes model through to provider.transcribe().

GAP 4: SUPPORTED_AUDIO_TYPES was defined but never validated against.
  → Route now rejects unsupported content-types with a clear error message.
  → Allows application/octet-stream (Azure Blob SAS URLs often return this).

GAP 5: Client JSDoc still said 'via OpenAI Whisper API' — now 'via configured STT provider'.

GAP 8: Azure WAV content-type hardcoded samplerate=16000 — now generic audio/wav.

Tests: 42 transcription tests (was 35), 178 total passing.
  → toAzureLocale: 4 tests (locale mapping, passthrough, fallback, case-insensitive)
  → setSTT: 1 test (singleton override)
  → model passthrough: 2 tests (mock ignores, input accepts)
2026-04-06 11:40:27 -07:00
saravanakumardb1
f8e15880d2 feat(extraction): add transcribe() to ExtractionClient — reusable speech-to-text client
- TranscribeRequest/TranscribeResponse types exported from @bytelyst/extraction
- transcribe() method on ExtractionClient calls POST /api/transcribe
- 3 new client tests (correct body, optional fields, error propagation)
- Package test count: 16 → 19
2026-04-06 11:11:17 -07:00
saravanakumardb1
151e07207b feat(llm): add vision, streaming, and embedding support
- ContentPart types (TextContentPart, ImageUrlContentPart) for multipart messages
- ChatMessage.content now accepts string | ContentPart[] for vision
- EmbeddingRequest/Response types + optional embed() on LLMProvider
- chatCompletionStream() implemented in OpenAI + Azure providers (SSE parsing)
- embed() implemented in OpenAI + Azure providers
- Vision helpers: isVisionMessage, hasVisionContent, buildVisionMessage, getMessageText
- MockLLMProvider: streaming, embedding, vision content support
- 27 tests passing (up from 7)
2026-04-06 07:42:30 -07:00
43bf51a290 feat(llm): add Perplexity, Gemini providers and createFallbackChain
- Add PerplexityProvider (OpenAI-compatible, reads PERPLEXITY_API_KEY)
- Add GeminiProvider (Google Generative Language API adapter, reads GEMINI_API_KEY)
- Add createFallbackChain() — ordered provider chain, skips unconfigured,
  aggregates errors; allows any app to replace custom LLM fallback loops
- Extend LLMProviderType with 'perplexity' | 'gemini'
- Update factory to resolve and instantiate new provider types
- Add PAID_PROVIDERS to llm-router registry (OpenAI, Perplexity) for apps
  using round-robin routing alongside free-tier providers
- 27 tests covering fallback chain, new providers, error/edge cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 12:50:08 -07:00
59ae0e1943 feat(runtime): add checkpoint artifact id contract 2026-04-04 14:27:26 -07:00
9aeb9bbd59 feat(runtime): add checkpoint summaries to shared and cowork surfaces 2026-04-04 12:13:46 -07:00
ff8c5eb704 fix(runtime): add queued agent run state 2026-04-04 11:11:45 -07:00
9810ebf619 fix(events): tighten timeline and runtime contracts 2026-04-04 00:35:24 -07:00
3f2482b12c feat(events): add timeline and agent runtime baselines 2026-04-03 19:53:41 -07:00
e6b58b7187 feat(events): add phase3 trail report contracts 2026-04-03 19:47:54 -07:00
78918fbd90 feat(events): add phase2 plan routine habit contracts 2026-04-03 19:34:37 -07:00
76f1b47484 feat(events): add phase1 ecosystem contracts 2026-04-03 16:29:30 -07:00
root
8b37189829 chore(registry): point packages to gitea.bytelyst.com 2026-03-31 10:53:13 +00:00
saravanakumardb1
de13a08a98 chore: update chat history archive + design-tokens tarball 2026-03-31 01:42:48 -07:00
e174335a9e fix(rn-platform-sdk): align providers with platform-service APIs
- Feature flags: GET /flags/poll legacy { flags } + optional userId
- Kill switch: GET /settings/kill-switch, map message to reason
- Broadcasts: GET /broadcasts, POST dismiss; map server message shape
- Surveys: GET /surveys/active; submit via start/response/complete
- Auth: register(); login/register bodies include productId
- Telemetry: map queued events to TelemetryEventSchema; RN Platform import
- prepare script runs tsc on install

Made-with: Cursor
2026-03-30 01:12:18 -07:00
e13d0cba6b fix(subscription-client): add missing X-Product-Id header to API requests
Aligns with referral-client, org-client, and marketplace-client which
all send this header. The billing API likely requires it for product
scoping.

Made-with: Cursor
2026-03-30 00:26:48 -07:00
1ee97327ee feat(packages): create 9 NomGap-required platform packages
Create source implementations for packages imported by NomGap:
- @bytelyst/accessibility — ARIA helper functions (alertLabel, progressLabel, etc.)
- @bytelyst/celebrations — celebration engine for milestones
- @bytelyst/gentle-notifications — guilt-free notification filtering
- @bytelyst/time-references — human-friendly fasting time references
- @bytelyst/subscription-client — billing/subscription HTTP client
- @bytelyst/quick-actions — progressive disclosure UI helpers
- @bytelyst/referral-client — referral program client
- @bytelyst/marketplace-client — influencer marketplace client
- @bytelyst/org-client — B2B org management client

Made-with: Cursor
2026-03-29 22:24:02 -07:00
root
eba6c7a641 chore(platform): align docker and package outputs 2026-03-29 23:41:08 +00:00
saravanakumardb1
ac6d1e0911 chore(fastify-sse): add vitest devDependency
Package was running tests via workspace-hoisted vitest but had no
explicit devDependency. Adds vitest ^3.0.0 for standalone build
correctness.
2026-03-29 12:54:27 -07:00
saravanakumardb1
3e092490f3 chore: bump ollama-client, use-theme, use-keyboard-shortcuts to 0.1.1 for Gitea publish 2026-03-29 12:53:34 -07:00
saravanakumardb1
ea2e68562b chore(hooks): add typecheck script to use-theme and use-keyboard-shortcuts
Aligns with other packages that expose tsc --noEmit for CI.
2026-03-29 12:52:31 -07:00
saravanakumardb1
bb86bf220e fix(use-theme): remove redundant applyTheme from toggleTheme
toggleTheme was calling applyTheme() inside the state updater AND
the useEffect was also applying on state change — double DOM write.
Now toggleTheme relies solely on the useEffect, matching setTheme
behavior.
2026-03-29 12:52:19 -07:00
saravanakumardb1
2688f7e3ca fix(ollama-client): remove timeout from pull(), guard formatBytes NaN, simplify stream body, use fetchJson for delete() 2026-03-29 12:50:49 -07:00
saravanakumardb1
26ac2a3dec chore(fastify-sse): bump to 0.3.0 for Gitea publish 2026-03-29 12:49:28 -07:00
saravanakumardb1
3f808eff56 fix(ollama-client): add explicit Node types to tsconfig
config.ts imports child_process and fs — declare types: ['node']
explicitly instead of relying on root tsconfig inheritance.
2026-03-29 12:48:18 -07:00
saravanakumardb1
e6ccaec2fe fix(fastify-sse): add X-Accel-Buffering header to per-request startSSE
Aligns with hub.ts which already includes this header. Prevents
nginx/Traefik from buffering SSE chunks behind a reverse proxy.
2026-03-29 12:47:13 -07:00
saravanakumardb1
e194365711 fix(use-theme): add SSR safety guards for window access
setTheme, toggleTheme, and storage event listener now check
typeof window before accessing localStorage/addEventListener.
Prevents crashes in Next.js server components.
2026-03-29 12:46:18 -07:00
saravanakumardb1
6f4957d821 fix(use-keyboard-shortcuts): enforce symmetric modifier matching
Modifiers (shift, alt, meta) are now checked in both directions:
when not required, the physical key must NOT be pressed either.

Before: Cmd+K shortcut would fire on Cmd+Shift+K or Cmd+Alt+K.
After: exact modifier combination is enforced.

4 regression tests added.
2026-03-29 12:45:32 -07:00
saravanakumardb1
31cf7c0c6f feat(ollama-client): shared Ollama API client package 2026-03-29 12:43:01 -07:00
saravanakumardb1
bfa55998a2 feat(use-keyboard-shortcuts): shared React keyboard shortcuts hook 2026-03-29 12:40:43 -07:00
saravanakumardb1
0f5dc91648 feat(use-theme): shared React theme toggle hook 2026-03-29 12:40:06 -07:00
saravanakumardb1
c28dbc873e feat(fastify-sse): add per-request SSE helpers 2026-03-29 12:38:57 -07:00
saravanakumardb1
f808a3c05d fix(ui): use extensionless imports + bundler resolution for source-consumed package 2026-03-29 02:03:48 -07:00
saravanakumardb1
a8d37bd103 feat(ui): add Sidebar, StatCard, LoadingSpinner components + README docs — Level 3 component coverage 2026-03-29 00:19:45 -07:00
saravanakumardb1
b7cb44267b feat(design-tokens): add per-product CSS exports and regenerate all token files 2026-03-28 23:16:19 -07:00
saravanakumardb1
11a832e271 feat(ui): add Storybook for @bytelyst/ui component library
- Storybook 8 with React Vite framework + a11y addon
- Stories for Button (7 variants), Badge (6), Input (5), Card (4)
- Dark/elevated/light background presets
- Run: pnpm --filter @bytelyst/ui storybook
2026-03-28 00:59:25 -07:00
saravanakumardb1
5da71f3735 feat(ui): add Input, Textarea, Card, Label, Select, Separator components to @bytelyst/ui
- Input: with label, error, hint, a11y attributes
- Textarea: resizable with label, error, hint
- Card: with CardHeader, CardTitle, CardDescription sub-components
- Label: with required indicator
- Select: native select with chevron icon, label, error
- Separator: horizontal/vertical with ARIA roles
- All components use --bl-* design token CSS variables
- 12 total components in @bytelyst/ui
2026-03-28 00:33:38 -07:00
saravanakumardb1
6b6f147de7 feat(design-tokens): extend generator with per-product Swift + Kotlin native themes
- Add generateProductSwift() and generateProductKotlin() to generate.ts
- Add PRODUCT_NATIVE_MAP for 10 products (ChronoMind, JarvisJr, PeakPulse, LysnrAI, NomGap, ActionTrail, FlowMonk, NoteLett, LocalMemGPT, LocalLLMLab)
- Output 20 native token files in generated/native/
- Fix TS type narrowing for gradient objects (line 382)
- Update DESIGN_SYSTEM_AUDIT.md with Appendix G remediation results
2026-03-28 00:25:03 -07:00
saravanakumardb1
46ee14371c fix(ci): add --pool forks to all vitest test scripts to fix kill EPERM on Node v25
Root cause: tinypool worker teardown calls kill() which returns EPERM
in the act_runner host environment on Node.js v25.2.1. Tests pass but
the vitest process crashes during cleanup, causing CI failure.

Fix: --pool forks CLI flag on every package/service test script, plus
pool: 'forks' in all vitest.config.ts files. This uses child_process.fork()
worker management which handles termination cleanly.

60 package.json files updated, 10 vitest.config.ts files updated.
2026-03-27 23:23:38 -07:00
saravanakumardb1
252403f74e feat(ui): create @bytelyst/ui with Button, Toast, Modal, ConfirmDialog, Badge, EmptyState 2026-03-27 16:29:37 -07:00
saravanakumardb1
b3a1ee5db9 feat(design-tokens): per-product CSS generation for all 11 products 2026-03-27 16:24:58 -07:00
saravanakumardb1
915f59f595 feat(design-tokens): add actiontrail, notelett, localmemgpt, localllmlab product palettes 2026-03-27 16:23:13 -07:00
saravanakumardb1
b6348fd4fe fix(security): harden npm publish — add .npmrc + publishConfig to all 57 packages
- Created .npmrc with @bytelyst scoped registry pointing to local Gitea
- Added publishConfig.registry to all 57 @bytelyst/* package.json files
- Created scripts/harden-publish-config.sh for future re-runs
- Prevents accidental publish to npmjs.org or corporate JFrog registry
2026-03-26 21:51:05 -07:00
saravanakumardb1
adfa5b9fec fix(react-auth): align source version with published package 2026-03-23 18:36:15 -07:00
saravanakumardb1
841cdf3a16 fix(platform-service+events): 3 more gaps in diagnostics + delivery
- diagnostics/subscribers: wire session.created email notification to
  target user using existing 'diagnostics-session-created' template
  (was just logging instead of sending the email)
- events/types: add missing 'currency' field to payment.failed schema
  (payment.succeeded had it, payment.failed did not — inconsistency)
- delivery/subscribers: use event.payload.currency instead of hardcoded
  empty string in payment-failed email variables
- Typecheck clean, 1483/1483 tests pass
2026-03-22 01:20:24 -07:00
saravanakumardb1
1576b699b0 feat(platform-service): resolve all P3 TODOs — diagnostics notifications + test cleanup
- diagnostics/subscribers: notify admin via email when debug session is
  cancelled (looks up session creator via getSession + getUserById)
- diagnostics/subscribers: email session summary (logs/traces/screenshots)
  to admin when debug session completes
- diagnostics/subscribers: send Slack alert via dispatchSlack for FATAL
  logs ingested during debug sessions (on-call engineer notification)
- feedback-client/integration.test.ts: replace TODO-4 with clear NOTE,
  fix unused var lint errors
- feedback-client/gdpr.test.ts: mark lifecycle policy as accepted,
  remove console.log + unused blobPath variable
- Update WORKSPACE_TODO_AUDIT.md — P3 section: all 5 resolved
- Typecheck clean, 1483/1483 tests pass
2026-03-22 01:03:51 -07:00
saravanakumardb1
9471d4c56f fix(test): add @vitest-environment happy-dom to React UI test files
6 test files across 4 packages (auth-ui, dashboard-components,
dashboard-shell, react-auth) failed with 'document is not defined'
when run from the monorepo root because the root vitest config uses
environment: 'node'. The package-local configs set happy-dom but are
ignored when vitest is invoked from root.

Fix: Add per-file '// @vitest-environment happy-dom' annotations,
which is the recommended vitest pattern for mixed-environment monorepos.
This ensures tests work regardless of which config is loaded.

Recovers 148 tests across 6 files.
2026-03-21 16:21:42 -07:00
saravanakumardb1
7613d6890f feat(field-encrypt): admin-panel encryption toggle via feature flags
- FieldEncryptorConfig.enabled: false returns NullFieldEncryptor (no-op)
- NullFieldEncryptor stores plaintext as-is, decrypt returns ct directly
- 7 new tests for toggle behavior (50/50 total)
- encryption_enabled added to COMMON_FLAGS (seeded for all 10 products)
2026-03-21 15:24:19 -07:00
saravanakumardb1
4a47db72ae fix(flags): SSE stream endpoint + client — pass productId via query string
EventSource API cannot set custom headers, so the SSE /flags/stream
endpoint and feature-flag-client were broken for streaming mode:
- Server: accept productId and token from query string as fallback
  when x-product-id / authorization headers are absent
- Client: pass productId (and optional auth token) as query params
  when constructing the EventSource URL
2026-03-21 12:12:14 -07:00