import { z } from "zod"; import type { JsonValue } from "@decionis/agent-safe-pipeline"; /** * Core's outcome evidence wire contract (`decionis.outcomes.evidence/1`, inside * `decionis.outcomes.submission/1`), mirrored here. Core owns the meter: the signed agreement, * the one `OutcomeCalculator` that classifies, the append-only ledger and the signed monthly * statement. AgentSafe only states what it recorded about its card purchases and submits it with * its producer token. * * Owner: decionis/Decionis, `packages/shared/src/outcomes/Evidence.ts`, generated to * `packages/shared/contracts/OutcomeEvidence.v1.json` (owner revision e264bfbf5, source digest * 865c60e2…). The exact bytes are vendored at `packages/agentsafe/contracts/OutcomeEvidence.v1.json` * and pinned by {@link OUTCOME_EVIDENCE_CONTRACT_SHA256}: a test fails when the copy drifts, and * holds every submission this package builds to the vendored schema. */ export declare const OUTCOME_EVIDENCE_VERSION: "decionis.outcomes.evidence/1"; export declare const OUTCOME_SUBMISSION_VERSION: "decionis.outcomes.submission/1"; export declare const OUTCOME_EVIDENCE_LIMITS: { readonly batch: 1000; readonly reasons: 30; readonly exclusions: 10; }; /** SHA-256 of the vendored owner bytes (`packages/agentsafe/contracts/OutcomeEvidence.v1.json`). */ export declare const OUTCOME_EVIDENCE_CONTRACT_SHA256 = "488c42003adce72cadfd6096586ebdb1c4bb79801e796810da78000bdded3d5b"; export declare const OUTCOME_CODE: RegExp; /** Integer minor units in the transaction currency at its own scale; never converted. */ export declare const OutcomeMoneySchema: z.ZodObject<{ currency: z.ZodString; scale: z.ZodNumber; amount_minor: z.ZodNumber; }, z.core.$strict>; /** * One business action, normalized by its producer. A later revision of the same subject * supersedes the earlier one; business identifiers never leave AgentSafe, only digests. The * three cross-field rules are Core's, and the JSON Schema cannot state them: governed evidence * names its decision, only a held or blocked action is reviewed, and the financial result stays * in the transaction currency. */ export declare const OutcomeEvidenceSchema: z.ZodObject<{ version: z.ZodLiteral<"decionis.outcomes.evidence/1">; subject_digest: z.ZodString; revision: z.ZodNumber; platform: z.ZodString; connection_id: z.ZodNullable; action_type: z.ZodString; occurred_at: z.ZodString; amount: z.ZodObject<{ currency: z.ZodString; scale: z.ZodNumber; amount_minor: z.ZodNumber; }, z.core.$strict>; coverage: z.ZodEnum<{ UNGOVERNED: "UNGOVERNED"; OBSERVED: "OBSERVED"; GOVERNED: "GOVERNED"; }>; decision: z.ZodNullable; dossier_id: z.ZodNullable; disposition: z.ZodEnum<{ BLOCK: "BLOCK"; HOLD: "HOLD"; PROCEED: "PROCEED"; }>; mode: z.ZodEnum<{ SHADOW: "SHADOW"; ENFORCEMENT: "ENFORCEMENT"; PARALLEL: "PARALLEL"; }>; decided_at: z.ZodString; reason_codes: z.ZodArray; }, z.core.$strict>>; review: z.ZodNullable; confirmation: z.ZodEnum<{ UNCONFIRMED: "UNCONFIRMED"; CONFIRMED_PROBLEM: "CONFIRMED_PROBLEM"; LEGITIMATE: "LEGITIMATE"; }>; confirmed_by: z.ZodNullable>; reviewer: z.ZodEnum<{ CUSTOMER: "CUSTOMER"; DESK: "DESK"; }>; decided_at: z.ZodString; analyst_minutes: z.ZodNullable; }, z.core.$strict>>; execution: z.ZodNullable; grant_id: z.ZodNullable; receipt_sha256: z.ZodNullable; at: z.ZodString; }, z.core.$strict>>; financial: z.ZodNullable; amount: z.ZodObject<{ currency: z.ZodString; scale: z.ZodNumber; amount_minor: z.ZodNumber; }, z.core.$strict>; at: z.ZodString; }, z.core.$strict>>; exclusion_codes: z.ZodArray; source_sha256: z.ZodString; }, z.core.$strict>; /** * `POST /v1/outcomes/evidence`: the producer token names the producer, the body names the * organization it observed. One revision per subject in a batch, as Core holds it. */ export declare const OutcomeEvidenceSubmissionSchema: z.ZodObject<{ version: z.ZodLiteral<"decionis.outcomes.submission/1">; producer: z.ZodEnum<{ agentsafe: "agentsafe"; commerce: "commerce"; }>; org_id: z.ZodString; evidence: z.ZodArray; subject_digest: z.ZodString; revision: z.ZodNumber; platform: z.ZodString; connection_id: z.ZodNullable; action_type: z.ZodString; occurred_at: z.ZodString; amount: z.ZodObject<{ currency: z.ZodString; scale: z.ZodNumber; amount_minor: z.ZodNumber; }, z.core.$strict>; coverage: z.ZodEnum<{ UNGOVERNED: "UNGOVERNED"; OBSERVED: "OBSERVED"; GOVERNED: "GOVERNED"; }>; decision: z.ZodNullable; dossier_id: z.ZodNullable; disposition: z.ZodEnum<{ BLOCK: "BLOCK"; HOLD: "HOLD"; PROCEED: "PROCEED"; }>; mode: z.ZodEnum<{ SHADOW: "SHADOW"; ENFORCEMENT: "ENFORCEMENT"; PARALLEL: "PARALLEL"; }>; decided_at: z.ZodString; reason_codes: z.ZodArray; }, z.core.$strict>>; review: z.ZodNullable; confirmation: z.ZodEnum<{ UNCONFIRMED: "UNCONFIRMED"; CONFIRMED_PROBLEM: "CONFIRMED_PROBLEM"; LEGITIMATE: "LEGITIMATE"; }>; confirmed_by: z.ZodNullable>; reviewer: z.ZodEnum<{ CUSTOMER: "CUSTOMER"; DESK: "DESK"; }>; decided_at: z.ZodString; analyst_minutes: z.ZodNullable; }, z.core.$strict>>; execution: z.ZodNullable; grant_id: z.ZodNullable; receipt_sha256: z.ZodNullable; at: z.ZodString; }, z.core.$strict>>; financial: z.ZodNullable; amount: z.ZodObject<{ currency: z.ZodString; scale: z.ZodNumber; amount_minor: z.ZodNumber; }, z.core.$strict>; at: z.ZodString; }, z.core.$strict>>; exclusion_codes: z.ZodArray; source_sha256: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>; export type OutcomeMoney = z.infer; export type OutcomeEvidence = z.infer; export type OutcomeDecision = NonNullable; export type OutcomeReview = NonNullable; export type OutcomeExecution = NonNullable; export type OutcomeEvidenceSubmission = z.infer; /** * What the producer states about one subject. The revision is not the producer's to choose: * the store assigns it from what it last recorded for the subject, so a subject's revision * rises exactly when its evidence changes. */ export type OutcomeEvidenceDraft = Omit; /** Whether a string is a digest in the contract's form: 64 lowercase hex characters. */ export declare function isOutcomeDigest(value: unknown): value is string; /** * The contract's digest: SHA-256 over the RFC 8785 canonical form, as 64 lowercase hex * characters with no prefix. The canonicaliser is the one every other digest here uses. */ export declare function outcomeDigest(value: JsonValue): string; //# sourceMappingURL=OutcomeEvidence.d.ts.map