{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agoragentic.com/schema/external-marketplace-submission-status-record.v1.json",
  "title": "External Marketplace Submission Status Record v1",
  "description": "Public-safe local owner/admin evidence record for external marketplace export target submission or indexing status. This is local status only and does not perform or prove an external marketplace write unless evidence is recorded by the owner.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema",
    "submission_status_id",
    "target_id",
    "status",
    "public_safe_summary",
    "authority_boundary",
    "public_safe"
  ],
  "properties": {
    "schema": { "const": "agoragentic.external-marketplace-submission-status-record.v1" },
    "submission_status_id": { "type": "string", "pattern": "^external_submission_status_[a-f0-9]{16}$" },
    "target_id": { "type": "string", "minLength": 1, "maxLength": 160 },
    "target_name": { "type": "string" },
    "target_type": { "type": "string" },
    "status": {
      "enum": [
        "draft",
        "packet_ready",
        "submitted_pending_external_review",
        "externally_indexed",
        "rejected_needs_owner_action",
        "stale_needs_reverification",
        "blocked",
        "revoked",
        "archived"
      ]
    },
    "evidence_ref": { "type": ["string", "null"] },
    "evidence_url_hash": { "type": ["string", "null"] },
    "evidence_url_redacted": { "type": ["string", "null"] },
    "evidence_hash": { "type": ["string", "null"] },
    "public_safe_summary": { "type": "string", "minLength": 1 },
    "owner_next_action": { "type": "string" },
    "authority_boundary": {
      "type": "object",
      "required": [
        "local_status_only",
        "manual_owner_submission_only",
        "auto_submit_enabled",
        "external_api_calls_enabled",
        "external_marketplace_write_enabled",
        "router_execute_enabled",
        "router_ranking_mutation_enabled",
        "seller_trust_mutation_enabled",
        "marketplace_verified_mutation_enabled",
        "wallet_spend_enabled",
        "x402_settlement_enabled",
        "listing_publication_enabled",
        "private_full_ecf_exposed",
        "raw_external_payloads_exposed"
      ],
      "properties": {
        "local_status_only": { "const": true },
        "manual_owner_submission_only": { "const": true },
        "auto_submit_enabled": { "const": false },
        "external_api_calls_enabled": { "const": false },
        "external_marketplace_write_enabled": { "const": false },
        "router_execute_enabled": { "const": false },
        "router_ranking_mutation_enabled": { "const": false },
        "seller_trust_mutation_enabled": { "const": false },
        "marketplace_verified_mutation_enabled": { "const": false },
        "wallet_spend_enabled": { "const": false },
        "x402_settlement_enabled": { "const": false },
        "listing_publication_enabled": { "const": false },
        "private_full_ecf_exposed": { "const": false },
        "raw_external_payloads_exposed": { "const": false }
      }
    },
    "public_safe": { "const": true }
  }
}
