feat(settings): 用户级全局默认配置(per-user 落库 + 新建项目套默认)

新增 settings 表(user_id PK,data JSON,单本地用户 'local')+ store.getSettings/putSettings
(内置默认=核心策略子集)+ GET/PUT /api/settings 端点;POST /api/projects 创建时以用户
默认填充未显式传的字段(body 优先,自动放行/预算经 patchProject 套用)。前端弹框另提交。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-29 09:19:18 +08:00
parent a50e45baba
commit f5ea32a600
4 changed files with 83 additions and 7 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
export { Store, StoreError } from './store.js';
export type { CreateProjectInput, CreateTaskInput, PatchProjectInput, PatchTaskInput, ActiveRun } from './store.js';
export type { CreateProjectInput, CreateTaskInput, PatchProjectInput, PatchTaskInput, ActiveRun, UserSettings } from './store.js';
export type { Metrics, DurationStats, RunStats, ReviewStats, RetryStats, ModelUsage } from '../model/metrics.js';
export { openDb } from './db.js';
export type { DB } from './db.js';