Implement @mosaic/brain — typed structured data service with MCP + REST API, JSON file backend, and schema validation via Zod. Collections: tasks, projects, events, agents, tickets, appreciations, missions, mission_tasks. MCP tools: brain_tasks, brain_projects, brain_events, brain_agents, brain_tickets, brain_today, brain_stale, brain_stats, brain_search, brain_audit, brain_missions, brain_mission, brain_mission_tasks, plus mutation tools for all collections. REST API mirrors MCP 1:1 at /v1/*. Bearer token auth with timing-safe comparison. Fastify server with per-request MCP instances (stateless HTTP transport). JSON file storage with proper-lockfile for concurrent access. Also adds Brain* types to @mosaic/types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
989 B
JSON
46 lines
989 B
JSON
{
|
|
"name": "@mosaic/brain",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"bin": {
|
|
"mosaic-brain": "./dist/index.js"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.json",
|
|
"dev": "tsx watch src/index.ts",
|
|
"start": "node dist/index.js",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "echo 'ok'",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
"@mosaic/types": "workspace:*",
|
|
"fastify": "^5.3.3",
|
|
"proper-lockfile": "^4.1.2",
|
|
"zod": "^3.24.4"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22",
|
|
"@types/proper-lockfile": "^4",
|
|
"tsx": "^4",
|
|
"typescript": "^5",
|
|
"vitest": "^3"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm",
|
|
"access": "public"
|
|
}
|
|
}
|