@sema-agent/settings-schema 34.0.0 → 35.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 +648 -0
- package/README.md +86 -39
- package/conformance/VERSION +1 -1
- package/conformance/cases/c100-a2a-inside-stale-fingerprint-dropped/expected.json +101 -0
- package/conformance/cases/c100-a2a-inside-stale-fingerprint-dropped/input.json +28 -0
- package/conformance/cases/c100-a2a-inside-stale-fingerprint-dropped/meta.json +6 -0
- package/conformance/cases/c101-a2a-inside-incomplete-dropped/expected.json +113 -0
- package/conformance/cases/c101-a2a-inside-incomplete-dropped/input.json +38 -0
- package/conformance/cases/c101-a2a-inside-incomplete-dropped/meta.json +6 -0
- package/conformance/cases/c102-a2a-inside-incomplete-zero-survivors/expected.json +85 -0
- package/conformance/cases/c102-a2a-inside-incomplete-zero-survivors/input.json +34 -0
- package/conformance/cases/c102-a2a-inside-incomplete-zero-survivors/meta.json +6 -0
- package/conformance/cases/c103-mcp-caller-meta-declared/expected.json +106 -0
- package/conformance/cases/c103-mcp-caller-meta-declared/input.json +28 -0
- package/conformance/cases/c103-mcp-caller-meta-declared/meta.json +6 -0
- package/conformance/cases/c98-a2a-registration-keys-carried/expected.json +163 -0
- package/conformance/cases/c98-a2a-registration-keys-carried/input.json +42 -0
- package/conformance/cases/c98-a2a-registration-keys-carried/meta.json +6 -0
- package/conformance/cases/c99-a2a-preapproval-on-outside-peer-dropped/expected.json +100 -0
- package/conformance/cases/c99-a2a-preapproval-on-outside-peer-dropped/input.json +23 -0
- package/conformance/cases/c99-a2a-preapproval-on-outside-peer-dropped/meta.json +6 -0
- package/dist/a2a-peer-identity.d.ts +116 -0
- package/dist/a2a-peer-identity.js +182 -0
- package/dist/api/credentials.d.ts +94 -14
- package/dist/api/credentials.js +33 -8
- package/dist/atomic-write.d.ts +9 -3
- package/dist/atomic-write.js +14 -6
- package/dist/catalog-manages.js +2 -2
- package/dist/config-d-file.d.ts +0 -3
- package/dist/config-d-file.js +1 -6
- package/dist/config-dir-migration.js +0 -1
- package/dist/config-document-refusal.d.ts +1 -1
- package/dist/config-fns.d.ts +21 -8
- package/dist/config-fns.js +16 -3
- package/dist/config-root-documents.d.ts +3 -54
- package/dist/config-root-documents.js +24 -21
- package/dist/config-root-node.d.ts +2 -96
- package/dist/config-root-node.js +15 -163
- package/dist/conformance/warnings.js +1 -1
- package/dist/conformance/web-admin-credential-lock.js +3 -2
- package/dist/cross-session.d.ts +2 -2
- package/dist/env-model-table.d.ts +3 -3
- package/dist/env-model-table.js +5 -5
- package/dist/fleet.d.ts +5 -5
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/mcp-request-entry.d.ts +19 -0
- package/dist/mcp-request-entry.js +15 -13
- package/dist/migration-receipt.d.ts +9 -11
- package/dist/migration-receipt.js +4 -5
- package/dist/node.d.ts +3 -3
- package/dist/node.js +3 -3
- package/dist/one-time-migrations.d.ts +3 -4
- package/dist/one-time-migrations.js +3 -28
- package/dist/plugin-id-segment.d.ts +15 -0
- package/dist/plugin-id-segment.js +15 -0
- package/dist/plugin-settings.d.ts +61 -0
- package/dist/plugin-settings.js +111 -0
- package/dist/retired-envs.js +5 -0
- package/dist/safety-merge-spec.d.ts +23 -2
- package/dist/safety-merge-spec.js +13 -0
- package/dist/scheduler-store-node.d.ts +14 -11
- package/dist/scheduler-store-node.js +22 -34
- package/dist/scheduler-store.d.ts +21 -6
- package/dist/scheduler-store.js +100 -19
- package/dist/settings-units.d.ts +9 -0
- package/dist/settings-units.js +12 -7
- package/dist/types.d.ts +53 -4
- package/dist/types.js +79 -4
- package/docs/API-SURFACE.md +51 -11
- package/docs/CC-DIVERGENCE.md +2 -1
- package/docs/CONFORMANCE.md +4 -4
- package/docs/CONSUMER-INTEGRATION.md +158 -13
- package/llms-full.txt +47 -18
- package/llms.txt +18 -7
- package/package.json +7 -3
package/dist/types.js
CHANGED
|
@@ -41,7 +41,9 @@ import { DEVICE_RELAY_RULE, deviceRelayFlaws } from "./device-relay.js"; // 16.0
|
|
|
41
41
|
import { DEVICE_MAX_PREAUTH_PER_REMOTE_RULE, DEVICE_TRUSTED_PROXY_CIDRS_RULE, readDeviceMaxPreAuthPerRemote, readDeviceTrustedProxyCidrs } from "./device-lane-knobs.js"; // the value grammar of the device lane's two optional knobs (the one judge; engine boot reads the same)
|
|
42
42
|
import { TOOL_WIRE_NAME_MAX_CHARS, isUsableWireName } from "./wire-name.js"; // 18.0.0: the one "usable wire name" judge (the a2a peer name; the request-plane MCP / A2A readers ask the same function)
|
|
43
43
|
import { deepFreeze } from "./deep-freeze.js";
|
|
44
|
+
import { PLUGIN_ID_SEGMENT_REGEX, PLUGIN_ID_SEGMENT_SENTENCE } from "./plugin-id-segment.js"; // the one grammar of a plugin id segment + its refusal sentence (a zero-import leaf, package-private; the regex is re-exported below under its own name)
|
|
44
45
|
import { McpEntryCredential } from "./mcp-entry-credential.js"; // 29.0.0: the http entry's credential reference (the one reading = the engine primitives' readCredentialRef)
|
|
46
|
+
import { A2A_PEER_BOUNDARIES, A2A_PEER_ENTRY_PROBLEM_MEMBER, A2aPeerFingerprint, a2aPeerBoundaryOf, a2aPeerEntryProblems } from "./a2a-peer-identity.js"; // the a2a peer's boundary words + their one reading, the identity stamp's one spelling, and the entry judge (the engine primitives' registration judge + this package's two words; a leaf: it reads no value of this module)
|
|
45
47
|
// COARSE, best-effort literal-secret SHAPE detector (NOT exhaustive — the real boundary is the env-NAME schema
|
|
46
48
|
// on structured fields). Rejected in free-form value fields (worker `env`, model `extraBody`), URL components,
|
|
47
49
|
// AND as an env-NAME value (an AWS key id is a valid env-NAME charset yet is a secret VALUE, not a NAME). Case-
|
|
@@ -1266,10 +1268,20 @@ const RuntimeCapsSeat = z.object({
|
|
|
1266
1268
|
allowAutoMode: retiredKey("runtimeCaps.allowAutoMode", RUNTIME_CAP_AUTO_MODE_RETIRED),
|
|
1267
1269
|
allowUltracode: retiredKey("runtimeCaps.allowUltracode", RUNTIME_CAP_ULTRACODE_RETIRED),
|
|
1268
1270
|
});
|
|
1271
|
+
/** The bounds of an entitlement tier's free-form fields —— the ONE source of these numbers: {@link EntitlementTier} reads them, and so do
|
|
1272
|
+
* console forms and API routes (import this, never copy a number). */
|
|
1273
|
+
export const ENTITLEMENT_TIER_LIMITS = deepFreeze({
|
|
1274
|
+
displayNameMax: 200,
|
|
1275
|
+
});
|
|
1276
|
+
const EntitlementTierDisplayName = z.string().min(1).max(ENTITLEMENT_TIER_LIMITS.displayNameMax);
|
|
1269
1277
|
/** A named entitlement bundle (a `tier`, or a composable `role`). Bind a `roster` to inherit its model/skill/mcp
|
|
1270
1278
|
* visibility for free; explicit allowlists intersect on top. Edit a tier once → re-prices everyone on it. */
|
|
1271
1279
|
export const EntitlementTier = z.object({
|
|
1272
1280
|
id: z.string().min(1).regex(/^[a-z0-9][a-z0-9._-]*$/i, "tier id: letters/digits/._- , no spaces"),
|
|
1281
|
+
/** Human-facing display label for the admin console (e.g. "标准版", "Design team"). Not an identifier, not unique, and not used for
|
|
1282
|
+
* matching (`id` stays the only key). Bounded by {@link ENTITLEMENT_TIER_LIMITS}`.displayNameMax`; carries the string verbatim (no trim
|
|
1283
|
+
* or character-set restriction, matching `ProjectRegistration.displayName`). */
|
|
1284
|
+
displayName: EntitlementTierDisplayName.optional(),
|
|
1273
1285
|
roster: z.string().optional(),
|
|
1274
1286
|
models: z.array(z.string()).optional(),
|
|
1275
1287
|
visibleSkills: z.array(z.string()).optional(),
|
|
@@ -1618,7 +1630,7 @@ export const ProjectRegistration = z.object({
|
|
|
1618
1630
|
goal: ProjectGoal.optional(),
|
|
1619
1631
|
/** 项目上下文条目(≤ {@link PROJECT_LIMITS}`.contextItemsMax` 条,见 {@link ProjectContextItem})。 */
|
|
1620
1632
|
contextItems: ProjectContextItems.optional(),
|
|
1621
|
-
/** 归档时刻(RFC 3339)。在场 =
|
|
1633
|
+
/** 归档时刻(RFC 3339)。在场 = 已归档。归档与删除是两件事:归档保留这条登记;删除由写口按它自己的规则执行 —— 会话行上的 `projectId` 可能指向已删除的项目,读方按「不存在」处置。 */
|
|
1622
1634
|
archivedAt: RFC3339_DATE_TIME.optional(),
|
|
1623
1635
|
/** 内容证明时刻(RFC 3339,与 `archivedAt` 同一只判官):中心写口在一次按 `writeRoleFor('projects', …)` 判过 `goal` / `notes` / `contextItems` 的写之后盖的章。
|
|
1624
1636
|
* 在场 = 这条登记的内容过了那一道;缺席 = 旧登记 / 没经过带章的写口(此前 editor 写下的内容也是这一种)。本包只定形与角色(`DOMAIN_FIELD_WRITE_ROLE.projects.fields.contentAttestedAt` =
|
|
@@ -1643,6 +1655,8 @@ function remoteUniquenessIssues(cfg, ctx) {
|
|
|
1643
1655
|
}
|
|
1644
1656
|
}
|
|
1645
1657
|
}
|
|
1658
|
+
/** 项目登记簿。`projects` 记录的**条目序是契约事实**:它就是登记簿的展示序,唯一来源 = 文档里的条目次序;写者必须保序({@link applyProjectPatch} 已保序)。
|
|
1659
|
+
* 已知分工:今天的内容版本(`configDVersionOf`(`./config-d-file`))按排序后的键计算,只调换条目次序不会换版本号;今天内容版本看不见条目序;改不改另行设计(改它会让每一份配置文档的内容版本都换一次)。 */
|
|
1646
1660
|
export const ProjectsConfig = z
|
|
1647
1661
|
.object({
|
|
1648
1662
|
/** 键=projectId({@link PROJECT_ID_REGEX},generic lowercase UUID——宽读);tenant 半边=web-admin
|
|
@@ -2743,6 +2757,14 @@ export const McpServerSpec = z.object({
|
|
|
2743
2757
|
*
|
|
2744
2758
|
* **解析透明** —— 形归谁校验、为什么不放这里:{@link PARSE_TRANSPARENT_KEYS}(`mcp.servers[].startupTimeoutMs`)。 */
|
|
2745
2759
|
startupTimeoutMs: z.unknown().optional(),
|
|
2760
|
+
/** 要不要让这台服务器知道「是谁在调」—— 一一对应引擎的 `McpServerSpec.callerMeta`。`true` ⇒ 引擎在发给这台服务器的每个 `tools/call` / `resources/read` /
|
|
2761
|
+
* `prompts/get` 的 `_meta` 里送调用方标识(这一腿的任务 id、这一次运行的 id、委派树的根会话 id,以及有父任务时的父任务 id);`false` 与缺席 ⇒ 什么都不送。
|
|
2762
|
+
* 缺席不送(`.optional()`,不铸默认:把会话 / 任务标识送出进程是部署自己选的关联)。标识里带会话 id,与 `sessionMetaKey` 是否声明无关 ——
|
|
2763
|
+
* 部署若不想让某台服务器学到任何会话 id,两把键都不开。
|
|
2764
|
+
*
|
|
2765
|
+
* 形是布尔,**本包判**(不是解析透明的键):布尔之外的任何值(`"true"` / `1` / `null` / 对象)整条判拒,与引擎判官同答 —— 不读成任一边,
|
|
2766
|
+
* 部署不会以为服务器被告知了调用方、其实没有,或者反过来。 */
|
|
2767
|
+
callerMeta: z.boolean().optional(),
|
|
2746
2768
|
/** Declaration-plane GROUPING LABEL for this server — maps 1:1 onto the engine's `McpServerSpec.source`
|
|
2747
2769
|
* (core ≥7.5.0 echoes it verbatim on `wiring_manifest.mcp[].source`, single-line + 80-char cap, so a
|
|
2748
2770
|
* consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
|
|
@@ -2794,6 +2816,19 @@ export const McpConfig = z
|
|
|
2794
2816
|
// 值集合:坏一项 ⇒ 整个对端丢),`principalHeader` = 头名判官,`name` = 线上名判官(对端名是线上工具名 `a2a__<名>__…` 的身份片)。
|
|
2795
2817
|
// 秘密边界同 mcp:中心只存 env-NAME,值在读方自己的环境里。写权限 publisher(一个对端就是一组新挂进智能体的远端技能,同 mcp)。
|
|
2796
2818
|
// 首版不收 `notes` / `rosters`(按 roster 定向)/ `toolAxes`(中心面不替调用方担保远端技能的副作用轴):三者都被剥并告警。
|
|
2819
|
+
// 七只可选的登记键(内部目的地):`id` · `boundary` · `fingerprint` · `ownerTeam` · `displayName` · `askEverySkills` · `preApprovedFor`。都是可选键、没有缺省:
|
|
2820
|
+
// 不带它们的条目读出来与加键之前逐字节同。22.0.0 起、加键之前的每一版读方读到带它们的条目整条丢(`entry-dropped`,`entry-unknown-key`),文档面剥键 ——
|
|
2821
|
+
// 所以读方先发:各服务先升到内嵌本版,管理台才写新键。身份戳、内外读法、问题词闭集与配对在 `./a2a-peer-identity`(本包铸、别处只比较)。
|
|
2822
|
+
// **条目判**写在 `A2aPeerSpec` 自己身上(它的第一个 refinement):成员形过了之后,问引擎原语包的完备性判官 + 本包两词(`a2aPeerEntryProblems`),每个词一条
|
|
2823
|
+
// issue、词在 `params.flaw`;外部条目带 `preApprovedFor` 是另一条形规则(哪些成员能同在,不带词)。写面整份拒、视图面逐条丢(全是问题词 ⇒
|
|
2824
|
+
// `entry-registration-refused`,行带 `registrationProblems`;有成员形的 issue ⇒ `entry-schema-invalid`),两面读这一只。
|
|
2825
|
+
// 有了 refinement,zod 对它的 `.pick` / `.omit` / `.partial` 运行期抛,以它为接收方的 `.merge`、覆盖已有键的 `.extend` 同样抛:要子形的从型派生
|
|
2826
|
+
// 或用 `A2aPeerSpec.shape` 的成员自己拼,要加键的用 `.safeExtend`,校验一条条目只用这一只。
|
|
2827
|
+
/** 条目编号的长界 —— 本包自己的界(引擎从不见到 `id`)。 */
|
|
2828
|
+
const A2A_PEER_ID_MAX_CHARS = 128;
|
|
2829
|
+
/** 条目编号的字符形:字母数字起头,只含字母数字与 `.` `_` `-`(UUID 与 slug 都在内;是标识符不是自由文本,读口与审计原样出门)。长界由 schema 的 `.max` 读 {@link A2A_PEER_ID_MAX_CHARS}。
|
|
2830
|
+
* 与协作槽位的 `id`(`CollabSlot`)是同一种标识符文法,写法也照它(小写区间在前);它不是主机路径判官 —— 那只判官只在原语包里。 */
|
|
2831
|
+
const A2A_PEER_ID_RE = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
|
|
2797
2832
|
/** 一个常驻出站 A2A 对端。 */
|
|
2798
2833
|
export const A2aPeerSpec = z.object({
|
|
2799
2834
|
/** 对端的身份:线上工具名 `a2a__<名>__…` 的命名空间段 —— 线上名判官({@link isUsableWireName}:非空、≤128、首尾无空白;不截断、不 trim)。 */
|
|
@@ -2811,17 +2846,53 @@ export const A2aPeerSpec = z.object({
|
|
|
2811
2846
|
/** 挂在哪些场景;空 = 全部(与 mcp / skills 同一条读方过滤)。 */
|
|
2812
2847
|
scenarios: z.array(z.string().min(1)).prefault([]),
|
|
2813
2848
|
enabled: z.boolean().default(true),
|
|
2849
|
+
/** 条目不变的编号:名字可以改,编号不变、不复用;读口、审计、管理台的列表与配对(`pairA2aPeers`)按它认条目。名册内唯一(与名字唯一同一道域判)。
|
|
2850
|
+
* 由写口铸(单机由「确认登记」入口铸);内部条目必带(问题词 `id_missing`)。只给读口与审计,不进引擎的声明。 */
|
|
2851
|
+
id: z.string().max(A2A_PEER_ID_MAX_CHARS).regex(A2A_PEER_ID_RE, "an a2a peer id starts with a letter or digit and holds only letters, digits, '.', '_' and '-'").optional(),
|
|
2852
|
+
/** 这个端点在不在本组织的信任边界之内:{@link A2A_PEER_BOUNDARIES}。缺席 = 外部(读法只有 `a2aPeerBoundaryOf` 一只;读出形不补这个键)。
|
|
2853
|
+
* 部署面的事实:只由登记的一侧写,模型、对端的卡片、请求体都说不了它。 */
|
|
2854
|
+
boundary: z.enum(A2A_PEER_BOUNDARIES).optional(),
|
|
2855
|
+
/** 身份戳(`./a2a-peer-identity`):**本包铸、别处只比较不铸**;身份字段(`url` / `cardUrl` / `ownerTeam` / `boundary`)被写一次就换一枚。
|
|
2856
|
+
* 不是凭据(身份的版本号,不保密、不签名)。 */
|
|
2857
|
+
fingerprint: A2aPeerFingerprint.optional(),
|
|
2858
|
+
/** 归属团队与负责人的联系面(登记人写的自由文本):问卡上的「这个对端归谁」、催不动时通知谁。不取自对端的卡片。读不读得出(有可见字符、长界)
|
|
2859
|
+
* 由条目判问引擎原语包(`owner_team_unreadable`),成员形只判是串。 */
|
|
2860
|
+
ownerTeam: z.string().optional(),
|
|
2861
|
+
/** 给人看的名字;`name` 仍是线上工具名的一截。缺席 ⇒ 问卡上不带展示名(不拿 `name` 顶替)。不取自对端的卡片。读不读得出由条目判问引擎原语包
|
|
2862
|
+
* (`display_name_unreadable`),成员形只判是串。 */
|
|
2863
|
+
displayName: z.string().optional(),
|
|
2864
|
+
/** 这些技能每次都问(只能往上加:读方把它投成该技能的「每次都问」轴,从不往下调)。一张值名单:坏一个元素 ⇒ 整条条目判不过。 */
|
|
2865
|
+
askEverySkills: z.array(z.string().min(1)).optional(),
|
|
2866
|
+
/** 全员预批:值 = 勾下那一刻条目的身份戳;等于条目当前的 `fingerprint` 才算勾着(身份一变自动不成立,写口不替人跟着改)。
|
|
2867
|
+
* **只许出现在内部条目上**(下面这只条目判)。 */
|
|
2868
|
+
preApprovedFor: A2aPeerFingerprint.optional(),
|
|
2869
|
+
}).superRefine((p, ctx) => {
|
|
2870
|
+
// 条目判:写面(parseDomain / validateDomain)整份拒、视图面(逐条丢弃)丢这一条,两面读的是这一只。
|
|
2871
|
+
for (const flaw of a2aPeerEntryProblems(p)) {
|
|
2872
|
+
const issue = buildQuotedIssue `a2a peer "${p.name}" is not a registration the engine can mount (${fixed(flaw)} at ${fixed(A2A_PEER_ENTRY_PROBLEM_MEMBER[flaw])}) — the peer is not mounted. A peer inside the trust boundary needs an id, a fingerprint minted by mintA2aPeerFingerprint for its current url / cardUrl / ownerTeam / boundary, an ownerTeam, a non-empty allowSkills, a principalHeader and locations that do not cross the network in the clear; displayName and ownerTeam, when present, hold visible text within the engine's bound`;
|
|
2873
|
+
ctx.addIssue({ code: "custom", ...issue, params: { ...issue.params, flaw }, path: [A2A_PEER_ENTRY_PROBLEM_MEMBER[flaw]] });
|
|
2874
|
+
}
|
|
2875
|
+
if (a2aPeerBoundaryOf(p) === "outside" && p.preApprovedFor !== undefined) {
|
|
2876
|
+
ctx.addIssue({ code: "custom", ...buildQuotedIssue `a2a peer "${p.name}" sets preApprovedFor but is not registered inside the trust boundary (its boundary is ${fixed(p.boundary === undefined ? "absent, which reads outside" : '"outside"')}) — a pre-approval is for inside peers only: remove preApprovedFor, or register the peer with boundary "inside"`, path: ["preApprovedFor"] });
|
|
2877
|
+
}
|
|
2814
2878
|
});
|
|
2815
|
-
/** `a2a` 域:常驻出站 A2A 对端名册。空名册 = 不拨任何对端;文档缺席(店 / `config.d`)读作空名册。对端名唯一(重名拒,同 mcp)
|
|
2879
|
+
/** `a2a` 域:常驻出站 A2A 对端名册。空名册 = 不拨任何对端;文档缺席(店 / `config.d`)读作空名册。对端名唯一(重名拒,同 mcp);条目编号 `id`
|
|
2880
|
+
* 在场的也唯一(同一道域判)。
|
|
2816
2881
|
* 线上(`GET /effective`)缺席不是空名册:读口不补,{@link EffectiveWire} 上 `a2a` 缺席 = 生产方没发这个域(它的契约早于本域),见 {@link WIRE_CARRIED_DOMAINS}。 */
|
|
2817
2882
|
export const A2aConfig = z
|
|
2818
2883
|
.object({ peers: z.array(A2aPeerSpec).prefault([]) })
|
|
2819
2884
|
.superRefine((cfg, ctx) => {
|
|
2820
2885
|
const seen = new Set();
|
|
2886
|
+
const seenIds = new Set();
|
|
2821
2887
|
cfg.peers.forEach((p, i) => {
|
|
2822
2888
|
if (seen.has(p.name))
|
|
2823
2889
|
ctx.addIssue({ code: "custom", ...buildQuotedIssue `duplicate a2a peer "${p.name}"`, path: ["peers", i, "name"] });
|
|
2824
2890
|
seen.add(p.name);
|
|
2891
|
+
if (p.id === undefined)
|
|
2892
|
+
return;
|
|
2893
|
+
if (seenIds.has(p.id))
|
|
2894
|
+
ctx.addIssue({ code: "custom", ...buildQuotedIssue `duplicate a2a peer id "${p.id}" (on peer "${p.name}")`, path: ["peers", i, "id"] });
|
|
2895
|
+
seenIds.add(p.id);
|
|
2825
2896
|
});
|
|
2826
2897
|
});
|
|
2827
2898
|
// ── Domain: plugins (plugin SOURCE REFERENCES — C2 plugins 上云, additive 0.5.0) ──────────────────────────
|
|
@@ -2859,6 +2930,10 @@ export const PLUGIN_ORIGIN = z
|
|
|
2859
2930
|
/** A full 40-hex git commit SHA — the ONLY pin form the supply-side treats as 钉死 (a branch/tag `version`
|
|
2860
2931
|
* is a moving ref; only a commit pin makes the materialized bytes reproducible). */
|
|
2861
2932
|
export const GIT_COMMIT_SHA = z.string().regex(/^[a-f0-9]{40}$/, "must be a full 40-character lowercase git commit SHA");
|
|
2933
|
+
/** The grammar of ONE segment of a plugin id (`<name>@<marketplace>`): a letter or digit first, then letters / digits / `.` / `_` / `-`, case-insensitive.
|
|
2934
|
+
* Re-exported here under its own name; the ONE definition is the zero-import leaf `./plugin-id-segment` — the `<name>` half (`PluginSpec.name`), the
|
|
2935
|
+
* `<marketplace>` half (the marketplace arm of `PluginSource`) and the id reader `readPluginId` (`./plugin-settings`) all read that same object. */
|
|
2936
|
+
export { PLUGIN_ID_SEGMENT_REGEX };
|
|
2862
2937
|
/** WHERE a plugin comes from — two forms (产品拍板: git URL 与 marketplace ref 两形态):
|
|
2863
2938
|
* - `git`: the plugin lives at a git URL directly (repo root = plugin root).
|
|
2864
2939
|
* - `marketplace`: the plugin is `<name>@<marketplace>` in a plugin marketplace; `marketplace` is the
|
|
@@ -2869,13 +2944,13 @@ export const PluginSource = z.discriminatedUnion("kind", [
|
|
|
2869
2944
|
z.object({ kind: z.literal("git"), url: PLUGIN_ORIGIN }),
|
|
2870
2945
|
z.object({
|
|
2871
2946
|
kind: z.literal("marketplace"),
|
|
2872
|
-
marketplace: z.string().min(1).regex(
|
|
2947
|
+
marketplace: z.string().min(1).regex(PLUGIN_ID_SEGMENT_REGEX, PLUGIN_ID_SEGMENT_SENTENCE),
|
|
2873
2948
|
url: PLUGIN_ORIGIN.optional(),
|
|
2874
2949
|
}),
|
|
2875
2950
|
]);
|
|
2876
2951
|
export const PluginSpec = z.object({
|
|
2877
2952
|
/** Plugin name (the `<name>` half of a `<name>@<marketplace>` id; the whole id for a direct git plugin). */
|
|
2878
|
-
name: z.string().min(1).regex(
|
|
2953
|
+
name: z.string().min(1).regex(PLUGIN_ID_SEGMENT_REGEX, PLUGIN_ID_SEGMENT_SENTENCE),
|
|
2879
2954
|
source: PluginSource,
|
|
2880
2955
|
/** Human version label (semver/tag). A moving ref — NOT a pin; pin with `sha`. */
|
|
2881
2956
|
version: z.string().optional(),
|
package/docs/API-SURFACE.md
CHANGED
|
@@ -4,11 +4,21 @@
|
|
|
4
4
|
> 每次全量重算并逐名比对 —— 加 / 删 / 改形一个导出而不重生成本档 ⇒ 红。导出面的每次变动因此以本档的 diff 出现在评审里。
|
|
5
5
|
> 形:`value` = 运行期拿得到的值;`type` = 只在类型层;`value+type` = 同名的值与类型(zod schema 与它推出的类型)。
|
|
6
6
|
|
|
7
|
-
子路径
|
|
7
|
+
子路径 25 条(资产出口 `./package.json` / `./fleet-paths.json` 不是模块,不列),导出名合计 1699 个(同名在多条子路径上各计一次)。
|
|
8
8
|
|
|
9
|
-
## `.`(
|
|
9
|
+
## `.`(912)
|
|
10
10
|
|
|
11
|
+
- `A2A_PEER_BOUNDARIES` — value
|
|
12
|
+
- `A2A_PEER_ENTRY_PROBLEMS` — value
|
|
13
|
+
- `A2A_PEER_FINGERPRINT_RE` — value
|
|
11
14
|
- `A2aConfig` — value+type
|
|
15
|
+
- `A2aPeerBoundary` — type
|
|
16
|
+
- `A2aPeerEntryProblem` — type
|
|
17
|
+
- `A2aPeerFields` — type
|
|
18
|
+
- `A2aPeerFingerprint` — value
|
|
19
|
+
- `A2aPeerIdentitySource` — type
|
|
20
|
+
- `A2aPeerPairable` — type
|
|
21
|
+
- `A2aPeerPairing` — type
|
|
12
22
|
- `A2aPeerSpec` — value+type
|
|
13
23
|
- `ABSOLUTE_HOST_PATH_MAX` — value
|
|
14
24
|
- `ACCESS_TOKEN_TTL_SECONDS` — value
|
|
@@ -49,6 +59,8 @@
|
|
|
49
59
|
- `CONNECTOR_ID_RULE` — value
|
|
50
60
|
- `CONTROL_AND_BIDI_CHARS` — value
|
|
51
61
|
- `CREDENTIAL_PARAM_NAMES` — value
|
|
62
|
+
- `CREDENTIAL_PLANE_REFUSALS` — value
|
|
63
|
+
- `CREDENTIAL_PLANE_REFUSAL_ERRORS` — value
|
|
52
64
|
- `CROSS_SESSION_INBOUND_UNSET` — value
|
|
53
65
|
- `CROSS_SESSION_INBOUND_VALUES` — value
|
|
54
66
|
- `CancelSource` — value+type
|
|
@@ -86,6 +98,7 @@
|
|
|
86
98
|
- `CredentialDrainRequest` — value+type
|
|
87
99
|
- `CredentialHandleAnswer` — value+type
|
|
88
100
|
- `CredentialParamName` — type
|
|
101
|
+
- `CredentialPlaneRefusalError` — type
|
|
89
102
|
- `CredentialResolveRequest` — value+type
|
|
90
103
|
- `CrossSessionInboundSetting` — value
|
|
91
104
|
- `CrossSessionInboundSettingValue` — type
|
|
@@ -165,9 +178,11 @@
|
|
|
165
178
|
- `DroppedEntry` — type
|
|
166
179
|
- `DroppedEntryIdentity` — type
|
|
167
180
|
- `DroppedEntryReasonCode` — type
|
|
181
|
+
- `ENABLED_PLUGINS_VALUE_KINDS` — value
|
|
168
182
|
- `ENGINE_OWNED_HOOK_EVENTS` — value
|
|
169
183
|
- `ENGINE_OWNED_HOOK_EVENT_SINCE` — value
|
|
170
184
|
- `ENGINE_SIGNAL_KEY` — value
|
|
185
|
+
- `ENTITLEMENT_TIER_LIMITS` — value
|
|
171
186
|
- `ENV_MODELS_DECISIONS` — value
|
|
172
187
|
- `ENV_MODELS_DOCUMENT` — value
|
|
173
188
|
- `ENV_MODEL_TABLE_KEYS` — value
|
|
@@ -182,6 +197,8 @@
|
|
|
182
197
|
- `EffectiveWire` — type
|
|
183
198
|
- `ElicitationHookInput` — value
|
|
184
199
|
- `ElicitationResultHookInput` — value
|
|
200
|
+
- `EnabledPluginsValue` — type
|
|
201
|
+
- `EnabledPluginsValueKind` — type
|
|
185
202
|
- `EngineDraining` — value+type
|
|
186
203
|
- `EngineOwnedHookEvent` — type
|
|
187
204
|
- `EngineSignal` — value+type
|
|
@@ -338,7 +355,6 @@
|
|
|
338
355
|
- `MODEL_PLANE_REFUSAL_CODES` — value
|
|
339
356
|
- `MODEL_SWITCH_SOURCES` — value
|
|
340
357
|
- `MODEL_THINKING_LEVEL_WORDS` — value
|
|
341
|
-
- `MarkedMigrationId` — type
|
|
342
358
|
- `McpConfig` — value+type
|
|
343
359
|
- `McpContentOrigin` — type
|
|
344
360
|
- `McpEntryCredential` — value+type
|
|
@@ -363,7 +379,6 @@
|
|
|
363
379
|
- `MergeCategorySpec` — value+type
|
|
364
380
|
- `MergeShape` — value+type
|
|
365
381
|
- `MessageDisplayHookInput` — value
|
|
366
|
-
- `MigrationMarker` — type
|
|
367
382
|
- `MinTrust` — value+type
|
|
368
383
|
- `ModelCost` — value
|
|
369
384
|
- `ModelEntry` — value+type
|
|
@@ -386,6 +401,8 @@
|
|
|
386
401
|
- `PARSE_TRANSPARENT_KEYS` — value
|
|
387
402
|
- `PATH_BASE_URL_FORBIDDEN_PARTS` — value
|
|
388
403
|
- `PLAIN_STRING_RECORD_FAULTS` — value
|
|
404
|
+
- `PLUGIN_ID_SEGMENT_REGEX` — value
|
|
405
|
+
- `PLUGIN_MARKETPLACE_SENTINELS` — value
|
|
389
406
|
- `PLUGIN_ORIGIN` — value
|
|
390
407
|
- `PRINCIPAL_INC_CLAIM` — value
|
|
391
408
|
- `PRINCIPAL_LIFECYCLE_EVENT_KINDS` — value
|
|
@@ -414,6 +431,8 @@
|
|
|
414
431
|
- `PermissionUpdateDestination` — value+type
|
|
415
432
|
- `PlainStringRecordFault` — type
|
|
416
433
|
- `PlainStringRecordRead` — type
|
|
434
|
+
- `PluginId` — type
|
|
435
|
+
- `PluginMarketplaceSentinel` — type
|
|
417
436
|
- `PluginOptionKeysProblem` — type
|
|
418
437
|
- `PluginSource` — value+type
|
|
419
438
|
- `PluginSpec` — value+type
|
|
@@ -483,6 +502,7 @@
|
|
|
483
502
|
- `RefReferrer` — type
|
|
484
503
|
- `RefReferrerDomain` — type
|
|
485
504
|
- `RemoteExecSpec` — value+type
|
|
505
|
+
- `RequestMcpCredentialsVerdict` — type
|
|
486
506
|
- `RequestMcpTransport` — type
|
|
487
507
|
- `RequestMcpTransportRead` — type
|
|
488
508
|
- `RequestStringRecordRead` — type
|
|
@@ -557,6 +577,7 @@
|
|
|
557
577
|
- `SchedulerReadOptions` — type
|
|
558
578
|
- `SchedulerRecord` — type
|
|
559
579
|
- `SchedulerStore` — type
|
|
580
|
+
- `SchedulerStoreFileRead` — type
|
|
560
581
|
- `SchedulerStoreRead` — type
|
|
561
582
|
- `SchedulerWhen` — type
|
|
562
583
|
- `Scope` — value+type
|
|
@@ -693,6 +714,8 @@
|
|
|
693
714
|
- `WorktreeCreateHookInput` — value
|
|
694
715
|
- `WorktreeRemoveHookInput` — value
|
|
695
716
|
- `WsUrlFlaw` — type
|
|
717
|
+
- `a2aPeerBoundaryOf` — value
|
|
718
|
+
- `a2aPeerFingerprintDigest` — value
|
|
696
719
|
- `aggregateUsage` — value
|
|
697
720
|
- `applyProjectPatch` — value
|
|
698
721
|
- `buildEffective` — value
|
|
@@ -760,6 +783,7 @@
|
|
|
760
783
|
- `isInstanceStale` — value
|
|
761
784
|
- `isLoopbackAuthHost` — value
|
|
762
785
|
- `isLoopbackRouteHost` — value
|
|
786
|
+
- `isPluginMarketplaceSentinel` — value
|
|
763
787
|
- `isReadyForTraffic` — value
|
|
764
788
|
- `isRefCheckedDomain` — value
|
|
765
789
|
- `isReportableRefusalName` — value
|
|
@@ -791,6 +815,7 @@
|
|
|
791
815
|
- `memberMinTrust` — value
|
|
792
816
|
- `memberTighten` — value
|
|
793
817
|
- `membersOf` — value
|
|
818
|
+
- `mintA2aPeerFingerprint` — value
|
|
794
819
|
- `mintScopedToken` — value
|
|
795
820
|
- `mintedCheapId` — value
|
|
796
821
|
- `narrowAtMention` — value
|
|
@@ -798,6 +823,7 @@
|
|
|
798
823
|
- `normalizeContentHash` — value
|
|
799
824
|
- `normalizeUserCode` — value
|
|
800
825
|
- `outgoingPath` — value
|
|
826
|
+
- `pairA2aPeers` — value
|
|
801
827
|
- `parseDomain` — value
|
|
802
828
|
- `parseDomainLoud` — value
|
|
803
829
|
- `parseDomainSalvaged` — value
|
|
@@ -823,6 +849,7 @@
|
|
|
823
849
|
- `readDrainRequest` — value
|
|
824
850
|
- `readDrainRequestReading` — value
|
|
825
851
|
- `readEffectiveWire` — value
|
|
852
|
+
- `readEnabledPluginsValue` — value
|
|
826
853
|
- `readEngineSignal` — value
|
|
827
854
|
- `readEntryIdentityAt` — value
|
|
828
855
|
- `readEnvModelSlots` — value
|
|
@@ -830,6 +857,8 @@
|
|
|
830
857
|
- `readHttpHookAllowlistLayer` — value
|
|
831
858
|
- `readModelRefusals` — value
|
|
832
859
|
- `readPlainStringRecord` — value
|
|
860
|
+
- `readPluginId` — value
|
|
861
|
+
- `readRequestMcpCredentials` — value
|
|
833
862
|
- `readRequestMcpTransport` — value
|
|
834
863
|
- `readRequestStringRecord` — value
|
|
835
864
|
- `readScopedTokenBinding` — value
|
|
@@ -892,7 +921,7 @@
|
|
|
892
921
|
- `writeRoleFor` — value
|
|
893
922
|
- `wsUrlFlaws` — value
|
|
894
923
|
|
|
895
|
-
## `./types`(
|
|
924
|
+
## `./types`(155)
|
|
896
925
|
|
|
897
926
|
- `A2aConfig` — value+type
|
|
898
927
|
- `A2aPeerSpec` — value+type
|
|
@@ -921,6 +950,7 @@
|
|
|
921
950
|
- `DOMAIN_SCHEMAS` — value
|
|
922
951
|
- `DomainConfig` — type
|
|
923
952
|
- `DomainName` — type
|
|
953
|
+
- `ENTITLEMENT_TIER_LIMITS` — value
|
|
924
954
|
- `ENV_NAME` — value
|
|
925
955
|
- `EffectiveConfig` — type
|
|
926
956
|
- `EffectiveKey` — value+type
|
|
@@ -961,6 +991,7 @@
|
|
|
961
991
|
- `ModelsConfig` — value+type
|
|
962
992
|
- `NON_SECRET_URL` — value
|
|
963
993
|
- `PARSE_TRANSPARENT_KEYS` — value
|
|
994
|
+
- `PLUGIN_ID_SEGMENT_REGEX` — value
|
|
964
995
|
- `PLUGIN_ORIGIN` — value
|
|
965
996
|
- `PRIVATE_KEY_PEM_HEADER` — value
|
|
966
997
|
- `PROBE_CPU_CORES_MAX` — value
|
|
@@ -1306,7 +1337,7 @@
|
|
|
1306
1337
|
- `tightenVerdict` — value
|
|
1307
1338
|
- `trustRank` — value
|
|
1308
1339
|
|
|
1309
|
-
## `./node`(
|
|
1340
|
+
## `./node`(73)
|
|
1310
1341
|
|
|
1311
1342
|
- `ConditionalWriteResult` — type
|
|
1312
1343
|
- `ConfigBundle` — type
|
|
@@ -1333,8 +1364,6 @@
|
|
|
1333
1364
|
- `EnvFileResolveOptions` — type
|
|
1334
1365
|
- `EnvFileTrustSeat` — type
|
|
1335
1366
|
- `EnvModelsDecisionWrite` — type
|
|
1336
|
-
- `EnvModelsMigration` — type
|
|
1337
|
-
- `EnvModelsMint` — type
|
|
1338
1367
|
- `FileConfigRead` — type
|
|
1339
1368
|
- `FileConfigStore` — value+type
|
|
1340
1369
|
- `LOCAL_READ_DOMAINS` — value
|
|
@@ -1363,7 +1392,6 @@
|
|
|
1363
1392
|
- `loadSchedulerStore` — value
|
|
1364
1393
|
- `migrateConfigDirectory` — value
|
|
1365
1394
|
- `migrateConfigDocuments` — value
|
|
1366
|
-
- `migrateEnvModelsDecision` — value
|
|
1367
1395
|
- `mutateSchedulerStore` — value
|
|
1368
1396
|
- `nodeConfigDirectoryIo` — value
|
|
1369
1397
|
- `nodeConfigRootIo` — value
|
|
@@ -1372,7 +1400,6 @@
|
|
|
1372
1400
|
- `readEnvFileLines` — value
|
|
1373
1401
|
- `readEnvModelsDecision` — value
|
|
1374
1402
|
- `readEnvModelsDecisionSync` — value
|
|
1375
|
-
- `readMigrationMarker` — value
|
|
1376
1403
|
- `remoteExecPath` — value
|
|
1377
1404
|
- `resolveEnvFileAssignments` — value
|
|
1378
1405
|
- `saveSchedulerStore` — value
|
|
@@ -1402,13 +1429,14 @@
|
|
|
1402
1429
|
- `migrateEffectiveSnapshot` — value
|
|
1403
1430
|
- `migrateStoredDocuments` — value
|
|
1404
1431
|
|
|
1405
|
-
## `./scheduler-store`(
|
|
1432
|
+
## `./scheduler-store`(11)
|
|
1406
1433
|
|
|
1407
1434
|
- `STALE_SESSION_RECORD_MS` — value
|
|
1408
1435
|
- `SchedulerParseWarning` — type
|
|
1409
1436
|
- `SchedulerReadOptions` — type
|
|
1410
1437
|
- `SchedulerRecord` — type
|
|
1411
1438
|
- `SchedulerStore` — type
|
|
1439
|
+
- `SchedulerStoreFileRead` — type
|
|
1412
1440
|
- `SchedulerStoreRead` — type
|
|
1413
1441
|
- `SchedulerWhen` — type
|
|
1414
1442
|
- `isSchedulerRecord` — value
|
|
@@ -1637,6 +1665,18 @@
|
|
|
1637
1665
|
- `routableInstances` — value
|
|
1638
1666
|
- `shouldRenewLease` — value
|
|
1639
1667
|
|
|
1668
|
+
## `./plugin-settings`(9)
|
|
1669
|
+
|
|
1670
|
+
- `ENABLED_PLUGINS_VALUE_KINDS` — value
|
|
1671
|
+
- `EnabledPluginsValue` — type
|
|
1672
|
+
- `EnabledPluginsValueKind` — type
|
|
1673
|
+
- `PLUGIN_MARKETPLACE_SENTINELS` — value
|
|
1674
|
+
- `PluginId` — type
|
|
1675
|
+
- `PluginMarketplaceSentinel` — type
|
|
1676
|
+
- `isPluginMarketplaceSentinel` — value
|
|
1677
|
+
- `readEnabledPluginsValue` — value
|
|
1678
|
+
- `readPluginId` — value
|
|
1679
|
+
|
|
1640
1680
|
## `./api/auth`(23)
|
|
1641
1681
|
|
|
1642
1682
|
- `ACCESS_TOKEN_TTL_SECONDS` — value
|
package/docs/CC-DIVERGENCE.md
CHANGED
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
|
|
64
64
|
| 号 | 面 | CC 原形 | 本包 | 方向 | 理由 | 读它的 |
|
|
65
65
|
|---|---|---|---|---|---|---|
|
|
66
|
-
| SS-CCD-08 | 仓库里写给 CC 的 `.claude/settings.json` / `.claude/settings.local.json` | 那就是 CC 自己的项目层 / 本地层:工作区受信时整份读(hooks / env / allow 规则 / MCP 服务器……) | 源 `foreignProjectSettings`(`tightenOnly`):不论工作区读数只读收紧方向(deny / ask
|
|
66
|
+
| SS-CCD-08 | 仓库里写给 CC 的 `.claude/settings.json` / `.claude/settings.local.json` | 那就是 CC 自己的项目层 / 本地层:工作区受信时整份读(hooks / env / allow 规则 / MCP 服务器……) | 源 `foreignProjectSettings`(`tightenOnly`):不论工作区读数只读收紧方向(deny / ask 规则、关停位的开、沙箱收紧极、自动记忆开关的 `false`),其余答 `tighten_only` 或 `below_trust_floor`,一行披露没读的部分 | 更严 | 对本工具它是另一个工具的配置:用户接受本工具的工作区,不等于同意把另一个工具的 hooks、环境变量与 allow 规则搬进来;收紧方向不需要信任 | 壳与服务端读仓库设置文件的那一腿 |
|
|
67
|
+
| SS-CCD-11 | 自动记忆开关 `autoMemoryEnabled`(`SAFETY_MERGE_SPEC.autoMemory` · `SETTINGS_UNITS.autoMemoryEnabled`) | CC 2.1.321 语料(`cli321.js:276244` 描述、`:277258` 缺省 `true`、`:276239` 不在限制性键表 `WJ` 中;读自语料,未核二进制):整值替换、最高层赢,项目层同样可写 `true` / `false` | 成员级值向类目 `autoMemory`:`false` 为收紧极(`boolPole: { strict: false, minTrust: "local" }`,六个源 × 三种读数一律 `admitted`);`true` / 不带值 / 非布尔走地板 `global`(仅用户 / flag / 托管层准入,项目 / 本地 / foreign 层一律 `below_trust_floor`);合并律 `replace` + `boolStricter(strict: false)`,一层的 `false` 恒胜;读法 `"boolean"` 只认严格布尔,类目 `fail: "closed"`,读不出不得丢弃、按 `false` 处置 | 更严 | 防止未受信仓库的 `true` 覆盖用户在用户层写下的 `false`(否则用户记忆会被读进不可信仓库驱动的会话),并守住「布尔极成员行地板严格高于仓库可控源」的不变式。代价:在用户层写了 `false` 的用户无法在某个项目的设置文件里写 `true` 重新打开;出路 = 删掉用户层的 `false`,或使用产品的环境变量覆盖 | 共用库与终端的设置解析器 |
|
|
67
68
|
|
|
68
69
|
关停位(`SAFETY_MERGE_SPEC.killSwitches`)无偏差:任一层可写「开」、合并严者胜,与限制性键表 `{path:["permissions","disableBypassPermissionsMode"],restrictive:"disable"}`(`:237449`)同形。
|
|
69
70
|
|
package/docs/CONFORMANCE.md
CHANGED
|
@@ -106,11 +106,11 @@ expect(report.ok).toBe(true);
|
|
|
106
106
|
22.0.0 起两腿在「条目只多带未知键」上分开:读腿丢那一条(`entry-unknown-key`),文档面剥键受理。律对此一臂:这种丢弃不算抢救;
|
|
107
107
|
受理形删掉那几处坐标上的条目 = 读腿那一格,且那里装着读腿点名的同一条(身份对得上);每处坐标下严写至少剥了一个键;严写告警面减去这些条目内的键
|
|
108
108
|
= 读腿的剥键 / 承运告警。零幸存者(整域缺省)且全因未知键的 case,冻结的 `domain-defaulted` 不带理由,手登在测试里(一行一条理由、反向核)。
|
|
109
|
-
今天
|
|
109
|
+
今天 117 条语料:46 受理(其中 5 条读腿丢了带未知键的条目)、71 拒(读腿抢救过坏条目的 45 条;读腿整条拒的 18 条;带非域名键的 7 条;悬空引用的 1 条)。
|
|
110
110
|
- **为什么不派生**:严写结局不是读结局的一种表示变换(读腿抢救处严写拒);从 `domains` 期望派生会让一份金样的错同时改写两条腿。
|
|
111
111
|
每条 case 的严写金样显式入库、各自冻结,`why` 写在金样旁边。
|
|
112
112
|
- **负控**(`test/conformance-mutation.test.ts` 第十一靶):把 `parseDomainLoud` 换成读腿的宽松解析 ⇒ 严写腿**恰好**红在读腿抢救过的
|
|
113
|
-
那
|
|
113
|
+
那 50 条上(45 条金样拒、宽松受理;5 条金样受理、宽松读丢了带未知键的条目 ⇒ 受理形不同);把非域名键静默跳过 ⇒ 恰好红在那 7 条上。
|
|
114
114
|
|
|
115
115
|
## 2. 报告形
|
|
116
116
|
|
|
@@ -249,7 +249,7 @@ sema-test 的读数,是本仓自己重跑 `node scripts/conformance-historical.m
|
|
|
249
249
|
会在告警面报 `missing` / `extra`;**消费方自己入库的语料**(例:web-admin `test/conformance/cases/wa05-*` 在
|
|
250
250
|
被丢的 skills 条目上断言 `entry-dropped`)提货时要按新读数重新加冕 —— additive 字段让旧金样少一个键,
|
|
251
251
|
是提货成本,不是读法分歧。`reasonCode`(10.1.0:为什么丢的机读闭集词)同理在投影里 —— 语料里 `entry-key-invalid` /
|
|
252
|
-
`entry-schema-invalid` / `entry-unknown-key`(22.0.0,c03 / c76)由 JSON 表达得出;`entry-unreadable`(判的过程抛了)需要病态访问器,JSON 表达不出,由
|
|
252
|
+
`entry-schema-invalid` / `entry-unknown-key`(22.0.0,c03 / c76)/ `entry-registration-refused`(`a2a` 对端条目判的登记问题词,c100 / c101)由 JSON 表达得出;`entry-unreadable`(判的过程抛了)需要病态访问器,JSON 表达不出,由
|
|
253
253
|
`test/dropped-entry-reason-code-s1295.test.ts` 看着;web-admin 自有语料同样要在提货时按新读数重新加冕。
|
|
254
254
|
- **多重集**而不是集合:同一 kind 在同一域上发两次是有信息的,去重会把「报了两条」读成「报了一条」。
|
|
255
255
|
- 一条告警**内部**的集合字段(`keys` / `droppedNames`)同样按**袋**比:它们的顺序来自文档枚举次序,契约
|
|
@@ -365,7 +365,7 @@ kit 每格用同一只临时根铸点造一个根、在根下的 `c/` 里放凭
|
|
|
365
365
|
- 格:没人持有 ⇒ 取到(锁在真目标旁、回调拿到锁内读的文本)· 新鲜锁 / 未来 mtime / 未过龄 ⇒ 忙且锁一字不动、不等待 · 过龄 ⇒ 收、不留挪开件 ·
|
|
366
366
|
持锁期间锁被换成继任者 ⇒ `stillMine()` 假、`replaceWith` 不写、结果 `lost`、继任者的锁原样在 · 同一形下不先问 `stillMine()`,直接 `replaceWith` / `remove` 也不落(两只提交方法各自核身份)·
|
|
367
367
|
软链写穿、锁在真目标旁 · 悬空软链(链接在、目标不在 —— 经软链到达的凭据文件登出之后的样子)/ 读不了的真目标 / 建不出的锁 /
|
|
368
|
-
锁名被不是普通文件的东西占着(黑盒格用目录;命名管道与悬空软链在本包白盒钉里)⇒ `unreadable`(有界、不建文件、不写、不碰那只东西、回调不跑;悬空软链是已知限制 ——
|
|
368
|
+
锁名被不是普通文件的东西占着(黑盒格用目录;命名管道与悬空软链在本包白盒钉里)⇒ `unreadable`(有界、不建文件、不写、不碰那只东西、回调不跑;悬空软链是已知限制 —— 登出后再登录写不进去;本版不解析悬空链接的落点:要做就得改原子写器对悬空链接的拒律〔不替链接建它指向的文件〕,那是另一份设计、按大版本排;出路 = 删掉悬空链接,或先重建目标。`./node` 的原语对这一形答的 `unreadable` 多一个可缺的诊断位 `ioKind: "dangling_symlink"`,这份 kit 不判它 —— 别的实现不带这一键也过)·
|
|
369
369
|
`remove()` · 真目标不在 ⇒ `current` 为 `undefined` · 回调抛 ⇒ 放锁原样重抛 · 回调交回 thenable ⇒ `TypeError` · 把手的三只方法出了回调都失效。
|
|
370
370
|
- 黑盒看不到的不判:只试一次的次数、收残留的交错、身份取自 fd 且 fd 钉到放锁 —— 这些要注入系统调用才能排出来,在本包自己的白盒钉里;黑盒只量「忙时不等待」的耗时上界(1 s,单调钟)。
|
|
371
371
|
过龄格里 kit 自己钉着被收的那只残留(开着一只只读 fd),「新锁不是同一只」的比对因此不受 inode 号复用影响;失锁两格对一只不钉 fd 的实现只是概率性地抓得到。
|