@sema-agent/settings-schema 31.0.1 → 32.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 +894 -0
- package/README.md +88 -19
- package/conformance/VERSION +1 -1
- package/conformance/cases/c97-roles-own-proto-key-entry-dropped/expected.json +105 -0
- package/conformance/cases/c97-roles-own-proto-key-entry-dropped/input.json +26 -0
- package/conformance/cases/c97-roles-own-proto-key-entry-dropped/meta.json +6 -0
- package/dist/api/auth.d.ts +1 -1
- package/dist/api/feedback.d.ts +3 -3
- package/dist/api/feedback.js +3 -2
- package/dist/atomic-write.d.ts +4 -1
- package/dist/atomic-write.js +15 -2
- package/dist/center-refs.d.ts +1 -1
- package/dist/center-refs.js +1 -1
- package/dist/config-d-file.d.ts +22 -4
- package/dist/config-d-file.js +12 -3
- package/dist/config-document-refusal.d.ts +13 -2
- package/dist/config-document-refusal.js +2 -0
- package/dist/config-fns.d.ts +14 -3
- package/dist/config-fns.js +49 -12
- package/dist/config-root-documents.js +1 -1
- package/dist/conformance/contract-adapter.js +18 -1
- package/dist/declared-capture.d.ts +1 -1
- package/dist/declared-capture.js +5 -1
- package/dist/device-lane-knobs.d.ts +57 -0
- package/dist/device-lane-knobs.js +127 -0
- package/dist/execution-lanes.d.ts +3 -1
- package/dist/execution-lanes.js +3 -1
- package/dist/file-store.js +2 -2
- package/dist/fleet.d.ts +5 -5
- package/dist/fleet.js +4 -3
- package/dist/hooks-config.d.ts +47 -23
- package/dist/hooks-config.js +93 -134
- package/dist/hooks.d.ts +26 -22
- package/dist/hooks.js +17 -8
- package/dist/host-path.d.ts +9 -5
- package/dist/host-path.js +9 -20
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/ip-address.d.ts +19 -0
- package/dist/ip-address.js +28 -0
- package/dist/loopback.d.ts +3 -11
- package/dist/loopback.js +11 -12
- package/dist/mcp-request-entry.js +4 -6
- package/dist/migration-receipt.d.ts +1 -1
- package/dist/migration-receipt.js +1 -1
- package/dist/one-time-migrations.d.ts +1 -1
- package/dist/one-time-migrations.js +257 -62
- package/dist/plain-json-object.d.ts +5 -8
- package/dist/plain-json-object.js +5 -8
- package/dist/record-seat.d.ts +35 -0
- package/dist/record-seat.js +97 -0
- package/dist/reserved-member-name.d.ts +8 -3
- package/dist/reserved-member-name.js +10 -3
- package/dist/retired-envs.js +13 -2
- package/dist/safety-merge-spec.d.ts +11 -3
- package/dist/safety-merge-spec.js +3 -2
- package/dist/types.d.ts +404 -112
- package/dist/types.js +132 -73
- package/docs/API-SURFACE.md +25 -6
- package/docs/CC-DIVERGENCE.md +11 -2
- package/docs/CONFORMANCE.md +2 -2
- package/docs/CONSUMER-INTEGRATION.md +177 -6
- package/llms-full.txt +35 -21
- package/llms.txt +12 -8
- package/package.json +7 -6
package/dist/types.js
CHANGED
|
@@ -22,7 +22,7 @@ import { MAX_EXTRA_BODY_DEPTH } from "./hash.js"; // reconcile the extraBody dep
|
|
|
22
22
|
import { DispatchPolicy, FLEET_GENERATION_ENV, FLEET_SCOPE_ENV } from "./fleet.js"; // WorkerSpec.fleet.dispatch (scheduling framework D3)
|
|
23
23
|
import { isLoopbackAuthHost } from "./loopback.js";
|
|
24
24
|
import { isJsonArray, isPlainJsonObject } from "./plain-json-object.js"; // THE "is this a JSON object" predicate + the total array test
|
|
25
|
-
import { appendOwn, guardedSafeParse, isAccessorDescriptor
|
|
25
|
+
import { appendOwn, guardedSafeParse, isAccessorDescriptor } from "./own-key-read.js"; // the one spelling of "is this descriptor an accessor" (its own fields only) + the one guarded zod verdict
|
|
26
26
|
import { httpUrlFlaws, httpUrlRule } from "./url-shape.js"; // 11.0.0: THE URL shape judge // 11.0.0: the one narrow「本机」predicate (auth relaxation)
|
|
27
27
|
import { secretScanForms } from "./secret-scan.js"; // package-private normalization — the one set of forms both scanners read (not in the barrel)
|
|
28
28
|
import { WEB_ADMIN_ENV } from "./web-admin-env.js"; // the three connection keys the config renderer writes are reserved worker env
|
|
@@ -34,10 +34,11 @@ import { LANE_ENV_OWNER, LATE_LANE_ENV_KEYS, laneEnvSeat, laneRowOf } from "./ex
|
|
|
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)
|
|
36
36
|
import { buildQuotedIssue, fixed } from "./quoted-issue.js"; // THE minting point of custom issues (package-private)
|
|
37
|
-
import {
|
|
38
|
-
import { AbsoluteHostPath } from "./host-path.js"; // the one host-path shape judge (a task's cwd and a project's folder / file entries)
|
|
37
|
+
import { RECORD_MEMBER_NAME, partialRecordOf, recordOf } from "./record-seat.js"; // the one way to mint a record seat (its guard refuses a reserved own member name — the table the record reader and the center-refs resolver read) · the judge every name that keys a record seat starts from (worker name, catalog entry name, HTTP header name: a reserved name is refused where the name is minted)
|
|
38
|
+
import { AbsoluteHostPath } from "./host-path.js"; // the zod seat of the one host-path shape judge (a task's cwd and a project's folder / file entries)
|
|
39
39
|
import { RFC3339_DATE_TIME } from "./rfc3339.js"; // the package's one RFC 3339 date-time judge (package-private)
|
|
40
40
|
import { DEVICE_RELAY_RULE, deviceRelayFlaws } from "./device-relay.js"; // 16.0.0: the value grammar of the device lane's DEVICE_RELAY_URL (ws(s) URL or the literal none)
|
|
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)
|
|
41
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)
|
|
42
43
|
import { deepFreeze } from "./deep-freeze.js";
|
|
43
44
|
import { McpEntryCredential } from "./mcp-entry-credential.js"; // 29.0.0: the http entry's credential reference (the one reading = the engine primitives' readCredentialRef)
|
|
@@ -108,7 +109,8 @@ export const hasNul = (s) => s.includes("\0");
|
|
|
108
109
|
/** The params of a custom issue's sentence and their one rendering live in the package-private minting module `./quoted-issue`
|
|
109
110
|
* (one minting point for the whole package); re-exported here unchanged. */
|
|
110
111
|
export { renderQuotedSentence } from "./quoted-issue.js";
|
|
111
|
-
/** The one host-path shape judge (a task's `cwd`, a project's `folder` / `file` entries)
|
|
112
|
+
/** The one host-path shape judge (a task's `cwd`, a project's `folder` / `file` entries) is the engine primitives package's `isAbsoluteHostPath`; its leaf module `./host-path`
|
|
113
|
+
* re-exports that function and the length bound (the same objects, not copies) and holds the zod seat `AbsoluteHostPath`. */
|
|
112
114
|
export { ABSOLUTE_HOST_PATH_MAX, AbsoluteHostPath, isAbsoluteHostPath } from "./host-path.js";
|
|
113
115
|
/** Does `s` contain a secret-shaped token? —— **the one scanner** (11.0.0, S-1274): the write side (this detector, behind every
|
|
114
116
|
* free-text write port — NON_SECRET_URL, mcp stdio, execution coords, ssh login, worker env, extraBody, …) and the display side
|
|
@@ -468,8 +470,9 @@ export const ModelThinkingLevelMap = z
|
|
|
468
470
|
.object(Object.fromEntries(MODEL_THINKING_LEVEL_WORDS.map((word) => [word, ThinkingLevelSpelling.optional()])))
|
|
469
471
|
.strict();
|
|
470
472
|
export const ModelEntry = z.object({
|
|
471
|
-
/** Catalog key + `@name` mention handle (stable, url/word-safe), e.g. "model-a".
|
|
472
|
-
|
|
473
|
+
/** Catalog key + `@name` mention handle (stable, url/word-safe), e.g. "model-a". It keys record seats (`budget.perModel`, the refusal signal's
|
|
474
|
+
* `entries`), so it starts from {@link RECORD_MEMBER_NAME}: `constructor` / `prototype` are refused here, with the record reader's sentence. */
|
|
475
|
+
name: RECORD_MEMBER_NAME.min(1).regex(/^[a-z0-9][a-z0-9._-]*$/i, "letters/digits/._- , no spaces"),
|
|
473
476
|
/** The gateway's model id, e.g. "deepseek-v4-pro" (what actually goes on the wire). */
|
|
474
477
|
id: z.string().min(1),
|
|
475
478
|
/** Routes the brain in the service (createRoutingBrain by provider): "gateway"/"vllm" → OpenAI brain,
|
|
@@ -489,7 +492,7 @@ export const ModelEntry = z.object({
|
|
|
489
492
|
sealedApiKey: SealedApiKey.optional(),
|
|
490
493
|
/** Price/capability tier — fuels core 1.25 `selectModel({ tier })` role resolution. */
|
|
491
494
|
tier: ModelTier.default("standard"),
|
|
492
|
-
/** Capability bits are THREE-STATE
|
|
495
|
+
/** Capability bits are THREE-STATE: `true` = declared capable, `false` = declared not capable, ABSENT =
|
|
493
496
|
* not declared — the reader applies its own default (the engine reads it through one predicate). This package never fills an
|
|
494
497
|
* absent bit in: reading "not written" as "not capable" is a default only a reader may choose. */
|
|
495
498
|
reasoning: z.boolean().optional(),
|
|
@@ -504,6 +507,19 @@ export const ModelEntry = z.object({
|
|
|
504
507
|
* face's rule for a closed vocabulary, unlike `compat`'s parse-transparent carry. What each value means on the wire is the reading
|
|
505
508
|
* consumer's call; this package only carries the declaration. */
|
|
506
509
|
thinkingLevelMap: ModelThinkingLevelMap.optional(),
|
|
510
|
+
/** This model's own default reasoning level — the engine's `Model.defaultThinking`: the level a request that names none runs at on this model
|
|
511
|
+
* (`off` = the request carries the explicit off, which a default-on gateway needs to stop thinking). One word of {@link MODEL_THINKING_LEVEL_WORDS}
|
|
512
|
+
* — the same table `thinkingLevelMap` is keyed by, not a second copy. Real need: a catalog entry whose gateway thinks by default and whose job
|
|
513
|
+
* (a classifier, a cheap step) does not need it; without this key the declaration is stripped (document face) or the whole entry is dropped
|
|
514
|
+
* (view face) and the deployment has nowhere to say it. THREE-STATE like the capability bits above: ABSENT = not declared (this package never
|
|
515
|
+
* mints the key; the reader's own default applies).
|
|
516
|
+
*
|
|
517
|
+
* **A bad value refuses the WHOLE entry** — a word outside the table (another spelling, another case, surrounding blanks), `null`, a non-string:
|
|
518
|
+
* nothing is stripped, nothing is defaulted, nothing reads as absence (the strict write face refuses the document; the read legs drop the entry
|
|
519
|
+
* with `entry-dropped` / `entry-schema-invalid` under the same cascade as any other bad entry), the same law as `thinkingLevelMap` and
|
|
520
|
+
* `fallbacks`. Whether this model can think at all, and how a level is spelled on its wire, is the reading engine's call; this package only
|
|
521
|
+
* carries the declaration. */
|
|
522
|
+
defaultThinking: z.enum(MODEL_THINKING_LEVEL_WORDS).optional(),
|
|
507
523
|
/** This model's fallback chain — the engine's per-model `fallbacks` (`RunnerDeps.models.<name>.fallbacks`): the names of the catalog entries
|
|
508
524
|
* (or tier words / aliases, which the engine resolves against its own expanded catalog) a call falls back to, in hop order, when this model
|
|
509
525
|
* cannot serve it. THREE-STATE like the capability bits above: ABSENT = not declared (this package never mints the key), `[]` = declared, no
|
|
@@ -518,6 +534,18 @@ export const ModelEntry = z.object({
|
|
|
518
534
|
* in this package would be a second source of the same fact. The chain is FLAT: a hop's own `fallbacks` is not followed (that is how the engine's catalog door reads a chain since core 7.67.0; this package only carries the declaration and does not verify engine behavior). Not an env-leg key: the
|
|
519
535
|
* env leg has no per-member seat in the catalog, so a chain is declared in the catalog document. */
|
|
520
536
|
fallbacks: z.array(z.string().min(1)).optional(),
|
|
537
|
+
/** Whether this model has a fast tier — the engine's `Model.fastMode`: `true` = declared to have one, `false` = declared not to. Real need: a
|
|
538
|
+
* deployment that offers its users a fast-mode switch says here which catalog entries the switch can apply to; without this key the declaration
|
|
539
|
+
* is stripped (document face) or the whole entry is dropped (view face), and the reading engine only ever sees "not declared".
|
|
540
|
+
* THREE-STATE like the capability bits above: ABSENT = not declared (this package never mints the key; the reader's own default applies —
|
|
541
|
+
* `false` is a declaration, not a second spelling of absence).
|
|
542
|
+
*
|
|
543
|
+
* **A bad value refuses the WHOLE entry** — a string, `null`, a number, an array, an object: nothing is stripped, nothing is defaulted, nothing
|
|
544
|
+
* reads as absence (the strict write face refuses the document; the read legs drop the entry with `entry-dropped` / `entry-schema-invalid` under
|
|
545
|
+
* the same cascade as any other bad entry), the same law as `reasoning` / `vision` and as `defaultThinking`, `thinkingLevelMap` and `fallbacks`.
|
|
546
|
+
* Whether this model can actually run fast, and when a request falls back from the fast tier, is the reading engine's call; this package only
|
|
547
|
+
* carries the declaration. */
|
|
548
|
+
fastMode: z.boolean().optional(),
|
|
521
549
|
contextWindow: INTEGER.positive().optional(),
|
|
522
550
|
maxTokens: INTEGER.positive().optional(),
|
|
523
551
|
/** Auto-compaction trigger threshold (tokens) for this model — web-admin 显式下发时本地 FileConfigStore
|
|
@@ -616,7 +644,7 @@ export const RoleTarget = z.union([
|
|
|
616
644
|
]);
|
|
617
645
|
/** 角色 → 目标的图(`models.roles` 与 `rosters[].roles` 同一只)。键不认识 ⇒ zod 的「未知键」句;键里有 12.0.0 退役的角色词 ⇒ 那一句点名
|
|
618
646
|
* 该词与出路(同组别的未知键一并点名)。 */
|
|
619
|
-
const RoleMap =
|
|
647
|
+
const RoleMap = partialRecordOf(ModelRole, RoleTarget, {
|
|
620
648
|
// 枚举键的 record 在运行期以 `unrecognized_keys`(带 `keys`)报未知键,zod 的型面只列了 invalid_type / invalid_key —— 按运行期形读(钉:role-words-12.0.0)。
|
|
621
649
|
error: (iss) => {
|
|
622
650
|
const raw = iss;
|
|
@@ -1085,7 +1113,7 @@ export const EntitlementBudget = z.object({
|
|
|
1085
1113
|
tpmLimit: INTEGER.nonnegative().optional(),
|
|
1086
1114
|
rpmLimit: INTEGER.nonnegative().optional(),
|
|
1087
1115
|
maxParallelRequests: INTEGER.nonnegative().optional(),
|
|
1088
|
-
perModel:
|
|
1116
|
+
perModel: recordOf(z.string(), z.object({ maxBudgetUsd: z.number().finite().nonnegative().optional(), tpmLimit: INTEGER.nonnegative().optional(), rpmLimit: INTEGER.nonnegative().optional() })).optional(),
|
|
1089
1117
|
/** Per-RUN admission gate (agentic-runaway guard, §3.3 🔴) — period budgets can't stop ONE runaway run. */
|
|
1090
1118
|
maxRunCostUsd: z.number().finite().nonnegative().optional(),
|
|
1091
1119
|
maxIterations: INTEGER.positive().optional(),
|
|
@@ -1138,11 +1166,14 @@ export const ScenarioAssignments = z.object({
|
|
|
1138
1166
|
groups: z.array(z.object({ group: z.string().min(1), scenario: z.string().min(1) })).prefault([]),
|
|
1139
1167
|
principals: z.array(z.object({ principal: z.string().min(1), scenario: z.string().min(1) })).prefault([]),
|
|
1140
1168
|
});
|
|
1141
|
-
/**
|
|
1169
|
+
/** The live runtime caps, one field each — the ONE source of the cap set: the type {@link EntitlementRuntimeCaps}, the merge
|
|
1170
|
+
* polarity table {@link RUNTIME_CAP_STRICT} (keyed by that type) and the one caps-object schema (`RuntimeCapsSeat`, below) all read
|
|
1171
|
+
* it. A field record, not an object schema: a caps object is parsed only where it lives — inside an entitlement document
|
|
1172
|
+
* (`EntitlementConfig` / `validateDomain("entitlement", …)`) or on the caps wire (`PrincipalCapsWire`).
|
|
1173
|
+
* Each cap is an org-forced-off runtime ceiling (gate②): ABSENT = no ceiling (local controls); `false` = org-disabled
|
|
1142
1174
|
* fleet-wide. Only ever pushes the "off" ceiling — never force-enables (monotone tighten-only). */
|
|
1143
|
-
|
|
1175
|
+
const RUNTIME_CAP_FIELDS = {
|
|
1144
1176
|
allowBypassPermissions: z.boolean().optional(),
|
|
1145
|
-
allowAutoMode: z.boolean().optional(),
|
|
1146
1177
|
/** Per-principal governance of the workflow/ultracode capability (K-2, 产品拍板 2026-06-28). web-admin treats this as
|
|
1147
1178
|
* the "准不准" axis; the engine separately advertises "能不能" (Capabilities.workflows). The shell enables
|
|
1148
1179
|
* ultracode/workflows iff engine-capable ∧ principal-entitled. Like the others: ABSENT = no ceiling,
|
|
@@ -1174,12 +1205,11 @@ export const EntitlementRuntimeCaps = z.object({
|
|
|
1174
1205
|
* source — never backfill absence into an explicit verdict); `true` = explicitly arm the classifier for this
|
|
1175
1206
|
* principal (a no-op on a deployment without a wired classify leg — the capability gate lives in core);
|
|
1176
1207
|
* `false` = explicit org deny. On compose across bundles `false` (deny) wins — see RUNTIME_CAP_STRICT;
|
|
1177
|
-
* core's `=== true` opt-in check is orthogonal to that merge polarity.
|
|
1178
|
-
*
|
|
1179
|
-
* (
|
|
1180
|
-
*
|
|
1208
|
+
* core's `=== true` opt-in check is orthogonal to that merge polarity. ONE SOURCE (32.0.0): this is the only
|
|
1209
|
+
* key that says the org denies auto mode — `false` here is that deny, for the user-facing auto permission mode and the
|
|
1210
|
+
* classifier leg alike (the former `allowAutoMode: false` meant the same deny and is folded into this key by the
|
|
1211
|
+
* one-time migration; its `true` only meant "no ceiling"). */
|
|
1181
1212
|
autoMode: z.boolean().optional(),
|
|
1182
|
-
allowUltracode: z.boolean().optional(),
|
|
1183
1213
|
/** Per-principal governance of the session memory-capture OPT-OUT — the consumer's `RuntimeCaps.allowMemoryOptOut`
|
|
1184
1214
|
* (design/383 §3.1): may this principal declare `memory.capture: "off"` for a run? `false` = the deployment
|
|
1185
1215
|
* REQUIRES capture for this principal (compliance / knowledge retention) — the declaration is refused, terminal
|
|
@@ -1200,22 +1230,42 @@ export const EntitlementRuntimeCaps = z.object({
|
|
|
1200
1230
|
* here `true` is the STRICT/tightening value (forcing the gate ON), so it wins on compose — see RUNTIME_CAP_STRICT.
|
|
1201
1231
|
* ABSENT = no fleet override (local/default resolution decides). Server-side enforcement = core's per-principal axis. */
|
|
1202
1232
|
forceDurableGate: z.boolean().optional(),
|
|
1203
|
-
}
|
|
1233
|
+
};
|
|
1204
1234
|
/** The STRICT (tightening) value per RuntimeCap — the value that WINS on compose (monotone tighten-only). The
|
|
1205
1235
|
* `allow*` ceilings tighten toward `false` (disabled wins); `forceDurableGate` tightens toward `true` (forced
|
|
1206
1236
|
* wins). Single source for the merge polarity so resolvers don't hardcode it. `Record<keyof …>` = a new cap
|
|
1207
|
-
* without an entry is a COMPILE error (no silent wrong-direction merge)
|
|
1237
|
+
* without an entry is a COMPILE error (no silent wrong-direction merge) — so its keys are also the cap list: iterate
|
|
1238
|
+
* `Object.keys(RUNTIME_CAP_STRICT)` to visit every live cap. */
|
|
1208
1239
|
export const RUNTIME_CAP_STRICT = deepFreeze({
|
|
1209
1240
|
allowBypassPermissions: false,
|
|
1210
|
-
allowAutoMode: false,
|
|
1211
1241
|
allowWorkflows: false,
|
|
1212
1242
|
allowFork: false,
|
|
1213
1243
|
allowObservers: false,
|
|
1214
1244
|
autoMode: false,
|
|
1215
|
-
allowUltracode: false,
|
|
1216
1245
|
allowMemoryOptOut: false,
|
|
1217
1246
|
forceDurableGate: true,
|
|
1218
1247
|
});
|
|
1248
|
+
/** 32.0.0 删去的两只能力位的墓碑形(拒句经 `retiredFormSentence` 铸,点名改写存量的一次性迁移)。 */
|
|
1249
|
+
const RUNTIME_CAP_AUTO_MODE_RETIRED = {
|
|
1250
|
+
retiredIn: "32.0.0",
|
|
1251
|
+
migration: "SS-M14",
|
|
1252
|
+
now: "runtimeCaps.autoMode (false = the org denies auto mode; the old key's true only meant no ceiling and has no counterpart)",
|
|
1253
|
+
};
|
|
1254
|
+
const RUNTIME_CAP_ULTRACODE_RETIRED = {
|
|
1255
|
+
retiredIn: "32.0.0",
|
|
1256
|
+
migration: "SS-M14",
|
|
1257
|
+
now: "nothing — no consumer ever enforced it; delete the key",
|
|
1258
|
+
};
|
|
1259
|
+
/**
|
|
1260
|
+
* 能力位对象的**唯一一只 schema**:现行字段({@link RUNTIME_CAP_FIELDS})+ 两只旧键原位的墓碑(在场即拒,任何值)。存着或带着能力位对象的三处都挂这一只 ——
|
|
1261
|
+
* 权益档位的 `runtimeCaps`、全员缺省的 `runtimeCaps`、caps wire 的 `runtimeCaps`(wire 那一处在它上面再开放世界)。
|
|
1262
|
+
* 墓碑不能省:能力位对象默认剥未知键(存储两座)、wire 座带未知键原样过,只删键 ⇒ 存量 / 在途的 `allowAutoMode: false` 静默失效(组织的 auto 拒位没了)。
|
|
1263
|
+
*/
|
|
1264
|
+
const RuntimeCapsSeat = z.object({
|
|
1265
|
+
...RUNTIME_CAP_FIELDS,
|
|
1266
|
+
allowAutoMode: retiredKey("runtimeCaps.allowAutoMode", RUNTIME_CAP_AUTO_MODE_RETIRED),
|
|
1267
|
+
allowUltracode: retiredKey("runtimeCaps.allowUltracode", RUNTIME_CAP_ULTRACODE_RETIRED),
|
|
1268
|
+
});
|
|
1219
1269
|
/** A named entitlement bundle (a `tier`, or a composable `role`). Bind a `roster` to inherit its model/skill/mcp
|
|
1220
1270
|
* visibility for free; explicit allowlists intersect on top. Edit a tier once → re-prices everyone on it. */
|
|
1221
1271
|
export const EntitlementTier = z.object({
|
|
@@ -1228,12 +1278,12 @@ export const EntitlementTier = z.object({
|
|
|
1228
1278
|
* "no constraint on this axis" semantics as visibleMcp (deny-wins on intersection; C2, additive 0.5.0). */
|
|
1229
1279
|
visiblePlugins: z.array(z.string()).optional(),
|
|
1230
1280
|
budget: EntitlementBudget.optional(),
|
|
1231
|
-
runtimeCaps:
|
|
1281
|
+
runtimeCaps: RuntimeCapsSeat.optional(),
|
|
1232
1282
|
/** design/170 件A(additive 0.15.0):org 记忆授权束——`org:` scope 键 → 授予(`write` 缺席=只读)。
|
|
1233
1283
|
* 挂 bundle 与 visibleSkills 同轴:tier ⊕ roles 跨束**并集**(write:true 在并集中胜出——多束=更多
|
|
1234
1284
|
* 访问,「展开」轴)。刻意**不挂 defaults**:全员默认 org 授权恰是准入面要防的形;要全员授,建显式
|
|
1235
1285
|
* tier。键形状门=`org:` 前缀(严校验单一真源在 core 的 v2 scope 契约,此处只拦挂错轴的类别错误)。 */
|
|
1236
|
-
orgMemory:
|
|
1286
|
+
orgMemory: recordOf(z.string().regex(/^org:\S+$/, "orgMemory key must be an `org:` scope string"), z.object({ write: z.boolean().optional() }).strict()).optional(),
|
|
1237
1287
|
/** 🔴 B1 违宪修复(EXPERT-REDESIGN §4-1):tokenQuota **不挂 tier** —— 只挂 defaults/subject/groupBinding。
|
|
1238
1288
|
* fail-loud 而非 zod 默认的静默剥除(admin 挂上去以为生效才是最糟的)。 */
|
|
1239
1289
|
tokenQuota: z
|
|
@@ -1293,7 +1343,7 @@ export const EntitlementConfig = z
|
|
|
1293
1343
|
* can only TIGHTEN further (monotone), never re-loosen the default. Leave unset for per-tier-only control. */
|
|
1294
1344
|
defaults: z
|
|
1295
1345
|
.object({
|
|
1296
|
-
runtimeCaps:
|
|
1346
|
+
runtimeCaps: RuntimeCapsSeat.optional(),
|
|
1297
1347
|
budget: EntitlementBudget.optional(),
|
|
1298
1348
|
/** 全局默认 token 双窗额度(最不具体层——被组/用户层压过)。 */
|
|
1299
1349
|
tokenQuota: TokenQuota.optional(),
|
|
@@ -1352,7 +1402,7 @@ export const EntitlementConfig = z
|
|
|
1352
1402
|
export const PrincipalOrgMemoryWire = z
|
|
1353
1403
|
.object({
|
|
1354
1404
|
gen: INTEGER.nonnegative(),
|
|
1355
|
-
scopes:
|
|
1405
|
+
scopes: recordOf(z.string().regex(/^org:\S+$/, "orgMemory scope must be an `org:` scope string"), z.object({ write: z.boolean().optional() }).strict()),
|
|
1356
1406
|
})
|
|
1357
1407
|
.strict();
|
|
1358
1408
|
/** `?principal=` caps wire **整体**的读边界 schema(web-admin 铸、server 消费同源锚;产品令 2026-08-05:
|
|
@@ -1360,7 +1410,8 @@ export const PrincipalOrgMemoryWire = z
|
|
|
1360
1410
|
* 显式保持宽读(每面注明所依裁定),不许硬转严:
|
|
1361
1411
|
* - `runtimeCaps`/`budget`(治理面,fail-closed):严格校验已知键 + **passthrough 未知键**——新 web-admin
|
|
1362
1412
|
* 的新 cap 键必须原样透传给 core(老 server 剥键=静默放松治理);值漂移 ⇒ 整体 parse 失败 ⇒ 消费端
|
|
1363
|
-
* fail-close(「outage 绝不静默 GRANT」的既裁方向)
|
|
1413
|
+
* fail-close(「outage 绝不静默 GRANT」的既裁方向)。`runtimeCaps` 上 32.0.0 删去的两只旧键(`allowAutoMode` /
|
|
1414
|
+
* `allowUltracode`)不是未知键:它们原位是墓碑,在场即拒(拒句点名迁移)—— 当未知键透传,读七键的消费方就不再读那只拒位。
|
|
1364
1415
|
* - `scenario`/`allowlist`/`execution`(能力面,fail-open,[565]/[580] 裁定):保持 `unknown` 宽读,
|
|
1365
1416
|
* 归一与 drift 审计诊断在消费端(schema 无法产出 executionDrift 诊断串,且整体拒会把 fail-open
|
|
1366
1417
|
* 面错翻成 fail-closed)。
|
|
@@ -1374,7 +1425,7 @@ export const PrincipalCapsWire = z
|
|
|
1374
1425
|
principal: z.string().optional(),
|
|
1375
1426
|
worker: z.string().nullable().optional(),
|
|
1376
1427
|
configured: z.boolean().optional(),
|
|
1377
|
-
runtimeCaps:
|
|
1428
|
+
runtimeCaps: RuntimeCapsSeat.passthrough().nullable().optional(),
|
|
1378
1429
|
budget: EntitlementBudget.passthrough().nullable().optional(),
|
|
1379
1430
|
scenario: z.unknown().optional(),
|
|
1380
1431
|
allowlist: z.unknown().optional(),
|
|
@@ -1596,7 +1647,7 @@ export const ProjectsConfig = z
|
|
|
1596
1647
|
.object({
|
|
1597
1648
|
/** 键=projectId({@link PROJECT_ID_REGEX},generic lowercase UUID——宽读);tenant 半边=web-admin
|
|
1598
1649
|
* scope 轴(不进域文档,见域头注)。 */
|
|
1599
|
-
projects:
|
|
1650
|
+
projects: recordOf(z.string().regex(PROJECT_ID_REGEX, "projectId must be a lowercase canonical UUID"), ProjectRegistration).prefault({}),
|
|
1600
1651
|
})
|
|
1601
1652
|
.superRefine(remoteUniquenessIssues);
|
|
1602
1653
|
/** The PATCH form of one registration: every key a PATCH may change, all optional; `registeredBy` / `registeredAt` / `contentAttestedAt` (and any key
|
|
@@ -1896,11 +1947,40 @@ const nonSecretLiteral = (minLength) => z
|
|
|
1896
1947
|
.max(2048)
|
|
1897
1948
|
.refine((s) => !containsSecretToken(s), buildQuotedIssue `looks like a literal secret — a credential goes in a secretRefs field as an env-NAME, never a value here`);
|
|
1898
1949
|
/**
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
1950
|
+
* 可信代理名单一个坏项的拒因片语(进写闸拒句「found:」那一段,整段是定文):**只有位置数与闭集拒因词** —— 参数的型就是这条不变式(`item` / `of` 是数,
|
|
1951
|
+
* `flaw` 是拒因闭集的型),名单项的文本(配置里的值)没有参数可进来。逐项的结构化读数是判官交的那一份(`readDeviceTrustedProxyCidrs` 的 `items`),
|
|
1952
|
+
* 这里只是它的定词渲染。
|
|
1953
|
+
*/
|
|
1954
|
+
function cidrItemFlawPhrase(item, of, flaw) {
|
|
1955
|
+
return `item ${item} of ${of}: ${flaw}`;
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* 有文法的车道坐标 → 它的值判官(16.0.0 起;三行,都在 device 车道)。判的是**在场**的值 —— 必需坐标的空白先归必需栏那一句(所有车道同一只);可选坐标的值整串交判官,
|
|
1959
|
+
* 判官自己说哪个拼法是未设(两只可选坐标都只认空串)。判官是唯一的那一只(写闸与管理面表单同读;`DEVICE_RELAY_URL` 的引擎起服也读同一只,两只可选坐标的引擎起服改读它是服务端提货本包这一版那一步的事);这里只把它的读数折成拒因短语(定词,不回显值),规则句随行。
|
|
1960
|
+
* 键都在车道表的非密坐标栏里(`test/device-relay-16.0.0.test.ts` / `test/device-lane-knobs-32.0.0.test.ts` 钉 device 那一行)。
|
|
1901
1961
|
*/
|
|
1902
1962
|
const COORDINATE_VALUE_GRAMMAR = new Map([
|
|
1903
1963
|
["DEVICE_RELAY_URL", { flaws: deviceRelayFlaws, rule: DEVICE_RELAY_RULE }],
|
|
1964
|
+
[
|
|
1965
|
+
"DEVICE_MAX_PREAUTH_PER_REMOTE",
|
|
1966
|
+
{
|
|
1967
|
+
flaws: (value) => {
|
|
1968
|
+
const r = readDeviceMaxPreAuthPerRemote(value);
|
|
1969
|
+
return r.ok ? [] : [r.flaw];
|
|
1970
|
+
},
|
|
1971
|
+
rule: DEVICE_MAX_PREAUTH_PER_REMOTE_RULE,
|
|
1972
|
+
},
|
|
1973
|
+
],
|
|
1974
|
+
[
|
|
1975
|
+
"DEVICE_TRUSTED_PROXY_CIDRS",
|
|
1976
|
+
{
|
|
1977
|
+
flaws: (value) => {
|
|
1978
|
+
const r = readDeviceTrustedProxyCidrs(value);
|
|
1979
|
+
return r.ok ? [] : r.items.map((i) => cidrItemFlawPhrase(i.item, i.of, i.flaw));
|
|
1980
|
+
},
|
|
1981
|
+
rule: DEVICE_TRUSTED_PROXY_CIDRS_RULE,
|
|
1982
|
+
},
|
|
1983
|
+
],
|
|
1904
1984
|
]);
|
|
1905
1985
|
/** 车道集缺席 / 为空时的那一句(块在而缺 `lanes`、`lanes` 是空表,与 enabled 的 worker 根本没有车道块,同一句)。规则句取判官的 {@link LANE_SET_RULE}。 */
|
|
1906
1986
|
const LANES_REQUIRED = `runtime.execution.lanes ${LANE_SET_RULE}`;
|
|
@@ -1952,38 +2032,17 @@ function addLaneSetIssue(ctx, lanes, flaw) {
|
|
|
1952
2032
|
}
|
|
1953
2033
|
}
|
|
1954
2034
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
* 经读内核 `ownEntriesOf` 的严归类读名:每个自有串键都读到名字,不调 getter),一条就使集合判不过、record 不再判;再交给 `record`。
|
|
1958
|
-
* zod 的 record 读键前先跳过 `__proto__`(不判它的值、输出里也没有它),只靠 record 判会把「带着一条被剥掉的引用」读成「没有那条引用」,条目带着其余引用活下来。
|
|
1959
|
-
* 只判朴素对象(形状问座位 `isPlainJsonObject`;别的形由 `record` 自己拒,拒句不变);成员名读不出(隐藏键 / 访问器 / 陷阱抛)⇒ 同样判坏,句子是内核那一句(fail-closed:守卫看不清名字就不担保)。
|
|
1960
|
-
* 每一只成员都由它铸,所以成员复用到哪个座位,这道判据就跟到哪个座位。凭据引用集合的值是 env-NAME 串 —— 一组值,不是一组条目:逐条抢救不下钻它
|
|
1961
|
-
* (值名单律,见 `salvageEntries`),坏一项 ⇒ 它所属的那一条条目整条判不过。
|
|
1962
|
-
*/
|
|
1963
|
-
function credentialRefs(record) {
|
|
1964
|
-
return z.preprocess((input, ctx) => {
|
|
1965
|
-
if (!isPlainJsonObject(input))
|
|
1966
|
-
return input;
|
|
1967
|
-
const members = ownEntriesOf(input);
|
|
1968
|
-
if (!members.ok) {
|
|
1969
|
-
ctx.addIssue({ code: "custom", input, ...buildQuotedIssue `${fixed(members.sentence)}` });
|
|
1970
|
-
return input;
|
|
1971
|
-
}
|
|
1972
|
-
for (const [name] of members.value)
|
|
1973
|
-
if (isReservedMemberName(name))
|
|
1974
|
-
ctx.addIssue({ code: "custom", input, ...buildQuotedIssue `a credential reference is named "${fixed(name)}" — a reserved member name (${fixed(RESERVED_MEMBER_NAMES.join(" | "))}) never names a reference; rename it` });
|
|
1975
|
-
return input;
|
|
1976
|
-
}, record);
|
|
1977
|
-
}
|
|
2035
|
+
// 凭据引用集合(名 → 宿主 env-NAME)是普通的记录座位(`./record-seat`:成员按自有属性名读,保留成员名 ⇒ 座位拒 —— 与包里每一只记录同一只守卫、同一句、同一个词)。
|
|
2036
|
+
// 它的值是 env-NAME 串 —— 一组值,不是一组条目:逐条抢救不下钻它(值名单律,见 `salvageEntries`),坏一项 ⇒ 它所属的那一条条目整条判不过。
|
|
1978
2037
|
/** 车道块的密钥引用(服务变量名 → 宿主 env-NAME)—— 凭据引用集合(值集合:不逐项抢救)。 */
|
|
1979
|
-
const LaneSecretRefs =
|
|
2038
|
+
const LaneSecretRefs = recordOf(ENV_NAME, ENV_NAME);
|
|
1980
2039
|
/** worker 的密钥 env 透传(服务变量名 → 宿主 env-NAME)—— 凭据引用集合(值集合:不逐项抢救)。 */
|
|
1981
|
-
const WorkerSecretEnv =
|
|
2040
|
+
const WorkerSecretEnv = recordOf(ENV_NAME, ENV_NAME).superRefine((rec, ctx) => {
|
|
1982
2041
|
retiredEnvIssue(rec, ctx);
|
|
1983
2042
|
for (const k of Object.keys(rec))
|
|
1984
2043
|
if (RESERVED_WORKER_ENV.has(k))
|
|
1985
2044
|
ctx.addIssue({ code: "custom", ...reservedKeyIssue("secretEnv", k) });
|
|
1986
|
-
})
|
|
2045
|
+
});
|
|
1987
2046
|
/** 一项是不是可声明的车道词(只给下面的变换收窄类型用:判官放行之后每一项都是)。 */
|
|
1988
2047
|
const isDeclarableLane = (v) => EXECUTION_LANE_WORDS.some((w) => w === v);
|
|
1989
2048
|
/** 列表的一次快照(长度只读一次,空洞读成 `undefined`):判官判的与变换收窄的是同一份项,不对调用方的数组读第二遍。不是列表 ⇒ 原样(下面的判据拒)。 */
|
|
@@ -2024,7 +2083,7 @@ const ExecutionBlock = z
|
|
|
2024
2083
|
.object({
|
|
2025
2084
|
lane: retiredKey("runtime.execution.lane", { retiredIn: "16.0.0", now: "runtime.execution.lanes (an ordered lane set; the first one is the default)", migration: "SS-M12" }),
|
|
2026
2085
|
lanes: DeclaredLanes,
|
|
2027
|
-
coords:
|
|
2086
|
+
coords: recordOf(ENV_NAME, nonSecretLiteral(0)).prefault({}),
|
|
2028
2087
|
secretRefs: LaneSecretRefs.prefault({}),
|
|
2029
2088
|
})
|
|
2030
2089
|
.superRefine((x, ctx) => {
|
|
@@ -2057,9 +2116,9 @@ const ExecutionBlock = z
|
|
|
2057
2116
|
if (!judgeKey("coords", key))
|
|
2058
2117
|
continue;
|
|
2059
2118
|
const owner = LANE_ENV_OWNER.get(key);
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2119
|
+
// 必需坐标:空白 = 缺(所有车道一句,不再问文法)。有文法的坐标:在场的值只问它的判官 —— 判官自己说哪个拼法是未设(可选坐标的空白因此不在这里放过)。
|
|
2120
|
+
if (owner?.required === true && isBlankCoordinate(value)) {
|
|
2121
|
+
issue("coords", key, buildQuotedIssue `required coordinate ${key} of lane "${fixed(owner.lane)}" is empty or whitespace-only — it counts as absent, and the engine refuses to start without it`);
|
|
2063
2122
|
continue;
|
|
2064
2123
|
}
|
|
2065
2124
|
const grammar = COORDINATE_VALUE_GRAMMAR.get(key);
|
|
@@ -2116,8 +2175,9 @@ const StoreBlock = z.object({
|
|
|
2116
2175
|
.optional(),
|
|
2117
2176
|
});
|
|
2118
2177
|
/** 一台 worker 的名字(唯一 → 容器名 / compose project / 缺省路由键)—— **唯一**的名字判据。web-admin 在租约 / 用量 /
|
|
2119
|
-
* discovery `?worker=` 等面上校验外部传来的 worker 名时读它(不抄窄正则)
|
|
2120
|
-
|
|
2178
|
+
* discovery `?worker=` 等面上校验外部传来的 worker 名时读它(不抄窄正则)。它作记录座位的键(`prompts.workers`),所以从
|
|
2179
|
+
* {@link RECORD_MEMBER_NAME} 起步:`constructor` / `prototype` 在建名的这一刻就拒,句子是记录读器那一句。 */
|
|
2180
|
+
export const WORKER_NAME = RECORD_MEMBER_NAME.min(1).regex(/^[a-z0-9][a-z0-9-]*$/, "lowercase letters/digits/-, no spaces");
|
|
2121
2181
|
const WorkerSpecObject = z.object({
|
|
2122
2182
|
/** 唯一 → 容器名 / compose project. */
|
|
2123
2183
|
name: WORKER_NAME,
|
|
@@ -2216,8 +2276,7 @@ const WorkerSpecObject = z.object({
|
|
|
2216
2276
|
* secret 名…)被拒,防 env 改路由/关鉴权/遮蔽密钥(council);墓碑表 `RETIRED_ENVS` 里的旧名被拒(引擎见之拒启;空串 = 未设,同引擎)。
|
|
2217
2277
|
* 可覆盖非保留键(如 LOG_LEVEL)。hash-included(改它重建)。
|
|
2218
2278
|
*/
|
|
2219
|
-
env: z
|
|
2220
|
-
.record(ENV_NAME, z.string().max(2048))
|
|
2279
|
+
env: recordOf(ENV_NAME, z.string().max(2048))
|
|
2221
2280
|
.superRefine((rec, ctx) => {
|
|
2222
2281
|
retiredEnvIssue(rec, ctx);
|
|
2223
2282
|
for (const [k, v] of Object.entries(rec)) {
|
|
@@ -2556,19 +2615,19 @@ export const SkillsManifestSchema = skillsDocument(SkillSpec.omit({ content: tru
|
|
|
2556
2615
|
// env-NAME references (`envRefs`/`headerRefs`: target-key → an ENV_NAME in the SERVICE's env). The service's
|
|
2557
2616
|
// `resolveSpec` reads the real values from its own environment — this DB never holds a credential. Like
|
|
2558
2617
|
// skills, MCP is applied at boot/reconcile (not hot) and writing is gated to `publisher` + the publish gate.
|
|
2559
|
-
const McpEnvRefs =
|
|
2618
|
+
const McpEnvRefs = recordOf(ENV_NAME, ENV_NAME); // target ENV key → ENV_NAME holding its value (both env-name-shaped)
|
|
2560
2619
|
// An HTTP header NAME: an RFC 7230 token that ALSO must not be a secret literal. A secret-SHAPED header name
|
|
2561
2620
|
// (a headerRefs key `sk-live-…`, or principalHeader `ghp_…`) is stored + shipped verbatim on /effective — the
|
|
2562
2621
|
// SAME invariant-① gap as worker.env / model.extraBody / mcp stdio command+args (credentials belong on the
|
|
2563
2622
|
// VALUE side = an env-NAME ref, never the name). The token charset includes `%`, so an encoded secret could ride
|
|
2564
2623
|
// the name — containsSecretToken percent-decodes, catching it too. ONE shared schema for every header-name field
|
|
2565
|
-
// (headerRefs keys, principalHeader). R19.
|
|
2566
|
-
|
|
2567
|
-
|
|
2624
|
+
// (headerRefs keys, principalHeader). R19. A header name keys a record seat (headerRefs), so it starts from RECORD_MEMBER_NAME:
|
|
2625
|
+
// `__proto__` / `constructor` / `prototype` are refused for principalHeader too, with the record reader's sentence (32.0.0).
|
|
2626
|
+
const HTTP_HEADER_NAME = RECORD_MEMBER_NAME
|
|
2568
2627
|
.regex(/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/, "must be an HTTP header NAME")
|
|
2569
2628
|
.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`);
|
|
2570
2629
|
// Header NAME → ENV_NAME holding its value. Header names are tokens (RFC 7230) — not env-name-shaped.
|
|
2571
|
-
const McpHeaderRefs =
|
|
2630
|
+
const McpHeaderRefs = recordOf(HTTP_HEADER_NAME, ENV_NAME);
|
|
2572
2631
|
/** The retired `transport.assertionHeader` (29.0.0): one tombstone sentence for every face. */
|
|
2573
2632
|
const MCP_ASSERTION_HEADER_RETIRED = {
|
|
2574
2633
|
retiredIn: "29.0.0",
|
|
@@ -2843,8 +2902,8 @@ export const PROMPT_BINDING_LIST_MAX = 64;
|
|
|
2843
2902
|
const PROMPT_OVERLAY_ID_MAX_CHARS = 128;
|
|
2844
2903
|
const isNonBlank = (s) => s.trim() !== "";
|
|
2845
2904
|
/** 引擎字符界的同一把尺:按 Unicode 码点量(一个非 BMP 字符算一个),与引擎 `codePointsOver` 同答 —— binding 名 / `evidence.intent` / 每条 ref / `sourceRevision` 四处共用。
|
|
2846
|
-
* 不用 zod 的 `.max()`:它的单位随 zod 版本变(低端量 UTF-16 码元、高端量码点;版本界与实测见 CHANGELOG 14.0.0 B4
|
|
2847
|
-
*
|
|
2905
|
+
* 不用 zod 的 `.max()`:它的单位随 zod 版本变(低端量 UTF-16 码元、高端量码点;版本界与实测见 CHANGELOG 14.0.0 B4;本包声明的 zod 区间此前两端都在,32.0.0 起下界抬到 4.6.3、低端已出范围)——
|
|
2906
|
+
* 此前宿主解析到哪一版 zod,镜像对非 BMP 字符的答案就跟着变,比引擎窄一步就破「引擎收的,本包必收」。镜像自带这把尺,答案不随 zod 版本动。
|
|
2848
2907
|
* 码元数 ≤ max ⇒ 码点数 ≤ max;码元数 > 2·max ⇒ 码点数 > max;只有夹在中间的才逐点数(不整串拷贝)。 */
|
|
2849
2908
|
const withinCodePoints = (max) => (s) => {
|
|
2850
2909
|
if (s.length <= max)
|
|
@@ -2878,7 +2937,7 @@ export const PromptOverlayWhen = z
|
|
|
2878
2937
|
.object({
|
|
2879
2938
|
traits: z.object({ allOf: z.array(z.string()).optional(), noneOf: z.array(z.string()).optional() }).strict().optional(),
|
|
2880
2939
|
host: z.object({ role: z.string().optional(), form: z.string().optional() }).strict().optional(),
|
|
2881
|
-
facts:
|
|
2940
|
+
facts: recordOf(z.string(), z.boolean()).optional(),
|
|
2882
2941
|
binding: PromptBindingCondition.optional(),
|
|
2883
2942
|
})
|
|
2884
2943
|
.strict();
|
|
@@ -2963,7 +3022,7 @@ export const PromptsConfig = z.object({
|
|
|
2963
3022
|
/** 每台 worker 都组装的中心层(`workers` 点名的那台除外)。缺席 = 不管提示词(引擎内置)。 */
|
|
2964
3023
|
artifact: PromptArtifact.optional(),
|
|
2965
3024
|
/** 按 worker 的中心层:点名的 worker 组装这一份,**整份取代** `artifact`(不叠加;覆盖语义只在编出它的那一处)。键 = worker 名(唯一的 worker 名判据)。 */
|
|
2966
|
-
workers:
|
|
3025
|
+
workers: recordOf(WORKER_NAME, PromptArtifact).optional(),
|
|
2967
3026
|
bindings: retiredKey("prompts.bindings", PROMPTS_AXES_RETIRED),
|
|
2968
3027
|
catalog: retiredKey("prompts.catalog", PROMPTS_AXES_RETIRED),
|
|
2969
3028
|
});
|
package/docs/API-SURFACE.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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` 不是模块,不列),导出名合计 1613 个(同名在多条子路径上各计一次)。
|
|
8
8
|
|
|
9
|
-
## `.`(
|
|
9
|
+
## `.`(865)
|
|
10
10
|
|
|
11
11
|
- `A2aConfig` — value+type
|
|
12
12
|
- `A2aPeerSpec` — value+type
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
- `CENTER_REF_FAULTS` — value
|
|
41
41
|
- `COMMAND_DECISIONS` — value
|
|
42
42
|
- `CONFIG_CHANGE_SOURCES` — value
|
|
43
|
+
- `CONFIG_DOCUMENT_IO_KINDS` — value
|
|
43
44
|
- `CONFIG_DOCUMENT_REFUSAL_REASONS` — value
|
|
44
45
|
- `CONFIG_ROOT_DOCUMENTS` — value
|
|
45
46
|
- `CONNECTOR_AUTHORIZE_QUERY` — value
|
|
@@ -71,6 +72,7 @@
|
|
|
71
72
|
- `CommandHookEntry` — value+type
|
|
72
73
|
- `ConfigChange` — type
|
|
73
74
|
- `ConfigChangeHookInput` — value
|
|
75
|
+
- `ConfigDocumentIoKind` — type
|
|
74
76
|
- `ConfigDocumentName` — type
|
|
75
77
|
- `ConfigDocumentRefusal` — type
|
|
76
78
|
- `ConfigDocumentRefusalReason` — type
|
|
@@ -103,9 +105,12 @@
|
|
|
103
105
|
- `DEVICE_AUTH_STATUSES` — value
|
|
104
106
|
- `DEVICE_CODE_TTL_SECONDS` — value
|
|
105
107
|
- `DEVICE_GRANT_TYPE` — value
|
|
108
|
+
- `DEVICE_MAX_PREAUTH_PER_REMOTE_FLAWS` — value
|
|
109
|
+
- `DEVICE_MAX_PREAUTH_PER_REMOTE_RULE` — value
|
|
106
110
|
- `DEVICE_POLL_INTERVAL_SECONDS` — value
|
|
107
111
|
- `DEVICE_RELAY_NONE` — value
|
|
108
112
|
- `DEVICE_RELAY_RULE` — value
|
|
113
|
+
- `DEVICE_TRUSTED_PROXY_CIDRS_RULE` — value
|
|
109
114
|
- `DIALOG_EXPIRY_DEFAULT` — value
|
|
110
115
|
- `DIALOG_EXPIRY_VALUES` — value
|
|
111
116
|
- `DIAL_ADDRESS_URL_FORBIDDEN_PARTS` — value
|
|
@@ -130,6 +135,8 @@
|
|
|
130
135
|
- `DeviceAuthStatus` — type
|
|
131
136
|
- `DeviceCodeRequest` — value+type
|
|
132
137
|
- `DeviceCodeResponse` — value+type
|
|
138
|
+
- `DeviceMaxPreAuthPerRemoteFlaw` — type
|
|
139
|
+
- `DeviceMaxPreAuthPerRemoteReading` — type
|
|
133
140
|
- `DeviceTokenRequest` — value+type
|
|
134
141
|
- `DialogExpirySetting` — value
|
|
135
142
|
- `DialogExpirySettingValue` — type
|
|
@@ -141,6 +148,7 @@
|
|
|
141
148
|
- `DomainConfig` — type
|
|
142
149
|
- `DomainFieldWriteRoles` — type
|
|
143
150
|
- `DomainName` — type
|
|
151
|
+
- `DomainReadRefusedError` — value+type
|
|
144
152
|
- `DrainPhase` — type
|
|
145
153
|
- `DrainReceipt` — value+type
|
|
146
154
|
- `DrainReceiptState` — value+type
|
|
@@ -174,7 +182,7 @@
|
|
|
174
182
|
- `EntitlementConfig` — value+type
|
|
175
183
|
- `EntitlementGroupBinding` — value+type
|
|
176
184
|
- `EntitlementOverride` — value+type
|
|
177
|
-
- `EntitlementRuntimeCaps` —
|
|
185
|
+
- `EntitlementRuntimeCaps` — type
|
|
178
186
|
- `EntitlementSubject` — value+type
|
|
179
187
|
- `EntitlementTier` — value+type
|
|
180
188
|
- `EntryKeptIndex` — type
|
|
@@ -599,6 +607,7 @@
|
|
|
599
607
|
- `TIGHTEN_VERDICTS` — value
|
|
600
608
|
- `TOKEN_SCOPE_REFUSALS` — value
|
|
601
609
|
- `TOOL_WIRE_NAME_MAX_CHARS` — value
|
|
610
|
+
- `TRUSTED_PROXY_CIDR_FLAWS` — value
|
|
602
611
|
- `TaskCompletedHookInput` — value
|
|
603
612
|
- `TaskCreatedHookInput` — value
|
|
604
613
|
- `TeammateIdleHookInput` — value
|
|
@@ -612,6 +621,10 @@
|
|
|
612
621
|
- `TokenQuota` — value+type
|
|
613
622
|
- `TokenRefreshRequest` — value+type
|
|
614
623
|
- `TokenScopeRefusal` — type
|
|
624
|
+
- `TrustedProxyCidr` — type
|
|
625
|
+
- `TrustedProxyCidrFlaw` — type
|
|
626
|
+
- `TrustedProxyCidrItemFlaw` — type
|
|
627
|
+
- `TrustedProxyCidrsReading` — type
|
|
615
628
|
- `UI_LANGUAGE_SETTING` — value
|
|
616
629
|
- `UI_LANGUAGE_VALUES` — value
|
|
617
630
|
- `URL_CREDENTIAL_REASONS` — value
|
|
@@ -719,6 +732,7 @@
|
|
|
719
732
|
- `httpUrlFlaws` — value
|
|
720
733
|
- `httpUrlRule` — value
|
|
721
734
|
- `interpolateHookEnvVars` — value
|
|
735
|
+
- `ipFamilyOf` — value
|
|
722
736
|
- `isAbsoluteHostPath` — value
|
|
723
737
|
- `isAtLeast` — value
|
|
724
738
|
- `isBlankCoordinate` — value
|
|
@@ -787,12 +801,15 @@
|
|
|
787
801
|
- `promptArtifactFor` — value
|
|
788
802
|
- `readCapabilityReading` — value
|
|
789
803
|
- `readCrossSessionInbound` — value
|
|
804
|
+
- `readDeviceMaxPreAuthPerRemote` — value
|
|
805
|
+
- `readDeviceTrustedProxyCidrs` — value
|
|
790
806
|
- `readDialogExpiry` — value
|
|
791
807
|
- `readDrainReceipt` — value
|
|
792
808
|
- `readDrainRequest` — value
|
|
793
809
|
- `readEffectiveWire` — value
|
|
794
810
|
- `readEngineSignal` — value
|
|
795
811
|
- `readEnvModelSlots` — value
|
|
812
|
+
- `readHookPluginOptionRef` — value
|
|
796
813
|
- `readHttpHookAllowlistLayer` — value
|
|
797
814
|
- `readModelRefusals` — value
|
|
798
815
|
- `readPlainStringRecord` — value
|
|
@@ -895,7 +912,7 @@
|
|
|
895
912
|
- `EntitlementConfig` — value+type
|
|
896
913
|
- `EntitlementGroupBinding` — value+type
|
|
897
914
|
- `EntitlementOverride` — value+type
|
|
898
|
-
- `EntitlementRuntimeCaps` —
|
|
915
|
+
- `EntitlementRuntimeCaps` — type
|
|
899
916
|
- `EntitlementSubject` — value+type
|
|
900
917
|
- `EntitlementTier` — value+type
|
|
901
918
|
- `ExecutionPolicy` — value+type
|
|
@@ -1078,7 +1095,7 @@
|
|
|
1078
1095
|
- `resolveEffectiveForWorker` — value
|
|
1079
1096
|
- `rosterMarkerRoles` — value
|
|
1080
1097
|
|
|
1081
|
-
## `./config-fns`(
|
|
1098
|
+
## `./config-fns`(58)
|
|
1082
1099
|
|
|
1083
1100
|
- `ANY_INDEX` — value
|
|
1084
1101
|
- `ApprovePublishResult` — type
|
|
@@ -1092,6 +1109,7 @@
|
|
|
1092
1109
|
- `DOMAIN_WRITE_ROLE` — value
|
|
1093
1110
|
- `DROPPED_ENTRY_REASON_CODES` — value
|
|
1094
1111
|
- `DomainFieldWriteRoles` — type
|
|
1112
|
+
- `DomainReadRefusedError` — value+type
|
|
1095
1113
|
- `DroppedEntry` — type
|
|
1096
1114
|
- `DroppedEntryIdentity` — type
|
|
1097
1115
|
- `DroppedEntryReasonCode` — type
|
|
@@ -1358,7 +1376,7 @@
|
|
|
1358
1376
|
- `parseSchedulerStore` — value
|
|
1359
1377
|
- `serializeSchedulerStore` — value
|
|
1360
1378
|
|
|
1361
|
-
## `./hooks`(
|
|
1379
|
+
## `./hooks`(121)
|
|
1362
1380
|
|
|
1363
1381
|
- `AgentHookEntry` — value+type
|
|
1364
1382
|
- `AssistantTurnError` — value+type
|
|
@@ -1479,6 +1497,7 @@
|
|
|
1479
1497
|
- `planHookCommandSpawn` — value
|
|
1480
1498
|
- `pluginOptionEnvName` — value
|
|
1481
1499
|
- `pluginOptionKeysProblem` — value
|
|
1500
|
+
- `readHookPluginOptionRef` — value
|
|
1482
1501
|
- `stopAttributionText` — value
|
|
1483
1502
|
|
|
1484
1503
|
## `./fleet`(85)
|