mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:21:10 +02:00
First concrete piece of M3 (docs/plans/mana-mcp-and-personas.md). The
tick loop itself and the Claude Agent SDK + MCP integration are M3.b;
the action/feedback persistence endpoints are M3.c. This commit just
stands up the service so the remaining pieces have a shell to land in.
Service shape (Bun/Hono on :3070)
- src/config.ts
Env-driven configuration: auth URL, MCP URL, service key for
action/feedback callbacks (M3.c), Anthropic API key, deterministic
PERSONA_SEED_SECRET (must match scripts/personas/password.ts so the
runner can log back in without any stored credentials), tick
interval and concurrency, RUNNER_PAUSED kill-switch. Production
start asserts all secrets are set and the dev fallback secret is
rotated.
- src/password.ts
Bit-for-bit identical HMAC-SHA256 password derivation to
scripts/personas/password.ts. Duplicated deliberately: the two
sides can't share code (one is a repo-root utility script, the
other is a workspace service) but must stay in sync — comment
at the top calls this out.
- src/clients/auth.ts
Two upstream calls the runner needs for one tick: POST /auth/login
and GET /api/auth/organization/list. loginAndResolvePersonalSpace()
wraps both and picks the persona's auto-created personal space as
the write target (throws if none exists — Spaces-Foundation should
always have seeded one on signup).
- src/index.ts
Hono app: /health, /metrics (stub), and a dev-only /diag/login
endpoint that takes a persona email, derives the password, logs
in, resolves the personal space, and returns {userId, spaceId} as
an end-to-end sanity check. Disabled in production.
No tick loop yet — RUNNER_PAUSED prints an info line on boot, but
nothing fires. The dispatcher + Claude Agent SDK + MCP client land in
M3.b; the internal POST callbacks into mana-auth for persona_actions /
persona_feedback land in M3.c.
Infra
- Port 3070 added to docs/PORT_SCHEMA.md.
- Service listed in root CLAUDE.md next to mana-mcp.
- services/mana-persona-runner/CLAUDE.md documents what's built today,
what lands in M3.b/c, and the local diag smoke recipe.
Boot smoke verified: /health returns ok + paused/interval/concurrency,
/diag/login without email returns 400.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| architecture | ||
| central-services | ||
| decisions | ||
| future | ||
| modules | ||
| optimizable | ||
| plans | ||
| postmortems | ||
| reports | ||
| test-examples | ||
| ANALYTICS.md | ||
| APP_GAP_ANALYSIS.md | ||
| APP_ONBOARDING.md | ||
| ARCHITECTURE_MIGRATION_REPORT.md | ||
| CAPACITY_PLANNING.md | ||
| CARDS_POSTGRES_MIGRATION.md | ||
| CLOUDFLARE_DOMAINS.md | ||
| CLOUDFLARE_FALLBACK.md | ||
| CLUSTER_HARDWARE_ANALYSE.md | ||
| complexity-hotspots.md | ||
| complexity-map.html | ||
| CONTEXT_INTELLIGENCE_REPORT.md | ||
| DATABASE_MIGRATIONS.md | ||
| DEPLOYMENT.md | ||
| DEVELOPMENT_SCRIPTS.md | ||
| DEVLOG_GUIDELINES.md | ||
| DISCORD_NOTIFICATIONS_SETUP.md | ||
| DOCKER_GUIDE.md | ||
| ENVIRONMENT_VARIABLES.md | ||
| ERROR_TRACKING.md | ||
| EXPO_SDK_UPGRADE.md | ||
| EXTERNAL_SERVICES.md | ||
| EXTERNAL_SSD_OPPORTUNITIES.md | ||
| FIX_COLIMA_MOUNTS.md | ||
| GIT_WORKFLOW.md | ||
| I18N.md | ||
| LOCAL_DEVELOPMENT.md | ||
| LOCAL_LLM_MODELS.md | ||
| LOCAL_STT_MODELS.md | ||
| MAC_MINI_SERVER.md | ||
| MAIL_SERVER.md | ||
| MANA_BOX_HARDWARE.md | ||
| MANA_EARNING_SYSTEM.md | ||
| MANA_VALUES.md | ||
| MICROSERVICES_API_OVERVIEW.md | ||
| MOBILE_DESKTOP_APP_STRATEGY.md | ||
| module-coupling.md | ||
| module-health.md | ||
| MODULE_REGISTRY.md | ||
| MONETIZATION_REPORT.md | ||
| MONITORING.md | ||
| OBSERVABILITY_GAPS.md | ||
| OLLAMA_MODELS.md | ||
| PLAN_TAURI_V2.md | ||
| PORT_SCHEMA.md | ||
| POSTGRES_BACKUP.md | ||
| PRE_LAUNCH_CLEANUP.md | ||
| PROD_READINESS_SCORE.md | ||
| PROJECT_OVERVIEW.md | ||
| PWA_GUIDE.md | ||
| RECOMMENDED_SERVICES.md | ||
| REFACTORING_AUDIT_2026_04.md | ||
| SEPA_ACTIVATION_CHECKLIST.md | ||
| SETUP_TEMPLATES.md | ||
| SHARED_PACKAGES_ROADMAP.md | ||
| SYNC_BILLING_PLAN.md | ||
| TECH_STACK_INDEPENDENCE.md | ||
| TECHNOLOGY_AUDIT_2026_03.md | ||
| TESTING_DEPLOYMENT_CHECKLIST.md | ||
| URL_SCHEMA.md | ||
| USER_SETTINGS.md | ||
| VERSIONING.md | ||
| WHO_MODULE.md | ||
| WINDOWS_GPU_SERVER_SETUP.md | ||