feat(daemon+store+api): verdict硬闸+执行期锁+conflict优先+schema
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -204,6 +204,9 @@ export function buildServer(opts: ApiOptions): FastifyInstance {
|
||||
// 部分更新任务(title/priority/complexity;complexity 重置逻辑在 Store.patchTask)
|
||||
app.patch('/api/tasks/:id', (req) => {
|
||||
const { id } = req.params as { id: string };
|
||||
if (store.hasInflightRun(id)) {
|
||||
throw new StoreError('任务有在途 run,执行期间禁止修改');
|
||||
}
|
||||
const b = (req.body ?? {}) as Record<string, unknown>;
|
||||
const patch: PatchTaskInput = {};
|
||||
if (b.title !== undefined) patch.title = String(b.title);
|
||||
|
||||
Reference in New Issue
Block a user