@sema-agent/settings-schema 13.0.1 → 14.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.
Files changed (136) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +18 -1
  3. package/conformance/VERSION +1 -1
  4. package/conformance/baseline.json +1 -3
  5. package/conformance/cases/c01-entry-salvage-then-typo/expected.json +1 -3
  6. package/conformance/cases/c02-hosts-clamp-stacked/expected.json +1 -3
  7. package/conformance/cases/c03-literal-dotted-top-key/expected.json +1 -3
  8. package/conformance/cases/c04-all-bad-collection-not-salvaged/expected.json +1 -3
  9. package/conformance/cases/c07-hooks-is-not-a-config-domain/expected.json +1 -3
  10. package/conformance/cases/c08-limits-unknown-carried-64/expected.json +1 -3
  11. package/conformance/cases/c09-limits-unknown-carried-65/expected.json +1 -3
  12. package/conformance/cases/c10-record-key-secret-redacted-twice/expected.json +1 -3
  13. package/conformance/cases/c11-unicode-unknown-keys/expected.json +1 -3
  14. package/conformance/cases/c12-prototype-name-top-keys/expected.json +1 -3
  15. package/conformance/cases/c13-models-field-null/expected.json +1 -3
  16. package/conformance/cases/c14-models-field-empty-array/expected.json +1 -3
  17. package/conformance/cases/c15-models-field-number/expected.json +1 -3
  18. package/conformance/cases/c16-deep-nesting-205/expected.json +1 -3
  19. package/conformance/cases/c17-empty-domain-file/expected.json +1 -3
  20. package/conformance/cases/c18-wire-envelope-not-an-object/expected.json +1 -3
  21. package/conformance/cases/c19-wire-envelope-no-version/expected.json +1 -3
  22. package/conformance/cases/c21-governance-empty-object-wins/expected.json +1 -3
  23. package/conformance/cases/c23-mixed-validity-models/expected.json +1 -3
  24. package/conformance/cases/c24-valid-entries-with-unknown-keys/expected.json +1 -3
  25. package/conformance/cases/c25-published-roundtrip-zero-warnings/expected.json +1 -3
  26. package/conformance/cases/c26-hosts-array-1024/expected.json +1 -3
  27. package/conformance/cases/c27-hosts-array-1025/expected.json +1 -3
  28. package/conformance/cases/c28-large-document-over-1mb/expected.json +1 -3
  29. package/conformance/cases/c29-salvage-then-domain-refine-fails/expected.json +1 -3
  30. package/conformance/cases/c30-version-triple-a-first/expected.json +1 -3
  31. package/conformance/cases/c31-version-triple-b-changed/expected.json +1 -3
  32. package/conformance/cases/c32-version-triple-a-restored/expected.json +1 -3
  33. package/conformance/cases/c33-limits-nested-carried-key/expected.json +1 -3
  34. package/conformance/cases/c34-skills-content-vs-manifest/expected.json +1 -3
  35. package/conformance/cases/c35-portable-domain-file-is-null/expected.json +1 -3
  36. package/conformance/cases/c36-skills-entry-without-content/expected.json +1 -3
  37. package/conformance/cases/c37-skills-field-null/expected.json +1 -3
  38. package/conformance/cases/c38-remote-exec-is-a-non-domain-file/expected.json +1 -3
  39. package/conformance/cases/c39-hidden-file-in-config-d/expected.json +1 -3
  40. package/conformance/cases/c40-s712-identity-only-what-reads-out/expected.json +1 -3
  41. package/conformance/cases/c41-s792-encoded-pem-identity/expected.json +1 -3
  42. package/conformance/cases/c42-s792-unknown-key-secret-redacted/expected.json +1 -3
  43. package/conformance/cases/c43-s792-form-and-deep-encoded-pem/expected.json +1 -3
  44. package/conformance/cases/c44-s792-utf8-escape-glued-token/expected.json +1 -3
  45. package/conformance/cases/c45-s792-identity-bounds-and-decode-depth/expected.json +1 -3
  46. package/conformance/cases/c46-s811-host-name-url-userinfo-withheld/expected.json +1 -3
  47. package/conformance/cases/c47-s811-roles-key-url-userinfo-withheld/expected.json +1 -3
  48. package/conformance/cases/c48-s935-model-headers-transported/expected.json +1 -3
  49. package/conformance/cases/c49-s935-model-headers-secret-entry-dropped/expected.json +1 -3
  50. package/conformance/cases/c50-s784-lane-host-legal/expected.json +1 -3
  51. package/conformance/cases/c51-s784-lane-e2b-legal/expected.json +1 -3
  52. package/conformance/cases/c52-s784-lane-k8s-legal/expected.json +1 -3
  53. package/conformance/cases/c53-s784-lane-ssh-legal/expected.json +1 -3
  54. package/conformance/cases/c54-s784-lane-adb-legal/expected.json +1 -3
  55. package/conformance/cases/c55-s784-lane-local-docker-legal/expected.json +1 -3
  56. package/conformance/cases/c56-s784-lane-device-legal/expected.json +1 -3
  57. package/conformance/cases/c57-s784-g1-enabled-no-lane/expected.json +1 -3
  58. package/conformance/cases/c58-s784-g2-multitenant-host/expected.json +1 -3
  59. package/conformance/cases/c59-s784-g3-k8s-missing-image/expected.json +1 -3
  60. package/conformance/cases/c60-s784-g3-e2b-missing-key/expected.json +1 -3
  61. package/conformance/cases/c61-s784-g3-other-lane-key/expected.json +1 -3
  62. package/conformance/cases/c62-s784-g7a-session-tidb/expected.json +1 -3
  63. package/conformance/cases/c63-s784-host-two-replicas/expected.json +1 -3
  64. package/conformance/cases/c64-s784-multitenant-local-store/expected.json +1 -3
  65. package/conformance/cases/c65-s784-pg-without-db/expected.json +1 -3
  66. package/conformance/cases/c66-s784-memory-backend-mismatch/expected.json +1 -3
  67. package/conformance/cases/c67-s784-retired-field-loud/expected.json +1 -3
  68. package/conformance/cases/c68-s784-device-local-store/expected.json +1 -3
  69. package/conformance/cases/c69-deep-encoded-token-past-every-reading/expected.json +1 -3
  70. package/conformance/cases/c70-rewritten-token-in-front-of-encoded-pem-header/expected.json +1 -3
  71. package/conformance/cases/c71-one-scanner-write-reads-display-forms/expected.json +1 -3
  72. package/conformance/cases/c72-dangling-reference-write-seat-refuses/expected.json +1 -3
  73. package/conformance/cases/c73-projects-extended-registration-reads/expected.json +1 -3
  74. package/conformance/cases/c74-projects-over-bound-refused/expected.json +1 -3
  75. package/conformance/cases/c75-projects-patch-remote-uniqueness/expected.json +1 -3
  76. package/conformance/cases/c76-projects-entry-salvage-nested/expected.json +1 -3
  77. package/conformance/cases/c77-prompts-center-artifact-carried/expected.json +252 -0
  78. package/conformance/cases/c77-prompts-center-artifact-carried/input.json +93 -0
  79. package/conformance/cases/c77-prompts-center-artifact-carried/meta.json +5 -0
  80. package/conformance/cases/c78-prompts-empty-bindings-refused/expected.json +82 -0
  81. package/conformance/cases/c78-prompts-empty-bindings-refused/input.json +11 -0
  82. package/conformance/cases/c78-prompts-empty-bindings-refused/meta.json +5 -0
  83. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/expected.json +82 -0
  84. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/input.json +129 -0
  85. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/meta.json +5 -0
  86. package/conformance/cases/c80-prompts-wire-v2-verbatim/expected.json +195 -0
  87. package/conformance/cases/c80-prompts-wire-v2-verbatim/input.json +65 -0
  88. package/conformance/cases/c80-prompts-wire-v2-verbatim/meta.json +5 -0
  89. package/conformance/cases/c81-prompts-declaration-bindings-refused/expected.json +82 -0
  90. package/conformance/cases/c81-prompts-declaration-bindings-refused/input.json +23 -0
  91. package/conformance/cases/c81-prompts-declaration-bindings-refused/meta.json +5 -0
  92. package/conformance/cases/c82-prompts-v1-catalog-refused/expected.json +82 -0
  93. package/conformance/cases/c82-prompts-v1-catalog-refused/input.json +35 -0
  94. package/conformance/cases/c82-prompts-v1-catalog-refused/meta.json +5 -0
  95. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/expected.json +82 -0
  96. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/input.json +56 -0
  97. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/meta.json +5 -0
  98. package/conformance/cases/cc01-mcp-toolfaces-non-object/expected.json +1 -3
  99. package/conformance/cases/cc02-mcp-source-key-is-transported/expected.json +1 -3
  100. package/conformance/cases/cc03-model-compat-unknown-subkey/expected.json +1 -3
  101. package/conformance/cases/cli01-model-name-nfc-vs-nfd/expected.json +1 -3
  102. package/conformance/cases/cli02-control-and-zero-width-chars/expected.json +1 -3
  103. package/conformance/cases/cli03-credential-pasted-into-unknown-key/expected.json +1 -3
  104. package/conformance/cases/cli04-env-value-with-newline/expected.json +1 -3
  105. package/conformance/cases/cli05-long-and-prefix-colliding-names/expected.json +1 -3
  106. package/conformance/cases/t01-absent-domain-key-not-null/expected.json +1 -3
  107. package/conformance/cases/t03-prototype-name-key-not-swallowed/expected.json +1 -3
  108. package/conformance/cases/t04-secret-literal-never-in-warning-value/expected.json +1 -3
  109. package/conformance/cases/z01-every-domain-empty-object/expected.json +2 -6
  110. package/conformance/cases/z02-every-domain-unknown-key/expected.json +2 -6
  111. package/dist/config-fns.d.ts +7 -3
  112. package/dist/config-fns.js +19 -16
  113. package/dist/conformance/derive.js +2 -2
  114. package/dist/index.d.ts +1 -0
  115. package/dist/index.js +1 -0
  116. package/dist/mcp-request-entry.d.ts +93 -0
  117. package/dist/mcp-request-entry.js +157 -0
  118. package/dist/migration-receipt.d.ts +1 -1
  119. package/dist/migration-receipt.js +1 -1
  120. package/dist/node.d.ts +0 -1
  121. package/dist/node.js +0 -1
  122. package/dist/one-time-migrations.d.ts +1 -1
  123. package/dist/one-time-migrations.js +39 -0
  124. package/dist/safety-merge-spec.d.ts +6 -6
  125. package/dist/types.d.ts +438 -355
  126. package/dist/types.js +161 -136
  127. package/dist/url-shape.d.ts +8 -0
  128. package/dist/url-shape.js +10 -0
  129. package/docs/API-SURFACE.md +41 -27
  130. package/docs/CONFORMANCE.md +1 -1
  131. package/docs/CONSUMER-INTEGRATION.md +3 -2
  132. package/llms-full.txt +14 -11
  133. package/llms.txt +7 -2
  134. package/package.json +2 -2
  135. package/dist/prompts-digest.d.ts +0 -16
  136. package/dist/prompts-digest.js +0 -49
package/dist/types.d.ts CHANGED
@@ -1978,315 +1978,363 @@ export declare const PluginsConfig: z.ZodObject<{
1978
1978
  }, z.core.$strip>>>;
1979
1979
  }, z.core.$strip>;
1980
1980
  export type PluginsConfig = z.infer<typeof PluginsConfig>;
1981
- /** 提示声明的槽位闭集(core `PromptTextDeclaration.slot` 同形):identity = 角色卡、scenario = 场景说明、behavior = 行为守则。
1982
- * declaration 轴与 catalog 轴({@link PromptArtifactSection})共用这一只。 */
1983
- export declare const PROMPT_SLOTS: readonly ["identity", "scenario", "behavior"];
1984
- export type PromptSlot = (typeof PROMPT_SLOTS)[number];
1985
- /** The slot enum, DERIVED from {@link PROMPT_SLOTS} (the runtime member table —— same form as `REF_CHECKED_DOMAINS`). */
1986
- export declare const PromptSlot: z.ZodEnum<{
1987
- scenario: "scenario";
1988
- identity: "identity";
1989
- behavior: "behavior";
1990
- }>;
1991
- /** core `PromptTextDeclaration` 的契约层同形(core prompts/default.d.ts 逐字:id/slot 闭集/text)。
1992
- * slot ↔ 三卡:identity=角色卡、scenario=场景说明、behavior=行为守则([1051]①)。 */
1993
- export declare const PromptTextDeclaration: z.ZodObject<{
1994
- id: z.ZodString;
1995
- slot: z.ZodEnum<{
1996
- scenario: "scenario";
1997
- identity: "identity";
1998
- behavior: "behavior";
1999
- }>;
2000
- text: z.ZodString;
2001
- contentHash: z.ZodOptional<z.ZodString>;
2002
- }, z.core.$strip>;
2003
- export type PromptTextDeclaration = z.infer<typeof PromptTextDeclaration>;
2004
- /** 三维 binding([ref]①a:v1=global/worker/scenario,砍 model 维——per-model 微调走
2005
- * ModelEntry.promptGuidance 专用通道)。covering 语义([1050]①b,解析只在 web-admin 一处):
2006
- * 同 slot **层间整体替换**(胜出层该 slot 声明数组整体替换低层同 slot 全部条目;层内数组保序,
2007
- * 与 core assemble「declaration order preserved」无缝);层序 scenario > worker > global。
2008
- * 发布即物化([1051]②a):declarations 是 publish 时物化的不可变声明(意图层/编译器版本归
2009
- * web-admin 编辑面存储,非跨仓契约面)。 */
2010
- export declare const PromptBinding: z.ZodObject<{
2011
- level: z.ZodEnum<{
2012
- worker: "worker";
2013
- scenario: "scenario";
2014
- global: "global";
2015
- }>;
2016
- worker: z.ZodOptional<z.ZodString>;
2017
- scenario: z.ZodOptional<z.ZodString>;
2018
- declarations: z.ZodArray<z.ZodObject<{
2019
- id: z.ZodString;
2020
- slot: z.ZodEnum<{
2021
- scenario: "scenario";
2022
- identity: "identity";
2023
- behavior: "behavior";
2024
- }>;
2025
- text: z.ZodString;
2026
- contentHash: z.ZodOptional<z.ZodString>;
2027
- }, z.core.$strip>>;
2028
- enabled: z.ZodDefault<z.ZodBoolean>;
2029
- notes: z.ZodOptional<z.ZodString>;
2030
- }, z.core.$strip>;
2031
- export type PromptBinding = z.infer<typeof PromptBinding>;
2032
- /** core `ARTIFACT_LIMITS` 的镜像常量(本包不加 core 运行期依赖轴 ⇒ 镜像)。对表钉住在**镜像的属主**这里:上游漂移门 ⑤ 逐键
2033
- * === devDependency 钉住的那只 core 的导出 —— 改上限必须同版动两处、过钉。 */
1981
+ /** 引擎 `ARTIFACT_LIMITS` 的镜像常量(本包不带引擎运行期依赖 ⇒ 镜像)。对表钉在**镜像的属主**这里:上游漂移门 ⑤ 逐键 === devDependency 钉住的那只引擎的导出。
1982
+ * `maxOverlayTextBytes` / `maxTotalTextBytes` 引擎按 UTF-8 字节量;本包的 zod 按字符(UTF-16 码元)量 —— 码元数恒 ≤ UTF-8 字节数,所以本包的门恒宽于引擎、方向对。
1983
+ * `maxIntentChars` / `maxRefChars` / `maxSourceRevisionChars` 引擎按 Unicode 码点量;本包用 `withinCodePoints` 同一把尺(不用 zod 的 `.max()`,它的单位随 zod 版本变)。 */
2034
1984
  export declare const PROMPT_ARTIFACT_LIMITS: {
2035
- readonly maxSections: 64;
2036
- readonly maxSectionBytes: 32000;
2037
- readonly maxTotalBytes: 131072;
2038
- readonly maxIdLength: 128;
2039
- readonly maxPackIdLength: 200;
1985
+ readonly maxOverlays: 64;
1986
+ readonly maxOverlayTextBytes: 32000;
1987
+ readonly maxTotalTextBytes: 131072;
1988
+ readonly maxIntentChars: 2000;
1989
+ readonly maxRefs: 32;
1990
+ readonly maxRefChars: 500;
1991
+ readonly maxSourceRevisionChars: 500;
2040
1992
  };
2041
- /** catalog 轴 section(core `CenterOverlaySection` 同形):center lane 的 contentHash **必备**
2042
- * (对账锚,[1050]② tiering;与 declaration 轴的 optional 不同)。text 上限按镜像常量(zod length
2043
- * 为 UTF-16 码元数,core verify 按 UTF-8 字节复核——传输门宽、语义门准)。 */
2044
- export declare const PromptArtifactSection: z.ZodObject<{
1993
+ /** 一个 binding 名(= 一次运行的场景名,`TaskSpec.promptBinding`)的长界 —— 引擎包根同名常量的镜像(对拍 = 上游漂移门 ⑤,逐值)。 */
1994
+ export declare const PROMPT_BINDING_MAX_CHARS = 128;
1995
+ /** 一张 `when.binding` 表至多点名几个 binding —— 引擎包根同名常量的镜像(同上)。 */
1996
+ export declare const PROMPT_BINDING_LIST_MAX = 64;
1997
+ /** `when.binding`:**恰一张表** —— `{anyOf}`(运行的 binding 在表里才成立;没有 binding 的运行在每张 anyOf 之外)或 `{noneOf}`(没有 binding、或不在表里才成立)。
1998
+ * 两张都给 / 都不给 / 别的键 ⇒ 拒。场景覆写写成一对互斥条件:通用的 `noneOf: [x]` 旁边是场景的 `anyOf: [x]`。 */
1999
+ export declare const PromptBindingCondition: z.ZodUnion<readonly [z.ZodObject<{
2000
+ anyOf: z.ZodArray<z.ZodString>;
2001
+ }, z.core.$strict>, z.ZodObject<{
2002
+ noneOf: z.ZodArray<z.ZodString>;
2003
+ }, z.core.$strict>]>;
2004
+ export type PromptBindingCondition = z.infer<typeof PromptBindingCondition>;
2005
+ /** overlay 的适用条件(引擎选择器的同一套词):traits / host / facts / binding 的合取;键闭合,词开放(词归引擎)。 */
2006
+ export declare const PromptOverlayWhen: z.ZodObject<{
2007
+ traits: z.ZodOptional<z.ZodObject<{
2008
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2009
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2010
+ }, z.core.$strict>>;
2011
+ host: z.ZodOptional<z.ZodObject<{
2012
+ role: z.ZodOptional<z.ZodString>;
2013
+ form: z.ZodOptional<z.ZodString>;
2014
+ }, z.core.$strict>>;
2015
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2016
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2017
+ anyOf: z.ZodArray<z.ZodString>;
2018
+ }, z.core.$strict>, z.ZodObject<{
2019
+ noneOf: z.ZodArray<z.ZodString>;
2020
+ }, z.core.$strict>]>>;
2021
+ }, z.core.$strict>;
2022
+ export type PromptOverlayWhen = z.infer<typeof PromptOverlayWhen>;
2023
+ /** 一条中心 overlay:对一个目标的一个操作(`replace` / `append` 一条目录消息、`add` 进一个档、`drop` 一段),带文本或引一条目录消息。
2024
+ * 键闭合(v3 没有 `scope`:binding 只在 `when.binding`);op / target / message 的词与存在性、id 文法、text ⊕ message 的互斥都归引擎。 */
2025
+ export declare const PromptOverlay: z.ZodObject<{
2045
2026
  id: z.ZodString;
2046
- slot: z.ZodEnum<{
2047
- scenario: "scenario";
2048
- identity: "identity";
2049
- behavior: "behavior";
2050
- }>;
2051
- text: z.ZodString;
2052
- contentHash: z.ZodString;
2053
- }, z.core.$strip>;
2054
- export type PromptArtifactSection = z.infer<typeof PromptArtifactSection>;
2055
- /** core `PromptCatalogSnapshot` 同形。packId=逻辑名(如 `center:acme@3`),历史身份恒在 digest。 */
2056
- export declare const PromptCatalogSnapshot: z.ZodObject<{
2057
- packId: z.ZodString;
2058
- sections: z.ZodArray<z.ZodObject<{
2027
+ op: z.ZodString;
2028
+ target: z.ZodString;
2029
+ text: z.ZodOptional<z.ZodString>;
2030
+ message: z.ZodOptional<z.ZodString>;
2031
+ when: z.ZodOptional<z.ZodObject<{
2032
+ traits: z.ZodOptional<z.ZodObject<{
2033
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2034
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2035
+ }, z.core.$strict>>;
2036
+ host: z.ZodOptional<z.ZodObject<{
2037
+ role: z.ZodOptional<z.ZodString>;
2038
+ form: z.ZodOptional<z.ZodString>;
2039
+ }, z.core.$strict>>;
2040
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2041
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2042
+ anyOf: z.ZodArray<z.ZodString>;
2043
+ }, z.core.$strict>, z.ZodObject<{
2044
+ noneOf: z.ZodArray<z.ZodString>;
2045
+ }, z.core.$strict>]>>;
2046
+ }, z.core.$strict>>;
2047
+ }, z.core.$strict>;
2048
+ export type PromptOverlay = z.infer<typeof PromptOverlay>;
2049
+ /** artifact 向引擎要的东西:它点名的目标(带种类)、用到的操作、条件读到的 trait、点名的 binding。引擎从 overlay 复算并比对,本包只判形。 */
2050
+ export declare const PromptArtifactRequires: z.ZodObject<{
2051
+ targets: z.ZodArray<z.ZodObject<{
2059
2052
  id: z.ZodString;
2060
- slot: z.ZodEnum<{
2061
- scenario: "scenario";
2062
- identity: "identity";
2063
- behavior: "behavior";
2064
- }>;
2065
- text: z.ZodString;
2066
- contentHash: z.ZodString;
2067
- }, z.core.$strip>>;
2068
- }, z.core.$strip>;
2069
- export type PromptCatalogSnapshot = z.infer<typeof PromptCatalogSnapshot>;
2070
- /** core `PromptEpochArtifactPayload` 同形(schemaVersion/assemblyApi 常量 1;catalogDigest=
2071
- * sha256(canonical(closure.promptCatalog)),server 候选门经 core verify 逐位复算;compatibleCore=
2072
- * 无依赖 dotted-triple range,schema 层只判形不解释)。 */
2073
- export declare const PromptEpochArtifactPayload: z.ZodObject<{
2074
- schemaVersion: z.ZodLiteral<1>;
2075
- assemblyApi: z.ZodLiteral<1>;
2076
- catalogDigest: z.ZodString;
2077
- compatibleCore: z.ZodOptional<z.ZodObject<{
2078
- minCore: z.ZodOptional<z.ZodString>;
2079
- maxCoreExclusive: z.ZodOptional<z.ZodString>;
2080
- }, z.core.$strip>>;
2081
- closure: z.ZodObject<{
2082
- basePackId: z.ZodString;
2083
- promptCatalog: z.ZodObject<{
2084
- packId: z.ZodString;
2085
- sections: z.ZodArray<z.ZodObject<{
2053
+ kind: z.ZodString;
2054
+ }, z.core.$strict>>;
2055
+ ops: z.ZodArray<z.ZodString>;
2056
+ traits: z.ZodArray<z.ZodString>;
2057
+ bindings: z.ZodArray<z.ZodString>;
2058
+ }, z.core.$strict>;
2059
+ export type PromptArtifactRequires = z.infer<typeof PromptArtifactRequires>;
2060
+ /** artifact 为什么存在:一句意图(必填)与它背后的评测 / 金样引用。 */
2061
+ export declare const PromptArtifactEvidence: z.ZodObject<{
2062
+ intent: z.ZodString;
2063
+ refs: z.ZodArray<z.ZodString>;
2064
+ }, z.core.$strict>;
2065
+ export type PromptArtifactEvidence = z.infer<typeof PromptArtifactEvidence>;
2066
+ /** artifact 被摘要的那一半(引擎的 `artifactDigest` = sha256(canonical(payload)))。`schemaVersion` 只收 3。 */
2067
+ export declare const PromptArtifactPayload: z.ZodObject<{
2068
+ schemaVersion: z.ZodLiteral<3>;
2069
+ requires: z.ZodObject<{
2070
+ targets: z.ZodArray<z.ZodObject<{
2071
+ id: z.ZodString;
2072
+ kind: z.ZodString;
2073
+ }, z.core.$strict>>;
2074
+ ops: z.ZodArray<z.ZodString>;
2075
+ traits: z.ZodArray<z.ZodString>;
2076
+ bindings: z.ZodArray<z.ZodString>;
2077
+ }, z.core.$strict>;
2078
+ overlays: z.ZodArray<z.ZodObject<{
2079
+ id: z.ZodString;
2080
+ op: z.ZodString;
2081
+ target: z.ZodString;
2082
+ text: z.ZodOptional<z.ZodString>;
2083
+ message: z.ZodOptional<z.ZodString>;
2084
+ when: z.ZodOptional<z.ZodObject<{
2085
+ traits: z.ZodOptional<z.ZodObject<{
2086
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2087
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2088
+ }, z.core.$strict>>;
2089
+ host: z.ZodOptional<z.ZodObject<{
2090
+ role: z.ZodOptional<z.ZodString>;
2091
+ form: z.ZodOptional<z.ZodString>;
2092
+ }, z.core.$strict>>;
2093
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2094
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2095
+ anyOf: z.ZodArray<z.ZodString>;
2096
+ }, z.core.$strict>, z.ZodObject<{
2097
+ noneOf: z.ZodArray<z.ZodString>;
2098
+ }, z.core.$strict>]>>;
2099
+ }, z.core.$strict>>;
2100
+ }, z.core.$strict>>;
2101
+ evidence: z.ZodObject<{
2102
+ intent: z.ZodString;
2103
+ refs: z.ZodArray<z.ZodString>;
2104
+ }, z.core.$strict>;
2105
+ }, z.core.$strict>;
2106
+ export type PromptArtifactPayload = z.infer<typeof PromptArtifactPayload>;
2107
+ /** 存储形:一份 artifact 的**身份**(payload + 引擎铸的 digest),不带发布出处。键闭合 —— 带 `sourceRevision` 的不收(出处是「哪一次发布」,由服务席在下发时盖)。 */
2108
+ export declare const PromptArtifact: z.ZodObject<{
2109
+ payload: z.ZodObject<{
2110
+ schemaVersion: z.ZodLiteral<3>;
2111
+ requires: z.ZodObject<{
2112
+ targets: z.ZodArray<z.ZodObject<{
2086
2113
  id: z.ZodString;
2087
- slot: z.ZodEnum<{
2088
- scenario: "scenario";
2089
- identity: "identity";
2090
- behavior: "behavior";
2091
- }>;
2092
- text: z.ZodString;
2093
- contentHash: z.ZodString;
2094
- }, z.core.$strip>>;
2095
- }, z.core.$strip>;
2096
- }, z.core.$strip>;
2097
- }, z.core.$strip>;
2098
- export type PromptEpochArtifactPayload = z.infer<typeof PromptEpochArtifactPayload>;
2099
- /** core `PublishedPromptArtifactEnvelope` 同形:发布信封=artifact(payload+artifactDigest)+ opaque
2100
- * sourceRevision(只比较相等、绝不排序;不进任何 digest——协议 §9.2 内容身份/发布事件分离)。 */
2101
- export declare const PublishedPromptArtifactEnvelope: z.ZodObject<{
2102
- artifact: z.ZodObject<{
2103
- payload: z.ZodObject<{
2104
- schemaVersion: z.ZodLiteral<1>;
2105
- assemblyApi: z.ZodLiteral<1>;
2106
- catalogDigest: z.ZodString;
2107
- compatibleCore: z.ZodOptional<z.ZodObject<{
2108
- minCore: z.ZodOptional<z.ZodString>;
2109
- maxCoreExclusive: z.ZodOptional<z.ZodString>;
2110
- }, z.core.$strip>>;
2111
- closure: z.ZodObject<{
2112
- basePackId: z.ZodString;
2113
- promptCatalog: z.ZodObject<{
2114
- packId: z.ZodString;
2115
- sections: z.ZodArray<z.ZodObject<{
2116
- id: z.ZodString;
2117
- slot: z.ZodEnum<{
2118
- scenario: "scenario";
2119
- identity: "identity";
2120
- behavior: "behavior";
2121
- }>;
2122
- text: z.ZodString;
2123
- contentHash: z.ZodString;
2124
- }, z.core.$strip>>;
2125
- }, z.core.$strip>;
2126
- }, z.core.$strip>;
2127
- }, z.core.$strip>;
2128
- artifactDigest: z.ZodString;
2129
- }, z.core.$strip>;
2114
+ kind: z.ZodString;
2115
+ }, z.core.$strict>>;
2116
+ ops: z.ZodArray<z.ZodString>;
2117
+ traits: z.ZodArray<z.ZodString>;
2118
+ bindings: z.ZodArray<z.ZodString>;
2119
+ }, z.core.$strict>;
2120
+ overlays: z.ZodArray<z.ZodObject<{
2121
+ id: z.ZodString;
2122
+ op: z.ZodString;
2123
+ target: z.ZodString;
2124
+ text: z.ZodOptional<z.ZodString>;
2125
+ message: z.ZodOptional<z.ZodString>;
2126
+ when: z.ZodOptional<z.ZodObject<{
2127
+ traits: z.ZodOptional<z.ZodObject<{
2128
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2129
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2130
+ }, z.core.$strict>>;
2131
+ host: z.ZodOptional<z.ZodObject<{
2132
+ role: z.ZodOptional<z.ZodString>;
2133
+ form: z.ZodOptional<z.ZodString>;
2134
+ }, z.core.$strict>>;
2135
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2136
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2137
+ anyOf: z.ZodArray<z.ZodString>;
2138
+ }, z.core.$strict>, z.ZodObject<{
2139
+ noneOf: z.ZodArray<z.ZodString>;
2140
+ }, z.core.$strict>]>>;
2141
+ }, z.core.$strict>>;
2142
+ }, z.core.$strict>>;
2143
+ evidence: z.ZodObject<{
2144
+ intent: z.ZodString;
2145
+ refs: z.ZodArray<z.ZodString>;
2146
+ }, z.core.$strict>;
2147
+ }, z.core.$strict>;
2148
+ artifactDigest: z.ZodString;
2149
+ }, z.core.$strict>;
2150
+ export type PromptArtifact = z.infer<typeof PromptArtifact>;
2151
+ /** 下发形:身份 + 发布出处 `sourceRevision`(只比相等、绝不排序;不进 digest)。键闭合。 */
2152
+ export declare const PublishedPromptArtifact: z.ZodObject<{
2130
2153
  sourceRevision: z.ZodString;
2131
- }, z.core.$strip>;
2132
- export type PublishedPromptArtifactEnvelope = z.infer<typeof PublishedPromptArtifactEnvelope>;
2133
- /** prompts 域存储形 v1(web-admin 存储真形;[1043] PromptCatalogPayload 的 v1 最小面)。
2134
- * overlays/profiles/modelPolicies = 协议 §5.1 的后续 additive 面,留位不预设形(等 core S6
2135
- * catalog schema 班车,additive 补键零迁移)。 */
2136
- export declare const PromptsConfig: z.ZodObject<{
2137
- bindings: z.ZodPrefault<z.ZodArray<z.ZodObject<{
2138
- level: z.ZodEnum<{
2139
- worker: "worker";
2140
- scenario: "scenario";
2141
- global: "global";
2142
- }>;
2143
- worker: z.ZodOptional<z.ZodString>;
2144
- scenario: z.ZodOptional<z.ZodString>;
2145
- declarations: z.ZodArray<z.ZodObject<{
2154
+ payload: z.ZodObject<{
2155
+ schemaVersion: z.ZodLiteral<3>;
2156
+ requires: z.ZodObject<{
2157
+ targets: z.ZodArray<z.ZodObject<{
2158
+ id: z.ZodString;
2159
+ kind: z.ZodString;
2160
+ }, z.core.$strict>>;
2161
+ ops: z.ZodArray<z.ZodString>;
2162
+ traits: z.ZodArray<z.ZodString>;
2163
+ bindings: z.ZodArray<z.ZodString>;
2164
+ }, z.core.$strict>;
2165
+ overlays: z.ZodArray<z.ZodObject<{
2146
2166
  id: z.ZodString;
2147
- slot: z.ZodEnum<{
2148
- scenario: "scenario";
2149
- identity: "identity";
2150
- behavior: "behavior";
2151
- }>;
2152
- text: z.ZodString;
2153
- contentHash: z.ZodOptional<z.ZodString>;
2154
- }, z.core.$strip>>;
2155
- enabled: z.ZodDefault<z.ZodBoolean>;
2156
- notes: z.ZodOptional<z.ZodString>;
2157
- }, z.core.$strip>>>;
2158
- catalog: z.ZodOptional<z.ZodObject<{
2159
- artifact: z.ZodObject<{
2160
- payload: z.ZodObject<{
2161
- schemaVersion: z.ZodLiteral<1>;
2162
- assemblyApi: z.ZodLiteral<1>;
2163
- catalogDigest: z.ZodString;
2164
- compatibleCore: z.ZodOptional<z.ZodObject<{
2165
- minCore: z.ZodOptional<z.ZodString>;
2166
- maxCoreExclusive: z.ZodOptional<z.ZodString>;
2167
- }, z.core.$strip>>;
2168
- closure: z.ZodObject<{
2169
- basePackId: z.ZodString;
2170
- promptCatalog: z.ZodObject<{
2171
- packId: z.ZodString;
2172
- sections: z.ZodArray<z.ZodObject<{
2173
- id: z.ZodString;
2174
- slot: z.ZodEnum<{
2175
- scenario: "scenario";
2176
- identity: "identity";
2177
- behavior: "behavior";
2178
- }>;
2179
- text: z.ZodString;
2180
- contentHash: z.ZodString;
2181
- }, z.core.$strip>>;
2182
- }, z.core.$strip>;
2183
- }, z.core.$strip>;
2184
- }, z.core.$strip>;
2185
- artifactDigest: z.ZodString;
2186
- }, z.core.$strip>;
2187
- sourceRevision: z.ZodString;
2188
- }, z.core.$strip>>;
2167
+ op: z.ZodString;
2168
+ target: z.ZodString;
2169
+ text: z.ZodOptional<z.ZodString>;
2170
+ message: z.ZodOptional<z.ZodString>;
2171
+ when: z.ZodOptional<z.ZodObject<{
2172
+ traits: z.ZodOptional<z.ZodObject<{
2173
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2174
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2175
+ }, z.core.$strict>>;
2176
+ host: z.ZodOptional<z.ZodObject<{
2177
+ role: z.ZodOptional<z.ZodString>;
2178
+ form: z.ZodOptional<z.ZodString>;
2179
+ }, z.core.$strict>>;
2180
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2181
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2182
+ anyOf: z.ZodArray<z.ZodString>;
2183
+ }, z.core.$strict>, z.ZodObject<{
2184
+ noneOf: z.ZodArray<z.ZodString>;
2185
+ }, z.core.$strict>]>>;
2186
+ }, z.core.$strict>>;
2187
+ }, z.core.$strict>>;
2188
+ evidence: z.ZodObject<{
2189
+ intent: z.ZodString;
2190
+ refs: z.ZodArray<z.ZodString>;
2191
+ }, z.core.$strict>;
2192
+ }, z.core.$strict>;
2193
+ artifactDigest: z.ZodString;
2194
+ }, z.core.$strict>;
2195
+ export type PublishedPromptArtifact = z.infer<typeof PublishedPromptArtifact>;
2196
+ /** prompts 域存储形 v2:中心层的身份。web-admin 店(草稿 / 发布快照 / 回滚史)与本地 `config.d/prompts.json` 同形。 */
2197
+ export declare const PromptsConfig: z.ZodObject<{
2198
+ artifact: z.ZodOptional<z.ZodObject<{
2199
+ payload: z.ZodObject<{
2200
+ schemaVersion: z.ZodLiteral<3>;
2201
+ requires: z.ZodObject<{
2202
+ targets: z.ZodArray<z.ZodObject<{
2203
+ id: z.ZodString;
2204
+ kind: z.ZodString;
2205
+ }, z.core.$strict>>;
2206
+ ops: z.ZodArray<z.ZodString>;
2207
+ traits: z.ZodArray<z.ZodString>;
2208
+ bindings: z.ZodArray<z.ZodString>;
2209
+ }, z.core.$strict>;
2210
+ overlays: z.ZodArray<z.ZodObject<{
2211
+ id: z.ZodString;
2212
+ op: z.ZodString;
2213
+ target: z.ZodString;
2214
+ text: z.ZodOptional<z.ZodString>;
2215
+ message: z.ZodOptional<z.ZodString>;
2216
+ when: z.ZodOptional<z.ZodObject<{
2217
+ traits: z.ZodOptional<z.ZodObject<{
2218
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2219
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2220
+ }, z.core.$strict>>;
2221
+ host: z.ZodOptional<z.ZodObject<{
2222
+ role: z.ZodOptional<z.ZodString>;
2223
+ form: z.ZodOptional<z.ZodString>;
2224
+ }, z.core.$strict>>;
2225
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2226
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2227
+ anyOf: z.ZodArray<z.ZodString>;
2228
+ }, z.core.$strict>, z.ZodObject<{
2229
+ noneOf: z.ZodArray<z.ZodString>;
2230
+ }, z.core.$strict>]>>;
2231
+ }, z.core.$strict>>;
2232
+ }, z.core.$strict>>;
2233
+ evidence: z.ZodObject<{
2234
+ intent: z.ZodString;
2235
+ refs: z.ZodArray<z.ZodString>;
2236
+ }, z.core.$strict>;
2237
+ }, z.core.$strict>;
2238
+ artifactDigest: z.ZodString;
2239
+ }, z.core.$strict>>;
2240
+ workers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2241
+ payload: z.ZodObject<{
2242
+ schemaVersion: z.ZodLiteral<3>;
2243
+ requires: z.ZodObject<{
2244
+ targets: z.ZodArray<z.ZodObject<{
2245
+ id: z.ZodString;
2246
+ kind: z.ZodString;
2247
+ }, z.core.$strict>>;
2248
+ ops: z.ZodArray<z.ZodString>;
2249
+ traits: z.ZodArray<z.ZodString>;
2250
+ bindings: z.ZodArray<z.ZodString>;
2251
+ }, z.core.$strict>;
2252
+ overlays: z.ZodArray<z.ZodObject<{
2253
+ id: z.ZodString;
2254
+ op: z.ZodString;
2255
+ target: z.ZodString;
2256
+ text: z.ZodOptional<z.ZodString>;
2257
+ message: z.ZodOptional<z.ZodString>;
2258
+ when: z.ZodOptional<z.ZodObject<{
2259
+ traits: z.ZodOptional<z.ZodObject<{
2260
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2261
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2262
+ }, z.core.$strict>>;
2263
+ host: z.ZodOptional<z.ZodObject<{
2264
+ role: z.ZodOptional<z.ZodString>;
2265
+ form: z.ZodOptional<z.ZodString>;
2266
+ }, z.core.$strict>>;
2267
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2268
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2269
+ anyOf: z.ZodArray<z.ZodString>;
2270
+ }, z.core.$strict>, z.ZodObject<{
2271
+ noneOf: z.ZodArray<z.ZodString>;
2272
+ }, z.core.$strict>]>>;
2273
+ }, z.core.$strict>>;
2274
+ }, z.core.$strict>>;
2275
+ evidence: z.ZodObject<{
2276
+ intent: z.ZodString;
2277
+ refs: z.ZodArray<z.ZodString>;
2278
+ }, z.core.$strict>;
2279
+ }, z.core.$strict>;
2280
+ artifactDigest: z.ZodString;
2281
+ }, z.core.$strict>>>;
2282
+ bindings: z.ZodOptional<z.ZodNever>;
2283
+ catalog: z.ZodOptional<z.ZodNever>;
2189
2284
  }, z.core.$strip>;
2190
2285
  export type PromptsConfig = z.infer<typeof PromptsConfig>;
2191
- /** effective 下发形([ref] 逐字;`GET /api/config/effective?worker=` 的 additive `prompts`
2192
- * key)。语义定死([1057]①):packId=`center:`+contentDigest 前 12(纯内容寻址,无 rev);
2193
- * contentDigest=canonical JSON 全量 sha256 非盐化(operator 对账位,digest 函数在 /node 绑定
2194
- * `promptsContentDigest`);sections=covering 已走完的基线终形(worker/core 零解析义务);
2195
- * scenarioOverrides[s]=该场景完整重算终形(整包替换非增量),无键=用基线;fail-closed=
2196
- * publish 闸关时整个 key 不出现。 */
2197
- /** prompts 包身份 `packId` 的前缀(铸点 `promptsContentDigest` 与判官 {@link PromptPackId} 都引它)。值落在引擎的会话记录里、是
2198
- * epoch 不误重 pin 的依据,所以值本身不随叫法归一改(换前缀 = 每条活会话的提示包身份翻一次,要引擎先读 epoch 判据)。 */
2199
- export declare const PROMPT_PACK_ID_PREFIX = "center:";
2200
- /** prompts 包身份的形:前缀 + 内容摘要的前 12 位小写 hex(纯内容寻址:同内容重发布 = 同 packId)。判它的每一处都引这一只。 */
2201
- export declare const PromptPackId: z.ZodString;
2202
- export declare const EffectivePrompts: z.ZodObject<{
2203
- packId: z.ZodString;
2204
- contentDigest: z.ZodString;
2205
- sections: z.ZodArray<z.ZodObject<{
2206
- id: z.ZodString;
2207
- slot: z.ZodEnum<{
2208
- scenario: "scenario";
2209
- identity: "identity";
2210
- behavior: "behavior";
2211
- }>;
2212
- text: z.ZodString;
2213
- contentHash: z.ZodOptional<z.ZodString>;
2214
- }, z.core.$strip>>;
2215
- scenarioOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
2216
- id: z.ZodString;
2217
- slot: z.ZodEnum<{
2218
- scenario: "scenario";
2219
- identity: "identity";
2220
- behavior: "behavior";
2221
- }>;
2222
- text: z.ZodString;
2223
- contentHash: z.ZodOptional<z.ZodString>;
2224
- }, z.core.$strip>>>>;
2225
- }, z.core.$strip>;
2226
- export type EffectivePrompts = z.infer<typeof EffectivePrompts>;
2227
- /** effective 下发形 v2(双轴,[985]a §1/[1242] Q1 裁:单 domain 单键、两轴是过渡窗内的两种表达)。
2228
- * declarations=现行 A 形(centerPromptProvider 继续消费);catalog=B 形(core S1 verify 管线的输入,
2229
- * server 原样交 core 不解释)。至少一轴必须在场(空对象=坏形);催收面语义照旧=publish 闸关时整个
2230
- * `prompts` key 消失(fail-closed)。引擎的候选门**只认本形**:没有 `schemaVersion` 的平铺 {@link EffectivePrompts} 体被响亮拒
2231
- * (整个 prompts 面不采用,落最后一份好配置 / 内置)。 */
2286
+ /** **唯一的选择读法**:这台 worker 组装哪一份中心层 —— 它有自己的那份 ⇒ 它;否则 scope 的那份;都没有 ⇒ `undefined`(不下发)。
2287
+ * `worker = null` = 没有 worker 身份的读者(本地腿、不带 worker 的全局拉取、个人面),恒读 scope 那份。只读自有键(名字恰是原型链上的名字时不会读出别的东西)。 */
2288
+ export declare function promptArtifactFor(prompts: PromptsConfig, worker: string | null): PromptArtifact | undefined;
2289
+ /** effective 下发形 v2:`{ schemaVersion: 2, artifact }`(键闭合)。每条腿(按 worker 的 / 不带 worker 的 / 个人面)只发这一形;
2290
+ * 发布闸关 / 没有发布 / 选不出 artifact ⇒ 整个 `prompts` 键不出现(fail-closed)。外壳的 `schemaVersion` 只在外壳形变时抬(artifact 自带 payload 版本)。
2291
+ * 消费方的判官:先过本形,再交引擎 verify。13.x 的 `{schemaVersion: 1, declarations?, catalog?}` 被响亮拒(拒句点名升级路径)。 */
2232
2292
  export declare const EffectivePromptsWire: z.ZodObject<{
2233
- schemaVersion: z.ZodLiteral<1>;
2234
- declarations: z.ZodOptional<z.ZodObject<{
2235
- packId: z.ZodString;
2236
- contentDigest: z.ZodString;
2237
- sections: z.ZodArray<z.ZodObject<{
2238
- id: z.ZodString;
2239
- slot: z.ZodEnum<{
2240
- scenario: "scenario";
2241
- identity: "identity";
2242
- behavior: "behavior";
2243
- }>;
2244
- text: z.ZodString;
2245
- contentHash: z.ZodOptional<z.ZodString>;
2246
- }, z.core.$strip>>;
2247
- scenarioOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
2248
- id: z.ZodString;
2249
- slot: z.ZodEnum<{
2250
- scenario: "scenario";
2251
- identity: "identity";
2252
- behavior: "behavior";
2253
- }>;
2254
- text: z.ZodString;
2255
- contentHash: z.ZodOptional<z.ZodString>;
2256
- }, z.core.$strip>>>>;
2257
- }, z.core.$strip>>;
2258
- catalog: z.ZodOptional<z.ZodObject<{
2259
- artifact: z.ZodObject<{
2260
- payload: z.ZodObject<{
2261
- schemaVersion: z.ZodLiteral<1>;
2262
- assemblyApi: z.ZodLiteral<1>;
2263
- catalogDigest: z.ZodString;
2264
- compatibleCore: z.ZodOptional<z.ZodObject<{
2265
- minCore: z.ZodOptional<z.ZodString>;
2266
- maxCoreExclusive: z.ZodOptional<z.ZodString>;
2267
- }, z.core.$strip>>;
2268
- closure: z.ZodObject<{
2269
- basePackId: z.ZodString;
2270
- promptCatalog: z.ZodObject<{
2271
- packId: z.ZodString;
2272
- sections: z.ZodArray<z.ZodObject<{
2273
- id: z.ZodString;
2274
- slot: z.ZodEnum<{
2275
- scenario: "scenario";
2276
- identity: "identity";
2277
- behavior: "behavior";
2278
- }>;
2279
- text: z.ZodString;
2280
- contentHash: z.ZodString;
2281
- }, z.core.$strip>>;
2282
- }, z.core.$strip>;
2283
- }, z.core.$strip>;
2284
- }, z.core.$strip>;
2285
- artifactDigest: z.ZodString;
2286
- }, z.core.$strip>;
2293
+ schemaVersion: z.ZodLiteral<2>;
2294
+ artifact: z.ZodObject<{
2287
2295
  sourceRevision: z.ZodString;
2288
- }, z.core.$strip>>;
2289
- }, z.core.$strip>;
2296
+ payload: z.ZodObject<{
2297
+ schemaVersion: z.ZodLiteral<3>;
2298
+ requires: z.ZodObject<{
2299
+ targets: z.ZodArray<z.ZodObject<{
2300
+ id: z.ZodString;
2301
+ kind: z.ZodString;
2302
+ }, z.core.$strict>>;
2303
+ ops: z.ZodArray<z.ZodString>;
2304
+ traits: z.ZodArray<z.ZodString>;
2305
+ bindings: z.ZodArray<z.ZodString>;
2306
+ }, z.core.$strict>;
2307
+ overlays: z.ZodArray<z.ZodObject<{
2308
+ id: z.ZodString;
2309
+ op: z.ZodString;
2310
+ target: z.ZodString;
2311
+ text: z.ZodOptional<z.ZodString>;
2312
+ message: z.ZodOptional<z.ZodString>;
2313
+ when: z.ZodOptional<z.ZodObject<{
2314
+ traits: z.ZodOptional<z.ZodObject<{
2315
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2316
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2317
+ }, z.core.$strict>>;
2318
+ host: z.ZodOptional<z.ZodObject<{
2319
+ role: z.ZodOptional<z.ZodString>;
2320
+ form: z.ZodOptional<z.ZodString>;
2321
+ }, z.core.$strict>>;
2322
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2323
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2324
+ anyOf: z.ZodArray<z.ZodString>;
2325
+ }, z.core.$strict>, z.ZodObject<{
2326
+ noneOf: z.ZodArray<z.ZodString>;
2327
+ }, z.core.$strict>]>>;
2328
+ }, z.core.$strict>>;
2329
+ }, z.core.$strict>>;
2330
+ evidence: z.ZodObject<{
2331
+ intent: z.ZodString;
2332
+ refs: z.ZodArray<z.ZodString>;
2333
+ }, z.core.$strict>;
2334
+ }, z.core.$strict>;
2335
+ artifactDigest: z.ZodString;
2336
+ }, z.core.$strict>;
2337
+ }, z.core.$strict>;
2290
2338
  export type EffectivePromptsWire = z.infer<typeof EffectivePromptsWire>;
2291
2339
  export declare const DOMAIN_SCHEMAS: {
2292
2340
  readonly models: z.ZodObject<{
@@ -2906,58 +2954,92 @@ export declare const DOMAIN_SCHEMAS: {
2906
2954
  }, z.core.$strip>>>;
2907
2955
  }, z.core.$strip>;
2908
2956
  readonly prompts: z.ZodObject<{
2909
- bindings: z.ZodPrefault<z.ZodArray<z.ZodObject<{
2910
- level: z.ZodEnum<{
2911
- worker: "worker";
2912
- scenario: "scenario";
2913
- global: "global";
2914
- }>;
2915
- worker: z.ZodOptional<z.ZodString>;
2916
- scenario: z.ZodOptional<z.ZodString>;
2917
- declarations: z.ZodArray<z.ZodObject<{
2918
- id: z.ZodString;
2919
- slot: z.ZodEnum<{
2920
- scenario: "scenario";
2921
- identity: "identity";
2922
- behavior: "behavior";
2923
- }>;
2924
- text: z.ZodString;
2925
- contentHash: z.ZodOptional<z.ZodString>;
2926
- }, z.core.$strip>>;
2927
- enabled: z.ZodDefault<z.ZodBoolean>;
2928
- notes: z.ZodOptional<z.ZodString>;
2929
- }, z.core.$strip>>>;
2930
- catalog: z.ZodOptional<z.ZodObject<{
2931
- artifact: z.ZodObject<{
2932
- payload: z.ZodObject<{
2933
- schemaVersion: z.ZodLiteral<1>;
2934
- assemblyApi: z.ZodLiteral<1>;
2935
- catalogDigest: z.ZodString;
2936
- compatibleCore: z.ZodOptional<z.ZodObject<{
2937
- minCore: z.ZodOptional<z.ZodString>;
2938
- maxCoreExclusive: z.ZodOptional<z.ZodString>;
2939
- }, z.core.$strip>>;
2940
- closure: z.ZodObject<{
2941
- basePackId: z.ZodString;
2942
- promptCatalog: z.ZodObject<{
2943
- packId: z.ZodString;
2944
- sections: z.ZodArray<z.ZodObject<{
2945
- id: z.ZodString;
2946
- slot: z.ZodEnum<{
2947
- scenario: "scenario";
2948
- identity: "identity";
2949
- behavior: "behavior";
2950
- }>;
2951
- text: z.ZodString;
2952
- contentHash: z.ZodString;
2953
- }, z.core.$strip>>;
2954
- }, z.core.$strip>;
2955
- }, z.core.$strip>;
2956
- }, z.core.$strip>;
2957
- artifactDigest: z.ZodString;
2958
- }, z.core.$strip>;
2959
- sourceRevision: z.ZodString;
2960
- }, z.core.$strip>>;
2957
+ artifact: z.ZodOptional<z.ZodObject<{
2958
+ payload: z.ZodObject<{
2959
+ schemaVersion: z.ZodLiteral<3>;
2960
+ requires: z.ZodObject<{
2961
+ targets: z.ZodArray<z.ZodObject<{
2962
+ id: z.ZodString;
2963
+ kind: z.ZodString;
2964
+ }, z.core.$strict>>;
2965
+ ops: z.ZodArray<z.ZodString>;
2966
+ traits: z.ZodArray<z.ZodString>;
2967
+ bindings: z.ZodArray<z.ZodString>;
2968
+ }, z.core.$strict>;
2969
+ overlays: z.ZodArray<z.ZodObject<{
2970
+ id: z.ZodString;
2971
+ op: z.ZodString;
2972
+ target: z.ZodString;
2973
+ text: z.ZodOptional<z.ZodString>;
2974
+ message: z.ZodOptional<z.ZodString>;
2975
+ when: z.ZodOptional<z.ZodObject<{
2976
+ traits: z.ZodOptional<z.ZodObject<{
2977
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2978
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
2979
+ }, z.core.$strict>>;
2980
+ host: z.ZodOptional<z.ZodObject<{
2981
+ role: z.ZodOptional<z.ZodString>;
2982
+ form: z.ZodOptional<z.ZodString>;
2983
+ }, z.core.$strict>>;
2984
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2985
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2986
+ anyOf: z.ZodArray<z.ZodString>;
2987
+ }, z.core.$strict>, z.ZodObject<{
2988
+ noneOf: z.ZodArray<z.ZodString>;
2989
+ }, z.core.$strict>]>>;
2990
+ }, z.core.$strict>>;
2991
+ }, z.core.$strict>>;
2992
+ evidence: z.ZodObject<{
2993
+ intent: z.ZodString;
2994
+ refs: z.ZodArray<z.ZodString>;
2995
+ }, z.core.$strict>;
2996
+ }, z.core.$strict>;
2997
+ artifactDigest: z.ZodString;
2998
+ }, z.core.$strict>>;
2999
+ workers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3000
+ payload: z.ZodObject<{
3001
+ schemaVersion: z.ZodLiteral<3>;
3002
+ requires: z.ZodObject<{
3003
+ targets: z.ZodArray<z.ZodObject<{
3004
+ id: z.ZodString;
3005
+ kind: z.ZodString;
3006
+ }, z.core.$strict>>;
3007
+ ops: z.ZodArray<z.ZodString>;
3008
+ traits: z.ZodArray<z.ZodString>;
3009
+ bindings: z.ZodArray<z.ZodString>;
3010
+ }, z.core.$strict>;
3011
+ overlays: z.ZodArray<z.ZodObject<{
3012
+ id: z.ZodString;
3013
+ op: z.ZodString;
3014
+ target: z.ZodString;
3015
+ text: z.ZodOptional<z.ZodString>;
3016
+ message: z.ZodOptional<z.ZodString>;
3017
+ when: z.ZodOptional<z.ZodObject<{
3018
+ traits: z.ZodOptional<z.ZodObject<{
3019
+ allOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
3020
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
3021
+ }, z.core.$strict>>;
3022
+ host: z.ZodOptional<z.ZodObject<{
3023
+ role: z.ZodOptional<z.ZodString>;
3024
+ form: z.ZodOptional<z.ZodString>;
3025
+ }, z.core.$strict>>;
3026
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
3027
+ binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3028
+ anyOf: z.ZodArray<z.ZodString>;
3029
+ }, z.core.$strict>, z.ZodObject<{
3030
+ noneOf: z.ZodArray<z.ZodString>;
3031
+ }, z.core.$strict>]>>;
3032
+ }, z.core.$strict>>;
3033
+ }, z.core.$strict>>;
3034
+ evidence: z.ZodObject<{
3035
+ intent: z.ZodString;
3036
+ refs: z.ZodArray<z.ZodString>;
3037
+ }, z.core.$strict>;
3038
+ }, z.core.$strict>;
3039
+ artifactDigest: z.ZodString;
3040
+ }, z.core.$strict>>>;
3041
+ bindings: z.ZodOptional<z.ZodNever>;
3042
+ catalog: z.ZodOptional<z.ZodNever>;
2961
3043
  }, z.core.$strip>;
2962
3044
  readonly limits: z.ZodObject<{
2963
3045
  rateLimitPerMin: z.ZodOptional<z.ZodNumber>;
@@ -3020,8 +3102,8 @@ export interface EffectiveConfig {
3020
3102
  * `proj:*` 可读 scope 前查本表(本地 effective 副本,分钟级陈旧容忍——陈旧只把「刚注册」误判为
3021
3103
  * 「未注册」= fail-closed,永不反向放行)。caps 窄投影不带(壳侧无执法消费;需要时 additive 加)。 */
3022
3104
  projects: ProjectsConfig;
3023
- /** web-admin prompts 战役 v1(0.10.18,[1064]②):存储真形(bindings);effective 下发的解析终形
3024
- * (EffectivePrompts key)由 web-admin 另行组装,worker lane 剥 bindings 全表([1057]⑤ lane 纪律)。 */
3105
+ /** 中心层的身份(14.0.0 单轴:`{ artifact?, workers? }`;域缺席 ⇒ `{}`)。下发不是这一形:每条腿经 {@link promptArtifactFor} 选出一份、
3106
+ * 盖上发布出处,发 {@link EffectivePromptsWire}(见 {@link EffectiveWire})。 */
3025
3107
  prompts: PromptsConfig;
3026
3108
  /** cost/限流族的热更新发布位(0.19.0,消费方 #322 批1)。域缺席 ⇒ `{}`(每一键都 ABSENT =
3027
3109
  * web-admin 不管 ⇒ 消费方回 env 底);11.0.0 起五个限额键的唯一位。 */
@@ -3122,9 +3204,10 @@ export type EffectiveKey = z.infer<typeof EffectiveKey>;
3122
3204
  /** What the service actually receives from GET /effective: identical to {@link EffectiveConfig} EXCEPT the
3123
3205
  * `skills` domain is shipped as a MANIFEST (each skill's `content` → a `contentHash`; bodies pulled lazily
3124
3206
  * via the content endpoint). The `rosters` domain is also emptied at resolution. See the mcp/skills design note §3.1.
3125
- * `prompts` is the second wire divergence (#100): on the wire it is web-admin-assembled RESOLVED form
3126
- * (worker lane strips the bindings storage table — {@link PromptsConfig} 注 [1057]⑤), consumer-validated
3127
- * additive JSON — optional (absent = web-admin published nothing), never the storage shape. */
3207
+ * `prompts` is the second wire divergence: on the wire it is {@link EffectivePromptsWire} (`{schemaVersion: 2, artifact}` — the one
3208
+ * artifact {@link promptArtifactFor} selected for the pulling worker, stamped with its publish provenance), carried verbatim by the
3209
+ * read leg and judged by the consumer (that shape, then the engine's verify) — optional (absent = nothing published, or the publish
3210
+ * gate is closed), never the storage shape. */
3128
3211
  export type EffectiveWire = Omit<EffectiveConfig, "skills" | "prompts"> & {
3129
3212
  skills: SkillsManifest;
3130
3213
  prompts?: unknown;