managarten/docs
Till JS 16c8818338 feat(mcp): M1+M1.5 MCP gateway + tool-registry + shared-crypto
Foundation for autonomous Claude-driven testing. Plan:
docs/plans/mana-mcp-and-personas.md.

New packages
- @mana/tool-registry — schema-first ToolSpec<InputSchema, OutputSchema>
  with zod generics, scope ('user-space' | 'admin') and policyHint
  ('read' | 'write' | 'destructive'). sync-client helpers speak the
  mana-sync push/pull protocol directly so RLS and field-level LWW are
  preserved. MasterKeyClient fetches per-user MKs via the existing
  mana-auth GET /api/v1/me/encryption-vault/key endpoint (JWT-gated,
  ZK-aware, already audited) — no new service-key endpoint built.
  ZeroKnowledgeUserError surfaced as a typed throw.
- @mana/shared-crypto — AES-GCM-256 primitives extracted from the web
  app's $lib/data/crypto/aes.ts so the server-side tool handlers and the
  browser produce byte-for-byte identical wire format
  (enc:1:{b64(iv)}.{b64(ct)}). Web app aes.ts now re-exports from
  shared-crypto — 5 existing importers unchanged, svelte-check stays
  green.

New service
- services/mana-mcp (:3069, Bun/Hono) — MCP Streamable HTTP gateway.
  JWKS auth against mana-auth, per-user session isolation (session-id
  belongs to the user who opened it — cross-user access returns 403),
  admin-scoped tools filtered out before registration. MasterKeyClient
  cached per process with a 5-minute TTL.

11 tools registered
- habits.{create,list,update,archive}, spaces.list (plaintext, M1)
- todo.{create,list,complete}, notes.{create,search}, journal.add
  (encrypted — field lists match
  apps/mana/apps/web/src/lib/data/crypto/registry.ts verbatim)

Infra
- Port 3069 added to docs/PORT_SCHEMA.md
- services/mana-mcp/CLAUDE.md with architecture, auth model,
  tool-authoring recipe, local smoke-test steps
- Root CLAUDE.md services list updated

Type-check green across shared-crypto, mana-tool-registry, mana-mcp.
svelte-check on apps/mana/apps/web stays at 0 errors / 0 warnings.
Boot smoke verified: /health returns registry.loaded=true, unauthed
/mcp → 401, invalid-JWT /mcp → 401 with descriptive message.

Decisions locked in for later milestones (per plan D1–D10):
- Personas will be real mana-auth users (users.kind='persona'), no
  service-key bypass (D1, D2)
- Tool-registry is the SSOT; mana-ai and the legacy
  apps/api/src/mcp/server.ts get merged into it in M4 (three current
  parallel tool catalogs collapse to one)
- Persona-runner (:3070) will be a separate service using the Claude
  Agent SDK + MCP client (D5)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 13:18:35 +02:00
..
architecture docs: update tool coverage table + server-side research + templates 2026-04-16 12:35:40 +02:00
central-services refactor(arcade, shared-ui): migrate CommandBar to GlobalSpotlight, delete CommandBar 2026-04-15 01:17:55 +02:00
decisions chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
future docs: add langfristige Roadmap-Punkte zu AI_AGENTS_IDEAS.md 2026-04-16 15:27:38 +02:00
modules feat(sleep): add sleep module with tracking, hygiene checklists, and stats 2026-04-13 21:19:52 +02:00
optimizable docs(optimizable): add manual-test-backlog as the "zu testen" register 2026-04-22 19:02:55 +02:00
plans feat(mcp): M1+M1.5 MCP gateway + tool-registry + shared-crypto 2026-04-23 13:18:35 +02:00
postmortems chore: tidy root files + reorganize a few stale docs 2026-04-08 12:15:27 +02:00
reports docs(gemini-deep-research): Mac-Mini deploy log 2026-04-22 2026-04-22 18:22:31 +02:00
test-examples chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
ANALYTICS.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
APP_GAP_ANALYSIS.md chore: misc fixes, new services, lockfile cleanup 2026-03-28 10:27:35 +01:00
APP_ONBOARDING.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
ARCHITECTURE_MIGRATION_REPORT.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
CAPACITY_PLANNING.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
CARDS_POSTGRES_MIGRATION.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
CLOUDFLARE_DOMAINS.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
CLOUDFLARE_FALLBACK.md refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
CLUSTER_HARDWARE_ANALYSE.md rename(taktik): rebrand to Times 2026-03-30 15:44:18 +02:00
complexity-hotspots.md chore(audit): module complexity reports + workbench map 2026-04-14 19:47:42 +02:00
complexity-map.html chore(audit): module complexity reports + workbench map 2026-04-14 19:47:42 +02:00
CONTEXT_INTELLIGENCE_REPORT.md docs: add Context Intelligence research report 2026-04-14 19:50:25 +02:00
DATABASE_MIGRATIONS.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
DEPLOYMENT.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
DEVELOPMENT_SCRIPTS.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
DEVLOG_GUIDELINES.md feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
DISCORD_NOTIFICATIONS_SETUP.md feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
DOCKER_GUIDE.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
ENVIRONMENT_VARIABLES.md feat(env): persistent dev secrets via .env.secrets override 2026-04-08 17:50:37 +02:00
ERROR_TRACKING.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
EXPO_SDK_UPGRADE.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
EXTERNAL_SERVICES.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
EXTERNAL_SSD_OPPORTUNITIES.md refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
FIX_COLIMA_MOUNTS.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
GIT_WORKFLOW.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
I18N.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
LOCAL_DEVELOPMENT.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
LOCAL_LLM_MODELS.md feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
LOCAL_STT_MODELS.md 📝 docs: add design UX guidelines and local model documentation 2026-01-27 01:32:31 +01:00
MAC_MINI_SERVER.md fix(mana-auth) + chore: rewrite /api/v1/auth/login JWT mint, remove Matrix stack 2026-04-08 16:32:13 +02:00
MAIL_SERVER.md feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
MANA_BOX_HARDWARE.md rename(taktik): rebrand to Times 2026-03-30 15:44:18 +02:00
MANA_EARNING_SYSTEM.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
MANA_VALUES.md feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
MICROSERVICES_API_OVERVIEW.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
MOBILE_DESKTOP_APP_STRATEGY.md feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
module-coupling.md chore(audit): module complexity reports + workbench map 2026-04-14 19:47:42 +02:00
module-health.md chore(audit): module complexity reports + workbench map 2026-04-14 19:47:42 +02:00
MODULE_REGISTRY.md feat(invoices): close Phase-2 gaps — finance cross-link + structured addresses 2026-04-20 18:58:18 +02:00
MONETIZATION_REPORT.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
MONITORING.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
OBSERVABILITY_GAPS.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
OLLAMA_MODELS.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
PLAN_TAURI_V2.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
PORT_SCHEMA.md feat(mcp): M1+M1.5 MCP gateway + tool-registry + shared-crypto 2026-04-23 13:18:35 +02:00
POSTGRES_BACKUP.md fix(infra): simplify PostgreSQL backup to pg_dumpall + pg_basebackup 2026-03-24 11:39:20 +01:00
PRE_LAUNCH_CLEANUP.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
PROD_READINESS_SCORE.md feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
PROJECT_OVERVIEW.md refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
PWA_GUIDE.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
RECOMMENDED_SERVICES.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
REFACTORING_AUDIT_2026_04.md refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
SEPA_ACTIVATION_CHECKLIST.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
SETUP_TEMPLATES.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
SHARED_PACKAGES_ROADMAP.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
SYNC_BILLING_PLAN.md feat(credits): add sync billing — monthly credit subscription for cloud sync 2026-04-10 22:21:58 +02:00
TECH_STACK_INDEPENDENCE.md refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
TECHNOLOGY_AUDIT_2026_03.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
TESTING_DEPLOYMENT_CHECKLIST.md chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
URL_SCHEMA.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
USER_SETTINGS.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
VERSIONING.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
WHO_MODULE.md docs(who): RFC for the historical-figure guessing module 2026-04-09 13:08:07 +02:00
WINDOWS_GPU_SERVER_SETUP.md fix(mana-voice-bot): move default port 3050 → 3024 + Windows GPU deployment notes 2026-04-08 13:14:57 +02:00