@sema-agent/settings-schema 23.0.0 → 25.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 +240 -0
- package/README.md +30 -3
- package/conformance/VERSION +1 -1
- package/conformance/cases/c34-skills-content-vs-manifest/expected.json +31 -17
- package/conformance/cases/c34-skills-content-vs-manifest/meta.json +1 -1
- package/conformance/cases/c36-skills-entry-without-content/expected.json +3 -66
- package/conformance/cases/c36-skills-entry-without-content/meta.json +1 -1
- package/conformance/cases/c37-skills-field-null/expected.json +9 -132
- package/conformance/cases/c37-skills-field-null/meta.json +1 -1
- package/conformance/cases/c87-a2a-credential-refs-not-partially-salvaged/expected.json +4 -12
- package/conformance/cases/c87-a2a-credential-refs-not-partially-salvaged/meta.json +1 -1
- package/dist/config-fns.d.ts +83 -27
- package/dist/config-fns.js +232 -115
- package/dist/conformance/derive.js +3 -4
- package/dist/file-store.d.ts +2 -2
- package/dist/fleet.d.ts +41 -31
- package/dist/fleet.js +63 -30
- package/dist/types.d.ts +3 -14
- package/dist/types.js +24 -34
- package/docs/API-SURFACE.md +12 -8
- package/docs/CONFORMANCE.md +1 -1
- package/docs/CONSUMER-INTEGRATION.md +56 -1
- package/llms-full.txt +13 -8
- package/llms.txt +5 -4
- package/package.json +1 -1
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* 变换表(每条写明:动了什么、影响哪几条腿、出处):
|
|
11
11
|
* · **T1 承运域在场性**(wire):`buildEffective` 恒物化每个域;wire 腿对承运表 `WIRE_CARRIED_DOMAINS` 里的域(`prompts`、`a2a`)按**在场性**
|
|
12
12
|
* 挂回(线上读口不编造生产方没发的域)—— 缺席进缺席出;在场时 `prompts` 是**未解析的原文档**,`a2a` 是域腿的读数。表由常量派生,不手抄域名。
|
|
13
|
-
* · **T2 skills 表示**(wire):域形带 `content`,wire 形带 `contentHash`(manifest)。判据 schema
|
|
13
|
+
* · **T2 skills 表示**(wire):域形带 `content`,wire 形带 `contentHash`(manifest)。判据 schema 随表示走;读法不随(24.0.0 起清单与域文档同一只读法、
|
|
14
|
+
* 同两张表,剥键扫描与告警同读 —— 此前清单不走剥键扫描,派生要把 skills 的剥键告警从 wire 期望里滤掉)。
|
|
14
15
|
* · **T3 非便携域**(local-root):`config.d/` 只读 {@link PORTABLE_DOMAINS};其余域的文件在场则报
|
|
15
16
|
* `unread-config-file{why:"non-portable-domain"}`,域本身取 schema 默认。**由 `PORTABLE_DOMAINS` 派生,
|
|
16
17
|
* 不手抄域名** —— 设计稿只点了 `hosts` 一个实例,类是「非便携域」。
|
|
@@ -41,7 +42,7 @@ import { DOMAINS, WIRE_CARRIED_DOMAINS, isDomainName } from "../types.js";
|
|
|
41
42
|
/** 变换表(本文件头注的机器形;`docs/CONFORMANCE.md` 与 `test/conformance-coverage.test.ts` 都读它)。 */
|
|
42
43
|
export const DERIVATION_TRANSFORMS = [
|
|
43
44
|
{ id: "T1-wire-carried-domains", legs: ["wire"], what: "buildEffective 恒物化每个域;wire 对 WIRE_CARRIED_DOMAINS(prompts / a2a)按在场性挂回(缺席进缺席出;在场时 prompts 是原文档、a2a 是域腿读数)" },
|
|
44
|
-
{ id: "T2-skills-representation", legs: ["wire"], what: "域形 content ↔ wire 形 contentHash(manifest),判据 schema
|
|
45
|
+
{ id: "T2-skills-representation", legs: ["wire"], what: "域形 content ↔ wire 形 contentHash(manifest),判据 schema 随表示走;读法与告警同一只" },
|
|
45
46
|
{ id: "T3-non-portable-domains", legs: ["localRoot"], what: "config.d/ 只读 PORTABLE_DOMAINS;其余域取默认 + unread-config-file{non-portable-domain}" },
|
|
46
47
|
{ id: "T4-unknown-top-level-key", legs: ["wire", "localRoot"], what: "wire open-world 逐字承运;domains 腿按域名取文档故无声;local 报 unread-config-file{not-a-domain}" },
|
|
47
48
|
{ id: "T5-file-layer-first", legs: ["localRoot"], what: "config.d/<域>.json 必须是 JSON 对象(空/null/数组/标量 throw),这一层在域解析之前" },
|
|
@@ -121,8 +122,6 @@ export function deriveWireExpectation(source, docs) {
|
|
|
121
122
|
const warnings = source.warnings.filter((w) => {
|
|
122
123
|
if ("domain" in w && w.domain === "prompts")
|
|
123
124
|
return false; // T1:wire 腿不解析 prompts ⇒ 没有它的告警
|
|
124
|
-
if ("domain" in w && w.domain === "skills" && (w.kind === "unknown-keys-dropped" || w.kind === "unknown-keys-carried"))
|
|
125
|
-
return false; // T2:manifest 不走剥键扫描
|
|
126
125
|
return true;
|
|
127
126
|
});
|
|
128
127
|
return { outcome: "effective", effective, warnings, metadata: { ...source.metadata } };
|
package/dist/file-store.d.ts
CHANGED
|
@@ -69,9 +69,9 @@ export declare class FileConfigStore implements ConfigReader {
|
|
|
69
69
|
* throw,消费者(server main 单点 catch)只能整包回落 env——models.json 一个坏文件把 skills/mcp/
|
|
70
70
|
* scenarios 全域连坐。`getEffective({tolerant:true})` 把 READ 层的坏文件按 parse 层既有的
|
|
71
71
|
* {@link DOMAIN_READ_FALLBACK} 同一张表处置:
|
|
72
|
-
* - `"default"` 域(models/
|
|
72
|
+
* - `"default"` 域(models/mcp/… 追加型 capability 目录):该域按 schema default 落 +
|
|
73
73
|
* 错误单列进 `domainErrors`(fail-closed:default 只会移除能力),其余好域照常生效;
|
|
74
|
-
* - `"throw"` 域(governance/rosters/entitlement
|
|
74
|
+
* - `"throw"` 域(governance/rosters/entitlement/…,以及条目缺席会放宽的 scenarios/plugins/skills):坏文件仍然 throw——READ 容错绝不放宽
|
|
75
75
|
* gate 域的 fail-loud(与 parse 层同一条纪律,defaulting=放权,不许)。
|
|
76
76
|
* 版本语义:坏域在 version hash 里以 `{__corruptDomainFile: <文件文本 hash>}` 哨兵参与——绝不与
|
|
77
77
|
* 「文件缺失(absent)」同 bytes(#readDomainRaw 头注的 lock-step 要求),坏→修好、好→坏、
|
package/dist/fleet.d.ts
CHANGED
|
@@ -94,14 +94,15 @@ export declare function compareGeneration(a: string, b: string): -1 | 0 | 1;
|
|
|
94
94
|
/**
|
|
95
95
|
* The serving lease as the ENGINE holds it — a CLOSED set of four words, owned here (the engine's vocabulary, word for word;
|
|
96
96
|
* a reader that switches on it exhaustively is told by the compiler when a word is added):
|
|
97
|
-
* - `none` — the lease is not in effect: web-admin
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* `none` — it keeps the state it had.
|
|
97
|
+
* - `none` — the lease is not in effect: web-admin's most recent capability declaration ({@link readCapabilityReading} said `declared`) did
|
|
98
|
+
* not carry {@link WebAdminCapabilities}`.servingLease`. The engine behaves exactly as an engine without a lease — no renewals, no fence.
|
|
99
|
+
* A reply that is not a declaration (`unreadable`: an older web-admin that sends no `capabilities` key, a gateway answering `{}`, a body that
|
|
100
|
+
* cannot be read) is not a reading: it does not move the engine into or out of `none` — it keeps the state it had.
|
|
101
101
|
* - `granted` — the engine holds a lease; `leaseUntil` says until when (epoch ms, the engine's own computation from the
|
|
102
102
|
* granted `ttlMs`, see {@link ServingLeaseResponse}).
|
|
103
103
|
* - `expired` — the lease is in effect but no grant is valid right now (web-admin is unreachable, answered `unknown`, or has
|
|
104
|
-
* not granted one yet
|
|
104
|
+
* not granted one yet; a fleet member that has not yet heard any declaration from web-admin is presumed to be inside the fence, its
|
|
105
|
+
* outage clock running from the engine's start): the engine keeps serving until its own outage allowance runs out. Not a denial.
|
|
105
106
|
* - `denied` — web-admin denied this instance on positive evidence (the `denied` verdict): sticky; the engine is draining and
|
|
106
107
|
* stops at its deadline.
|
|
107
108
|
* Only a fleet member says it: an engine without a generation has no lease and carries no `leaseState` at all (there is no
|
|
@@ -694,19 +695,23 @@ export declare function readServingLeaseResponse(body: unknown): ServingLeaseRea
|
|
|
694
695
|
* What web-admin says it can do: capability bits an engine reads before it starts using a web-admin-side endpoint.
|
|
695
696
|
* - `servingLease` — web-admin answers serving-lease renewals ({@link ServingLeaseRequest} / {@link ServingLeaseResponse}).
|
|
696
697
|
*
|
|
697
|
-
* A bit is `true` or absent — one spelling for "not supported" (there is no `false`).
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
698
|
+
* A bit is `true` or absent — one spelling for "not supported" (there is no `false`). A bit absent from a DECLARED object means web-admin
|
|
699
|
+
* does not support it, and for `servingLease` the engine then neither renews a lease nor is fenced by one: that is web-admin's own word (the
|
|
700
|
+
* lease switched off there, or a caller under the shared token, below). Having NO declaration is a different fact and is not read as "not
|
|
701
|
+
* supported": a heartbeat reply that carries no `capabilities` key (an older web-admin, a gateway or maintenance page answering `{}`) is not
|
|
702
|
+
* a reading ({@link readCapabilityReading} says `unreadable`), and a fleet member that has heard no declaration is presumed to be inside the
|
|
703
|
+
* fence — silence never loosens it. So the compatibility gate this shape gives (an executor may ship ahead of web-admin) holds on the
|
|
704
|
+
* heartbeat path of a web-admin that answers with the key — every web-admin release that can render a fleet generation does; a path whose
|
|
705
|
+
* answer carries no key (a gateway, a differently routed live base, a rolled-back web-admin) leaves the member inside the presumed fence.
|
|
706
|
+
* It is a gate, not a verdict — nothing in this shape says "web-admin refuses leases". Read a heartbeat reply with
|
|
707
|
+
* {@link readCapabilityReading} and start the lease client only on a `declared` reading whose `capabilities.servingLease === true`.
|
|
703
708
|
* Unknown bits are stripped (a newer web-admin's extra bits never break an older reader); a known bit whose value is not `true` breaks
|
|
704
|
-
* the declaration — and a broken declaration is NOT an absent
|
|
709
|
+
* the declaration — and a broken declaration is NOT an absent bit: the reply reads as `unreadable`, which is not a reading (the engine
|
|
705
710
|
* keeps the state it had; see {@link readCapabilityReading}).
|
|
706
711
|
* It rides in ONE place: the heartbeat's 2xx reply ({@link FLEET_PATHS}`.instances`), under {@link HEARTBEAT_REPLY_CAPABILITIES_KEY}.
|
|
707
712
|
* Web-admin answers the bits per CALLER CREDENTIAL: under a per-worker token, by what web-admin supports; under the shared token
|
|
708
713
|
* `servingLease` is always absent (the serving-lease endpoint takes per-worker tokens only, so announcing it there would only push
|
|
709
|
-
* that caller into the unreachable arm).
|
|
714
|
+
* that caller into the unreachable arm) — an empty declaration, `{ capabilities: {} }`, not a reply without the key.
|
|
710
715
|
*/
|
|
711
716
|
export declare const WebAdminCapabilities: z.ZodObject<{
|
|
712
717
|
servingLease: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -717,34 +722,39 @@ export type WebAdminCapabilities = z.infer<typeof WebAdminCapabilities>;
|
|
|
717
722
|
* Web-admin writes `{ …, [HEARTBEAT_REPLY_CAPABILITIES_KEY]: caps }`; the engine reads the whole reply with
|
|
718
723
|
* `readCapabilityReading(reply)` — the key lookup lives in the reader, one carrier one reader — and only on a 2xx (a failed heartbeat
|
|
719
724
|
* says nothing about the bits). Nested, not flat: the reply's own keys and the capability bits never share a namespace.
|
|
720
|
-
* A reply without the key is
|
|
721
|
-
*
|
|
725
|
+
* A reply without the key is not a declaration — it reads `unreadable` (`capabilities-absent`): an older web-admin, a gateway answering `{}`,
|
|
726
|
+
* bits flat on the body and `undefined` as the key's value (what JSON cannot carry) all read this way, and the engine acts on it as on no reply at all.
|
|
727
|
+
* A reply with the key present with a value that breaks the shape reads `unreadable` too (`invalid-capabilities`). Only an object under this
|
|
728
|
+
* key that passes {@link WebAdminCapabilities} is a reading.
|
|
722
729
|
*/
|
|
723
730
|
export declare const HEARTBEAT_REPLY_CAPABILITIES_KEY = "capabilities";
|
|
724
|
-
/**
|
|
731
|
+
/**
|
|
732
|
+
* What one heartbeat reply says about web-admin's capabilities — two words, see {@link readCapabilityReading}: `declared` (an explicit
|
|
733
|
+
* declaration, the only reading) or `unreadable` (the reply is not a declaration; `why` says which way).
|
|
734
|
+
*/
|
|
725
735
|
export type CapabilityReading = {
|
|
726
736
|
kind: "declared";
|
|
727
737
|
capabilities: WebAdminCapabilities;
|
|
728
|
-
} | {
|
|
729
|
-
kind: "undeclared";
|
|
730
738
|
} | {
|
|
731
739
|
kind: "unreadable";
|
|
732
|
-
why: "not-an-object" | "invalid-capabilities";
|
|
740
|
+
why: "not-an-object" | "capabilities-absent" | "invalid-capabilities";
|
|
733
741
|
};
|
|
734
742
|
/**
|
|
735
743
|
* Engine side: what one heartbeat reply says about web-admin's capabilities. The input is the heartbeat's whole 2xx reply body
|
|
736
|
-
* (the key lookup lives here — one carrier, one reader), the output one of
|
|
737
|
-
* - `declared` — the key ({@link HEARTBEAT_REPLY_CAPABILITIES_KEY}) is
|
|
738
|
-
* `capabilities` is
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
* - `unreadable` — the reply is not an object (`
|
|
742
|
-
* {
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
* on `
|
|
747
|
-
*
|
|
744
|
+
* (the key lookup lives here — one carrier, one reader), the output one of two words:
|
|
745
|
+
* - `declared` — the key ({@link HEARTBEAT_REPLY_CAPABILITIES_KEY}) is an own key of the reply and its value passes {@link WebAdminCapabilities}:
|
|
746
|
+
* web-admin made an explicit declaration. `capabilities` is a copy of it — the known bits that are set, as own properties of an object on the
|
|
747
|
+
* package's isolated prototype (unknown bits stripped, an absent bit stays absent and reads `undefined` even when `Object.prototype` is polluted with its name).
|
|
748
|
+
* `{ capabilities: {} }` is a declaration of no bits.
|
|
749
|
+
* - `unreadable` — anything else, and `why` says which way: the reply is not an object (`not-an-object`); the key is absent
|
|
750
|
+
* (`capabilities-absent` — an older web-admin, a body of `{}` or `{ ok: true }`, bits flat on the body, `undefined` as the key's value,
|
|
751
|
+
* a key that exists only on the prototype chain); the key is present but its value is not a {@link WebAdminCapabilities}
|
|
752
|
+
* (`invalid-capabilities`; a hidden key or an accessor that throws reads the same way).
|
|
753
|
+
* Only `declared` is a reading. A reply that is not a declaration says nothing about the fence — silence never loosens it: the engine acts
|
|
754
|
+
* on `unreadable` as on no reply at all. A fleet member that has heard no declaration is presumed to be inside the fence (its outage clock
|
|
755
|
+
* running from its own start); one that has heard a declaration keeps the state that declaration gave it, and leaves its clocks, the lease
|
|
756
|
+
* expiry and the outage allowance, as they were. Start the lease client only on `declared` with `capabilities.servingLease === true`.
|
|
757
|
+
* Never throws; judged by the same one guarded body judgement as every other reader here.
|
|
748
758
|
*/
|
|
749
759
|
export declare function readCapabilityReading(reply: unknown): CapabilityReading;
|
|
750
760
|
/**
|
package/dist/fleet.js
CHANGED
|
@@ -21,7 +21,7 @@ import { z } from "zod";
|
|
|
21
21
|
import { INTEGER } from "./integer.js";
|
|
22
22
|
import { fnv1a64 } from "./hash.js";
|
|
23
23
|
import { parseDeclared } from "./declared-capture.js";
|
|
24
|
-
import { readDeclaredKey, ownValueOf } from "./own-key-read.js";
|
|
24
|
+
import { dataDescriptor, isolatedObject, readDeclaredKey, ownValueOf } from "./own-key-read.js";
|
|
25
25
|
import { isPlainJsonObject } from "./plain-json-object.js";
|
|
26
26
|
import { buildQuotedIssue } from "./quoted-issue.js";
|
|
27
27
|
// ── Web-admin's fleet endpoints (paths, one spelling) ─────────────────────────────────────────────────────
|
|
@@ -123,14 +123,15 @@ const Generation = z.string().refine(isCanonicalGeneration, buildQuotedIssue `a
|
|
|
123
123
|
/**
|
|
124
124
|
* The serving lease as the ENGINE holds it — a CLOSED set of four words, owned here (the engine's vocabulary, word for word;
|
|
125
125
|
* a reader that switches on it exhaustively is told by the compiler when a word is added):
|
|
126
|
-
* - `none` — the lease is not in effect: web-admin
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* `none` — it keeps the state it had.
|
|
126
|
+
* - `none` — the lease is not in effect: web-admin's most recent capability declaration ({@link readCapabilityReading} said `declared`) did
|
|
127
|
+
* not carry {@link WebAdminCapabilities}`.servingLease`. The engine behaves exactly as an engine without a lease — no renewals, no fence.
|
|
128
|
+
* A reply that is not a declaration (`unreadable`: an older web-admin that sends no `capabilities` key, a gateway answering `{}`, a body that
|
|
129
|
+
* cannot be read) is not a reading: it does not move the engine into or out of `none` — it keeps the state it had.
|
|
130
130
|
* - `granted` — the engine holds a lease; `leaseUntil` says until when (epoch ms, the engine's own computation from the
|
|
131
131
|
* granted `ttlMs`, see {@link ServingLeaseResponse}).
|
|
132
132
|
* - `expired` — the lease is in effect but no grant is valid right now (web-admin is unreachable, answered `unknown`, or has
|
|
133
|
-
* not granted one yet
|
|
133
|
+
* not granted one yet; a fleet member that has not yet heard any declaration from web-admin is presumed to be inside the fence, its
|
|
134
|
+
* outage clock running from the engine's start): the engine keeps serving until its own outage allowance runs out. Not a denial.
|
|
134
135
|
* - `denied` — web-admin denied this instance on positive evidence (the `denied` verdict): sticky; the engine is draining and
|
|
135
136
|
* stops at its deadline.
|
|
136
137
|
* Only a fleet member says it: an engine without a generation has no lease and carries no `leaseState` at all (there is no
|
|
@@ -707,19 +708,23 @@ export function readServingLeaseResponse(body) {
|
|
|
707
708
|
* What web-admin says it can do: capability bits an engine reads before it starts using a web-admin-side endpoint.
|
|
708
709
|
* - `servingLease` — web-admin answers serving-lease renewals ({@link ServingLeaseRequest} / {@link ServingLeaseResponse}).
|
|
709
710
|
*
|
|
710
|
-
* A bit is `true` or absent — one spelling for "not supported" (there is no `false`).
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
711
|
+
* A bit is `true` or absent — one spelling for "not supported" (there is no `false`). A bit absent from a DECLARED object means web-admin
|
|
712
|
+
* does not support it, and for `servingLease` the engine then neither renews a lease nor is fenced by one: that is web-admin's own word (the
|
|
713
|
+
* lease switched off there, or a caller under the shared token, below). Having NO declaration is a different fact and is not read as "not
|
|
714
|
+
* supported": a heartbeat reply that carries no `capabilities` key (an older web-admin, a gateway or maintenance page answering `{}`) is not
|
|
715
|
+
* a reading ({@link readCapabilityReading} says `unreadable`), and a fleet member that has heard no declaration is presumed to be inside the
|
|
716
|
+
* fence — silence never loosens it. So the compatibility gate this shape gives (an executor may ship ahead of web-admin) holds on the
|
|
717
|
+
* heartbeat path of a web-admin that answers with the key — every web-admin release that can render a fleet generation does; a path whose
|
|
718
|
+
* answer carries no key (a gateway, a differently routed live base, a rolled-back web-admin) leaves the member inside the presumed fence.
|
|
719
|
+
* It is a gate, not a verdict — nothing in this shape says "web-admin refuses leases". Read a heartbeat reply with
|
|
720
|
+
* {@link readCapabilityReading} and start the lease client only on a `declared` reading whose `capabilities.servingLease === true`.
|
|
716
721
|
* Unknown bits are stripped (a newer web-admin's extra bits never break an older reader); a known bit whose value is not `true` breaks
|
|
717
|
-
* the declaration — and a broken declaration is NOT an absent
|
|
722
|
+
* the declaration — and a broken declaration is NOT an absent bit: the reply reads as `unreadable`, which is not a reading (the engine
|
|
718
723
|
* keeps the state it had; see {@link readCapabilityReading}).
|
|
719
724
|
* It rides in ONE place: the heartbeat's 2xx reply ({@link FLEET_PATHS}`.instances`), under {@link HEARTBEAT_REPLY_CAPABILITIES_KEY}.
|
|
720
725
|
* Web-admin answers the bits per CALLER CREDENTIAL: under a per-worker token, by what web-admin supports; under the shared token
|
|
721
726
|
* `servingLease` is always absent (the serving-lease endpoint takes per-worker tokens only, so announcing it there would only push
|
|
722
|
-
* that caller into the unreachable arm).
|
|
727
|
+
* that caller into the unreachable arm) — an empty declaration, `{ capabilities: {} }`, not a reply without the key.
|
|
723
728
|
*/
|
|
724
729
|
export const WebAdminCapabilities = z.object({
|
|
725
730
|
servingLease: z.literal(true).optional(),
|
|
@@ -729,26 +734,50 @@ export const WebAdminCapabilities = z.object({
|
|
|
729
734
|
* Web-admin writes `{ …, [HEARTBEAT_REPLY_CAPABILITIES_KEY]: caps }`; the engine reads the whole reply with
|
|
730
735
|
* `readCapabilityReading(reply)` — the key lookup lives in the reader, one carrier one reader — and only on a 2xx (a failed heartbeat
|
|
731
736
|
* says nothing about the bits). Nested, not flat: the reply's own keys and the capability bits never share a namespace.
|
|
732
|
-
* A reply without the key is
|
|
733
|
-
*
|
|
737
|
+
* A reply without the key is not a declaration — it reads `unreadable` (`capabilities-absent`): an older web-admin, a gateway answering `{}`,
|
|
738
|
+
* bits flat on the body and `undefined` as the key's value (what JSON cannot carry) all read this way, and the engine acts on it as on no reply at all.
|
|
739
|
+
* A reply with the key present with a value that breaks the shape reads `unreadable` too (`invalid-capabilities`). Only an object under this
|
|
740
|
+
* key that passes {@link WebAdminCapabilities} is a reading.
|
|
734
741
|
*/
|
|
735
742
|
export const HEARTBEAT_REPLY_CAPABILITIES_KEY = "capabilities";
|
|
736
743
|
/** The reply body as far as the capability carrier is concerned: the one key, optional, nothing else (the reply's other keys are stripped). */
|
|
737
744
|
const CapabilitiesCarrier = z.object({ [HEARTBEAT_REPLY_CAPABILITIES_KEY]: WebAdminCapabilities.optional() });
|
|
745
|
+
/** The bits {@link WebAdminCapabilities} knows — read off its shape, so a bit added there is copied here without a second list. */
|
|
746
|
+
const CAPABILITY_BITS = Object.keys(WebAdminCapabilities.shape);
|
|
747
|
+
/**
|
|
748
|
+
* The declaration as the reader hands it out: a copy holding exactly the known bits that are set, as OWN data properties of an object on the
|
|
749
|
+
* package's isolated prototype (nothing is inherited from `Object.prototype`). A consumer's `capabilities.servingLease` can then only find a bit web-admin declared — an
|
|
750
|
+
* absent bit is `undefined` even when `Object.prototype` has been polluted with its name, and the copy is not the caller's object. A bit that cannot
|
|
751
|
+
* be read off the validated value (it was parsed from a snapshot, so this cannot happen) ⇒ `undefined`, which the reader answers as `unreadable`,
|
|
752
|
+
* never as a declaration of fewer bits.
|
|
753
|
+
*/
|
|
754
|
+
function ownCapabilityBits(validated) {
|
|
755
|
+
const copy = isolatedObject();
|
|
756
|
+
for (const bit of CAPABILITY_BITS) {
|
|
757
|
+
const read = ownValueOf(validated, bit);
|
|
758
|
+
if (!read.ok)
|
|
759
|
+
return undefined;
|
|
760
|
+
if (read.value !== undefined)
|
|
761
|
+
Object.defineProperty(copy, bit, dataDescriptor(read.value));
|
|
762
|
+
}
|
|
763
|
+
return copy;
|
|
764
|
+
}
|
|
738
765
|
/**
|
|
739
766
|
* Engine side: what one heartbeat reply says about web-admin's capabilities. The input is the heartbeat's whole 2xx reply body
|
|
740
|
-
* (the key lookup lives here — one carrier, one reader), the output one of
|
|
741
|
-
* - `declared` — the key ({@link HEARTBEAT_REPLY_CAPABILITIES_KEY}) is
|
|
742
|
-
* `capabilities` is
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
* - `unreadable` — the reply is not an object (`
|
|
746
|
-
* {
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
* on `
|
|
751
|
-
*
|
|
767
|
+
* (the key lookup lives here — one carrier, one reader), the output one of two words:
|
|
768
|
+
* - `declared` — the key ({@link HEARTBEAT_REPLY_CAPABILITIES_KEY}) is an own key of the reply and its value passes {@link WebAdminCapabilities}:
|
|
769
|
+
* web-admin made an explicit declaration. `capabilities` is a copy of it — the known bits that are set, as own properties of an object on the
|
|
770
|
+
* package's isolated prototype (unknown bits stripped, an absent bit stays absent and reads `undefined` even when `Object.prototype` is polluted with its name).
|
|
771
|
+
* `{ capabilities: {} }` is a declaration of no bits.
|
|
772
|
+
* - `unreadable` — anything else, and `why` says which way: the reply is not an object (`not-an-object`); the key is absent
|
|
773
|
+
* (`capabilities-absent` — an older web-admin, a body of `{}` or `{ ok: true }`, bits flat on the body, `undefined` as the key's value,
|
|
774
|
+
* a key that exists only on the prototype chain); the key is present but its value is not a {@link WebAdminCapabilities}
|
|
775
|
+
* (`invalid-capabilities`; a hidden key or an accessor that throws reads the same way).
|
|
776
|
+
* Only `declared` is a reading. A reply that is not a declaration says nothing about the fence — silence never loosens it: the engine acts
|
|
777
|
+
* on `unreadable` as on no reply at all. A fleet member that has heard no declaration is presumed to be inside the fence (its outage clock
|
|
778
|
+
* running from its own start); one that has heard a declaration keeps the state that declaration gave it, and leaves its clocks, the lease
|
|
779
|
+
* expiry and the outage allowance, as they were. Start the lease client only on `declared` with `capabilities.servingLease === true`.
|
|
780
|
+
* Never throws; judged by the same one guarded body judgement as every other reader here.
|
|
752
781
|
*/
|
|
753
782
|
export function readCapabilityReading(reply) {
|
|
754
783
|
const judged = judgeSignalBody(reply, WHOLE_BODY, CapabilitiesCarrier);
|
|
@@ -760,8 +789,12 @@ export function readCapabilityReading(reply) {
|
|
|
760
789
|
case "read": {
|
|
761
790
|
// the validated output is an ordinary object: an absent optional key must stay absent, not be read off a polluted `Object.prototype` — own key only (it was parsed from a snapshot, so it cannot be unreadable)
|
|
762
791
|
const carried = ownValueOf(judged.value, HEARTBEAT_REPLY_CAPABILITIES_KEY);
|
|
763
|
-
|
|
764
|
-
|
|
792
|
+
if (!carried.ok)
|
|
793
|
+
return { kind: "unreadable", why: "invalid-capabilities" };
|
|
794
|
+
if (carried.value === undefined)
|
|
795
|
+
return { kind: "unreadable", why: "capabilities-absent" };
|
|
796
|
+
const capabilities = ownCapabilityBits(carried.value);
|
|
797
|
+
return capabilities === undefined ? { kind: "unreadable", why: "invalid-capabilities" } : { kind: "declared", capabilities };
|
|
765
798
|
}
|
|
766
799
|
default: {
|
|
767
800
|
const unhandled = judged;
|
package/dist/types.d.ts
CHANGED
|
@@ -1850,7 +1850,9 @@ export interface SkillsManifest {
|
|
|
1850
1850
|
}
|
|
1851
1851
|
/** Runtime (zod) twin of {@link SkillsManifest} — the READ-side judgment for a wire payload's `skills` key
|
|
1852
1852
|
* (`readEffectiveWire`). Derived from {@link SkillSpec} exactly like {@link SkillManifestEntry} is (omit
|
|
1853
|
-
* `content` / require `contentHash`) so schema, entry type and interface can never drift apart
|
|
1853
|
+
* `content` / require `contentHash`) so schema, entry type and interface can never drift apart, and built by the same
|
|
1854
|
+
* document constructor as {@link SkillsConfig} (24.0.0: the manifest is the skills domain on the wire — one document judgment,
|
|
1855
|
+
* duplicate names included; the reader judges it with the skills domain's two tables). Only
|
|
1854
1856
|
* `min(1)` on contentHash: the hash is the service's PULL KEY for the content endpoint, its exact format
|
|
1855
1857
|
* is web-admin's writing concern — re-pinning it here would make an old reader reject a newer web-admin's
|
|
1856
1858
|
* legal hash scheme. */
|
|
@@ -1867,19 +1869,6 @@ export declare const SkillsManifestSchema: z.ZodObject<{
|
|
|
1867
1869
|
contentHash: z.ZodString;
|
|
1868
1870
|
}, z.core.$strip>>>;
|
|
1869
1871
|
}, z.core.$strip>;
|
|
1870
|
-
/**
|
|
1871
|
-
* 18.0.0 —— **凭据引用集合不可部分抢救**(按 schema 身份的集合)。成员是「名 → 宿主 env-NAME」的凭据引用 Record:mcp 的 `envRefs` / `headerRefs`
|
|
1872
|
-
* (a2a 对端的 `headerRefs` 复用后者,因此同在)、车道块的 `secretRefs` 与 worker 的 `secretEnv`。逐条抢救(`salvageEntries`)走到成员**不下钻**、把它当一个值判:
|
|
1873
|
-
* 集合里任一键 / 值坏形 ⇒ 它所属的那一条条目整条 `entry-dropped`,兄弟条目保留。理由:丢掉一条坏引用不是「更窄」,而是让条目带着**一半凭据**活下来 ——
|
|
1874
|
-
* 拨一个远端服务 / 智能体时错误的失败方向(读方对「任一引用的 env 缺席」本来就整条跳过,同一个方向)。
|
|
1875
|
-
* 既有读数只变一处:直接对 `WorkersConfig` 调 `salvageEntries` 时,`secretEnv` 带坏引用的 worker 由「只丢那一条引用、worker 存活」变「整条丢」
|
|
1876
|
-
* (各域读数不变:workers 域不逐条抢救;mcp 的两只住在传输判别联合里,走查不进联合;车道块住在不是集合的 `runtime` 对象里)
|
|
1877
|
-
* —— 由 17.2.0 包的真读数逐行对拍钉住(`test/atomic-salvage-18.0.0.test.ts`,改了读数的那一行逐行登记)。别的集合字段(allowTools / scenarios / allowSkills …)照旧逐条抢救:丢坏元素只会更窄。
|
|
1878
|
-
* 成员读键按自有属性名判:`__proto__` / `constructor` / `prototype` 任一在场 ⇒ 集合坏 ⇒ 条目整条丢(见 `credentialRefs`;zod 的 record 读键前跳过 `__proto__`、不判它的值)。
|
|
1879
|
-
* 新的凭据引用集合必须复用这几只 schema 或由 `credentialRefs` 铸出并登记进这里(按身份判,换一只「形一样」的新 schema 不算成员)。
|
|
1880
|
-
* 登记的是剥掉包装之后的那只 `record`(与抢救走查同一只读法 `unwrapSchema`)。
|
|
1881
|
-
*/
|
|
1882
|
-
export declare const ATOMIC_SALVAGE: ReadonlySet<z.ZodType>;
|
|
1883
1872
|
export declare const McpTransport: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1884
1873
|
kind: z.ZodLiteral<"stdio">;
|
|
1885
1874
|
command: z.ZodString;
|
package/dist/types.js
CHANGED
|
@@ -34,7 +34,6 @@ import { LANE_ENV_OWNER, envKeyMigration, laneEnvSeat, laneRowOf } from "./execu
|
|
|
34
34
|
import { migrationSignpost, retiredFormSentence, retiredKey } from "./retired-form.js"; // 11.0.0: the ONE retired-form sentence + key tombstone (package-private)
|
|
35
35
|
import { retiredRoleWordsRefusal } from "./retired-role-words.js"; // 12.0.0: the retired role-word tombstone (package-private; SS-M8)
|
|
36
36
|
import { buildQuotedIssue, fixed } from "./quoted-issue.js"; // THE minting point of custom issues (package-private)
|
|
37
|
-
import { unwrapSchema } from "./zod-unwrap.js"; // 18.0.0: ATOMIC_SALVAGE registers the schema the salvage walker reaches (wrappers peeled with the walker's own reader)
|
|
38
37
|
import { RESERVED_MEMBER_NAMES, isReservedMemberName } from "./reserved-member-name.js"; // 18.0.0: the one reserved-member-name table (the record reader and the center-refs resolver ask the same predicate)
|
|
39
38
|
import { AbsoluteHostPath } from "./host-path.js"; // the one host-path shape judge (a task's cwd and a project's folder / file entries)
|
|
40
39
|
import { RFC3339_DATE_TIME } from "./rfc3339.js"; // the package's one RFC 3339 date-time judge (package-private)
|
|
@@ -1984,7 +1983,8 @@ function addLaneSetIssue(ctx, lanes, flaw) {
|
|
|
1984
1983
|
* 经读内核 `ownEntriesOf` 的严归类读名:每个自有串键都读到名字,不调 getter),一条就使集合判不过、record 不再判;再交给 `record`。
|
|
1985
1984
|
* zod 的 record 读键前先跳过 `__proto__`(不判它的值、输出里也没有它),只靠 record 判会把「带着一条被剥掉的引用」读成「没有那条引用」,条目带着其余引用活下来。
|
|
1986
1985
|
* 只判朴素对象(形状问座位 `isPlainJsonObject`;别的形由 `record` 自己拒,拒句不变);成员名读不出(隐藏键 / 访问器 / 陷阱抛)⇒ 同样判坏,句子是内核那一句(fail-closed:守卫看不清名字就不担保)。
|
|
1987
|
-
*
|
|
1986
|
+
* 每一只成员都由它铸,所以成员复用到哪个座位,这道判据就跟到哪个座位。凭据引用集合的值是 env-NAME 串 —— 一组值,不是一组条目:逐条抢救不下钻它
|
|
1987
|
+
* (值名单律,见 `salvageEntries`),坏一项 ⇒ 它所属的那一条条目整条判不过。
|
|
1988
1988
|
*/
|
|
1989
1989
|
function credentialRefs(record) {
|
|
1990
1990
|
return z.preprocess((input, ctx) => {
|
|
@@ -2001,9 +2001,9 @@ function credentialRefs(record) {
|
|
|
2001
2001
|
return input;
|
|
2002
2002
|
}, record);
|
|
2003
2003
|
}
|
|
2004
|
-
/** 车道块的密钥引用(服务变量名 → 宿主 env-NAME)——
|
|
2004
|
+
/** 车道块的密钥引用(服务变量名 → 宿主 env-NAME)—— 凭据引用集合(值集合:不逐项抢救)。 */
|
|
2005
2005
|
const LaneSecretRefs = credentialRefs(z.record(ENV_NAME, ENV_NAME));
|
|
2006
|
-
/** worker 的密钥 env 透传(服务变量名 → 宿主 env-NAME)——
|
|
2006
|
+
/** worker 的密钥 env 透传(服务变量名 → 宿主 env-NAME)—— 凭据引用集合(值集合:不逐项抢救)。 */
|
|
2007
2007
|
const WorkerSecretEnv = credentialRefs(z.record(ENV_NAME, ENV_NAME).superRefine((rec, ctx) => {
|
|
2008
2008
|
retiredEnvIssue(rec, ctx);
|
|
2009
2009
|
for (const k of Object.keys(rec))
|
|
@@ -2546,9 +2546,9 @@ export const SkillSpec = z.object({
|
|
|
2546
2546
|
* de-duplication, no sorting, no spelling check, no roster intersection — what an entry means (a tool, a namespace, a rule,
|
|
2547
2547
|
* a path) is read in ONE place, the consumer's grant judge; the element shape judged here is "a non-empty string" and nothing
|
|
2548
2548
|
* more. A malformed shape (not an array / a non-string or empty entry) is refused with a path naming the field
|
|
2549
|
-
* (`skills[i].allowedTools`) and, when the fault is an element, the element (`skills[i].allowedTools[j]`). Read leg: the list is
|
|
2550
|
-
* `scenarios` / `rosters` / `mcp.servers[].allowTools`
|
|
2551
|
-
*
|
|
2549
|
+
* (`skills[i].allowedTools`) and, when the fault is an element, the element (`skills[i].allowedTools[j]`). Read leg: the list is one value, like every list of values
|
|
2550
|
+
* (`scenarios` / `rosters` / `mcp.servers[].allowTools`): a bad element makes the skill unreadable, never a shorter list — and `skills` drops no
|
|
2551
|
+
* entry, so one unreadable skill makes the whole domain unreadable and the read throws (the view face reads it, the wire manifest alike). Travels on
|
|
2552
2552
|
* `/effective` with the rest of the manifest ({@link SkillsManifestSchema} derives from this schema). */
|
|
2553
2553
|
allowedTools: z.array(z.string().min(1)).optional(),
|
|
2554
2554
|
/** Tool deny list the skill declares — same carrying and reading rules as {@link SkillSpec.allowedTools} (absent = no list
|
|
@@ -2556,25 +2556,28 @@ export const SkillSpec = z.object({
|
|
|
2556
2556
|
disallowedTools: z.array(z.string().min(1)).optional(),
|
|
2557
2557
|
notes: z.string().optional(),
|
|
2558
2558
|
});
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2559
|
+
/** skills 文档的**一只**构造:条目集合 + 技能名唯一。域形(条目带 `content`)与线上形(条目带 `contentHash`,{@link SkillsManifestSchema})只差条目的表示 ——
|
|
2560
|
+
* 文档级判据只写这一次,线上清单与域文档同一只判官。 */
|
|
2561
|
+
function skillsDocument(entry) {
|
|
2562
|
+
return z.object({ skills: z.array(entry).prefault([]) }).superRefine((cfg, ctx) => {
|
|
2563
|
+
const seen = new Set();
|
|
2564
|
+
cfg.skills.forEach((s, i) => {
|
|
2565
|
+
if (seen.has(s.name))
|
|
2566
|
+
ctx.addIssue({ code: "custom", ...buildQuotedIssue `duplicate skill "${s.name}"`, path: ["skills", i, "name"] });
|
|
2567
|
+
seen.add(s.name);
|
|
2568
|
+
});
|
|
2567
2569
|
});
|
|
2568
|
-
}
|
|
2570
|
+
}
|
|
2571
|
+
export const SkillsConfig = skillsDocument(SkillSpec);
|
|
2569
2572
|
/** Runtime (zod) twin of {@link SkillsManifest} — the READ-side judgment for a wire payload's `skills` key
|
|
2570
2573
|
* (`readEffectiveWire`). Derived from {@link SkillSpec} exactly like {@link SkillManifestEntry} is (omit
|
|
2571
|
-
* `content` / require `contentHash`) so schema, entry type and interface can never drift apart
|
|
2574
|
+
* `content` / require `contentHash`) so schema, entry type and interface can never drift apart, and built by the same
|
|
2575
|
+
* document constructor as {@link SkillsConfig} (24.0.0: the manifest is the skills domain on the wire — one document judgment,
|
|
2576
|
+
* duplicate names included; the reader judges it with the skills domain's two tables). Only
|
|
2572
2577
|
* `min(1)` on contentHash: the hash is the service's PULL KEY for the content endpoint, its exact format
|
|
2573
2578
|
* is web-admin's writing concern — re-pinning it here would make an old reader reject a newer web-admin's
|
|
2574
2579
|
* legal hash scheme. */
|
|
2575
|
-
export const SkillsManifestSchema = z.
|
|
2576
|
-
skills: z.array(SkillSpec.omit({ content: true }).extend({ contentHash: z.string().min(1) })).prefault([]),
|
|
2577
|
-
});
|
|
2580
|
+
export const SkillsManifestSchema = skillsDocument(SkillSpec.omit({ content: true }).extend({ contentHash: z.string().min(1) }));
|
|
2578
2581
|
// ── Domain: mcp (MCP server 注册表 — the mcp/skills design note, Roadmap B1) ────────────
|
|
2579
2582
|
// web-admin = an MCP-server REGISTRY: a scenario mounts a subset by `scenarios[]`. Maps onto core's
|
|
2580
2583
|
// `McpServerSpec = { name, transport: {kind:"stdio",command,args?,env?} | {kind:"http",url,headers?}, allowTools?, contentOrigin?, source? }`.
|
|
@@ -2595,19 +2598,6 @@ const HTTP_HEADER_NAME = z
|
|
|
2595
2598
|
.refine((s) => !containsSecretToken(s), buildQuotedIssue `HTTP header name must not contain a secret literal — credentials go in the env-NAME value, never the header name`);
|
|
2596
2599
|
// Header NAME → ENV_NAME holding its value. Header names are tokens (RFC 7230) — not env-name-shaped.
|
|
2597
2600
|
const McpHeaderRefs = credentialRefs(z.record(HTTP_HEADER_NAME, ENV_NAME));
|
|
2598
|
-
/**
|
|
2599
|
-
* 18.0.0 —— **凭据引用集合不可部分抢救**(按 schema 身份的集合)。成员是「名 → 宿主 env-NAME」的凭据引用 Record:mcp 的 `envRefs` / `headerRefs`
|
|
2600
|
-
* (a2a 对端的 `headerRefs` 复用后者,因此同在)、车道块的 `secretRefs` 与 worker 的 `secretEnv`。逐条抢救(`salvageEntries`)走到成员**不下钻**、把它当一个值判:
|
|
2601
|
-
* 集合里任一键 / 值坏形 ⇒ 它所属的那一条条目整条 `entry-dropped`,兄弟条目保留。理由:丢掉一条坏引用不是「更窄」,而是让条目带着**一半凭据**活下来 ——
|
|
2602
|
-
* 拨一个远端服务 / 智能体时错误的失败方向(读方对「任一引用的 env 缺席」本来就整条跳过,同一个方向)。
|
|
2603
|
-
* 既有读数只变一处:直接对 `WorkersConfig` 调 `salvageEntries` 时,`secretEnv` 带坏引用的 worker 由「只丢那一条引用、worker 存活」变「整条丢」
|
|
2604
|
-
* (各域读数不变:workers 域不逐条抢救;mcp 的两只住在传输判别联合里,走查不进联合;车道块住在不是集合的 `runtime` 对象里)
|
|
2605
|
-
* —— 由 17.2.0 包的真读数逐行对拍钉住(`test/atomic-salvage-18.0.0.test.ts`,改了读数的那一行逐行登记)。别的集合字段(allowTools / scenarios / allowSkills …)照旧逐条抢救:丢坏元素只会更窄。
|
|
2606
|
-
* 成员读键按自有属性名判:`__proto__` / `constructor` / `prototype` 任一在场 ⇒ 集合坏 ⇒ 条目整条丢(见 `credentialRefs`;zod 的 record 读键前跳过 `__proto__`、不判它的值)。
|
|
2607
|
-
* 新的凭据引用集合必须复用这几只 schema 或由 `credentialRefs` 铸出并登记进这里(按身份判,换一只「形一样」的新 schema 不算成员)。
|
|
2608
|
-
* 登记的是剥掉包装之后的那只 `record`(与抢救走查同一只读法 `unwrapSchema`)。
|
|
2609
|
-
*/
|
|
2610
|
-
export const ATOMIC_SALVAGE = new Set([McpEnvRefs, McpHeaderRefs, LaneSecretRefs, WorkerSecretEnv].map(unwrapSchema));
|
|
2611
2601
|
export const McpTransport = z.discriminatedUnion("kind", [
|
|
2612
2602
|
z.object({
|
|
2613
2603
|
kind: z.literal("stdio"),
|
|
@@ -2748,7 +2738,7 @@ export const McpConfig = z
|
|
|
2748
2738
|
// ── Domain: a2a (常驻出站 A2A 对端名册 —— 18.0.0) ─────────────────────────────────────────────────────────────
|
|
2749
2739
|
// 一个 A2A 对端 = 一个 https 端点(单一传输,没有判别);形是 mcp http 条目的近亲,判官一律复用:URL = NON_SECRET_URL(存量文档座位,与 mcp `transport.url`
|
|
2750
2740
|
// 同座;名形判官 `findUrlCredential` 是新提交门的事,不接进读已落盘字节的 schema),`headerRefs` = mcp 的头名 → env-NAME 引用集合(凭据引用,
|
|
2751
|
-
//
|
|
2741
|
+
// 值集合:坏一项 ⇒ 整个对端丢),`principalHeader` = 头名判官,`name` = 线上名判官(对端名是线上工具名 `a2a__<名>__…` 的身份片)。
|
|
2752
2742
|
// 秘密边界同 mcp:中心只存 env-NAME,值在读方自己的环境里。写权限 publisher(一个对端就是一组新挂进智能体的远端技能,同 mcp)。
|
|
2753
2743
|
// 首版不收 `notes` / `rosters`(按 roster 定向)/ `toolAxes`(中心面不替调用方担保远端技能的副作用轴):三者都被剥并告警。
|
|
2754
2744
|
/** 一个常驻出站 A2A 对端。 */
|
package/docs/API-SURFACE.md
CHANGED
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
> 每次全量重算并逐名比对 —— 加 / 删 / 改形一个导出而不重生成本档 ⇒ 红。导出面的每次变动因此以本档的 diff 出现在评审里。
|
|
5
5
|
> 形:`value` = 运行期拿得到的值;`type` = 只在类型层;`value+type` = 同名的值与类型(zod schema 与它推出的类型)。
|
|
6
6
|
|
|
7
|
-
子路径 24 条(资产出口 `./package.json` / `./fleet-paths.json` 不是模块,不列),导出名合计
|
|
7
|
+
子路径 24 条(资产出口 `./package.json` / `./fleet-paths.json` 不是模块,不列),导出名合计 1523 个(同名在多条子路径上各计一次)。
|
|
8
8
|
|
|
9
|
-
## `.`(
|
|
9
|
+
## `.`(796)
|
|
10
10
|
|
|
11
11
|
- `A2aConfig` — value+type
|
|
12
12
|
- `A2aPeerSpec` — value+type
|
|
13
13
|
- `ABSOLUTE_HOST_PATH_MAX` — value
|
|
14
14
|
- `ACCESS_TOKEN_TTL_SECONDS` — value
|
|
15
15
|
- `ANY_INDEX` — value
|
|
16
|
-
- `ATOMIC_SALVAGE` — value
|
|
17
16
|
- `AT_MENTION_MODES` — value
|
|
18
17
|
- `AUTH_BRIDGE_ALGS` — value
|
|
19
18
|
- `AUTH_BRIDGE_ERROR_CODES` — value
|
|
@@ -107,6 +106,7 @@
|
|
|
107
106
|
- `DISPATCH_STRATEGIES` — value
|
|
108
107
|
- `DOMAINS` — value
|
|
109
108
|
- `DOMAIN_ENTRY_SALVAGE` — value
|
|
109
|
+
- `DOMAIN_FIELD_WRITE_ROLE` — value
|
|
110
110
|
- `DOMAIN_READ_FALLBACK` — value
|
|
111
111
|
- `DOMAIN_SCHEMAS` — value
|
|
112
112
|
- `DOMAIN_WRITE_ROLE` — value
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
- `DispatchPolicy` — value+type
|
|
132
132
|
- `DispatchStrategy` — type
|
|
133
133
|
- `DomainConfig` — type
|
|
134
|
+
- `DomainFieldWriteRoles` — type
|
|
134
135
|
- `DomainName` — type
|
|
135
136
|
- `DrainPhase` — type
|
|
136
137
|
- `DrainReceipt` — value+type
|
|
@@ -632,6 +633,7 @@
|
|
|
632
633
|
- `buildRetiredEnvWire` — value
|
|
633
634
|
- `canSwitchScope` — value
|
|
634
635
|
- `catalogManagesModelPlane` — value
|
|
636
|
+
- `changedWriteFields` — value
|
|
635
637
|
- `clampServingLeaseTtlMs` — value
|
|
636
638
|
- `classifyHooksConfig` — value
|
|
637
639
|
- `classifyTimeClaims` — value
|
|
@@ -648,7 +650,6 @@
|
|
|
648
650
|
- `describeNotStringRecord` — value
|
|
649
651
|
- `describeValueShape` — value
|
|
650
652
|
- `deviceRelayFlaws` — value
|
|
651
|
-
- `domainWriteRole` — value
|
|
652
653
|
- `drainVerdict` — value
|
|
653
654
|
- `effectiveScopeRole` — value
|
|
654
655
|
- `emptyEffective` — value
|
|
@@ -801,14 +802,14 @@
|
|
|
801
802
|
- `withheldNameToken` — value
|
|
802
803
|
- `workerRouteKey` — value
|
|
803
804
|
- `workersReferencingSecret` — value
|
|
805
|
+
- `writeRoleFor` — value
|
|
804
806
|
- `wsUrlFlaws` — value
|
|
805
807
|
|
|
806
|
-
## `./types`(
|
|
808
|
+
## `./types`(154)
|
|
807
809
|
|
|
808
810
|
- `A2aConfig` — value+type
|
|
809
811
|
- `A2aPeerSpec` — value+type
|
|
810
812
|
- `ABSOLUTE_HOST_PATH_MAX` — value
|
|
811
|
-
- `ATOMIC_SALVAGE` — value
|
|
812
813
|
- `AT_MENTION_MODES` — value
|
|
813
814
|
- `AUTONOMY_MODES` — value
|
|
814
815
|
- `AbsoluteHostPath` — value
|
|
@@ -1025,7 +1026,7 @@
|
|
|
1025
1026
|
- `resolveEffectiveForWorker` — value
|
|
1026
1027
|
- `rosterMarkerRoles` — value
|
|
1027
1028
|
|
|
1028
|
-
## `./config-fns`(
|
|
1029
|
+
## `./config-fns`(57)
|
|
1029
1030
|
|
|
1030
1031
|
- `ANY_INDEX` — value
|
|
1031
1032
|
- `ApprovePublishResult` — type
|
|
@@ -1034,9 +1035,11 @@
|
|
|
1034
1035
|
- `DEFAULT_DOMAIN_WRITE_ROLE` — value
|
|
1035
1036
|
- `DISCLOSABLE_IDENTITY_RE` — value
|
|
1036
1037
|
- `DOMAIN_ENTRY_SALVAGE` — value
|
|
1038
|
+
- `DOMAIN_FIELD_WRITE_ROLE` — value
|
|
1037
1039
|
- `DOMAIN_READ_FALLBACK` — value
|
|
1038
1040
|
- `DOMAIN_WRITE_ROLE` — value
|
|
1039
1041
|
- `DROPPED_ENTRY_REASON_CODES` — value
|
|
1042
|
+
- `DomainFieldWriteRoles` — type
|
|
1040
1043
|
- `DroppedEntry` — type
|
|
1041
1044
|
- `DroppedEntryIdentity` — type
|
|
1042
1045
|
- `DroppedEntryReasonCode` — type
|
|
@@ -1059,7 +1062,7 @@
|
|
|
1059
1062
|
- `WarningProjection` — type
|
|
1060
1063
|
- `WorkerLifecycleRecord` — type
|
|
1061
1064
|
- `buildEffective` — value
|
|
1062
|
-
- `
|
|
1065
|
+
- `changedWriteFields` — value
|
|
1063
1066
|
- `emptyEffective` — value
|
|
1064
1067
|
- `formatConfigPath` — value
|
|
1065
1068
|
- `isDisclosableIdentity` — value
|
|
@@ -1081,6 +1084,7 @@
|
|
|
1081
1084
|
- `sanitizeZodError` — value
|
|
1082
1085
|
- `statusRowsToPrune` — value
|
|
1083
1086
|
- `withheldNameToken` — value
|
|
1087
|
+
- `writeRoleFor` — value
|
|
1084
1088
|
|
|
1085
1089
|
## `./conformance`(70)
|
|
1086
1090
|
|
package/docs/CONFORMANCE.md
CHANGED
|
@@ -219,7 +219,7 @@ sema-test 的读数,是本仓自己重跑 `node scripts/conformance-historical.m
|
|
|
219
219
|
| id | 影响的腿 | 动了什么 |
|
|
220
220
|
|---|---|---|
|
|
221
221
|
| `T1-wire-carried-domains` | wire | `buildEffective` 恒物化每个域;wire 对承运表 `WIRE_CARRIED_DOMAINS`(`prompts`、`a2a`)按**在场性**挂回 —— 线上读口不编造生产方没发的域:缺席进缺席出;在场时 `prompts` 是**未解析的原文档**,`a2a` 是域腿读数。**由常量派生,不手抄域名**;覆盖律要求表里每个域都有语料让两腿在它上面真的分开 |
|
|
222
|
-
| `T2-skills-representation` | wire | 域形带 `content`,wire 形带 `contentHash`(manifest);判据 schema
|
|
222
|
+
| `T2-skills-representation` | wire | 域形带 `content`,wire 形带 `contentHash`(manifest);判据 schema 随表示走,读法不随 —— 24.0.0 起清单与域文档同一只读法、同两张表(`skills` 不逐条丢、读档 throw),剥键告警两腿同读(此前 wire 腿没有 skills 的剥键告警,派生把它们滤掉) |
|
|
223
223
|
| `T3-non-portable-domains` | local-root | `config.d/` 只读 `PORTABLE_DOMAINS`;其余域取 schema 默认 + `unread-config-file{non-portable-domain}`。**由常量派生,不手抄域名** |
|
|
224
224
|
| `T4-unknown-top-level-key` | wire + local-root | wire 是 open-world,不认识的顶层键**逐字承运**;`domains` 腿按域名取文档故无声;local-root 报 `unread-config-file{not-a-domain}` |
|
|
225
225
|
| `T5-file-layer-first` | local-root | `config.d/<域>.json` 必须是 JSON **对象**(空文件 / `null` / 数组 / 标量一律 fail-closed),这一层在域解析**之前** |
|