Files
stack/packages/cli/package.json
Jason Woltje ae4cd490ec
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
feat(cli): command architecture — agents, missions, and gateway-aware prdy
DB schema:
- Extend agents table with projectId, ownerId, systemPrompt, allowedTools,
  skills, isSystem columns and indexes
- Add agentId FK to conversations table with index

Brain:
- New agents repository (findAll, findById, findByName, findByProject,
  findSystem, findAccessible, create, update, remove)
- Wire into Brain interface and createBrain factory

Gateway:
- New AgentConfigsController at /api/agents with full CRUD + ownership guards
- Consolidate /api/missions — user-scoped CRUD replaces old project-ownership
  model, add /api/missions/:id/tasks sub-routes (replaces coord mission-tasks)
- Slim coord controller to file-based endpoints only (agent tool consumption)
- Remove DB-backed methods from CoordService (now handled by Brain repos)
- Wire agentConfigId into AgentService.createSession for DB config merging
- Add agentId field to ChatSocketMessageDto and ChatMessagePayload

CLI:
- New `mosaic agent` command (--list, --new, --show, --update, --delete)
- New `mosaic mission` command (--list, --init, --plan, --update, task sub)
- New `mosaic prdy` gateway-aware wrapper (--init, --update, --project)
- Shared with-auth helper and select-dialog utility
- TUI: accept --agent and --project flags, pass agentId to socket, display
  agent name in top bar
- Gateway API client: add agents, projects, missions, mission-tasks helpers
- Add @clack/prompts dependency
- Refactor sessions commands to use with-auth helper

Types:
- Add agentId to ChatMessagePayload

Tests:
- Update resource-ownership test for user-scoped missions (NotFoundException)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 18:08:48 -05:00

44 lines
987 B
JSON

{
"name": "@mosaic/cli",
"version": "0.0.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"mosaic": "dist/cli.js"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "tsc",
"dev": "tsx src/cli.ts",
"lint": "eslint src",
"typecheck": "tsc --noEmit",
"test": "vitest run --passWithNoTests"
},
"dependencies": {
"@clack/prompts": "^0.9.0",
"@mosaic/mosaic": "workspace:^",
"@mosaic/prdy": "workspace:^",
"@mosaic/quality-rails": "workspace:^",
"@mosaic/types": "workspace:^",
"commander": "^13.0.0",
"ink": "^5.0.0",
"ink-spinner": "^5.0.0",
"ink-text-input": "^6.0.0",
"react": "^18.3.0",
"socket.io-client": "^4.8.0"
},
"devDependencies": {
"@types/node": "^22.0.0",
"@types/react": "^18.3.0",
"tsx": "^4.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
}