Compare commits

...
11 Commits
Author SHA1 Message Date
OpenCode 6a58ec4d0c chore: move NexusAI out to its own private repository (Hidosi/nexusai) 2026-08-18 15:19:19 +07:00
OpenCode 4c3aea8434 chore: ignore venv/ and __pycache__ in repo root 2026-08-18 14:39:03 +07:00
OpenCode 9c308c09e4 docs: add AGENTS.md — project map, tools, API, env, gotchas, changelog 2026-08-18 13:01:42 +07:00
OpenCode 8bd2e89907 feat: STT transcripts, model catalog+fuzzy resolve, UI audio player & auto-refresh
Core:
- ModelCatalog: periodic background sync of provider models + fuzzy resolve.
  Misspelled model ids map to the nearest match (cheapest on ties); no match
  raises ModelResolutionError with cheapest-first suggestions for the agent.

mcp-server:
- nexus_stt now writes the transcript to a Markdown file in the media dir so it
  appears in the gallery and is readable in the modal.
- media handler resolves model via catalog before generating; returns a note
  when substituting, or a BAD_REQUEST with available models when nothing fits.
- context wires a ModelCatalog per media provider with auto-sync.

admin:
- /media serves correct Content-Type (incl. text/markdown for transcripts).
- Gallery: audio play button on cards, dedicated audio player in modal,
  text/transcript tiles that fetch and render the .md in the modal.
- Header: auto-refresh toggle (5/10/30s) that refreshes the active tab
  without a full page reload; pauses while a modal is open.
2026-08-18 12:25:42 +07:00
OpenCode b2f57cc361 feat(mcp-server): add nexus_vision tool and fix upload MIME detection
- New tool nexus_vision: describe an image via a vision chat model
  (default google/gemini-3.1-flash-lite) and record result in journal.
- NordRouter /media/upload now detects MIME from file extension so
  data: URLs use the correct type (fixes HTTP 415 for images/audio/video).
- HttpClient supports FormData bodies (undici) for future multipart use.
2026-08-18 11:50:29 +07:00
OpenCode c65f9106df fix(mcp-server): do not store source audio path as STT gallery file
STT does not produce a local media file, so journal.filePath should be
null. Otherwise admin gallery tries to serve the source file from outside
the media dir and gets a broken link.
2026-08-18 10:33:15 +07:00
OpenCode 1bc3746594 Admin UX: light/dark theme, gallery pagination, content modal + delete, openai type
- Light/dark theme toggle persisted in localStorage
- Gallery pagination: page size 50/100/150/200 with prev/next
- Fullscreen modal viewer (image/video/audio) with metadata and delete
- Delete content: DELETE /api/generations/:id removes file (media-dir guarded)
  and journal record; added Journal.deleteById
- Provider types now include openai
- HTML output escaping in UI
2026-08-17 18:13:36 +07:00
OpenCode 6ff2b27556 Fix MCP crash when DB key exists without NEXUS_MASTER_KEY
KeyResolver now wraps getApiKey in try/catch and falls back to env instead of
crashing startup. ProvidersStore.getApiKey returns undefined when the cipher is
disabled rather than throwing. Server starts cleanly with env-only, and uses the
encrypted DB key when the master key is present.
2026-08-17 18:02:35 +07:00
OpenCode 679e56424b Add admin web UI (Phase 2): spend dashboard, media gallery, provider management
Fastify + single-page frontend on shared @nexusai/core. Reads the same SQLite
journal and media dir. Features: usage stats (by provider/capability/day),
content gallery (image/audio/video with local file serving + path-traversal
guard), provider CRUD with encrypted keys (masked in UI), enable/disable,
set-default, and real key validation via zero-cost /media/models call.
Adds Journal.getById and NordRouterMediaProvider.checkKey to core.
2026-08-17 17:22:07 +07:00
OpenCode 62c692c5a1 Add managed provider keys: encrypted store + env>DB resolver
AES-256-GCM encryption (KeyCipher) with master key from NEXUS_MASTER_KEY,
never persisted. ProvidersStore in SQLite: CRUD, enable/disable, default,
encrypted api keys, masked views for UI. KeyResolver applies env>DB precedence
and supports multiple providers. context.ts registers providers dynamically
from resolved config; backward compatible with env-only setups.
2026-08-17 17:12:26 +07:00
OpenCode 02fc536e85 Add NexusAI: universal MCP service (TTS/STT/image/video/music/web-search)
Monorepo-lite with shared @nexusai/core and @nexusai/mcp-server (stdio).
Provider-agnostic tools with explicit provider selection; NordRouter adapter
(media generate/poll/download, estimate, upload, models) and search via
perplexity/sonar. Local STT via faster-whisper uv sidecar. SQLite journal of
every generation for usage stats and future admin. 10 MCP tools.
2026-08-17 17:06:47 +07:00
+2
View File
@@ -18,3 +18,5 @@ npm-debug.log*
# OS # OS
.DS_Store .DS_Store
Thumbs.db Thumbs.db
venv/
__pycache__/