@adcp/sdk API Reference - v10.0.1
    Preparing search index...

    Interface GetPlanAuditLogsResponse

    Governance state and audit trail for one or more plans.

    interface GetPlanAuditLogsResponse {
        context_id?: string;
        context?: ContextObject;
        task_id?: string;
        status: TaskStatus;
        message?: string;
        timestamp?: string;
        replayed?: boolean;
        adcp_error?: Error;
        push_notification_config?: PushNotificationConfig;
        governance_context?: string;
        payload?: {};
        adcp_version?: string;
        adcp_major_version?: number;
        plans: {
            plan_id: string;
            plan_version: number;
            status: "active" | "suspended" | "completed";
            budget: {
                authorized?: number;
                committed?: number;
                remaining?: number;
                utilization_pct?: number;
            };
            channel_allocation?: {
                [k: string]: { committed?: number; pct?: number }
                | undefined;
            };
            summary: {
                checks_performed?: number;
                outcomes_reported?: number;
                statuses?: {
                    approved?: number;
                    denied?: number;
                    conditions?: number;
                    human_reviewed?: number;
                };
                findings_count?: number;
                escalations?: {
                    check_id: string;
                    reason: string;
                    resolution?: string;
                    resolved_at?: string;
                }[];
                drift_metrics?: {
                    escalation_rate?: number;
                    escalation_rate_trend?: "increasing"
                    | "stable"
                    | "declining";
                    auto_approval_rate?: number;
                    human_override_rate?: number;
                    mean_confidence?: number;
                    thresholds?: {
                        escalation_rate_max?: number;
                        escalation_rate_min?: number;
                        auto_approval_rate_max?: number;
                        human_override_rate_max?: number;
                    };
                };
            };
            entries?: {
                id: string;
                type: "check"
                | "outcome";
                timestamp: string;
                plan_id?: string;
                caller?: string;
                tool?: string;
                verdict?: GovernanceDecision;
                check_type?: "intent" | "execution";
                mode?: GovernanceMode;
                explanation?: string;
                policies_evaluated?: string[];
                categories_evaluated?: string[];
                findings?: {
                    category_id: string;
                    policy_id?: string;
                    severity: EscalationSeverity;
                    explanation: string;
                    confidence?: number;
                }[];
                outcome?: OutcomeType;
                committed_budget?: number;
                governance_context?: string;
                plan_hash?: string;
                purchase_type?: PurchaseType;
                outcome_status?: string;
            }[];
            governed_actions: {
                governance_context: string;
                purchase_type: PurchaseType;
                status: "active"
                | "suspended"
                | "completed";
                committed: number;
                check_count: number;
                seller_reference?: string;
            }[];
        }[];
        ext?: ExtensionObject;
    }
    Index

    Properties

    context_id?: string

    Session/conversation identifier for tracking related operations across multiple task invocations. Managed by the protocol layer to maintain conversational context. Distinct from context (per-request opaque echo, see below).

    context?: ContextObject
    task_id?: string

    Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.

    status: TaskStatus
    message?: string

    Human-readable summary of the task result. Provides natural language explanation of what happened, suitable for display to end users or for AI agent comprehension. Generated by the protocol layer based on the task response.

    timestamp?: string

    ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.

    replayed?: boolean

    Set to true when this response was returned from the idempotency cache rather than from a fresh execution. Set to false (or omitted) when the request was executed fresh. Buyers use this to distinguish cached replays from new executions — matters for billing reconciliation, audit logs, state-machine routing (cached state-tracking fields are historical snapshots, not current state — re-read via the resource's read endpoint), and any downstream system that assumes exactly-once event semantics. From 3.1 onward, replayed MAY appear on responses to any request that resolved via the idempotency cache, including read tools — universal idempotency_key (see security.mdx §Idempotency) means the cache holds read responses too.

    adcp_error?: Error
    push_notification_config?: PushNotificationConfig
    governance_context?: string

    Governance context token issued by the account's governance agent during check_governance. Buyers attach it to governed purchase requests (media buys, rights acquisitions, signal activations, creative services); sellers persist it and include it on all subsequent governance calls for that action's lifecycle. An account binds to one governance agent (see sync_governance); governance is phased across purchase / modification / delivery, not partitioned across specialist agents, so the envelope carries a single token for the full lifecycle.

    Value format: governance agents MUST emit a compact JWS per the AdCP JWS profile (see Security — Signed Governance Context). Sellers MAY verify; sellers that do not verify MUST persist and forward the token unchanged. In 3.1 all sellers MUST verify. Non-JWS values from pre-3.0 governance agents are deprecated.

    This is the primary correlation key for audit and reporting across the governance lifecycle.

    payload?: {}

    Conceptual grouping for the task-specific response data defined by individual task response schemas (e.g., get-products-response.json, create-media-buy-response.json). payload is a documentary construct — it is NOT a required wire field, and its on-the-wire shape depends on transport (see Transport serialization below). Task response schemas declare body fields without wrapping them in a payload object; the wire representation places those body fields per transport convention. On MCP the body fields appear as siblings of envelope fields at the root of the tool response; on A2A they appear inside task.artifacts[0].parts[].DataPart; on REST they appear at the root of the JSON body.

    adcp_version?: string

    Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.

    adcp_major_version?: number

    DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.

    plans: {
        plan_id: string;
        plan_version: number;
        status: "active" | "suspended" | "completed";
        budget: {
            authorized?: number;
            committed?: number;
            remaining?: number;
            utilization_pct?: number;
        };
        channel_allocation?: {
            [k: string]: { committed?: number; pct?: number }
            | undefined;
        };
        summary: {
            checks_performed?: number;
            outcomes_reported?: number;
            statuses?: {
                approved?: number;
                denied?: number;
                conditions?: number;
                human_reviewed?: number;
            };
            findings_count?: number;
            escalations?: {
                check_id: string;
                reason: string;
                resolution?: string;
                resolved_at?: string;
            }[];
            drift_metrics?: {
                escalation_rate?: number;
                escalation_rate_trend?: "increasing"
                | "stable"
                | "declining";
                auto_approval_rate?: number;
                human_override_rate?: number;
                mean_confidence?: number;
                thresholds?: {
                    escalation_rate_max?: number;
                    escalation_rate_min?: number;
                    auto_approval_rate_max?: number;
                    human_override_rate_max?: number;
                };
            };
        };
        entries?: {
            id: string;
            type: "check"
            | "outcome";
            timestamp: string;
            plan_id?: string;
            caller?: string;
            tool?: string;
            verdict?: GovernanceDecision;
            check_type?: "intent" | "execution";
            mode?: GovernanceMode;
            explanation?: string;
            policies_evaluated?: string[];
            categories_evaluated?: string[];
            findings?: {
                category_id: string;
                policy_id?: string;
                severity: EscalationSeverity;
                explanation: string;
                confidence?: number;
            }[];
            outcome?: OutcomeType;
            committed_budget?: number;
            governance_context?: string;
            plan_hash?: string;
            purchase_type?: PurchaseType;
            outcome_status?: string;
        }[];
        governed_actions: {
            governance_context: string;
            purchase_type: PurchaseType;
            status: "active"
            | "suspended"
            | "completed";
            committed: number;
            check_count: number;
            seller_reference?: string;
        }[];
    }[]

    Audit data for each requested plan.

    Type Declaration

    • plan_id: string

      Plan identifier.

    • plan_version: number

      Current plan version.

    • status: "active" | "suspended" | "completed"

      Plan lifecycle status.

    • budget: {
          authorized?: number;
          committed?: number;
          remaining?: number;
          utilization_pct?: number;
      }

      Budget state.

      • Optionalauthorized?: number

        Total authorized budget from the plan.

      • Optionalcommitted?: number

        Total budget committed from confirmed outcomes.

      • Optionalremaining?: number

        Authorized minus committed.

      • Optionalutilization_pct?: number

        Committed as a percentage of authorized.

    • Optionalchannel_allocation?: { [k: string]: { committed?: number; pct?: number } | undefined }

      Current channel mix. Keyed by channel ID.

    • summary: {
          checks_performed?: number;
          outcomes_reported?: number;
          statuses?: {
              approved?: number;
              denied?: number;
              conditions?: number;
              human_reviewed?: number;
          };
          findings_count?: number;
          escalations?: {
              check_id: string;
              reason: string;
              resolution?: string;
              resolved_at?: string;
          }[];
          drift_metrics?: {
              escalation_rate?: number;
              escalation_rate_trend?: "increasing"
              | "stable"
              | "declining";
              auto_approval_rate?: number;
              human_override_rate?: number;
              mean_confidence?: number;
              thresholds?: {
                  escalation_rate_max?: number;
                  escalation_rate_min?: number;
                  auto_approval_rate_max?: number;
                  human_override_rate_max?: number;
              };
          };
      }

      Aggregate validation and outcome statistics.

      • Optionalchecks_performed?: number

        Total governance checks performed.

      • Optionaloutcomes_reported?: number

        Total outcomes reported.

      • Optionalstatuses?: {
            approved?: number;
            denied?: number;
            conditions?: number;
            human_reviewed?: number;
        }

        Count of each governance check status.

        • Optionalapproved?: number
        • Optionaldenied?: number
        • Optionalconditions?: number
        • Optionalhuman_reviewed?: number

          Supplementary count of checks that went through internal human review. These checks are also counted in approved or denied.

      • Optionalfindings_count?: number

        Total findings across all checks and outcomes.

      • Optionalescalations?: { check_id: string; reason: string; resolution?: string; resolved_at?: string }[]

        All escalations and their resolutions.

      • Optionaldrift_metrics?: {
            escalation_rate?: number;
            escalation_rate_trend?: "increasing" | "stable" | "declining";
            auto_approval_rate?: number;
            human_override_rate?: number;
            mean_confidence?: number;
            thresholds?: {
                escalation_rate_max?: number;
                escalation_rate_min?: number;
                auto_approval_rate_max?: number;
                human_override_rate_max?: number;
            };
        }

        Aggregate governance metrics for detecting oversight drift. A declining escalation rate may indicate well-calibrated governance or eroding human oversight -- surfacing the trend lets the organization make that judgment.

        • Optionalescalation_rate?: number

          Fraction of checks that resulted in escalation.

          0

          1

        • Optionalescalation_rate_trend?: "increasing" | "stable" | "declining"

          Direction of escalation rate over the plan's lifetime.

        • Optionalauto_approval_rate?: number

          Fraction of checks approved without human intervention.

          0

          1

        • Optionalhuman_override_rate?: number

          Fraction of escalations where the human overrode the governance agent's recommendation.

          0

          1

        • Optionalmean_confidence?: number

          Average confidence score across all findings. Present when findings include confidence scores.

          0

          1

        • Optionalthresholds?: {
              escalation_rate_max?: number;
              escalation_rate_min?: number;
              auto_approval_rate_max?: number;
              human_override_rate_max?: number;
          }

          Organization-defined thresholds for drift metrics. When a metric crosses its threshold, the governance agent SHOULD include a finding on the next check. Set by the organization in governance agent configuration, echoed here for visibility.

          • Optionalescalation_rate_max?: number

            Maximum acceptable escalation rate. A rate above this suggests policy miscalibration.

            0

            1

          • Optionalescalation_rate_min?: number

            Minimum acceptable escalation rate. A rate below this may indicate eroding oversight.

            0

            1

          • Optionalauto_approval_rate_max?: number

            Maximum acceptable auto-approval rate.

            0

            1

          • Optionalhuman_override_rate_max?: number

            Maximum acceptable human override rate. A high rate suggests the governance agent's recommendations are poorly calibrated.

            0

            1

    • Optionalentries?: {
          id: string;
          type: "check" | "outcome";
          timestamp: string;
          plan_id?: string;
          caller?: string;
          tool?: string;
          verdict?: GovernanceDecision;
          check_type?: "intent" | "execution";
          mode?: GovernanceMode;
          explanation?: string;
          policies_evaluated?: string[];
          categories_evaluated?: string[];
          findings?: {
              category_id: string;
              policy_id?: string;
              severity: EscalationSeverity;
              explanation: string;
              confidence?: number;
          }[];
          outcome?: OutcomeType;
          committed_budget?: number;
          governance_context?: string;
          plan_hash?: string;
          purchase_type?: PurchaseType;
          outcome_status?: string;
      }[]

      Ordered audit trail. Only present when include_entries is true.

    • governed_actions: {
          governance_context: string;
          purchase_type: PurchaseType;
          status: "active" | "suspended" | "completed";
          committed: number;
          check_count: number;
          seller_reference?: string;
      }[]

      Per-action breakdown grouped by governance context.

    ext?: ExtensionObject