@sema-agent/settings-schema 25.0.0 → 26.0.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.
- package/CHANGELOG.md +359 -0
- package/README.md +46 -31
- package/conformance/VERSION +1 -1
- package/conformance/cases/c27-hosts-array-1025/meta.json +1 -1
- package/conformance/cases/c48-s935-model-headers-transported/expected.json +18 -68
- package/conformance/cases/c48-s935-model-headers-transported/meta.json +1 -1
- package/conformance/cases/c67-s784-retired-field-loud/meta.json +1 -1
- package/conformance/cases/c77-prompts-center-artifact-carried/expected.json +5 -5
- package/conformance/cases/c77-prompts-center-artifact-carried/input.json +2 -2
- package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/expected.json +1 -1
- package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/input.json +3 -3
- package/conformance/cases/c80-prompts-wire-v2-verbatim/expected.json +1 -1
- package/conformance/cases/c80-prompts-wire-v2-verbatim/input.json +1 -1
- package/conformance/cases/c82-prompts-v1-catalog-refused/expected.json +1 -1
- package/conformance/cases/c82-prompts-v1-catalog-refused/input.json +1 -1
- package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/expected.json +1 -1
- package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/input.json +1 -1
- package/conformance/cases/c88-projects-content-attestation-carried/expected.json +185 -0
- package/conformance/cases/c88-projects-content-attestation-carried/input.json +59 -0
- package/conformance/cases/c88-projects-content-attestation-carried/meta.json +6 -0
- package/conformance/cases/c89-projects-content-attestation-malformed/expected.json +104 -0
- package/conformance/cases/c89-projects-content-attestation-malformed/input.json +38 -0
- package/conformance/cases/c89-projects-content-attestation-malformed/meta.json +6 -0
- package/dist/cli.d.ts +7 -7
- package/dist/cli.js +11 -19
- package/dist/config-dir-io.js +3 -14
- package/dist/config-dir-migration.d.ts +1 -4
- package/dist/config-dir-migration.js +16 -22
- package/dist/config-document-refusal.d.ts +2 -3
- package/dist/config-fns.d.ts +3 -4
- package/dist/config-fns.js +9 -7
- package/dist/conformance/run.js +89 -29
- package/dist/conformance/types.d.ts +65 -39
- package/dist/execution-lane-index.d.ts +8 -19
- package/dist/execution-lane-index.js +6 -27
- package/dist/file-store.js +2 -3
- package/dist/fleet.d.ts +10 -47
- package/dist/fleet.js +13 -40
- package/dist/fs-failure.d.ts +5 -10
- package/dist/fs-failure.js +4 -8
- package/dist/hooks.d.ts +8 -6
- package/dist/hooks.js +7 -4
- package/dist/migration-receipt.d.ts +12 -14
- package/dist/migration-receipt.js +5 -7
- package/dist/node.js +1 -1
- package/dist/one-time-migrations.d.ts +9 -24
- package/dist/one-time-migrations.js +30 -796
- package/dist/remote-exec.js +2 -3
- package/dist/retired-envs.js +2 -0
- package/dist/retired-form.d.ts +12 -11
- package/dist/retired-form.js +12 -8
- package/dist/sandbox-git.d.ts +1 -1
- package/dist/sandbox-git.js +3 -3
- package/dist/scheduler-lifetime.d.ts +1 -1
- package/dist/scheduler-lifetime.js +1 -1
- package/dist/scheduler-store.d.ts +4 -29
- package/dist/scheduler-store.js +21 -14
- package/dist/types.d.ts +18 -21
- package/dist/types.js +81 -112
- package/dist/web-admin-credential.d.ts +2 -2
- package/dist/web-admin-credential.js +4 -4
- package/dist/worker-row-verdict.d.ts +1 -1
- package/dist/worker-row-verdict.js +1 -1
- package/dist/workers-rows.d.ts +2 -2
- package/dist/workers-rows.js +2 -2
- package/dist/zod-unwrap.d.ts +1 -1
- package/dist/zod-unwrap.js +1 -1
- package/docs/API-SURFACE.md +4 -11
- package/docs/CONFORMANCE.md +25 -13
- package/docs/CONSUMER-INTEGRATION.md +78 -24
- package/llms-full.txt +25 -24
- package/llms.txt +19 -13
- package/package.json +1 -1
- package/dist/runtime-lift-targets.d.ts +0 -7
- package/dist/runtime-lift-targets.js +0 -7
- package/dist/scheduler-store-migration.d.ts +0 -14
- package/dist/scheduler-store-migration.js +0 -14
package/dist/fleet.js
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
*
|
|
12
12
|
* 🔴 Contract discipline (same rules as scheduler-store):
|
|
13
13
|
* - ABSTRACT: types + zod wire shapes + PURE decision functions. ZERO IO, ZERO node:* — browser-safe barrel.
|
|
14
|
-
* - FINAL-STATE: shapes codify what is SHIPPED on the wire (
|
|
15
|
-
*
|
|
14
|
+
* - FINAL-STATE: shapes codify what is SHIPPED on the wire (/health `version` + the engine signal, billable submit
|
|
15
|
+
* 503+Retry-After) — no transitional aliases, breaking changes over shims
|
|
16
16
|
* (产品拍板: no temporary compatibility design; the target is long-term stability).
|
|
17
17
|
* - EXTENSIBLE: enums + optional fields externalize decisions (add an LB strategy = add an enum value,
|
|
18
18
|
* the skeleton does not move).
|
|
@@ -346,15 +346,13 @@ export const EngineDraining = z.object({
|
|
|
346
346
|
* {@link judgeRoutability}) read nothing else.
|
|
347
347
|
*
|
|
348
348
|
* One fact, one place on a body: the engine's STATE is this object; the row's IDENTITY (`instanceId`, `worker`, `address`,
|
|
349
|
-
* `version`, `heartbeatMs`) is the body's top level and is not repeated here.
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
349
|
+
* `version`, `heartbeatMs`) is the body's top level and is not repeated here. Neither body types a key of this object's names at
|
|
350
|
+
* its top level (26.0.0 removed the pre-11 flat dialect — `ready`, the boolean `draining` + `drainingSince`, `restart`,
|
|
351
|
+
* `generation`, `leaseState`, `leaseUntil`): a body that still carries them is read as without them — the heartbeat shape strips
|
|
352
|
+
* them, `/health` passes them through untyped — and no judge reads them.
|
|
353
353
|
*
|
|
354
|
-
* Nested under one key, not flat on the body: the
|
|
355
|
-
*
|
|
356
|
-
* both, and a flat object `draining` would make every reader still on the boolean refuse a draining engine's heartbeat. Nested, an
|
|
357
|
-
* older reader never sees it (the heartbeat shape strips unknown keys; `/health` is an open record) and a newer one reads only it.
|
|
354
|
+
* Nested under one key, not flat on the body: the state is one object the engine mints once, so it travels whole and a reader
|
|
355
|
+
* takes all of it or none of it (see "Reading" below) — never a mix of a body's top-level keys and the signal.
|
|
358
356
|
*
|
|
359
357
|
* - `ready` — always said (never "absent while ready"): the engine can take new work right now.
|
|
360
358
|
* - `draining` — present ⇔ draining ({@link EngineDraining}).
|
|
@@ -399,8 +397,7 @@ export function readEngineSignal(body) {
|
|
|
399
397
|
/** The `/health` self-description every orchestrator reads. Liveness and readiness are deliberately SPLIT: `status` stays ok while
|
|
400
398
|
* draining (the process is alive); readiness is {@link judgeReadiness} over the engine signal the body carries under
|
|
401
399
|
* {@link ENGINE_SIGNAL_KEY}. Unknown fields pass through — health is a self-description, not a closed record: `modelRefusals`
|
|
402
|
-
* rides it untyped and is read with {@link readModelRefusals};
|
|
403
|
-
* `restart`, `generation`, `leaseState`, `leaseUntil`) ride it untyped too and are read by nothing. */
|
|
400
|
+
* rides it untyped and is read with {@link readModelRefusals}; any other key rides it untyped too and is read by nothing. */
|
|
404
401
|
export const InstanceHealth = z
|
|
405
402
|
.object({
|
|
406
403
|
/** The instance's identity: the engine's OWN per-process id, minted by the engine every time the process starts (never read
|
|
@@ -409,13 +406,6 @@ export const InstanceHealth = z
|
|
|
409
406
|
instanceId: z.string().min(1),
|
|
410
407
|
/** build self-description — "did the restart actually land new code" (upgrade classification) */
|
|
411
408
|
version: z.string().min(1),
|
|
412
|
-
/** @deprecated Flat engine-state dialect (the boolean draining), sent during its contraction window for readers that predate
|
|
413
|
-
* {@link ENGINE_SIGNAL_KEY}; read nothing off it — draining is {@link EngineSignal}`.draining`. Removal registered
|
|
414
|
-
* (`ONE_TIME_MIGRATIONS` row `SS-W1`). */
|
|
415
|
-
draining: z.boolean().optional(),
|
|
416
|
-
/** @deprecated Flat engine-state dialect (pairs with the boolean `draining`: epoch ms, present iff draining); same window —
|
|
417
|
-
* read {@link EngineSignal}`.draining.since` instead. */
|
|
418
|
-
drainingSince: z.number().optional(),
|
|
419
409
|
/** The engine's {@link EngineSignal}, whole — the one place its state is read off `/health`. Read exactly as
|
|
420
410
|
* {@link readEngineSignal} reads it: a value that breaks the shape is ABSENT (`.catch`), never a refused body — and an absent
|
|
421
411
|
* signal is `no-engine-signal`, never ready. The key may then be present with the value `undefined`. */
|
|
@@ -489,17 +479,7 @@ export const InstanceAnnouncement = z.object({
|
|
|
489
479
|
/** reachable base URL for the deployment form: k8s pod IP:port / docker net alias / 127.0.0.1:<engine.port> */
|
|
490
480
|
address: z.string().min(1),
|
|
491
481
|
version: z.string().min(1),
|
|
492
|
-
/** @deprecated Flat engine-state dialect (self-declared readiness), sent during its contraction window for readers that
|
|
493
|
-
* predate {@link ENGINE_SIGNAL_KEY}; read nothing off it — readiness is {@link EngineSignal}`.ready`. Removal registered
|
|
494
|
-
* (`ONE_TIME_MIGRATIONS` row `SS-W1`). */
|
|
495
|
-
ready: z.boolean(),
|
|
496
|
-
/** @deprecated Flat engine-state dialect (the boolean draining), same window; read nothing off it — draining is
|
|
497
|
-
* {@link EngineSignal}`.draining`. */
|
|
498
|
-
draining: z.boolean().default(false),
|
|
499
482
|
heartbeatMs: INTEGER.positive().default(DEFAULT_HEARTBEAT_MS),
|
|
500
|
-
/** @deprecated Flat engine-state dialect (the restart signal), same window; read nothing off it — the restart signal is
|
|
501
|
-
* {@link EngineSignal}`.restart`. Its shape is unchanged for the window: a malformed one still refuses the heartbeat, as before. */
|
|
502
|
-
restart: RestartSignal.optional(),
|
|
503
483
|
/** S-768: present ⇔ this instance has at least one reportable model refusal — the SAME {@link ModelRefusalsWire} /health
|
|
504
484
|
* carries, minted by the same getter; read it with {@link readModelRefusals}`(announcement)` (never off this field
|
|
505
485
|
* directly: the field is the open wire form, the reader narrows to the closed sets). Every heartbeat re-announces the
|
|
@@ -508,22 +488,15 @@ export const InstanceAnnouncement = z.object({
|
|
|
508
488
|
* the key never sends it, so there absence is UNKNOWN, not "none" — tell the two apart by the announced `version`.
|
|
509
489
|
* Failure direction = meaning direction (this is a diagnostic key): a code this package version does not know passes
|
|
510
490
|
* (it is "not said" to the reader), and a value that breaks the {@link ModelRefusalsWire} shape law is dropped to
|
|
511
|
-
* ABSENT (`.catch`) — it never fails the announcement, so it can never make a healthy instance unroutable
|
|
512
|
-
*
|
|
491
|
+
* ABSENT (`.catch`) — it never fails the announcement, so it can never make a healthy instance unroutable. The key may
|
|
492
|
+
* then be present with the value `undefined`. */
|
|
513
493
|
modelRefusals: ModelRefusalsWire.optional().catch(undefined),
|
|
514
|
-
/** @deprecated Flat engine-state dialect (fleet membership), same window; read nothing off it — it is
|
|
515
|
-
* {@link EngineSignal}`.generation`. Shape unchanged for the window (a value that breaks it drops to absent, as before). */
|
|
516
|
-
generation: Generation.optional().catch(undefined),
|
|
517
|
-
/** @deprecated Flat engine-state dialect (the lease state), same window; read nothing off it — it is {@link EngineSignal}`.leaseState`. */
|
|
518
|
-
leaseState: LeaseState.optional().catch(undefined),
|
|
519
|
-
/** @deprecated Flat engine-state dialect (the lease deadline), same window; read nothing off it — it is {@link EngineSignal}`.leaseUntil`. */
|
|
520
|
-
leaseUntil: EpochMs.optional().catch(undefined),
|
|
521
494
|
/** The engine's {@link EngineSignal}, whole — the one place its state is read off a heartbeat (the routing judge
|
|
522
495
|
* {@link judgeRoutability} reads nothing else). Every heartbeat re-announces the full row, so a later heartbeat whose signal
|
|
523
496
|
* no longer says a part (`restart`, a lease key) means the engine no longer says it — the stored row is replaced, never merged.
|
|
524
497
|
* Read exactly as {@link readEngineSignal} reads it off any body: a value that breaks the shape is ABSENT (`.catch`), never a
|
|
525
498
|
* refused heartbeat — and an absent signal is `no-engine-signal`, never routable, so the failure lands on the routing axis
|
|
526
|
-
* closed, while the rest of the row (
|
|
499
|
+
* closed, while the rest of the row (its identity, its refusals) is still kept. The key may then be present with
|
|
527
500
|
* the value `undefined`. */
|
|
528
501
|
[ENGINE_SIGNAL_KEY]: EngineSignal.optional().catch(undefined),
|
|
529
502
|
});
|
|
@@ -546,7 +519,7 @@ export function isInstanceStale(r, nowMs) {
|
|
|
546
519
|
}
|
|
547
520
|
/** Health fusion — the ONE judge of "may dispatch route to this stored instance": a signal is present ∧ the row is not stale ∧
|
|
548
521
|
* the observer does not veto ∧ the engine's own readiness ({@link judgeReadiness} over the row's {@link EngineSignal}). Two sources
|
|
549
|
-
* merge as an AND — EITHER source's "not ready" removes the instance (fail-closed).
|
|
522
|
+
* merge as an AND — EITHER source's "not ready" removes the instance (fail-closed). */
|
|
550
523
|
export function judgeRoutability(r, nowMs) {
|
|
551
524
|
const signal = r[ENGINE_SIGNAL_KEY];
|
|
552
525
|
if (signal === undefined)
|
package/dist/fs-failure.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 包内私有(不进主桶、不进 exports 表;零 `node:` 依赖):**文件系统失败句的唯一铸点** —— `(errno, 落点, 真实路径)` → 一句。
|
|
3
|
-
* 本包凡是把文件系统错误说成人话的地方(
|
|
3
|
+
* 本包凡是把文件系统错误说成人话的地方(原子写器、命令行的写口、目录迁移的读口)都调 {@link fsFailureSentence},没有第二处手写的 `cannot …` 句子
|
|
4
4
|
* (`test/` 下的 `fs-failure-single-mint-gate` 门扫 `src/` 里的字符串字面量,铸点之外出现即红)。
|
|
5
5
|
*
|
|
6
6
|
* 落点({@link FsFailureSite}.`landing`,闭集)按失败发生在哪一步分句 —— 同一个 errno 在不同落点指向不同的东西:
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
* · `chmod` —— 原子写器给临时文件设模式(已有的文件沿用它原来的模式,临时文件建成后、`rename` 之前设)。这一步失败 ⇒ 点名**设模式**这件事(文件系统不让改文件模式;目录没有问题),
|
|
9
9
|
* 不提目录、不提不可变标志;`path` 是被保留模式的**真文件**(chmod 作用在替换它的临时副本上,用户认得的是真文件名);
|
|
10
10
|
* · `rename` —— 原子写器 `rename` 盖过目标。目录收了新文件、却换不掉这一份 ⇒ 点名**真文件**;
|
|
11
|
-
* · `remove` —— 删一个文件。删的是目录项:目录不让删 ⇒ 点名文件所在的**目录**(与建临时文件同一个因);
|
|
12
11
|
* · `read` —— 读一个目录或文件;
|
|
13
12
|
* · `write` —— 写口整体失败、步骤看不见(注入的写口抛的错,不是本包原子写器抛的):只点名要写的文件。
|
|
14
13
|
* 认得的 errno 给那一步对应的出路,别的 errno(磁盘满、I/O 错 …)给 Node 自己的句子 —— 照样响亮,只是不替它猜出路。两条与落点无关的律:
|
|
15
14
|
* · errno 只打一遍 —— 句首括号里一次,Node 句子自带的 `<errno>: ` 前缀去掉;
|
|
16
15
|
* · `ENAMETOOLONG`(路径某一节或整条超限)既不是目录的错也不是文件的错 ⇒ 一句 `path too long: <被操作系统拒的路径> (ENAMETOOLONG)`,不点名目录、不给权限类出路。
|
|
17
|
-
*
|
|
16
|
+
* 两个落点(`dir-create-temp` / `rename`;26.0.0 起删文件的 `remove` 随目录迁移唯一的删文件口一起删了)的权限类出路走**同一张表**、一只函数({@link permissionWayOut}):落点表 {@link WAY_OUT_LANDING}(这个落点认哪些 errno、清标志点名谁、动已有目录项的落点才有粘滞目录一句)×
|
|
18
17
|
* errno 表 {@link WAY_OUT_BY_ERRNO}(穷举;每个 errno 两格 —— 目录权限位对本进程「可写」/「不可写或没读过」)。同一个 `EPERM` 既可能是目录模式不让写,也可能是不可变标志(macOS `chflags uchg` / Linux `chattr +i`),
|
|
19
18
|
* 同一个 `EACCES` 在模式位已经放行时只能是 ACL 条目或安全模块策略 —— 铸点是纯函数,分不清,但调用方在 Node 一侧能读目录模式,把「模式对本进程可写」这个事实经落点的 `directoryWritable` 递进来:
|
|
20
|
-
* 「可写」⇒ chmod 已经没用,`EPERM` 的首选出路 = 清标志(`chflags nouchg` / `chattr -i`),动已有目录项的落点(
|
|
19
|
+
* 「可写」⇒ chmod 已经没用,`EPERM` 的首选出路 = 清标志(`chflags nouchg` / `chattr -i`),动已有目录项的落点(rename)再接粘滞目录一句(那条属主规则给的就是 `EPERM`),`EACCES` 的出路 = 查 ACL / 安全模块(不接粘滞句);
|
|
21
20
|
* 否则(模式不可写,或调用方没读过模式 —— 注入的替身 I/O 抛的错,包看不到它背后)⇒ 先让目录可写,`EPERM` / `EROFS` 句尾提示「只读 / 不可变」的可能。`EROFS` 的出路不变(只读文件系统清不掉)。
|
|
22
21
|
* `rename` 落点的「可写」不是读出来的而是已证明的({@link RENAME_DIRECTORY_WRITABLE}:走到 rename 时临时文件刚在同一目录建成)—— 一个来源,`EPERM` 与 `EACCES` 同走「可写」那一列,所以 rename 句从不说「make the directory writable」。
|
|
23
22
|
*
|
|
@@ -25,8 +24,8 @@
|
|
|
25
24
|
* 命令行 / 迁移用 {@link fsFailureMessage} 取句 —— 已经是 {@link FsFailure} 的原样用,否则按它所在的口铸。
|
|
26
25
|
*/
|
|
27
26
|
/** 一次失败发生的地方(闭集):落点加那一步交给操作系统的真实路径(`dir-create-temp` 是要建的临时文件,点名的目录是它的父目录;`rename` 是被盖过的真文件;
|
|
28
|
-
* `
|
|
29
|
-
* `directoryWritable`(只有 `dir-create-temp`
|
|
27
|
+
* `write` 是那份文件;`read` 是读的目录或文件;`chmod` 是被保留模式的真文件〔这一格不是「交给操作系统的路径」口径:chmod 的对象是替换它的临时副本〕)。
|
|
28
|
+
* `directoryWritable`(只有 `dir-create-temp` 落点有)—— 失败那一刻,目录的权限位对本进程是否可写(Node 一侧读的事实,见 `./atomic-write` 的 `directoryAdmitsWrite`);
|
|
30
29
|
* 缺席 = 没读过(注入的替身 I/O),出路顺序按「不可写」走。`rename` 落点没有这一格:走到 rename 时临时文件刚在同一目录建成,目录可写是已证明的事实,由铸点按 {@link RENAME_DIRECTORY_WRITABLE} 给出。
|
|
31
30
|
*/
|
|
32
31
|
export type FsFailureSite = {
|
|
@@ -39,10 +38,6 @@ export type FsFailureSite = {
|
|
|
39
38
|
} | {
|
|
40
39
|
readonly landing: "rename";
|
|
41
40
|
readonly path: string;
|
|
42
|
-
} | {
|
|
43
|
-
readonly landing: "remove";
|
|
44
|
-
readonly path: string;
|
|
45
|
-
readonly directoryWritable?: boolean;
|
|
46
41
|
} | {
|
|
47
42
|
readonly landing: "read";
|
|
48
43
|
readonly path: string;
|
package/dist/fs-failure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 包内私有(不进主桶、不进 exports 表;零 `node:` 依赖):**文件系统失败句的唯一铸点** —— `(errno, 落点, 真实路径)` → 一句。
|
|
3
|
-
* 本包凡是把文件系统错误说成人话的地方(
|
|
3
|
+
* 本包凡是把文件系统错误说成人话的地方(原子写器、命令行的写口、目录迁移的读口)都调 {@link fsFailureSentence},没有第二处手写的 `cannot …` 句子
|
|
4
4
|
* (`test/` 下的 `fs-failure-single-mint-gate` 门扫 `src/` 里的字符串字面量,铸点之外出现即红)。
|
|
5
5
|
*
|
|
6
6
|
* 落点({@link FsFailureSite}.`landing`,闭集)按失败发生在哪一步分句 —— 同一个 errno 在不同落点指向不同的东西:
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
* · `chmod` —— 原子写器给临时文件设模式(已有的文件沿用它原来的模式,临时文件建成后、`rename` 之前设)。这一步失败 ⇒ 点名**设模式**这件事(文件系统不让改文件模式;目录没有问题),
|
|
9
9
|
* 不提目录、不提不可变标志;`path` 是被保留模式的**真文件**(chmod 作用在替换它的临时副本上,用户认得的是真文件名);
|
|
10
10
|
* · `rename` —— 原子写器 `rename` 盖过目标。目录收了新文件、却换不掉这一份 ⇒ 点名**真文件**;
|
|
11
|
-
* · `remove` —— 删一个文件。删的是目录项:目录不让删 ⇒ 点名文件所在的**目录**(与建临时文件同一个因);
|
|
12
11
|
* · `read` —— 读一个目录或文件;
|
|
13
12
|
* · `write` —— 写口整体失败、步骤看不见(注入的写口抛的错,不是本包原子写器抛的):只点名要写的文件。
|
|
14
13
|
* 认得的 errno 给那一步对应的出路,别的 errno(磁盘满、I/O 错 …)给 Node 自己的句子 —— 照样响亮,只是不替它猜出路。两条与落点无关的律:
|
|
15
14
|
* · errno 只打一遍 —— 句首括号里一次,Node 句子自带的 `<errno>: ` 前缀去掉;
|
|
16
15
|
* · `ENAMETOOLONG`(路径某一节或整条超限)既不是目录的错也不是文件的错 ⇒ 一句 `path too long: <被操作系统拒的路径> (ENAMETOOLONG)`,不点名目录、不给权限类出路。
|
|
17
|
-
*
|
|
16
|
+
* 两个落点(`dir-create-temp` / `rename`;26.0.0 起删文件的 `remove` 随目录迁移唯一的删文件口一起删了)的权限类出路走**同一张表**、一只函数({@link permissionWayOut}):落点表 {@link WAY_OUT_LANDING}(这个落点认哪些 errno、清标志点名谁、动已有目录项的落点才有粘滞目录一句)×
|
|
18
17
|
* errno 表 {@link WAY_OUT_BY_ERRNO}(穷举;每个 errno 两格 —— 目录权限位对本进程「可写」/「不可写或没读过」)。同一个 `EPERM` 既可能是目录模式不让写,也可能是不可变标志(macOS `chflags uchg` / Linux `chattr +i`),
|
|
19
18
|
* 同一个 `EACCES` 在模式位已经放行时只能是 ACL 条目或安全模块策略 —— 铸点是纯函数,分不清,但调用方在 Node 一侧能读目录模式,把「模式对本进程可写」这个事实经落点的 `directoryWritable` 递进来:
|
|
20
|
-
* 「可写」⇒ chmod 已经没用,`EPERM` 的首选出路 = 清标志(`chflags nouchg` / `chattr -i`),动已有目录项的落点(
|
|
19
|
+
* 「可写」⇒ chmod 已经没用,`EPERM` 的首选出路 = 清标志(`chflags nouchg` / `chattr -i`),动已有目录项的落点(rename)再接粘滞目录一句(那条属主规则给的就是 `EPERM`),`EACCES` 的出路 = 查 ACL / 安全模块(不接粘滞句);
|
|
21
20
|
* 否则(模式不可写,或调用方没读过模式 —— 注入的替身 I/O 抛的错,包看不到它背后)⇒ 先让目录可写,`EPERM` / `EROFS` 句尾提示「只读 / 不可变」的可能。`EROFS` 的出路不变(只读文件系统清不掉)。
|
|
22
21
|
* `rename` 落点的「可写」不是读出来的而是已证明的({@link RENAME_DIRECTORY_WRITABLE}:走到 rename 时临时文件刚在同一目录建成)—— 一个来源,`EPERM` 与 `EACCES` 同走「可写」那一列,所以 rename 句从不说「make the directory writable」。
|
|
23
22
|
*
|
|
@@ -47,10 +46,9 @@ const WAY_OUT_BY_ERRNO = {
|
|
|
47
46
|
};
|
|
48
47
|
const WAY_OUT_LANDING = {
|
|
49
48
|
"dir-create-temp": { errnos: ["EACCES", "EPERM", "EROFS", "ENOENT"], flagSubject: "the directory" },
|
|
50
|
-
remove: { errnos: ["EACCES", "EPERM", "EROFS"], flagSubject: "the file or its directory", stickyVerb: "remove" },
|
|
51
49
|
rename: { errnos: ["EACCES", "EPERM"], flagSubject: "the file or its directory", stickyVerb: "replace" },
|
|
52
50
|
};
|
|
53
|
-
/** 权限类出路的**唯一一只函数**(
|
|
51
|
+
/** 权限类出路的**唯一一只函数**(两个落点共用,表驱动):`code` 不是这个落点认的权限类 errno ⇒ `undefined`(调用方给 Node 自己的句子)。
|
|
54
52
|
* 组合律一条:errno 表的格(按 `directoryWritable === true` 选「可写」列或「不可写或没读过」列);「可写」∧ 该 errno 带粘滞 ∧ 这个落点有 `stickyVerb` ⇒ 句尾接 `in a sticky directory only the file's owner may <verb> it`。 */
|
|
55
53
|
const permissionWayOut = (landing, code, directoryWritable) => {
|
|
56
54
|
const spec = WAY_OUT_LANDING[landing];
|
|
@@ -94,8 +92,6 @@ export function fsFailureSentence(site, cause) {
|
|
|
94
92
|
return `cannot set the mode of ${site.path}${tag}: ${code !== undefined && CHMOD_REFUSED.has(code) ? CHMOD_WAY_OUT : nodeSentenceOf(cause, code)}`;
|
|
95
93
|
case "rename":
|
|
96
94
|
return `cannot replace ${site.path}${tag}: ${permissionWayOut("rename", code, RENAME_DIRECTORY_WRITABLE) ?? nodeSentenceOf(cause, code)}`;
|
|
97
|
-
case "remove":
|
|
98
|
-
return `cannot remove ${site.path} from directory ${parentDirectory(site.path)}${tag}: ${permissionWayOut("remove", code, site.directoryWritable) ?? nodeSentenceOf(cause, code)}`;
|
|
99
95
|
case "read":
|
|
100
96
|
return `cannot read ${site.of === "directory" ? "directory " : ""}${site.path}${tag}: ${nodeSentenceOf(cause, code)}`;
|
|
101
97
|
case "write":
|
package/dist/hooks.d.ts
CHANGED
|
@@ -78,19 +78,21 @@ export declare const HookEventName: z.ZodEnum<{
|
|
|
78
78
|
}>;
|
|
79
79
|
export type HookEventName = z.infer<typeof HookEventName>;
|
|
80
80
|
export declare const HookOwner: z.ZodEnum<{
|
|
81
|
-
shell: "shell";
|
|
82
81
|
engine: "engine";
|
|
82
|
+
shell: "shell";
|
|
83
83
|
}>;
|
|
84
84
|
export type HookOwner = z.infer<typeof HookOwner>;
|
|
85
85
|
/**
|
|
86
|
-
* Events whose TRIGGER lives in the engine half of sema's two-process wire
|
|
87
|
-
*
|
|
86
|
+
* Events whose TRIGGER lives in the engine half of sema's two-process wire — the owner of an event is the half where the
|
|
87
|
+
* occurrence it names happens:
|
|
88
|
+
* - tool-execution chain: PreToolUse / PostToolUse / PostToolUseFailure / PostToolBatch, and PermissionDenied (26.0.0) — a
|
|
89
|
+
* tool call refused by the engine's tool gate; the refusal is decided in the tool-execution chain, not in a dialog
|
|
88
90
|
* - compaction (runs engine-side): PreCompact / PostCompact
|
|
89
91
|
* - model-turn boundary (run-end is only known to the engine): Stop / StopFailure / UserPromptSubmit
|
|
90
|
-
* Everything else is shell-owned (UI / lifecycle
|
|
91
|
-
* live in the shell).
|
|
92
|
+
* Everything else is shell-owned (UI / lifecycle: the permission dialog — PermissionRequest —, sessions, teams, worktrees,
|
|
93
|
+
* files live in the shell). A shell that routes hooks by owner derives its table from this one (no second copy).
|
|
92
94
|
*/
|
|
93
|
-
export declare const ENGINE_OWNED_HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PostToolUseFailure", "PostToolBatch", "PreCompact", "PostCompact", "Stop", "StopFailure", "UserPromptSubmit"];
|
|
95
|
+
export declare const ENGINE_OWNED_HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PostToolUseFailure", "PostToolBatch", "PreCompact", "PostCompact", "Stop", "StopFailure", "UserPromptSubmit", "PermissionDenied"];
|
|
94
96
|
/** owner per event — single owner; the non-owner side never fires it (dedup rule). */
|
|
95
97
|
export declare const HOOK_EVENT_OWNER: Readonly<Record<HookEventName, HookOwner>>;
|
|
96
98
|
/**
|
package/dist/hooks.js
CHANGED
|
@@ -49,12 +49,14 @@ export const HookEventName = z.enum(HOOK_EVENTS);
|
|
|
49
49
|
// ── ownership (owner-single) ─────────────────────────────────────────────────────────────────────
|
|
50
50
|
export const HookOwner = z.enum(["engine", "shell"]);
|
|
51
51
|
/**
|
|
52
|
-
* Events whose TRIGGER lives in the engine half of sema's two-process wire
|
|
53
|
-
*
|
|
52
|
+
* Events whose TRIGGER lives in the engine half of sema's two-process wire — the owner of an event is the half where the
|
|
53
|
+
* occurrence it names happens:
|
|
54
|
+
* - tool-execution chain: PreToolUse / PostToolUse / PostToolUseFailure / PostToolBatch, and PermissionDenied (26.0.0) — a
|
|
55
|
+
* tool call refused by the engine's tool gate; the refusal is decided in the tool-execution chain, not in a dialog
|
|
54
56
|
* - compaction (runs engine-side): PreCompact / PostCompact
|
|
55
57
|
* - model-turn boundary (run-end is only known to the engine): Stop / StopFailure / UserPromptSubmit
|
|
56
|
-
* Everything else is shell-owned (UI / lifecycle
|
|
57
|
-
* live in the shell).
|
|
58
|
+
* Everything else is shell-owned (UI / lifecycle: the permission dialog — PermissionRequest —, sessions, teams, worktrees,
|
|
59
|
+
* files live in the shell). A shell that routes hooks by owner derives its table from this one (no second copy).
|
|
58
60
|
*/
|
|
59
61
|
export const ENGINE_OWNED_HOOK_EVENTS = [
|
|
60
62
|
"PreToolUse",
|
|
@@ -66,6 +68,7 @@ export const ENGINE_OWNED_HOOK_EVENTS = [
|
|
|
66
68
|
"Stop",
|
|
67
69
|
"StopFailure",
|
|
68
70
|
"UserPromptSubmit",
|
|
71
|
+
"PermissionDenied",
|
|
69
72
|
];
|
|
70
73
|
/** owner per event — single owner; the non-owner side never fires it (dedup rule). */
|
|
71
74
|
export const HOOK_EVENT_OWNER = Object.fromEntries(HOOK_EVENTS.map((e) => [e, ENGINE_OWNED_HOOK_EVENTS.includes(e) ? "engine" : "shell"]));
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 一次性迁移的**收据形**与两张闭集(11.0.0)—— 叶子模块(运行期零依赖;只有型导入),由 `./one-time-migrations` 再导出(不进主桶)。
|
|
3
|
-
*
|
|
3
|
+
* 单拆出来只为一件事:读迁移 id 闭集的叶子(墓碑句 `./retired-form`、车道表 `./execution-lane-index`、配置根文档 `./config-root-documents`)
|
|
4
|
+
* 不该为一个型把整套迁移体与域 schema 拉进来。(26.0.0 起调度店的读口不再带收据 —— 它的读时改写到期删了。)
|
|
4
5
|
*/
|
|
5
6
|
import type { ENV_MODELS_DOCUMENT } from "./config-root-documents.js";
|
|
6
|
-
import type {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* (`WIRE_RETIREMENT_IDS`,`./one-time-migrations`)不改任何存储形,铸不出收据,不在本集。 */
|
|
10
|
-
export declare const ONE_TIME_MIGRATION_IDS: readonly ["SS-M1", "SS-M2", "SS-M3", "SS-M4", "SS-M5", "SS-M6", "SS-M7", "SS-M8", "SS-M9", "SS-M10", "SS-M11", "SS-M12"];
|
|
7
|
+
import type { DomainName } from "./types.js";
|
|
8
|
+
/** 本版登记的一次性迁移 id(闭集;每个 id 在 `ONE_TIME_MIGRATIONS` 登记表里恰一行)。收据只许这些 id。 */
|
|
9
|
+
export declare const ONE_TIME_MIGRATION_IDS: readonly ["SS-M8", "SS-M10", "SS-M11", "SS-M12"];
|
|
11
10
|
export type OneTimeMigrationId = (typeof ONE_TIME_MIGRATION_IDS)[number];
|
|
12
11
|
/**
|
|
13
12
|
* 一条收据说迁移**对一个坐标做了什么**(闭集,每词一义):
|
|
14
13
|
* - `moved` — 值搬到新位(`to`),义不变;
|
|
15
|
-
* - `rewritten` — 同一坐标上的值换成今天的生效读法(例:
|
|
16
|
-
* - `dropped-
|
|
17
|
-
* - `dropped-inert` — 删掉;今天的读法本就不让它生效(例:超界的主机条目、引擎从不读的旧字段、空的retired 域文档);
|
|
14
|
+
* - `rewritten` — 同一坐标上的值换成今天的生效读法(例:15.x worker 行的记忆方言词 `tidb` ⇒ `mysql`);
|
|
15
|
+
* - `dropped-inert` — 删掉;今天的读法本就不让它生效(例:core 7.49.0 起引擎不再认的角色词 `team` / `synthesize`、空的 `bindings: []`、不声明那条车道的行上的车道键);
|
|
18
16
|
* - `refused` — 不改:要改就得替运维猜(或旧文档今天本就读不进);原样留着,读侧照旧响亮拒,`reason` 说为什么;
|
|
19
17
|
* - `minted` — 在**缺席处**写下一份新事实(一份部署决定),不改任何已有的值 —— 只有 SS-M11 铸(配置根的 `config.env-models.json`:
|
|
20
18
|
* 升级前「管模型面的目录整表顶替 env 模型」的读法,写成 `replaced`;不存在才建)。
|
|
21
19
|
*/
|
|
22
|
-
export declare const MIGRATION_APPLIED_AS: readonly ["moved", "rewritten", "dropped-
|
|
20
|
+
export declare const MIGRATION_APPLIED_AS: readonly ["moved", "rewritten", "dropped-inert", "refused", "minted"];
|
|
23
21
|
export type MigrationAppliedAs = (typeof MIGRATION_APPLIED_AS)[number];
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
export type MigrationDocument = DomainName |
|
|
22
|
+
/** 收据指向的那份文档:配置域名,或配置根上的 env 模型表决定(`config.env-models`,SS-M11 铸)。
|
|
23
|
+
* (26.0.0 起没有一步给 retired 域 `runtime`、`config.d/remote-exec.json` 或调度店出收据 —— 那三只文档的迁移步到期删了。) */
|
|
24
|
+
export type MigrationDocument = DomainName | typeof ENV_MODELS_DOCUMENT;
|
|
27
25
|
/** 文档里的段坐标(字符串段 = 对象键,数字段 = 数组下标;与告警坐标同一形)。 */
|
|
28
26
|
export type MigrationPath = readonly (string | number)[];
|
|
29
27
|
interface ReceiptBase {
|
|
@@ -39,7 +37,7 @@ export type MigrationReceipt = (ReceiptBase & {
|
|
|
39
37
|
readonly path: MigrationPath;
|
|
40
38
|
};
|
|
41
39
|
}) | (ReceiptBase & {
|
|
42
|
-
readonly appliedAs: "rewritten" | "dropped-
|
|
40
|
+
readonly appliedAs: "rewritten" | "dropped-inert" | "minted";
|
|
43
41
|
}) | (ReceiptBase & {
|
|
44
42
|
readonly appliedAs: "refused";
|
|
45
43
|
readonly reason: string;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
export const ONE_TIME_MIGRATION_IDS = ["SS-M1", "SS-M2", "SS-M3", "SS-M4", "SS-M5", "SS-M6", "SS-M7", "SS-M8", "SS-M9", "SS-M10", "SS-M11", "SS-M12"];
|
|
1
|
+
/** 本版登记的一次性迁移 id(闭集;每个 id 在 `ONE_TIME_MIGRATIONS` 登记表里恰一行)。收据只许这些 id。 */
|
|
2
|
+
export const ONE_TIME_MIGRATION_IDS = ["SS-M8", "SS-M10", "SS-M11", "SS-M12"];
|
|
4
3
|
/**
|
|
5
4
|
* 一条收据说迁移**对一个坐标做了什么**(闭集,每词一义):
|
|
6
5
|
* - `moved` — 值搬到新位(`to`),义不变;
|
|
7
|
-
* - `rewritten` — 同一坐标上的值换成今天的生效读法(例:
|
|
8
|
-
* - `dropped-
|
|
9
|
-
* - `dropped-inert` — 删掉;今天的读法本就不让它生效(例:超界的主机条目、引擎从不读的旧字段、空的retired 域文档);
|
|
6
|
+
* - `rewritten` — 同一坐标上的值换成今天的生效读法(例:15.x worker 行的记忆方言词 `tidb` ⇒ `mysql`);
|
|
7
|
+
* - `dropped-inert` — 删掉;今天的读法本就不让它生效(例:core 7.49.0 起引擎不再认的角色词 `team` / `synthesize`、空的 `bindings: []`、不声明那条车道的行上的车道键);
|
|
10
8
|
* - `refused` — 不改:要改就得替运维猜(或旧文档今天本就读不进);原样留着,读侧照旧响亮拒,`reason` 说为什么;
|
|
11
9
|
* - `minted` — 在**缺席处**写下一份新事实(一份部署决定),不改任何已有的值 —— 只有 SS-M11 铸(配置根的 `config.env-models.json`:
|
|
12
10
|
* 升级前「管模型面的目录整表顶替 env 模型」的读法,写成 `replaced`;不存在才建)。
|
|
13
11
|
*/
|
|
14
|
-
export const MIGRATION_APPLIED_AS = ["moved", "rewritten", "dropped-
|
|
12
|
+
export const MIGRATION_APPLIED_AS = ["moved", "rewritten", "dropped-inert", "refused", "minted"];
|
package/dist/node.js
CHANGED
|
@@ -11,7 +11,7 @@ export * from "./local-load.js";
|
|
|
11
11
|
// 一份 `config.d/<名>.json` 的读数(缺席 / 在场 / 被拒)的**同步读口**:与包内异步读口同一只纯判、同一个缺席尾(壳在同步具名锁里读 `config.d` 文档用它,不自读文本);纯判本身与异步读口不出门。显式列名。
|
|
12
12
|
export { readConfigDFileReadingSync } from "./config-d-file.js";
|
|
13
13
|
export * from "./scheduler-store-node.js"; // R7 self-wake scheduler store — fs binding of the ./scheduler-store contract
|
|
14
|
-
// 目录形的一次性迁移(读目录 → 迁 → 整域终判 →
|
|
14
|
+
// 目录形的一次性迁移(读目录 → 迁 → 整域终判 → 原子写;从不删文件)—— 语义只此一处,命令行是它的渲染器、引擎起服调同一只。显式列名:该模块的包内私有件(出门形/拼路径)不外泄。
|
|
15
15
|
export { migrateConfigDirectory, migrateConfigDocuments, // 14.5.0:同一段「迁 → 整域终判」的同步口(入参是已有的存量文档,无 io)—— 目录形调的就是它的内核
|
|
16
16
|
} from "./config-dir-migration.js";
|
|
17
17
|
export { nodeConfigDirectoryIo } from "./config-dir-io.js"; // 上面那只函数的真 I/O 绑定:node:fs + 本包唯一的原子写器(config-document 模式规则)
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import type { MigrationReceipt, OneTimeMigrationId } from "./migration-receipt.js";
|
|
2
|
-
import { REMOTE_EXEC_DOCUMENT } from "./remote-exec.js";
|
|
2
|
+
import type { REMOTE_EXEC_DOCUMENT } from "./remote-exec.js";
|
|
3
3
|
import { type DomainName, type RetiredDomainName } from "./types.js";
|
|
4
4
|
export { MIGRATION_APPLIED_AS, ONE_TIME_MIGRATION_IDS, type MigrationAppliedAs, type MigrationDocument, type MigrationPath, type MigrationReceipt, type OneTimeMigrationId } from "./migration-receipt.js";
|
|
5
|
-
export { migrateSchedulerRecords } from "./scheduler-store-migration.js";
|
|
6
|
-
/** wire 删码位的 id(闭集;`W` = wire):没有存储形要改写、没有收据,与数据迁移同表登记只为让「什么时候删、删什么、删后谁接住」只写一处。 */
|
|
7
|
-
export declare const WIRE_RETIREMENT_IDS: readonly ["SS-W1"];
|
|
8
|
-
export type WireRetirementId = (typeof WIRE_RETIREMENT_IDS)[number];
|
|
9
5
|
/** 一条一次性迁移的窗(登记表的一行;纯数据)。 */
|
|
10
6
|
export interface OneTimeMigrationWindow {
|
|
11
|
-
/**
|
|
12
|
-
readonly id: OneTimeMigrationId
|
|
13
|
-
/** 旧形在读侧的待遇(
|
|
7
|
+
/** 迁移 id(闭集 `ONE_TIME_MIGRATION_IDS`);每个 id 恰一行。 */
|
|
8
|
+
readonly id: OneTimeMigrationId;
|
|
9
|
+
/** 旧形在读侧的待遇(闭集,每词一义;「读写两面遇旧形一律响亮拒,迁移还在时拒句点名迁移 id、窗关删码后止于今天的位」这条律的例外只在这一格里写):
|
|
14
10
|
* · `refused` — 读写两面拒,拒句点名本行 id(经 `migrationSignpost` 铸;钉:每个 `refused` 行的 id 在 `src/` 至少一处铸点,
|
|
15
11
|
* 且非 `refused` 行零铸点);
|
|
16
|
-
* · `rewritten-on-read` — 读时改写、不拒(SS-M3:调度店的下一个写者落盘),没有拒句可点名;
|
|
17
|
-
* · `not-stored` — 没有存储形(wire 删码位),谈不上拒;
|
|
18
12
|
* · `read-as-default` — 旧形是一份文档的**缺席**(SS-M11:配置根上没有 `config.env-models.json`),读者按它的缺省读(`kept`),不拒、没有拒句可点名 ——
|
|
19
13
|
* 缺省读出来的后果由读者自己的响亮臂说(引擎的模型面组拒句点名出路)。 */
|
|
20
|
-
readonly oldForm: "refused" | "
|
|
14
|
+
readonly oldForm: "refused" | "read-as-default";
|
|
21
15
|
/** 引入这条迁移的版本。 */
|
|
22
16
|
readonly introducedIn: string;
|
|
23
17
|
/** 该版本在 npm 上的发布日(UTC 日历日 YYYY-MM-DD)。`null` = 未发布形,由抬 `package.json` 到 `introducedIn` 的发布准备提交回填。 */
|
|
@@ -33,15 +27,12 @@ export interface OneTimeMigrationWindow {
|
|
|
33
27
|
}
|
|
34
28
|
/** 一次性迁移登记表 —— 本族各条窗的**唯一属主**。别处只写「窗见 `ONE_TIME_MIGRATIONS` 登记表」。 */
|
|
35
29
|
export declare const ONE_TIME_MIGRATIONS: readonly OneTimeMigrationWindow[];
|
|
36
|
-
/** 一组存储文档是不是**一个 scope 的全集**:`"scope"` = 缺席的域就是从未设过;`"partial"` = 缺席的域只是没给(principal 层、回滚史的
|
|
37
|
-
* 单域行、任意子集)。只有 SS-M1 读它。 */
|
|
38
|
-
export type DocumentCoverage = "scope" | "partial";
|
|
39
30
|
/** 一组存储文档(域名 / retired 域名 / `remote-exec` → 文档)。别的键原样带过、不动。 */
|
|
40
31
|
export type StoredDocuments = Readonly<Partial<Record<DomainName | RetiredDomainName | typeof REMOTE_EXEC_DOCUMENT, unknown>>>;
|
|
41
32
|
export interface StoredDocumentsMigration {
|
|
42
|
-
/**
|
|
33
|
+
/** 迁移后的文档集:没改的文档是**同一引用**;被移除的不在、新建的在(26.0.0 起没有一步移除或新建文档)。 */
|
|
43
34
|
readonly docs: Readonly<Record<string, unknown>>;
|
|
44
|
-
/** 逐条收据(步序 SS-
|
|
35
|
+
/** 逐条收据(步序 SS-M8 → SS-M10 → workers 行步〔SS-M12 改写 → 一次终判〕:纯改写步在前,用新 schema 终判的 workers 行步最后;步内按坐标)。
|
|
45
36
|
* 只有 `refused` 的收据 = 什么都没改。 */
|
|
46
37
|
readonly receipts: readonly MigrationReceipt[];
|
|
47
38
|
}
|
|
@@ -49,18 +40,12 @@ export interface StoredDocumentsMigration {
|
|
|
49
40
|
* 迁移一组存储文档(见文件头「入口」)。纯函数;没改的文档原样返回;**不抬任何版本号**(结果里没有版本 —— 那是调用方的)。
|
|
50
41
|
* 重跑恒等:第二次跑零改动,只剩第一次就 `refused` 的那几张收据(那些坐标原样留着,读侧照旧拒)。
|
|
51
42
|
*/
|
|
52
|
-
export declare function migrateStoredDocuments(docs: StoredDocuments
|
|
53
|
-
readonly coverage: DocumentCoverage;
|
|
54
|
-
}): StoredDocumentsMigration;
|
|
43
|
+
export declare function migrateStoredDocuments(docs: StoredDocuments): StoredDocumentsMigration;
|
|
55
44
|
/**
|
|
56
|
-
* 迁移一份冻结的 effective(见文件头「入口」):域键过与 {@link migrateStoredDocuments}
|
|
57
|
-
* 都物化了),其余键(`version` / `updatedAt` / wire 上的 `skills` 清单形 …)原样。键序保持;被移除的retired 域不在;effective 没改 ⇒ 同一引用。
|
|
45
|
+
* 迁移一份冻结的 effective(见文件头「入口」):域键过与 {@link migrateStoredDocuments} 同一组步,其余键(`version` / `updatedAt` / wire 上的 `skills` 清单形 …)原样。键序保持;被移除的retired 域不在;effective 没改 ⇒ 同一引用。
|
|
58
46
|
* 不是对象 ⇒ 原样返回(判形是读者的事)。
|
|
59
47
|
*/
|
|
60
48
|
export declare function migrateEffectiveSnapshot(effective: unknown): {
|
|
61
49
|
readonly effective: unknown;
|
|
62
50
|
readonly receipts: readonly MigrationReceipt[];
|
|
63
51
|
};
|
|
64
|
-
/** SS-M7 走查的全部 URL 座位的坐标模式(派生;数组 / Record 位写 `*`;域文档以域名起头,`remote-exec.json` 以 `remote-exec` 起头)—— 迁移不用它,
|
|
65
|
-
* 它给钉与说明看「今天派生出哪些座位」。 */
|
|
66
|
-
export declare function urlSeatPatterns(): string[];
|