{
  "protocol": "shokai/0.5",
  "sdk": "@kigenka/shokai 0.5.1 (with the red-team round 3 fixes; 0.5.0 lacks them)",
  "note": "The protocol calls the grant a pass. On the wire the field is still seat.",
  "steps": [
    {
      "who": "Fen's agent (no card)",
      "at": "room",
      "sent": "an unsigned greeting",
      "got": [
        "greeting",
        "lobby_briefing",
        "invitation_response",
        "farewell"
      ]
    },
    {
      "who": "Maru's representative",
      "at": "room",
      "granted": true,
      "placeSigner": "Kiran's key",
      "repKey": "Noor's key",
      "acts": [
        "room.post"
      ]
    },
    {
      "who": "Noor (card 2)",
      "at": "tea shop",
      "granted": true,
      "acts": [
        "menu.view: ok",
        "order.place 12.00 USD: ok"
      ]
    },
    {
      "who": "Kiran",
      "at": "tea shop",
      "sent": "card_revocation of card 2",
      "effect": "old pass's next act: act_decision/deny"
    },
    {
      "who": "Maru's representative",
      "at": "room",
      "granted": true,
      "note": "card 1 untouched"
    }
  ],
  "checks": [
    {
      "ok": true,
      "what": "an unprepared arrival at the room gets the leaflet (lobby_briefing), not silence"
    },
    {
      "ok": true,
      "what": "Maru's representative checked the room's card (signed by Kiran's key, naming Noor) and was granted a pass"
    },
    {
      "ok": true,
      "what": "Maru's representative posts in the room within its pass"
    },
    {
      "ok": true,
      "what": "Noor, with card 2, is granted a pass at the tea shop"
    },
    {
      "ok": true,
      "what": "the tea shop sees card 2 only (the going-out card)"
    },
    {
      "ok": true,
      "what": "both cards name the same representative key (Noor)"
    },
    {
      "ok": true,
      "what": "Noor looks at the menu"
    },
    {
      "ok": true,
      "what": "Noor orders a 12.00 USD sencha, within the 15.00 USD limit"
    },
    {
      "ok": true,
      "what": "after Kiran revokes card 2, Noor's open pass under it is ended"
    },
    {
      "ok": true,
      "what": "the meeting room, under card 1, still grants a pass"
    }
  ],
  "ok": true,
  "trace": {
    "maru_room": [
      {
        "dir": "out",
        "type": "greeting"
      },
      {
        "dir": "in",
        "type": "greeting"
      },
      {
        "dir": "out",
        "type": "card_presentation"
      },
      {
        "dir": "in",
        "type": "card_presentation"
      },
      {
        "dir": "in",
        "type": "card_receipt"
      },
      {
        "dir": "out",
        "type": "introduction"
      },
      {
        "dir": "out",
        "type": "invitation_request"
      },
      {
        "dir": "in",
        "type": "invitation_response",
        "decision": "grant"
      },
      {
        "dir": "in",
        "type": "farewell",
        "outcome": "seated"
      },
      {
        "dir": "out",
        "type": "act"
      },
      {
        "dir": "in",
        "type": "act_result"
      },
      {
        "dir": "out",
        "type": "farewell",
        "outcome": "completed"
      }
    ],
    "noor_shop": [
      {
        "dir": "out",
        "type": "greeting"
      },
      {
        "dir": "in",
        "type": "greeting"
      },
      {
        "dir": "out",
        "type": "card_presentation"
      },
      {
        "dir": "in",
        "type": "card_presentation"
      },
      {
        "dir": "in",
        "type": "card_receipt"
      },
      {
        "dir": "out",
        "type": "introduction"
      },
      {
        "dir": "out",
        "type": "invitation_request"
      },
      {
        "dir": "in",
        "type": "invitation_response",
        "decision": "grant"
      },
      {
        "dir": "in",
        "type": "farewell",
        "outcome": "seated"
      },
      {
        "dir": "out",
        "type": "act"
      },
      {
        "dir": "in",
        "type": "act_result"
      },
      {
        "dir": "out",
        "type": "act"
      },
      {
        "dir": "in",
        "type": "act_result"
      },
      {
        "dir": "out",
        "type": "act"
      },
      {
        "dir": "in",
        "type": "act_decision",
        "decision": "deny"
      }
    ]
  }
}
