9b17d3e24f
B-① 附件上传(⑧ ★ POST /api/tasks/:id/attachments):
后端:
- 加 @fastify/multipart;schema/db.ts tasks.attachments 列(幂等迁移)
- types.Attachment{name,type,path} + Task.attachments;mappers 映射
- store.addAttachments(追加元数据 + 广播 task.updated)
- POST /api/tasks/:id/attachments:multipart files[](单文件≤25MB/单次≤10),
落盘 <data>/tasks/<id>/attachments/,文件名消毒,返回全部附件
前端:
- api.uploadAttachments(FormData multipart)
- 新建任务表单加文件选择 + 已选列表;创建任务后自动上传附件
验证:typecheck 干净;206 测试通过;前端 build 通过。
(端到端需重启 daemon 加载新端点——与后续 SSE/takeover 一并重启。)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
972 B
JSON
37 lines
972 B
JSON
{
|
||
"name": "maestro",
|
||
"version": "0.1.0",
|
||
"private": true,
|
||
"type": "module",
|
||
"description": "多项目 TODO 管理与 Agent 执行系统(本地优先 daemon)",
|
||
"engines": {
|
||
"node": ">=20"
|
||
},
|
||
"bin": {
|
||
"maestro": "dist/cli/index.js",
|
||
"maestro-mcp": "dist/mcp/index.js"
|
||
},
|
||
"scripts": {
|
||
"build": "tsc -p tsconfig.json && cp src/store/schema.sql dist/store/schema.sql",
|
||
"typecheck": "tsc -p tsconfig.json --noEmit",
|
||
"dev": "tsx src/daemon/index.ts",
|
||
"test": "tsx --test test/*.test.ts"
|
||
},
|
||
"dependencies": {
|
||
"@anthropic-ai/claude-agent-sdk": "^0.3.175",
|
||
"@fastify/multipart": "^8.3.1",
|
||
"@modelcontextprotocol/sdk": "^1.29.0",
|
||
"better-sqlite3": "^11.3.0",
|
||
"fastify": "^4.28.1",
|
||
"nanoid": "^5.0.7",
|
||
"ws": "^8.18.0"
|
||
},
|
||
"devDependencies": {
|
||
"@types/better-sqlite3": "^7.6.11",
|
||
"@types/node": "^20.14.0",
|
||
"@types/ws": "^8.5.12",
|
||
"tsx": "^4.16.5",
|
||
"typescript": "^5.5.4"
|
||
}
|
||
}
|