@adcp/sdk API Reference - v17.0.0-rc.0
    Preparing search index...

    Interface GetTaskStatusResponse

    Response from the get_task_status AdCP tool, a 3.x protocol-namespace alias for legacy AdCP tasks/get. Contains AdCP application-layer task status, task metadata, and optional conversation history or terminal result payload; distinct from transport-native MCP/A2A task responses.

    interface GetTaskStatusResponse {
        adcp_version?: string;
        adcp_major_version?: number;
        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?: {};
        task_type: TaskType;
        protocol: AdCPProtocol;
        created_at: string;
        updated_at: string;
        completed_at?: string;
        has_webhook?: boolean;
        progress?: {
            percentage?: number;
            current_step?: string;
            total_steps?: number;
            step_number?: number;
        };
        error?: {
            code: string;
            message: string;
            details?: {
                protocol?: AdCPProtocol;
                operation?: string;
                specific_context?: {};
            };
        };
        history?: { timestamp: string; type: "request"
        | "response"; data: {} }[];
        result?: {};
        ext?: ExtensionObject;
    }
    Index
    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.

    context_id?: string

    Transport-managed conversation identifier. On A2A, this maps to the native Message/Task contextId used to associate messages with a conversation; it is not carried inside the AdCP DataPart. On MCP, a request-body context_id, where admitted by the selected request schema, is a compatibility-only field: servers MUST ignore it, callers MUST NOT rely on it for continuity, and it MUST NOT select session state, identity, account, authorization, task continuation, or idempotency scope. MCP continuity, if provided, comes from the transport session. Distinct from context (per-request opaque echo, see below) and from task_id (AdCP operation tracking).

    context?: ContextObject
    task_id: string
    status: TaskStatus
    message?: string
    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. replayed: true appears only when the request actually resolved through the idempotency cache; an absent replayed means false, and a response MAY carry replayed: false. Pure reads may ignore an optional idempotency_key; when a seller voluntarily caches keyed reads, those responses use the same replay indicator and full cache contract.

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

    Opaque authorization context issued only by an approved check_governance decision. Buyers attach it to governed requests across protocol roles (media buys, rights acquisitions, signal activations, creative services); receiving services persist it and forward it on subsequent execution and lifecycle checks. The context is the authoritative plan binding at service boundaries, so a service MUST NOT require a separate plan_id.

    Governance agents MUST emit a compact JWS per the AdCP JWS profile. Verifiers validate standard authorization claims such as signature, issuer, audience, expiry, and replay protection, but intermediaries MUST NOT interpret embedded governance state for business logic. A conditions or denied verdict never carries an authorization context.

    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.

    task_type: TaskType
    protocol: AdCPProtocol
    created_at: string

    When the task was initially created (ISO 8601)

    date-time

    updated_at: string

    When the task was last updated (ISO 8601)

    date-time

    completed_at?: string

    When the task completed (ISO 8601, only for completed/failed/canceled tasks)

    date-time

    has_webhook?: boolean

    Whether this task has webhook configuration

    progress?: {
        percentage?: number;
        current_step?: string;
        total_steps?: number;
        step_number?: number;
    }

    Progress information for long-running tasks

    Type Declaration

    • Optionalpercentage?: number

      Completion percentage (0-100)

      0

      100

    • Optionalcurrent_step?: string

      Current step or phase of the operation

    • Optionaltotal_steps?: number

      Total number of steps in the operation

      1

      int

    • Optionalstep_number?: number

      Current step number

      1

      int

    error?: {
        code: string;
        message: string;
        details?: {
            protocol?: AdCPProtocol;
            operation?: string;
            specific_context?: {};
        };
    }

    Convenience summary for failed tasks. When include_result was true and the canonical terminal result is also present, this error MUST agree with the canonical fatal error in result. A legacy poll carrying only this singular summary proves failure status but not equivalence to a richer terminal webhook artifact.

    Type Declaration

    • code: string

      Error code for programmatic handling

    • message: string

      Detailed error message

    • Optionaldetails?: { protocol?: AdCPProtocol; operation?: string; specific_context?: {} }

      Additional error context

      • Optionalprotocol?: AdCPProtocol
      • Optionaloperation?: string

        Specific operation that failed

      • Optionalspecific_context?: {}

        Domain-specific error context

    history?: { timestamp: string; type: "request" | "response"; data: {} }[]

    Complete conversation history for this task (only included if include_history was true in request)

    Type Declaration

    • timestamp: string

      When this exchange occurred (ISO 8601)

      date-time

    • type: "request" | "response"

      Whether this was a request from client or response from server

    • data: {}

      The full request or response payload

    result?: {}

    Canonical task-specific terminal payload. Present when include_result was true and a completed, failed, or rejected task produced a terminal artifact; canceled tasks may omit it. For failed tasks, the singular error field is a convenience summary and MUST agree with the canonical fatal error represented here. Consumers and sellers MUST resolve and validate the exact schema through manifest.task_result_resolution: use terminal_schema_overrides[task_type] when present, otherwise tools[task_type].response_schema. The polling envelope keeps this field generic so get_task_status does not embed every task response schema.