/** * S-545 —— **wire 帧投影面的登记表**([ref]「手抄投影全面下线,改由源头机器派生」在本仓第一处落点)。 * * ## 这张表是什么(以及它**不是**什么) * 每一行登记一只把 core 帧投到 wire 的构造器,只写三样**人必须裁定**的东西: * · `coreType` —— 该面的键集**权威**所在的 core 型表达式。键名本身**一个都不抄**:门把这段表达式喂给 * `test/helpers/core-frame-keys.ts`,由 TypeScript 的类型检查器从**安装态 core 的 `.d.ts`** 里读出键集 * 与一枚全键 fixture。core 加键/退键 ⇒ 读数当场变,不需要任何人记得回来改表。 * · `excluded` / `unwrapped` —— core 有、本面**有意不投**或**拆开铺平**的键。这不是键集,是**处置**: * 没有任何机器能替人决定一个键该不该上 wire,所以这一栏必须是人写的。它的正确性由门反向钉住 * (登记的词必须仍是 core 的键;core 退役一个键而这里留着残条目 ⇒ 红)。 * · `minted` —— 本仓**自铸**、core 没有的 wire 键。同样是处置,同样被反向钉住(铸键不许与 core 键重名)。 * * ## 为什么在 `src/` 而不在 `test/` * 与 `core-keyset-guard.ts` 同一条理由:它的**执行点之一是 `tsc --noEmit`** —— 那个文件的 ① 面把 * `NotificationExcluded` 直接读成本表这一行的 `excluded`,于是「哪几个键有意不上 wire」全仓**只有一个写者**。 * 旧形是两个:守卫文件一簿、`test/wire-whitelist-exhaustiveness.test.ts` 的 `KnownExcluded` 一簿,那份门注 * 自己写着「两处必须同时改」—— 而「必须同时改」正是 [ref] 要下线的东西(对账门不算替代,单写者才算)。 * 本表是纯数据、无行为,被守卫文件以 `typeof import(...)` 的**类型查询**读取(编译期擦除,零运行期边)。 * * ## 门在哪里 * `test/wire-whitelist-exhaustiveness.test.ts`:对每一行喂一枚 core 型全键 fixture,真的跑一遍构造器, * 断言 **投影体键集 == (core 键 − excluded − unwrapped) ∪ minted**(等式 = 两个方向一次给全:多投一枚 * core 没有的键、漏投一枚 core 有的键,各自一条变异负控证判别力)。同一只门还把本表与 `project.ts` 的 * 构造器导出清单对账 —— 新加一只投影器而不登记本表 ⇒ 红(普查不许有洞)。 */ /** 一只帧投影构造器的登记行。 */ export interface WireProjectionFace { /** 构造器的导出名(普查对账用;`project.ts` 与两只 HTTP 行投影都按这个名字找)。 */ readonly projector: string; /** 该面键集权威所在的 **core 型表达式**(门把它原样写进探针文件)。 */ readonly coreType: string; /** core 有、本面**有意不投**的键(逐键理由写在本行上方;涉及裁定的真源指向守卫文件对应面)。 */ readonly excluded: readonly string[]; /** core 有、但被**拆开铺平**成本面自身键集的壳键(壳键本身不上 wire,它的成员才是本面)。 */ readonly unwrapped?: readonly string[]; /** 本仓**自铸**、core 没有、且在场无条件的 wire 键(逐键理由写在本行上方)。 */ readonly minted: readonly string[]; /** * 本仓自铸、但**只在某个条件成立时**在场的键 —— 门对它只判「允许」不判「必需」。 * 每一枚都要写清那个条件,而且那个条件必须是 **core 型表达不出来的**(否则它该进 `minted`,由全键 * fixture 逼出来)。今天唯一的一员是清标行的 `originUnknownKeys`:它的触发条件是「入参带了 core 型上 * **没有**的嵌套成员」,而全键 fixture 是照 core 型生成的,结构上永远触发不了它。 */ readonly mintedConditional?: readonly string[]; } /** * `TaskEvent` **信封**上的键 —— 这一族构造器一个都不管,所以在每一只 TaskEvent 面上统一扣除。 * · `type`:臂名由调用点自己拼在投影体外(`{ type: "tool_end", ...toolEndEventData(ev) }`),不是载荷键; * · `sourceTaskId` / `bgAgentId`:live 腿的**四键身份**由 `liveIdentityFields` 单独挑(durable 两腿只挑两键), * 属主是那只函数而不是各面构造器 —— 所以对本族构造器它们恒不在投影体里。 * 这是**一条统一规则**,不是十六个面各自的豁免名单:新臂进来自动适用。 */ export declare const FRAME_ENVELOPE_KEYS: readonly ["type", "sourceTaskId", "bgAgentId"]; /** 探针文件要从 `@sema-agent/core` 具名导入的类型(`coreType` 表达式里用到的全部名字)。 */ export declare const WIRE_PROJECTION_CORE_IMPORTS: readonly ["TaskEvent", "TaskNotificationPayload", "WiringManifest", "EngineNotice", "MemoryImportReport", "OriginClearanceRow", "OriginClearanceEvent", "MemoryEntryOrigin"]; /** * 全部帧投影面。键 = 面名(门的报错文案与负控都按它称呼这一行)。 * * ⚠️ 加一只新构造器时**同批加一行**;不加 ⇒ 普查对账格红(这正是它存在的理由 —— 旧形下三个后进构造器 * 在门辖外躺了一整个提货周期,core 给那三分支加键时无人红,[ref] 审计 2.4 才补上)。 */ export declare const WIRE_PROJECTION_FACES: { readonly task_progress: { readonly projector: "taskProgressEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly tool_start: { readonly projector: "toolStartEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly tool_end: { readonly projector: "toolEndEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly tool_progress: { readonly projector: "toolProgressEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly tool_disclosure: { readonly projector: "toolDisclosureEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly tool_roster_delta: { readonly projector: "toolRosterDeltaEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly diagnostics: { readonly projector: "diagnosticsEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly steering_injected: { readonly projector: "steeringInjectedEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly workspace_changed: { readonly projector: "workspaceChangedEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly status: { readonly projector: "brainStatusEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly compacted: { readonly projector: "compactedEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly context_usage: { readonly projector: "contextUsageEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly turn_end: { readonly projector: "turnEndEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly compaction_outcome: { readonly projector: "compactionOutcomeEventData"; readonly coreType: string; readonly excluded: readonly []; readonly minted: readonly []; }; readonly human_input: { readonly projector: "humanInputEventData"; readonly coreType: string; readonly excluded: readonly ["principal"]; readonly minted: readonly []; }; readonly task_notification: { readonly projector: "taskNotificationEventData"; readonly coreType: `TaskNotificationPayload & ${string}`; readonly excluded: readonly ["peer", "crossSessionMessage", "crossSessionNotice"]; readonly unwrapped: readonly ["notification"]; readonly minted: readonly ["injected"]; }; readonly wiring_manifest_tenant: { readonly projector: "wiringManifestEventData"; readonly coreType: `WiringManifest & ${string}`; readonly excluded: readonly ["governance", "configFingerprint", "autoConsolidation", "readDeny"]; readonly unwrapped: readonly ["manifest"]; readonly minted: readonly []; }; readonly wiring_manifest_operator: { readonly projector: "wiringManifestOperatorEventData"; readonly coreType: `WiringManifest & ${string}`; readonly excluded: readonly []; readonly unwrapped: readonly ["manifest"]; readonly minted: readonly []; }; readonly engine_notice: { readonly projector: "engineNoticeEventData"; readonly coreType: "EngineNotice"; readonly excluded: readonly []; readonly minted: readonly ["ts"]; }; readonly memory_import_report: { readonly projector: "buildImportReportWire"; readonly coreType: "MemoryImportReport"; readonly excluded: readonly []; readonly minted: readonly []; }; readonly origin_clearance_row: { readonly projector: "buildClearanceRowWire"; readonly coreType: "OriginClearanceRow"; readonly excluded: readonly ["entryText"]; readonly minted: readonly ["custodyBytes"]; readonly mintedConditional: readonly ["originUnknownKeys"]; }; readonly origin_clearance_origin: { readonly projector: "buildClearanceRowWire"; readonly coreType: "MemoryEntryOrigin"; readonly excluded: readonly []; readonly minted: readonly []; }; readonly origin_clearance_event: { readonly projector: "buildClearanceRowWire"; readonly coreType: "OriginClearanceEvent"; readonly excluded: readonly []; readonly minted: readonly []; }; }; /** 面名。 */ export type WireProjectionFaceName = keyof typeof WIRE_PROJECTION_FACES; //# sourceMappingURL=wire-projection-faces.d.ts.map