Interface: RequiredMetadataRule
Defined in: src/batteries/validation/types.ts:85
Requires provider-specific metadata on selected primitives.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
applyTo | "every" | "first-in-group" | Whether metadata is required only on the group leader or on every matching primitive. | src/batteries/validation/types.ts:93 |
fallbackPayloadValue? | unknown | Vendor-documented sentinel used when the genuine metadata is unavailable (for example, Gemini's skip_thought_signature_validator for translated or model-switched history). Consumed only by mutate-mode repair, and only with OrderingGuardOptions.allowMetadataFallbackRepair; it must never be applied by ordinary mutate mode because it represents a provenance claim. | src/batteries/validation/types.ts:113 |
fallbackRepairAuthorized? | boolean | Whether THIS rule's fallbackPayloadValue may be applied in mutate mode without OrderingGuardOptions.allowMetadataFallbackRepair. Remarks The global flag exists because a fallback value asserts provenance the ADK cannot verify, and that should be an explicit choice. But a global flag is the wrong granularity for a sentinel the VENDOR itself publishes for exactly this case: gating Gemini's documented, portable skip_thought_signature_validator behind the same switch as an arbitrary fabricated value left gemini-3 unable to dispatch a replayed tool call under ANY configuration — enforce nacks, mutate nacks, and the only working setting is a flag whose own documentation warns against enabling it casually. That is issue #15 defect 3. Set this only where the fallback is a vendor-documented escape hatch rather than an invented value. It authorizes ONE rule's fallback; it does not enable fallback repair catalog-wide, and allowMetadataFallbackRepair still authorizes rules that do not declare it. Defaults to false, preserving the existing behaviour for every rule that does not opt in. | src/batteries/validation/types.ts:138 |
fallbackReplayCompatibility? | string | Replay-adapter convention to attach alongside fallbackPayloadValue. A payload requires this tag so the ADK knows which adapter may replay it. Consumed only by the separately opted-in mutate-mode fallback repair, never by validation or ordinary mutation. | src/batteries/validation/types.ts:119 |
gatedByReplayCompatibility? | string[] | Optional producer tags that gate this check; metadata is required only when the primitive's replay-compatibility tag identifies one of these wire formats. | src/batteries/validation/types.ts:106 |
id | string | Stable identifier used in violations. | src/batteries/validation/types.ts:89 |
kind | OrderingPrimitiveKind | Primitive whose payload is required to carry the metadata. | src/batteries/validation/types.ts:91 |
requiredPayloadKey | string | Dot-path into value.payload for the required provider metadata. | src/batteries/validation/types.ts:95 |
severity? | "blocking" | "advisory" | Whether a missing value blocks dispatch. Omitted means blocking; advisory records the same metadata check without allowing it to reject a dispatch. This models Gemini 3's hard thought_signature requirement versus Gemini 2.5's advisory version of the same check. | src/batteries/validation/types.ts:101 |
type | "requiredMetadata" | Discriminator selecting the metadata-presence evaluator. | src/batteries/validation/types.ts:87 |