@sema-agent/settings-schema 8.1.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,15 +21,22 @@
21
21
  * (无 host、无 `DB_BACKEND`、无 `tidb` 词)⇒ 不写店,旧字段 dropped。
22
22
  * · **表达不了 ⇒ refused**:值写错了栏(密钥以字面值写在 env、坐标来自宿主密钥)、不认识的词、新旧两形并存、`DB_BACKEND=pg`
23
23
  * 配 MySQL 族坐标 —— 迁移不搬值进密钥位、不读宿主密钥、不替运维挑赢家、不换库。
24
- * · **终判 = 7.0.0 schema**:迁出来的每只 worker 都过 `WorkerSpec.safeParse`;不过 ⇒ refused,拒因是 schema 自己的 issue
25
- * (例:多租户 + host 车道、点了车道却缺必需坐标)。迁移不复述任何一条写闸规则。
24
+ *
25
+ * ## 终判(逐行:迁过的行与没动的行同一只)
26
+ * 每一只**认得出名字**的 worker —— 迁过的、没动的一样 —— 都过读侧自己的判据:**只含这一行的 workers 域**读不读得进
27
+ * (`WorkersConfig`,就是 `parseDomain("workers")` 用的那一只 schema)。读不进 ⇒ refused,拒因是 schema 自己的 issue(例:多租户 + host
28
+ * 车道、点了车道却缺必需坐标、`env` 里设了保留名、`replicas` 与 `autoscaling` 并存)。迁移不复述任何一条写闸规则,也不另抄保留名表:
29
+ * 判据只有读侧那一只。所以 `doc` 里每一只认得出名字的 worker 单独都读得进。
30
+ *
31
+ * 整域读侧仍是**最后围栏**,只剩两类归它:认不出名字的条目(不是对象 / 没有字符串名字 —— 迁移不判形,原样留在 `doc`)与跨行规则
32
+ * (名字 / 路由前缀唯一 —— 两行单独都读得进,合起来才不行,迁移不替运维挑留哪一行)。
26
33
  *
27
34
  * refused 的 worker **不进**输出 `doc`(中心不加载它、在列表标红点名 `field`;CLI 有 refused 就一字不写),但随 `refused[].original`
28
35
  * 逐字带回:`doc` ∪ `refused[].original` 覆盖输入的全部 worker,中心写回前按 `index` 放回(或另存),运维的 spec 不会随迁移消失。
29
36
  * 拒因 / dropped 只点名字段,不回显值。
30
37
  *
31
38
  * ## 幂等
32
- * 已迁形(没有任何旧键、该有的块都在)⇒ 原样(同一引用)返回、`changed = []`。所以再跑一次 ⇒ 零变化、`doc` 字节相等。
39
+ * 已迁形且逐行读得进(没有任何旧键、该有的块都在)⇒ 原样(同一引用)返回、`changed = []`。所以再跑一次 ⇒ 零变化、`doc` 字节相等。
33
40
  */
34
41
  import { type ConfigPath } from "./config-fns.js";
35
42
  /** 一个被丢掉的旧字段(引擎本就不读它 —— 通知一行,不是错误)。`field` 相对该 worker 条目;`index` = 它在输入 `workers` 里的下标。 */
@@ -38,7 +45,8 @@ export interface WorkersMigrationDrop {
38
45
  readonly index: number;
39
46
  readonly field: ConfigPath;
40
47
  }
41
- /** 一只迁不了的 worker(不进输出 `doc`)。`field` 指到要人改的那一格(相对该 worker 条目;终判失败时是 7.0.0 形里的路径),
48
+ /** 一只迁不了的 worker(不进输出 `doc`)。`field` 指到要人改的那一格(相对该 worker 条目;终判拒时是读侧 schema issue 的路径 ——
49
+ * 迁过的行指迁出形里的格,没动的行指存下来那一行的格),
42
50
  * `reason` 只点名字段、不回显值。`original` = 输入里那一行**逐字**(同一个值,未拷贝未改写)——
43
51
  * 🔴 **写回 `doc` 之前必须把每个 `refused[].original` 按 `index` 放回(或另存)**,否则这只 worker 的 spec 随写回从存储里消失,
44
52
  * 运维看到的是「worker 不见了」而不是「worker 被标红」。它是调用方自己的数据,原样带回;要记日志,按调用方记那一行的规矩记。 */
@@ -21,20 +21,28 @@
21
21
  * (无 host、无 `DB_BACKEND`、无 `tidb` 词)⇒ 不写店,旧字段 dropped。
22
22
  * · **表达不了 ⇒ refused**:值写错了栏(密钥以字面值写在 env、坐标来自宿主密钥)、不认识的词、新旧两形并存、`DB_BACKEND=pg`
23
23
  * 配 MySQL 族坐标 —— 迁移不搬值进密钥位、不读宿主密钥、不替运维挑赢家、不换库。
24
- * · **终判 = 7.0.0 schema**:迁出来的每只 worker 都过 `WorkerSpec.safeParse`;不过 ⇒ refused,拒因是 schema 自己的 issue
25
- * (例:多租户 + host 车道、点了车道却缺必需坐标)。迁移不复述任何一条写闸规则。
24
+ *
25
+ * ## 终判(逐行:迁过的行与没动的行同一只)
26
+ * 每一只**认得出名字**的 worker —— 迁过的、没动的一样 —— 都过读侧自己的判据:**只含这一行的 workers 域**读不读得进
27
+ * (`WorkersConfig`,就是 `parseDomain("workers")` 用的那一只 schema)。读不进 ⇒ refused,拒因是 schema 自己的 issue(例:多租户 + host
28
+ * 车道、点了车道却缺必需坐标、`env` 里设了保留名、`replicas` 与 `autoscaling` 并存)。迁移不复述任何一条写闸规则,也不另抄保留名表:
29
+ * 判据只有读侧那一只。所以 `doc` 里每一只认得出名字的 worker 单独都读得进。
30
+ *
31
+ * 整域读侧仍是**最后围栏**,只剩两类归它:认不出名字的条目(不是对象 / 没有字符串名字 —— 迁移不判形,原样留在 `doc`)与跨行规则
32
+ * (名字 / 路由前缀唯一 —— 两行单独都读得进,合起来才不行,迁移不替运维挑留哪一行)。
26
33
  *
27
34
  * refused 的 worker **不进**输出 `doc`(中心不加载它、在列表标红点名 `field`;CLI 有 refused 就一字不写),但随 `refused[].original`
28
35
  * 逐字带回:`doc` ∪ `refused[].original` 覆盖输入的全部 worker,中心写回前按 `index` 放回(或另存),运维的 spec 不会随迁移消失。
29
36
  * 拒因 / dropped 只点名字段,不回显值。
30
37
  *
31
38
  * ## 幂等
32
- * 已迁形(没有任何旧键、该有的块都在)⇒ 原样(同一引用)返回、`changed = []`。所以再跑一次 ⇒ 零变化、`doc` 字节相等。
39
+ * 已迁形且逐行读得进(没有任何旧键、该有的块都在)⇒ 原样(同一引用)返回、`changed = []`。所以再跑一次 ⇒ 零变化、`doc` 字节相等。
33
40
  */
34
41
  import { formatConfigPath, redactSecrets } from "./config-fns.js";
35
42
  import { LANE_ENV_OWNER, STORE_ENV_KEYS, isLaneEnvKey } from "./execution-lane-index.js";
36
43
  import { EXECUTION_LANE_WORDS, MEMORY_ENGINE_BACKENDS, STORE_BACKENDS } from "./execution-lanes.js";
37
- import { WorkerSpec } from "./types.js";
44
+ import { issueText } from "./issue-text.js";
45
+ import { WorkersConfig } from "./types.js";
38
46
  function isRec(v) {
39
47
  return v !== null && typeof v === "object" && !Array.isArray(v);
40
48
  }
@@ -102,8 +110,10 @@ function migrateEntry(raw, index) {
102
110
  return refuse(["secretEnv", "REMOTE_EXEC"], "the execution lane is set from a host secret — the migration cannot read it; declare runtime.execution.lane by hand");
103
111
  const needLane = !hasExecution && (enabled || laneTouched);
104
112
  const needStore = !hasStore && (enabled || storeTouched);
105
- if (!needLane && !needStore)
106
- return UNCHANGED;
113
+ if (!needLane && !needStore) {
114
+ const refusal = rowVerdict(raw, "stored");
115
+ return refusal === undefined ? UNCHANGED : refuse(refusal.field, refusal.reason);
116
+ }
107
117
  const w = structuredClone(raw);
108
118
  const runtime = isRec(w.runtime) ? w.runtime : {};
109
119
  w.runtime = runtime;
@@ -278,17 +288,31 @@ function migrateEntry(raw, index) {
278
288
  delete w.env;
279
289
  if (isRec(w.secretEnv) && Object.keys(secretEnv).length === 0 && isRec(raw.secretEnv) && Object.keys(raw.secretEnv).length > 0)
280
290
  delete w.secretEnv;
281
- // 终判 = 7.0.0 schema 本身(迁移不复述写闸规则)
282
- const verdict = WorkerSpec.safeParse(w);
283
- if (!verdict.success) {
284
- const issues = verdict.error.issues;
285
- const shown = issues.slice(0, 3).map((i) => `${formatConfigPath(i.path)}: ${i.message}`);
286
- const more = issues.length > shown.length ? ` (+${issues.length - shown.length} more)` : "";
287
- const first = issues[0];
288
- return refuse(first === undefined ? [] : first.path, `after migration the worker is not a valid 7.0.0 WorkerSpec — ${shown.join("; ")}${more}`);
289
- }
291
+ const refusal = rowVerdict(w, "migrated");
292
+ if (refusal !== undefined)
293
+ return refuse(refusal.field, refusal.reason);
290
294
  return { kind: "migrated", entry: w, dropped };
291
295
  }
296
+ /**
297
+ * 逐行**终判** —— 迁过的行与没动的行同一只(见文件头「终判」):只含这一行的 workers 域读不读得进,判据就是读侧的 `WorkersConfig`
298
+ * (逐行的规则无论写在 `WorkerSpec` 里还是写在域层,都在;跨行规则一行时不触发)。读得进 ⇒ `undefined`;读不进 ⇒ 第一条 issue 的
299
+ * 路径(相对该行)+ 至多三条 issue 的句子(经 `issueText`:不回显输入值)。`stage` 只决定拒因说的是哪一份形(迁出形 / 存储形)。
300
+ */
301
+ function rowVerdict(row, stage) {
302
+ const verdict = WorkersConfig.safeParse({ workers: [row] });
303
+ if (verdict.success)
304
+ return undefined;
305
+ const issues = verdict.error.issues;
306
+ const shown = issues.slice(0, 3).map((i) => `${formatConfigPath(rowRelative(i.path))}: ${issueText(i)}`);
307
+ const more = issues.length > shown.length ? ` (+${issues.length - shown.length} more)` : "";
308
+ const subject = stage === "migrated" ? "after migration the worker" : "the stored worker";
309
+ const first = issues[0];
310
+ return { field: first === undefined ? [] : rowRelative(first.path), reason: `${subject} is not a valid WorkerSpec — ${shown.join("; ")}${more}` };
311
+ }
312
+ /** 一只单行域里的 issue 路径 → 相对那一行(去掉 `["workers", 0]` 前缀;不在那一行下的 issue 原样)。 */
313
+ function rowRelative(path) {
314
+ return path[0] === "workers" && path[1] === 0 ? path.slice(2) : path;
315
+ }
292
316
  /**
293
317
  * 迁移一份 workers 域**原始**文档(`{ workers: [...] }`)。不是这个形 ⇒ 原样返回(判形是 `parseDomain` 的事,迁移不抛)。
294
318
  * 规则、幂等与 refused 的处置见文件头。
@@ -64,7 +64,7 @@ export declare const RemoteExecSpec: z.ZodDiscriminatedUnion<"provider", [z.ZodO
64
64
  memory?: string | undefined;
65
65
  workdir?: string | undefined;
66
66
  cpus?: number | undefined;
67
- network?: "host" | "none" | "bridge" | undefined;
67
+ network?: "none" | "host" | "bridge" | undefined;
68
68
  mountPath?: string | undefined;
69
69
  }, {
70
70
  provider: "local-docker";
@@ -72,7 +72,7 @@ export declare const RemoteExecSpec: z.ZodDiscriminatedUnion<"provider", [z.ZodO
72
72
  memory?: string | undefined;
73
73
  workdir?: string | undefined;
74
74
  cpus?: number | undefined;
75
- network?: "host" | "none" | "bridge" | undefined;
75
+ network?: "none" | "host" | "bridge" | undefined;
76
76
  mountPath?: string | undefined;
77
77
  }>, z.ZodObject<{
78
78
  provider: z.ZodLiteral<"e2b">;
package/dist/types.d.ts CHANGED
@@ -5044,10 +5044,10 @@ declare const CollabTemplate: z.ZodEffects<z.ZodObject<{
5044
5044
  /** Slot id the finalizer anchors to (e.g. the judge slot). Meaningless for type "none". */
5045
5045
  slot: z.ZodOptional<z.ZodString>;
5046
5046
  }, "strip", z.ZodTypeAny, {
5047
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5047
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5048
5048
  slot?: string | undefined;
5049
5049
  }, {
5050
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5050
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5051
5051
  slot?: string | undefined;
5052
5052
  }>;
5053
5053
  sharedContext: z.ZodDefault<z.ZodObject<{
@@ -5093,7 +5093,7 @@ declare const CollabTemplate: z.ZodEffects<z.ZodObject<{
5093
5093
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5094
5094
  };
5095
5095
  finalizer: {
5096
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5096
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5097
5097
  slot?: string | undefined;
5098
5098
  };
5099
5099
  sharedContext: {
@@ -5125,7 +5125,7 @@ declare const CollabTemplate: z.ZodEffects<z.ZodObject<{
5125
5125
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5126
5126
  };
5127
5127
  finalizer: {
5128
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5128
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5129
5129
  slot?: string | undefined;
5130
5130
  };
5131
5131
  budget: {
@@ -5159,7 +5159,7 @@ declare const CollabTemplate: z.ZodEffects<z.ZodObject<{
5159
5159
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5160
5160
  };
5161
5161
  finalizer: {
5162
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5162
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5163
5163
  slot?: string | undefined;
5164
5164
  };
5165
5165
  sharedContext: {
@@ -5191,7 +5191,7 @@ declare const CollabTemplate: z.ZodEffects<z.ZodObject<{
5191
5191
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5192
5192
  };
5193
5193
  finalizer: {
5194
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5194
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5195
5195
  slot?: string | undefined;
5196
5196
  };
5197
5197
  budget: {
@@ -5272,10 +5272,10 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5272
5272
  /** Slot id the finalizer anchors to (e.g. the judge slot). Meaningless for type "none". */
5273
5273
  slot: z.ZodOptional<z.ZodString>;
5274
5274
  }, "strip", z.ZodTypeAny, {
5275
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5275
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5276
5276
  slot?: string | undefined;
5277
5277
  }, {
5278
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5278
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5279
5279
  slot?: string | undefined;
5280
5280
  }>;
5281
5281
  sharedContext: z.ZodDefault<z.ZodObject<{
@@ -5321,7 +5321,7 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5321
5321
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5322
5322
  };
5323
5323
  finalizer: {
5324
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5324
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5325
5325
  slot?: string | undefined;
5326
5326
  };
5327
5327
  sharedContext: {
@@ -5353,7 +5353,7 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5353
5353
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5354
5354
  };
5355
5355
  finalizer: {
5356
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5356
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5357
5357
  slot?: string | undefined;
5358
5358
  };
5359
5359
  budget: {
@@ -5387,7 +5387,7 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5387
5387
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5388
5388
  };
5389
5389
  finalizer: {
5390
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5390
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5391
5391
  slot?: string | undefined;
5392
5392
  };
5393
5393
  sharedContext: {
@@ -5419,7 +5419,7 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5419
5419
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5420
5420
  };
5421
5421
  finalizer: {
5422
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5422
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5423
5423
  slot?: string | undefined;
5424
5424
  };
5425
5425
  budget: {
@@ -5455,7 +5455,7 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5455
5455
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5456
5456
  };
5457
5457
  finalizer: {
5458
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5458
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5459
5459
  slot?: string | undefined;
5460
5460
  };
5461
5461
  sharedContext: {
@@ -5489,7 +5489,7 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5489
5489
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5490
5490
  };
5491
5491
  finalizer: {
5492
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5492
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5493
5493
  slot?: string | undefined;
5494
5494
  };
5495
5495
  budget: {
@@ -5525,7 +5525,7 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5525
5525
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5526
5526
  };
5527
5527
  finalizer: {
5528
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5528
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5529
5529
  slot?: string | undefined;
5530
5530
  };
5531
5531
  sharedContext: {
@@ -5559,7 +5559,7 @@ export declare const CollabConfig: z.ZodEffects<z.ZodObject<{
5559
5559
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
5560
5560
  };
5561
5561
  finalizer: {
5562
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
5562
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
5563
5563
  slot?: string | undefined;
5564
5564
  };
5565
5565
  budget: {
@@ -11446,10 +11446,10 @@ export declare const DOMAIN_SCHEMAS: {
11446
11446
  /** Slot id the finalizer anchors to (e.g. the judge slot). Meaningless for type "none". */
11447
11447
  slot: z.ZodOptional<z.ZodString>;
11448
11448
  }, "strip", z.ZodTypeAny, {
11449
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11449
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11450
11450
  slot?: string | undefined;
11451
11451
  }, {
11452
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11452
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11453
11453
  slot?: string | undefined;
11454
11454
  }>;
11455
11455
  sharedContext: z.ZodDefault<z.ZodObject<{
@@ -11495,7 +11495,7 @@ export declare const DOMAIN_SCHEMAS: {
11495
11495
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
11496
11496
  };
11497
11497
  finalizer: {
11498
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11498
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11499
11499
  slot?: string | undefined;
11500
11500
  };
11501
11501
  sharedContext: {
@@ -11527,7 +11527,7 @@ export declare const DOMAIN_SCHEMAS: {
11527
11527
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
11528
11528
  };
11529
11529
  finalizer: {
11530
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11530
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11531
11531
  slot?: string | undefined;
11532
11532
  };
11533
11533
  budget: {
@@ -11561,7 +11561,7 @@ export declare const DOMAIN_SCHEMAS: {
11561
11561
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
11562
11562
  };
11563
11563
  finalizer: {
11564
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11564
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11565
11565
  slot?: string | undefined;
11566
11566
  };
11567
11567
  sharedContext: {
@@ -11593,7 +11593,7 @@ export declare const DOMAIN_SCHEMAS: {
11593
11593
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
11594
11594
  };
11595
11595
  finalizer: {
11596
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11596
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11597
11597
  slot?: string | undefined;
11598
11598
  };
11599
11599
  budget: {
@@ -11629,7 +11629,7 @@ export declare const DOMAIN_SCHEMAS: {
11629
11629
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
11630
11630
  };
11631
11631
  finalizer: {
11632
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11632
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11633
11633
  slot?: string | undefined;
11634
11634
  };
11635
11635
  sharedContext: {
@@ -11663,7 +11663,7 @@ export declare const DOMAIN_SCHEMAS: {
11663
11663
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
11664
11664
  };
11665
11665
  finalizer: {
11666
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11666
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11667
11667
  slot?: string | undefined;
11668
11668
  };
11669
11669
  budget: {
@@ -11699,7 +11699,7 @@ export declare const DOMAIN_SCHEMAS: {
11699
11699
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
11700
11700
  };
11701
11701
  finalizer: {
11702
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11702
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11703
11703
  slot?: string | undefined;
11704
11704
  };
11705
11705
  sharedContext: {
@@ -11733,7 +11733,7 @@ export declare const DOMAIN_SCHEMAS: {
11733
11733
  earlyStop?: "consensus" | "stability" | "judge_call" | "verify_pass" | undefined;
11734
11734
  };
11735
11735
  finalizer: {
11736
- type: "summarize" | "judge" | "vote" | "fuse" | "verify" | "none";
11736
+ type: "none" | "summarize" | "judge" | "vote" | "fuse" | "verify";
11737
11737
  slot?: string | undefined;
11738
11738
  };
11739
11739
  budget: {
package/dist/types.js CHANGED
@@ -17,7 +17,7 @@
17
17
  */
18
18
  import { z } from "zod";
19
19
  import { MAX_EXTRA_BODY_DEPTH } from "./hash.js"; // reconcile the extraBody depth cap with the hash cap (R18)
20
- import { DispatchPolicy, FLEET_GENERATION_ENV } from "./fleet.js"; // WorkerSpec.fleet.dispatch (scheduling framework D3)
20
+ import { DispatchPolicy, FLEET_GENERATION_ENV, FLEET_SCOPE_ENV } from "./fleet.js"; // WorkerSpec.fleet.dispatch (scheduling framework D3)
21
21
  import { carriesUserinfo, percentLayers } from "./secret-scan.js"; // package-private normalization + the userinfo judgement (not in the barrel)
22
22
  import { EXECUTION_LANES, EXECUTION_LANE_WORDS, MEMORY_ENGINE_BACKENDS, SESSION_BACKENDS, STORE_BACKENDS } from "./execution-lanes.js"; // 7.0.0 M-R2: the lane / store vocabulary (one exported table)
23
23
  import { LANE_ENV_OWNER, MIGRATION_SIGNPOST, isMigratableEnvKey, laneEnvSeat, laneRowOf } from "./execution-lane-index.js"; // package-private indexes derived from that table (not in the barrel)
@@ -1569,8 +1569,9 @@ const RESERVED_ENV_FIELD = Object.freeze({
1569
1569
  PG_DATABASE: "runtime.store.db.database", PG_PASSWORD: "secretRefs.dbPasswordEnv",
1570
1570
  // ── runtime.execution(7.0.0):车道词两键 + 车道表里每个名(派生,不手抄)
1571
1571
  REMOTE_EXEC: "runtime.execution.lane",
1572
- // ── fleet 成员身份:渲染器按该 worker 的代际写它,引擎读回并回声成 EngineSignal.generation —— 没有 WorkerSpec 字段能写它
1572
+ // ── fleet 成员身份两键:渲染器按该 worker 的代际写 generation(引擎读回并回声成 EngineSignal.generation)、按该 worker 令牌绑定的 scope 写 scope(引擎读作自身身份的 scope)—— 没有 WorkerSpec 字段能写它们
1573
1573
  [FLEET_GENERATION_ENV]: "(set by the config renderer from the worker's generation — not configurable)",
1574
+ [FLEET_SCOPE_ENV]: "(set by the config renderer from the worker's scope — not configurable)",
1574
1575
  REQUIRE_EXECUTION_LANE: "runtime.execution.lane (the renderer emits REQUIRE_EXECUTION_LANE=true for every declared lane)",
1575
1576
  ...Object.fromEntries([...LANE_ENV_OWNER].map(([name, owner]) => [name, laneEnvSeat(name, owner)])),
1576
1577
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/settings-schema",
3
- "version": "8.1.0",
3
+ "version": "8.3.0",
4
4
  "description": "Sema settings schema — pure config contract (zod domains + effective-config + roster resolution + ref-integrity + remoteExec) shared by sema-registry, sema-server, and the TOC desktop/CLI. One source of truth. (Renamed at 1.0.0 from @sema-agent/registry-core — name and docs only, no behavior change; note the range moves 0.19.0 -> 1.0.0, so a dependency must become ^1.0.0. The old names @sema-agent/registry-core <=0.19.0 and @sema-ai/registry-core remain published, frozen, for migration.)",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",
@@ -59,6 +59,7 @@
59
59
  "default": "./dist/config-fns.js"
60
60
  },
61
61
  "./package.json": "./package.json",
62
+ "./fleet-paths.json": "./dist/fleet-paths.json",
62
63
  "./conformance": {
63
64
  "types": "./dist/conformance/index.d.ts",
64
65
  "default": "./dist/conformance/index.js"
@@ -123,7 +124,7 @@
123
124
  "node": ">=20.3.0"
124
125
  },
125
126
  "scripts": {
126
- "build": "rm -rf dist && tsc -p tsconfig.build.json",
127
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && node scripts/gen-fleet-paths.mjs",
127
128
  "typecheck": "tsc --noEmit",
128
129
  "test": "vitest run",
129
130
  "test:watch": "vitest",