From d6f62af0ede994e0206f23fe1f68f814007bba83 Mon Sep 17 00:00:00 2001 From: weichen Date: Tue, 13 Oct 2026 06:53:42 +0000 Subject: [PATCH] Add managed scope to authoritative SettingDesc TS mirror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why: Dev 组合构建经 make contracts 从 Core ts/types.ts 重新生成 frontend/ui 的 contracts.ts——受管 scope 字段此前只改了 frontend 镜像,构建时被权威源覆盖丢失(TS2339)。 Evidence: go test ./... 全绿;生成链路验证随 Dev 组合 CI。 Impact: 权威 TS 类型加可选字段;Go 契约(SettingDesc.Scope)此前已随 Core #30 合入,两侧对齐。 --- ts/types.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ts/types.ts b/ts/types.ts index dd4ecd6..254cb6f 100644 --- a/ts/types.ts +++ b/ts/types.ts @@ -269,6 +269,8 @@ export interface SettingDesc { default?: unknown; options?: string[]; effect: 'hot' | 'new-run' | 'restart'; secret?: boolean; + /** P2 受管:system = 系统受管项,仅系统管理面可写(用户/项目层拒绝)。 */ + scope?: 'system'; } // ---- 插件 ----