/** * Record-hash reference primitives shared across the producer side * (middleware, atrib-emit, hooks). * * Per atrib-spec §1.2.5: informed_by entries are "sha256:" + 64 lowercase hex. * Per §1.2.7: annotates is the same shape. * * Co-locating the regex + extractor here means the middleware's * autoDetectInformedByFromArgs path, atrib-emit's input validation, and any * out-of-tree wrapper (e.g. mcp-wrap) all use the same definitions. Drift * between them would silently produce records with inconsistent reference * formats (some pass-through, some rejected). */ /** Anchored regex matching a single canonical record_hash reference. */ export declare const SHA256_REF_PATTERN: RegExp; /** Global (unanchored) regex used for scanning prose / nested values. */ export declare const SHA256_REF_GLOBAL_PATTERN: RegExp; /** Env var used by parent producers to thread a parent record into child records. */ export declare const ATRIB_PARENT_RECORD_HASH_ENV = "ATRIB_PARENT_RECORD_HASH"; /** * Return the parent record hash seed from an environment object. * * Invalid values are ignored so parent-child threading preserves the * degradation contract: attribution metadata may drop, but the tool call * must not fail. */ export declare function parentRecordHashFromEnv(env?: Record): string | undefined; /** * Walk a value (any shape) and extract all sha256:<64-hex> references. * Returns a Set of canonicalized matches. * * Skips the top-level `chain_root` field, that field carries the chain * primitive (parent record's hash), not a reference the agent is claiming * informed the action. Per §1.2.3 chain_root is structural metadata. * * The walker is recursive but only skips `chain_root` at the IMMEDIATE * top level of an object. Nested keys like `previous.chain_root` would * still be walked (a producer that nests a sha256 deep in args genuinely * means it as a reference; the structural-metadata exception is only for * the top-level field name). */ export declare function extractRecordHashes(value: unknown): Set; /** * Extract record-reference candidates from structured reference fields only. * * This is the safe input for autoDetectInformedByFromArgs. It does not scan * arbitrary prose, content payloads, args_hash/result_hash/content_id * commitments, or nested informed_by envelopes. Those values may be * meaningful evidence, but they are not automatically graph edges. */ export declare function extractRecordReferenceCandidates(value: unknown): Set; //# sourceMappingURL=refs.d.ts.map