import { type PromptTextDeclaration, type PublishedPromptArtifactEnvelope } from "@sema-agent/core"; /** [ref]⓪ 下发形(remote effective 的 additive key,JSON verbatim 面——不经 registry-core parse,所以 * cli 补位前 center 发的 `contentHash` 也原样到达)。 */ export interface EffectiveCenterPrompts { /** `center:` — 纯内容寻址(同内容重发布=同 packId,epoch 不误重 pin)。 */ packId: string; /** canonical JSON 全量 sha256(非盐化,operator 对账位 [ref]②)。 */ contentDigest: string; /** covering 已在 center 走完的基线终形(层信息不下发,worker 零解析义务)。 */ sections: PromptTextDeclaration[]; /** per-scenario 完整重算终形(整包替换基线,非增量);无键=用基线。 */ scenarioOverrides?: Record; } /** * 结构判形(防炸底线,非语义复检)。`ok:false` 时调用方拒绝采用该候选的 prompts 面并 warn——绝不让 * 一个坏 pack 把每个任务的 prepare 炸掉。校验与 core assemble 的 THROW 条件同形(id 规范/长度/core/ * 保留、slot 闭集)+ 下发信封两键形;`contentHash` 只查形(值的校验归 core 1.315,错值 core 丢弃+warn)。 */ export declare function validateCenterPrompts(raw: unknown): { ok: true; value: EffectiveCenterPrompts; } | { ok: false; error: string; }; /** core 引擎版本(verifyPromptArtifact 的 compatibleCore range 输入)——经 exports map 解析包根读 * package.json(`require('@sema-agent/core/package.json')` 被 exports 封死,ERR_PACKAGE_PATH_NOT_EXPORTED * 第一手教训)。解析失败回 "0.0.0" = range-gated artifact 被诚实拒(fail-closed 响,绝不静默采用)。 */ export declare const CORE_ENGINE_VERSION: string; /** validatePromptsDomain 的归一产物:两轴的已判形面 + 变更检测身份(adopt 去重键,跨轴稳定)。 */ export interface PromptsDomainFaces { /** A 形(declaration 轴)——centerPromptProvider 继续消费(现行链路零改动)。 */ declarations?: EffectiveCenterPrompts; /** B 形(catalog 轴)——core S1 verify 已过(digest 复算/上限/range 全管线);server 不解释内容, * 原样交 core artifact 仓(e/b 班车接线位)。 */ catalog?: PublishedPromptArtifactEnvelope; /** 采用去重键:两轴 digest 拼接(轴缺席记 "-")。 */ identity: string; /** 观测面([ref]a §3:`center_prompts_adopted` 增 axes,看两轴共存窗)。 */ axes: Array<"declarations" | "catalog">; } /** * prompts 域候选门 v2(validateCenterPrompts 的双轴升级;整拒语义不变=任一在场轴坏形 ⇒ 整个 prompts * 面拒绝采用,LKG/内置继续服务)。唯一认可形=`{schemaVersion:1, declarations?, catalog?}` * (registry-core `EffectivePromptsWire`)至少一轴。[ref]B-9(5.0.0):legacy 平铺兼容窗到期删—— * 0.13.0 起 EffectivePromptsWire 首字段是 `schemaVersion: z.ZodLiteral<1>`,与 server 共用 ^0.13.0 的 * 合规 center 不可能再发平铺;非合规体=响亮拒绝(整拒落 LKG/内置),不再静默吸收。 * catalog 轴的语义权威=core `verifyPromptArtifact`(形/digest 逐位复算/ARTIFACT_LIMITS/compatibleCore * range 全在 core 一处——[ref]③ a 解,上限单真源永不漂)。 */ export declare function validatePromptsDomain(raw: unknown): { ok: true; value: PromptsDomainFaces; } | { ok: false; error: string; }; /** [ref](docs/R100-PROMPTS-LANE-FIX.md §V2-B)worker 腿 effective 上 `prompts` 键的**形-肯定**判别: * 消费形特征(v2 `schemaVersion` 键,或 legacy 三键 packId/contentDigest/sections)⇒ 原样返回交 * {@link validatePromptsDomain}(收或拒,方向不变);其余=center 存储原文(global lane [ref]①e 下发 * 存储形是合法输入)——catalog 在场则投影 `{schemaVersion:1, catalog}`(config-provider 本地腿先例), * 否则视为「center 未发」⇒ undefined。null=有意 cleared 语义([ref] 前 null 走拒,方向为宽是设计变更, * 留痕于设计档)。垃圾标量原样返回(fail-loud 归 validate)。 * 属主放本中立叶:config-lkg 与 boot/refresh 同吃,capabilities 层会重开 S6 刚消的反向依赖边。 */ export declare function centerPromptsFromEffective(eff: unknown): unknown | undefined; //# sourceMappingURL=prompts-domain-validate.d.ts.map