{
  "uri": "https://gate.horizonshield.dev/ext/conduct/v1",
  "name": "A2A Conduct Extension",
  "version": "v1",
  "since_gate": "0.3.2",
  "type": "data-only extension on the A2A Agent Card, plus an optional request-level echo",
  "required": false,
  "declaration": {
    "where": "capabilities.extensions[] with uri equal to this URI",
    "params": {
      "compensation": {
        "requirement": "REQUIRED",
        "shape": {
          "paid_by": [
            "buyer",
            "seller",
            "referral",
            "advertising",
            "subscription",
            "public",
            "other"
          ],
          "referral_fee": "boolean",
          "listing_fee": "boolean",
          "success_fee_pct": "number 0..100, optional",
          "disclosure_url": "string, optional"
        },
        "note": "Same shape as the top-level compensation key (0.2.0). When both are present they must be equal on the five keys; an omitted optional key equals only an omitted key."
      },
      "measured_endpoints": {
        "requirement": "REQUIRED, at least one",
        "type": "string[]",
        "meaning": "exact endpoint URL(s) whose conduct is recorded, as on the register"
      },
      "conduct_record": {
        "requirement": "REQUIRED",
        "type": "https URL",
        "meaning": "live record of measurements written by a party other than the agent; for gate-measured endpoints https://gate.horizonshield.dev/history?endpoint=<url-encoded endpoint>"
      },
      "witness_intake": {
        "requirement": "REQUIRED",
        "type": "https URL",
        "meaning": "where a client files its own walk; https://ledger.horizonshield.dev/witness"
      },
      "verdict_recipe": {
        "requirement": "OPTIONAL",
        "type": "https URL",
        "meaning": "how to recompute the record hashes; https://gate.horizonshield.dev/spec"
      },
      "consent": {
        "requirement": "OPTIONAL",
        "type": "https URL",
        "meaning": "the origin's /.well-known/mcp-conduct.json"
      },
      "register": {
        "requirement": "OPTIONAL",
        "type": "https URL",
        "meaning": "the public register the endpoint sits on"
      },
      "rings": {
        "requirement": "OPTIONAL",
        "type": "object",
        "meaning": "where monthly NENRIN Layer 3 rings are published: spec, spec_sha256, base, path, slug, ledger"
      }
    }
  },
  "echo": {
    "activate": "send the A2A service parameter A2A-Extensions containing this URI (an HTTP header in the HTTP bindings); the 0.3 spelling X-A2A-Extensions is read as well",
    "response_header": "A2A-Extensions must contain this URI; when the request used X-A2A-Extensions the same value is echoed under that spelling too",
    "wires": {
      "1.0": "method SendMessage; result is {task} or {message} with TASK_STATE_* / ROLE_* names and parts discriminated by member name",
      "0.3": "method message/send; result is a Message or Task with kind"
    },
    "metadata_keys": [
      "https://gate.horizonshield.dev/ext/conduct/v1/endpoint",
      "https://gate.horizonshield.dev/ext/conduct/v1/conduct_record",
      "https://gate.horizonshield.dev/ext/conduct/v1/witness_intake"
    ],
    "message_extensions": "the returned Message (or status.message of a Task) should list this URI in its extensions field",
    "nothing_else": "no timestamp, no score"
  },
  "walk": {
    "schema": "jidec-path-v1",
    "purpose_prefix": "a2a-conduct-walk-v1: ",
    "nodes": [
      "n0 GET <origin>/.well-known/agent-card.json",
      "n1 the same GET again",
      "n2 compute: locate this URI in n1 and validate params",
      "n3 POST the measured endpoint with A2A-Extensions: <this URI> (MCP initialize, or A2A SendMessage / message/send)"
    ],
    "assertions": [
      "card_bytes_stable",
      "conduct_ext_declared",
      "compensation_well_formed",
      "measured_endpoint_answered",
      "extension_echoed (null and not applicable when n3 was not an A2A message)"
    ],
    "verdict": "{ ok, outcome, n_pass, n_total }; both ok and outcome are carried because make_ring.py reads ok while JIDEC_PATH_SPEC_v1 names outcome",
    "canonical": "UTF-8, keys sorted at every nesting level, separators , and : without spaces, non-ASCII unescaped (Python json.dumps sort_keys separators ensure_ascii=False; JavaScript must sort keys recursively before JSON.stringify: the seam of ledger entry 34)",
    "submit": "POST <witness_intake> with {\"record_canonical\": \"<exact bytes>\"}",
    "counted": "the monthly ring for the endpoint counts the walk under witnesses by distinct witness.name and under discrepancies when ok is false",
    "reference_client": "workers/hs-ledger/nenrin/a2a-conduct-walk/a2a_conduct_walk.py"
  },
  "how_this_gate_reads_it": "condition 3 (compensation_disclosure) reads the top-level compensation key and every capabilities.extensions[] entry carrying this URI; one well-formed declaration passes, two that disagree fail, none fails. Nothing else in the params is judged by this gate.",
  "what_it_does_not_do": [
    "measure quality",
    "verify that compensation is truthful",
    "make the agent trustworthy",
    "count as a pass by being present"
  ],
  "interop": {
    "in_toto_statement_v1": "planned mapping, not yet emitted: subject = the ring file by sha256, predicateType = this URI",
    "scitt": "planned mapping, not yet emitted: the ring file is the Statement payload, the JIDEC entry with its Bitcoin attestation plays the Receipt",
    "canonical_form": "inherits the NENRIN v1 seam (canonical form defined by reference to a language runtime); RFC 8785 or a language-neutral statement expected in the next NENRIN version"
  },
  "versioning": "the URI ends in /v1; a breaking change uses a new URI; a w3id.org redirect may later point here and would not be a second identifier",
  "license": "Apache-2.0 (LICENSE beside the markdown in the repository)",
  "a2a_endpoint": "https://gate.horizonshield.dev/a2a (SendMessage or message/send; a text part carrying an MCP endpoint URL returns this gate's register reading for it)",
  "spec_markdown": "GET https://gate.horizonshield.dev/ext/conduct/v1 with Accept: text/markdown",
  "spec_markdown_sha256": "3aa5a50d8ac323c63951bdf4b73d6fa1de6a45aa0d0a41dced4792d5f6dfafd8",
  "source": "https://github.com/ogasurfproject-jpg/horizon-shield/blob/main/workers/hs-verify-gate/ext/CONDUCT_EXT_v1.md",
  "gate_version": "0.3.5"
}