{
  "schema": "alicit.demo/v1",
  "version": 1,
  "recorder": "scripts/record-demo.sh",
  "policy": {
    "settings": "default",
    "cedar_revision": 2,
    "capability_model": "e42a3217a490cdc1137a20e3794d8182155c2f0e0f63944ab2c8a5b2811ab6fe"
  },
  "agent": {
    "host": "build-mac",
    "directory": "~/alicit",
    "repository": "alicit-ai/alicit",
    "agent": "Claude Code"
  },
  "steps": [
    {
      "id": "read",
      "command": [
        "alicit",
        "run",
        "--justification",
        "List the open pull requests in alicit-ai/alicit for the current task",
        "--",
        "gh",
        "pr",
        "list",
        "--repo",
        "alicit-ai/alicit"
      ],
      "shell": "alicit run --justification 'List the open pull requests in alicit-ai/alicit for the current task' -- gh pr list --repo alicit-ai/alicit",
      "stdout": [
        "7\tShow the Wake latency in alicit doctor\tdoctor-wake-latency\tOPEN\t2026-10-05T14:02:11Z"
      ],
      "stderr": [
        "alicit: Request req_demo_01 is awaiting its outcome: POST /v1/github/alicit-ai/token (decision window 300s).",
        "alicit: Request req_demo_01: approved.",
        "alicit: Request req_demo_02 is awaiting its outcome: POST /v1/github/alicit-ai/token (decision window 900s).",
        "alicit: Request req_demo_02: completed (Provider HTTP 200)."
      ],
      "requests": [
        "req_demo_01",
        "req_demo_02"
      ],
      "wakes": 0,
      "wake": null
    },
    {
      "id": "merge",
      "command": [
        "alicit",
        "run",
        "--justification",
        "Merge pull request 7 in alicit-ai/alicit into main after its review",
        "--",
        "gh",
        "pr",
        "merge",
        "7",
        "--repo",
        "alicit-ai/alicit",
        "--rebase",
        "--match-head-commit",
        "4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2"
      ],
      "shell": "alicit run --justification 'Merge pull request 7 in alicit-ai/alicit into main after its review' -- gh pr merge 7 --repo alicit-ai/alicit --rebase --match-head-commit 4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2",
      "stdout": [
        "{\"merged\":true,\"sha\":\"9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d\"}"
      ],
      "stderr": [
        "alicit: Request req_demo_03 is awaiting its outcome: POST /v1/github/alicit-ai/token (decision window 300s).",
        "alicit: Request req_demo_03: approved.",
        "alicit: Request req_demo_04 is awaiting its outcome: POST /v1/github/alicit-ai/token (decision window 900s).",
        "alicit: Request req_demo_04: completed (Provider HTTP 200).",
        "alicit: Request req_demo_05 is awaiting its outcome: POST /v1/github/alicit-ai/token (decision window 300s).",
        "alicit: Request req_demo_05: approved.",
        "alicit: Request req_demo_06 is awaiting its outcome: POST /v1/github/alicit-ai/token (decision window 900s).",
        "alicit: Request req_demo_06: completed (Provider HTTP 200)."
      ],
      "requests": [
        "req_demo_03",
        "req_demo_04",
        "req_demo_05",
        "req_demo_06"
      ],
      "wakes": 1,
      "wake": {
        "request_id": "req_demo_05"
      }
    }
  ],
  "approver": {
    "request_id": "req_demo_05",
    "review_version": 10,
    "kind": "mint",
    "title": "GitHub pr.merge alicit-ai/alicit base_ref=main head_sha=4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2 merge_method=rebase pull_number=7 request_body_digest=e01235fc4",
    "provider": {
      "id": "github",
      "name": "GitHub"
    },
    "operation": {
      "id": "pr.merge",
      "action": "merge",
      "summary": "Merge pull request #7 in alicit-ai/alicit into main at head 4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2 with the rebase method.",
      "scope": "The token can write code and pull requests in alicit-ai/alicit for at most five minutes. The CLI checks the base and the head again, then sends only this one merge request. GitHub refuses it if the head of the pull request is not 4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2.",
      "target": {
        "owner": "alicit-ai",
        "repo": "alicit"
      },
      "parameters": {
        "base_ref": "main",
        "head_sha": "4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2",
        "merge_method": "rebase",
        "pull_number": "7",
        "request_body_digest": "e01235fc4e0a1f963244812c4b5857385369ea613879899d78737bc6d91c3a82"
      },
      "model_digest": "e42a3217a490cdc1137a20e3794d8182155c2f0e0f63944ab2c8a5b2811ab6fe"
    },
    "justification": "Merge pull request 7 in alicit-ai/alicit into main after its review",
    "host": {
      "name": "build-mac",
      "trust_class": "ASSERTED"
    },
    "process": "gh",
    "profiles": [
      "github-repository-exact"
    ],
    "operator": "operator-compose-operator",
    "method": "POST",
    "path": "/v1/github/alicit-ai/token",
    "requested_ttl_seconds": 300,
    "decision_window_seconds": 300,
    "created_at": 1791295440,
    "expires_at": 1791295740,
    "review_mode": "policy",
    "context": {
      "working_directory": "~/alicit",
      "repository": "alicit-ai/alicit",
      "agent": "Claude Code",
      "agent_session": ""
    },
    "card": [
      {
        "label": "Host",
        "value": "build-mac"
      },
      {
        "label": "Repository",
        "value": "alicit-ai/alicit"
      },
      {
        "label": "Agent",
        "value": "Claude Code"
      },
      {
        "label": "Process",
        "value": "gh"
      },
      {
        "label": "Resource",
        "value": "alicit-ai/alicit"
      }
    ],
    "sections": [
      {
        "title": "Requested from",
        "fields": [
          {
            "label": "Directory",
            "value": "~/alicit"
          },
          {
            "label": "Repository",
            "value": "alicit-ai/alicit"
          },
          {
            "label": "Agent",
            "value": "Claude Code"
          }
        ]
      },
      {
        "title": "Operation",
        "fields": [
          {
            "label": "Provider",
            "value": "github"
          },
          {
            "label": "Operation",
            "value": "pr.merge"
          },
          {
            "label": "Action",
            "value": "merge"
          },
          {
            "label": "PR number",
            "value": "7"
          },
          {
            "label": "Base branch",
            "value": "main"
          },
          {
            "label": "Head commit",
            "value": "4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2"
          },
          {
            "label": "Merge method",
            "value": "rebase"
          },
          {
            "label": "Request body digest",
            "value": "e01235fc4e0a1f963244812c4b5857385369ea613879899d78737bc6d91c3a82"
          }
        ]
      },
      {
        "title": "Request",
        "fields": [
          {
            "label": "Method",
            "value": "POST"
          },
          {
            "label": "Path",
            "value": "/v1/github/alicit-ai/token"
          }
        ]
      },
      {
        "title": "Justification",
        "fields": [
          {
            "label": "Justification",
            "value": "Merge pull request 7 in alicit-ai/alicit into main after its review"
          }
        ]
      }
    ]
  },
  "history": [
    {
      "request_id": "req_demo_05",
      "step": "merge",
      "outcome": "approved",
      "kind": "mint",
      "operation_id": "pr.merge",
      "title": "GitHub pr.merge alicit-ai/alicit base_ref=main head_sha=4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2 merge_method=rebase pull_number=7 request_body_digest=e01235fc4",
      "justification": "Merge pull request 7 in alicit-ai/alicit into main after its review",
      "decision": "approved",
      "policy": "permitted",
      "wake": "woken",
      "review_mode": "policy",
      "execution": "response_received",
      "provider_result": "api_success",
      "delivery": "not_observed",
      "created_at": 1791295440,
      "review": {
        "summary": "Merge pull request #7 in alicit-ai/alicit into main at head 4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2 with the rebase method.",
        "scope": "The token can write code and pull requests in alicit-ai/alicit for at most five minutes. The CLI checks the base and the head again, then sends only this one merge request. GitHub refuses it if the head of the pull request is not 4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2.",
        "action": "merge",
        "target": {
          "owner": "alicit-ai",
          "repo": "alicit"
        },
        "parameters": {
          "base_ref": "main",
          "head_sha": "4f9c2a7e1b3d5f60718293a4b5c6d7e8f9a0b1c2",
          "merge_method": "rebase",
          "pull_number": "7",
          "request_body_digest": "e01235fc4e0a1f963244812c4b5857385369ea613879899d78737bc6d91c3a82"
        },
        "method": "POST",
        "path": "/v1/github/alicit-ai/token",
        "host": "build-mac",
        "process": "gh",
        "profiles": [
          "github-repository-exact"
        ],
        "requested_ttl_seconds": 300
      }
    },
    {
      "request_id": "req_demo_03",
      "step": "merge",
      "outcome": "released",
      "kind": "mint",
      "operation_id": "pr.view",
      "title": "GitHub pr.view alicit-ai/alicit pull_number=7",
      "justification": "Capability Model: pr.view on alicit-ai/alicit#7 to read its base before a merge",
      "decision": "not_recorded",
      "policy": "permitted",
      "wake": "not_required",
      "review_mode": "",
      "execution": "response_received",
      "provider_result": "api_success",
      "delivery": "not_observed",
      "created_at": 1791295320,
      "review": {
        "summary": "View pull request #7 in alicit-ai/alicit.",
        "scope": "The token can read pull requests and code in alicit-ai/alicit. It cannot write. The CLI sends one read request for this pull request.",
        "action": "read",
        "target": {
          "owner": "alicit-ai",
          "repo": "alicit"
        },
        "parameters": {
          "pull_number": "7"
        },
        "method": "POST",
        "path": "/v1/github/alicit-ai/token",
        "host": "build-mac",
        "process": "gh",
        "profiles": [
          "github-repository-exact"
        ],
        "requested_ttl_seconds": 300
      }
    },
    {
      "request_id": "req_demo_01",
      "step": "read",
      "outcome": "released",
      "kind": "mint",
      "operation_id": "pulls.read",
      "title": "GitHub pulls.read alicit-ai/alicit",
      "justification": "List the open pull requests in alicit-ai/alicit for the current task",
      "decision": "not_recorded",
      "policy": "permitted",
      "wake": "not_required",
      "review_mode": "",
      "execution": "response_received",
      "provider_result": "api_success",
      "delivery": "not_observed",
      "created_at": 1791295200,
      "review": {
        "summary": "Read pull requests in alicit-ai/alicit.",
        "scope": "The token is limited to pull request reads in this repository.",
        "action": "read",
        "target": {
          "owner": "alicit-ai",
          "repo": "alicit"
        },
        "parameters": {},
        "method": "POST",
        "path": "/v1/github/alicit-ai/token",
        "host": "build-mac",
        "process": "gh",
        "profiles": [
          "github-repository-exact"
        ],
        "requested_ttl_seconds": 300
      }
    }
  ]
}
