{
  "info": {
    "name": "Sandbox Platform API",
    "description": "Sandbox Platform via the gateway.\n\n## Folders\n\n| Folder | What |\n|--------|------|\n| **Start here** | Health, providers, first run, auth samples |\n| **Admin** | Compute quotas + credential plane (KeyHive or Gateway 410) |\n| **Harbor** | v2 / v1 / unversioned / deliver / **Pass@N (Temporal)** |\n| **SSE** | Live Harbor/Agent event streams (Send and Download) |\n| **Agent** | Agent catalog + runs |\n| **Code Edit** | Catalog + code executions |\n| **LLM** | One-shot completions (JSON or SSE) |\n| **Sandboxes** | Long-lived sandbox lifecycle |\n| **Local** | Direct ports \u2014 `make up` only |\n\n## Setup\n\n1. Import this collection + **Sandbox Dev** / **Prod** (or Local).\n2. Set `SANDBOX_API_KEY` (consumers). For quotas / KeyHive BYOK also set `SANDBOX_ADMIN_API_KEY`. Optional: `KEYCLOAK_ACCESS_TOKEN`.\n3. Set `tenant_id` / `project_id` (or `new_*` for Admin onboard).\n4. Set `llm_credential_mode` to match the cluster (hosted envs default to `keyhive`; use `gateway` only for Gateway egress).\n5. Open **Start here** and send top \u2192 bottom.\n\n**LLM credentials (exclusive modes):**\n- `llm_credential_mode=keyhive` (default on dev/preprod/prod) \u2014 Sandbox Admin credential-plane / KeyHive BYOK; Harbor/Agent/IDE lease provider keys.\n- `llm_credential_mode=gateway` \u2014 LLM BYOK on **LLM Gateway**; Sandbox credential-plane routes return HTTP 410.\n\nJob ids save into variables automatically.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "const reqAuth = pm.request.auth && pm.request.auth.type;",
          "if (reqAuth !== \"noauth\") {",
          "  const api = (",
          "    pm.environment.get(\"SANDBOX_API_KEY\") ||",
          "    pm.collectionVariables.get(\"SANDBOX_API_KEY\") ||",
          "    \"\"",
          "  ).trim();",
          "  const kc = (",
          "    pm.environment.get(\"KEYCLOAK_ACCESS_TOKEN\") ||",
          "    pm.collectionVariables.get(\"KEYCLOAK_ACCESS_TOKEN\") ||",
          "    \"\"",
          "  ).trim();",
          "  if (api) {",
          "    pm.request.headers.upsert({ key: \"X-Api-Key\", value: api });",
          "    try { pm.request.headers.remove(\"Authorization\"); } catch (e) {}",
          "  } else if (kc) {",
          "    pm.request.headers.upsert({ key: \"Authorization\", value: \"Bearer \" + kc });",
          "    try { pm.request.headers.remove(\"X-Api-Key\"); } catch (e) {}",
          "  }",
          "}",
          "const url = (pm.request.url && pm.request.url.toString()) || \"\";",
          "if (/\\/sandbox\\/v1\\/admin\\/(credential-plane|keyhive)\\//.test(url)) {",
          "  return;",
          "}",
          "const nt = (pm.environment.get(\"new_tenant_id\") || pm.variables.get(\"new_tenant_id\") || \"\").trim();",
          "const np = (pm.environment.get(\"new_project_id\") || pm.variables.get(\"new_project_id\") || \"\").trim();",
          "let tenant = (pm.variables.get(\"tenant_id\") || \"\").trim();",
          "let project = (pm.variables.get(\"project_id\") || \"\").trim();",
          "if (nt && np && (nt !== tenant || np !== project)) {",
          "  const ns = nt + \":\" + np;",
          "  console.warn(",
          "    \"tenancy mismatch: tenant_id/project_id=\" + (tenant || \"?\") + \":\" + (project || \"?\") +",
          "    \" but new_tenant_id/new_project_id=\" + ns +",
          "    \" \u2014 activating new_* so /providers /quota /usage /jobs use the operator target\"",
          "  );",
          "  pm.environment.set(\"tenant_id\", nt);",
          "  pm.environment.set(\"project_id\", np);",
          "  pm.environment.set(\"namespace\", ns);",
          "  pm.collectionVariables.set(\"tenant_id\", nt);",
          "  pm.collectionVariables.set(\"project_id\", np);",
          "  pm.collectionVariables.set(\"namespace\", ns);",
          "  tenant = nt;",
          "  project = np;",
          "}",
          "if (tenant && project) {",
          "  pm.request.headers.upsert({ key: \"X-Sandbox-Tenant-Id\", value: tenant });",
          "  pm.request.headers.upsert({ key: \"X-Sandbox-Project-Id\", value: project });",
          "}"
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "if (!pm.response) { return; }",
          "const expected = (pm.info.requestName.match(/\\u2192\\s*(\\d{3})/) || [])[1];",
          "const code = pm.response.code;",
          "",
          "if (expected) {",
          "  pm.test(`responds ${expected}`, function () {",
          "    pm.response.to.have.status(Number(expected));",
          "  });",
          "} else {",
          "  pm.test(\"the platform did not fail\", function () {",
          "    pm.expect(code, String(pm.response.text() || \"\").slice(0, 200)).to.be.below(500);",
          "  });",
          "  if (code === 401 || code === 403) {",
          "    pm.test(\"credentials are set\", function () {",
          "      throw new Error(",
          "        \"Refused. Set SANDBOX_API_KEY in the environment. \" +",
          "        \"Admin routes also need SANDBOX_ADMIN_API_KEY.\"",
          "      );",
          "    });",
          "  }",
          "}"
        ]
      }
    }
  ],
  "auth": {
    "type": "noauth"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://sandbox-dev.turing.com"
    },
    {
      "key": "SANDBOX_API_KEY",
      "value": ""
    },
    {
      "key": "KEYCLOAK_ACCESS_TOKEN",
      "value": ""
    },
    {
      "key": "SANDBOX_ADMIN_API_KEY",
      "value": ""
    },
    {
      "key": "llm_credential_mode",
      "value": "keyhive"
    },
    {
      "key": "provider_api_key",
      "value": ""
    },
    {
      "key": "key_id",
      "value": ""
    },
    {
      "key": "KEYHIVE_TEAM_TOKEN",
      "value": ""
    },
    {
      "key": "namespace",
      "value": "harbor-canvas:default"
    },
    {
      "key": "tenant_id",
      "value": "harbor-canvas"
    },
    {
      "key": "project_id",
      "value": "default"
    },
    {
      "key": "new_tenant_id",
      "value": "harbor-canvas"
    },
    {
      "key": "new_project_id",
      "value": "default"
    },
    {
      "key": "job_id",
      "value": ""
    },
    {
      "key": "retry_job_id",
      "value": ""
    },
    {
      "key": "agent_run_job_id",
      "value": ""
    },
    {
      "key": "last_event_id",
      "value": "0"
    },
    {
      "key": "agent_id",
      "value": "opencode"
    },
    {
      "key": "model",
      "value": "anthropic/claude-sonnet-4-5"
    },
    {
      "key": "wandb_model",
      "value": "wandb/moonshotai/Kimi-K2.5"
    },
    {
      "key": "provider",
      "value": "anthropic"
    },
    {
      "key": "test_stdout_path",
      "value": "tests/test_stdout.txt"
    },
    {
      "key": "task_archive_url",
      "value": ""
    },
    {
      "key": "workspace_fixture_url",
      "value": ""
    },
    {
      "key": "deliver_url",
      "value": ""
    },
    {
      "key": "sandbox_id",
      "value": ""
    },
    {
      "key": "reuse_fingerprint",
      "value": ""
    },
    {
      "key": "reuse_salt",
      "value": "postman-studio-tab-1"
    },
    {
      "key": "gs_task_id",
      "value": "gs-task-example"
    },
    {
      "key": "desktop_image_uri",
      "value": ""
    },
    {
      "key": "capture_id",
      "value": ""
    },
    {
      "key": "capture_url",
      "value": ""
    },
    {
      "key": "correlation_id",
      "value": ""
    },
    {
      "key": "label_trainer",
      "value": "postman-demo"
    },
    {
      "key": "label_pass",
      "value": "1"
    },
    {
      "key": "label_program",
      "value": "sandbox"
    }
  ],
  "item": [
    {
      "name": "Start here",
      "description": "Send Quickstart top \u2192 bottom first. Gateway and Auth are reference samples.",
      "item": [
        {
          "name": "Quickstart",
          "description": "A minimal real workflow against dev or prod. Select an environment, set SANDBOX_API_KEY plus tenant_id/project_id, then send these requests top to bottom. Code execution needs no model key. Model runs use KeyHive leases when `llm_credential_mode=keyhive`, or LLM Gateway egress when `llm_credential_mode=gateway`.",
          "item": [
            {
              "name": "1. Gateway health \u2014 no credentials required",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/healthz",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"gateway is healthy\", () => pm.response.to.have.status(200));"
                    ]
                  }
                }
              ]
            },
            {
              "name": "2. Providers available to this project",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/providers",
                "description": "Sandbox provider inventory for `tenant_id:project_id`. Meaningful under KeyHive; often empty/503 under Gateway."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"provider inventory responded\", function () {",
                      "  pm.expect(pm.response.code, String(pm.response.text() || \"\").slice(0, 200)).to.be.oneOf([",
                      "    200, 503,",
                      "  ]);",
                      "});",
                      "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                      "if (pm.response.code === 200) {",
                      "  const body = pm.response.json();",
                      "  const items = Array.isArray(body) ? body : (body.items || body.providers || []);",
                      "  pm.expect(Array.isArray(items)).to.be.true;",
                      "  const tenant = (pm.variables.get(\"tenant_id\") || \"\").trim();",
                      "  const project = (pm.variables.get(\"project_id\") || \"\").trim();",
                      "  console.log(\"scoped to \" + (tenant || \"?\") + \":\" + (project || \"?\") + \" mode=\" + mode);",
                      "  const lines = items.map((item) => {",
                      "    if (typeof item === \"string\") return item;",
                      "    return (item.provider || \"?\") + \" (\" + (item.source || \"unknown\") + \")\";",
                      "  });",
                      "  const emptyHint =",
                      "    mode === \"keyhive\"",
                      "      ? \"(none \u2014 append keys via Admin \u2192 Credential plane KeyHive)\"",
                      "      : \"(none \u2014 LLM BYOK is on LLM Gateway when llm_credential_mode=gateway)\";",
                      "  console.log(\"providers:\", lines.join(\", \") || emptyHint);",
                      "  pm.collectionVariables.set(",
                      "    \"wandb_available\",",
                      "    String(items.some((item) => (item.provider || item) === \"wandb\"))",
                      "  );",
                      "} else {",
                      "  pm.collectionVariables.set(\"wandb_available\", \"false\");",
                      "  console.log(",
                      "    mode === \"keyhive\"",
                      "      ? \"provider inventory unavailable (credential plane down?)\"",
                      "      : \"provider inventory unavailable (gateway mode \u2014 use LLM Gateway BYOK)\"",
                      "  );",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "3. Run Python now \u2014 real sandbox, no LLM key",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/codeedit/v1/executions",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"language\": \"python3.12\",\n  \"files\": {\n    \"main.py\": \"import json, platform\\nprint(json.dumps({'message': 'Sandbox works', 'python': platform.python_version()}))\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"code ran successfully\", function () {",
                      "  pm.response.to.have.status(200);",
                      "  const body = pm.response.json();",
                      "  pm.expect(body.exit_code).to.eql(0);",
                      "  pm.expect(body.stdout).to.include(\"Sandbox works\");",
                      "});"
                    ]
                  }
                }
              ]
            },
            {
              "name": "4. Run W&B Kimi with OpenCode",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/agent/v1/runs",
                "description": "OpenCode via W&B Inference when inventory exposes wandb. Skips when inventory is empty.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"agent_id\": \"opencode\",\n  \"model\": \"{{wandb_model}}\",\n  \"instruction\": \"Create hello.txt containing exactly: Hello from W&B Kimi via Sandbox\",\n  \"workspace\": {\n    \"files\": {\n      \"README.md\": \"Postman quickstart workspace\\n\"\n    }\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.variables.get(\"wandb_available\") !== \"true\") {",
                      "  const mode = (pm.variables.get(\"llm_credential_mode\") || \"gateway\").trim();",
                      "  console.log(",
                      "    \"Skipping W&B model run: provider inventory has no wandb \" +",
                      "    \"(mode=\" + mode + \"). Under keyhive, append a wandb key via Admin; \" +",
                      "    \"under gateway, configure BYOK on LLM Gateway.\"",
                      "  );",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"agent_run_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "5. Check W&B Kimi run status",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/agent/v1/runs/{{agent_run_job_id}}",
                "description": "Repeat until status is succeeded or failed. The same project headers are attached automatically, so platform API keys can read the job they submitted."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"agent_run_job_id\")) {",
                      "  console.log(\"Skipping: agent_run_job_id is not set. Send quickstart request 4 first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "Gateway",
          "item": [
            {
              "name": "GET /",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "GET /healthz",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/healthz",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "GET /readyz",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/readyz",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "GET /sandbox/healthz",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/sandbox/healthz",
                "description": ""
              }
            },
            {
              "name": "GET /sandbox (route index)",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/sandbox",
                "description": "Which planes this deployment routes to. Needs a key: only the gateway's own /healthz, /readyz and /sandbox/healthz are unauthenticated."
              }
            },
            {
              "name": "GET /docs/index (redirect)",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/docs/index",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "GET /docs (integrator site)",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/docs/introduction/overview/",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "GET /openapi/sandbox-platform.yaml",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/openapi/sandbox-platform.yaml",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "GET /internal/swagger",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/internal/swagger",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "GET /internal/redoc",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/internal/redoc",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "GET /internal/openapi.json",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/internal/openapi.json",
                "description": "",
                "auth": {
                  "type": "noauth"
                }
              }
            }
          ]
        },
        {
          "name": "Auth",
          "item": [
            {
              "name": "No credentials \u2192 401",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/sandbox/harbor/capabilities",
                "description": "What every route does without a credential. Worth sending once so you recognise the shape of the refusal.",
                "auth": {
                  "type": "noauth"
                }
              }
            },
            {
              "name": "X-Api-Key \u2192 200",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/capabilities",
                "description": "Consumer auth for all hosted envs (dev/preprod/prod). Collection pre-request stamps X-Api-Key from SANDBOX_API_KEY."
              }
            },
            {
              "name": "Bearer Keycloak access token \u2192 200",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/capabilities",
                "description": "Optional Keycloak path (CTP). Consumers should use SANDBOX_API_KEY. Skipped unless KEYCLOAK_ACCESS_TOKEN is set.",
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{KEYCLOAK_ACCESS_TOKEN}}",
                      "type": "string"
                    }
                  ]
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"KEYCLOAK_ACCESS_TOKEN\")) {",
                      "  console.log(\"Skipping: KEYCLOAK_ACCESS_TOKEN is not set. Optional \u2014 consumers use SANDBOX_API_KEY.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "Admin",
      "description": "Operator management. Needs `SANDBOX_ADMIN_API_KEY` for quotas and KeyHive BYOK.\n\n- **Quotas & credential plane** \u2014 compute quotas; KeyHive live when `llm_credential_mode=keyhive`, or Gateway `\u2192 410` smokes when `gateway`.\n- **Onboard tenant** \u2014 set quota (+ optional KeyHive team/key) and activate `new_*` tenancy.\n\nSet `llm_credential_mode` to match the cluster. Set `new_tenant_id` / `new_project_id` to the project you manage.",
      "item": [
        {
          "name": "Quotas & credential plane",
          "description": "**Compute quotas** are operated on Sandbox Admin (dev/preprod/prod). Requires `SANDBOX_ADMIN_API_KEY` (`X-Sandbox-Admin-Key`) plus `SANDBOX_API_KEY`.\n\n**LLM BYOK** depends on `llm_credential_mode`:\n- `keyhive` \u2014 use **Credential plane (KeyHive)** (teams/keys live).\n- `gateway` \u2014 use **Credential plane (Gateway \u2192 410)** smokes; provision BYOK on LLM Gateway.\n\n**Target project for quotas:** set `new_tenant_id` / `new_project_id`. Consumer routes stamp `tenant_id`/`project_id` and auto-activate from `new_*` when they diverge.",
          "item": [
            {
              "name": "GET /sandbox/v1/usage/summary",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/usage/summary",
                "description": "Your own usage for the stamped tenancy (`tenant_id`/`project_id`, auto-healed from `new_*` when they diverge). No admin key needed."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"response ok\", function () {",
                      "  pm.response.to.have.status(200);",
                      "});",
                      "const tenant = (pm.variables.get(\"tenant_id\") || \"\").trim();",
                      "const project = (pm.variables.get(\"project_id\") || \"\").trim();",
                      "console.log(\"scoped to \" + (tenant || \"?\") + \":\" + (project || \"?\"));"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandbox/v1/quota",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/quota",
                "description": "Effective per-project concurrency limit and current in-flight count for the stamped tenancy."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"response ok\", function () {",
                      "  pm.response.to.have.status(200);",
                      "});",
                      "const tenant = (pm.variables.get(\"tenant_id\") || \"\").trim();",
                      "const project = (pm.variables.get(\"project_id\") || \"\").trim();",
                      "console.log(\"scoped to \" + (tenant || \"?\") + \":\" + (project || \"?\"));"
                    ]
                  }
                }
              ]
            },
            {
              "name": "PUT /sandbox/v1/admin/quotas/{tenant}/{project}",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "X-Sandbox-Admin-Key",
                    "value": "{{SANDBOX_ADMIN_API_KEY}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/admin/quotas/{{new_tenant_id}}/{{new_project_id}}",
                "description": "Operator-owned per-project concurrency cap. Path is `new_tenant_id`/`new_project_id`. On success, activates that tenancy for consumer routes.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"max_concurrent\": 2\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                      "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if ([200,201].includes(pm.response.code)) {",
                      "  pm.test(\"quota upserted\", function () {",
                      "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                      "  });",
                      "}",
                      "const t = (pm.environment.get(\"new_tenant_id\") || pm.variables.get(\"new_tenant_id\") || \"\").trim();",
                      "const p = (pm.environment.get(\"new_project_id\") || pm.variables.get(\"new_project_id\") || \"\").trim();",
                      "if (!t || !p) {",
                      "  console.log(\"Skipping activate: set new_tenant_id and new_project_id first.\");",
                      "} else {",
                      "  const ns = t + \":\" + p;",
                      "  pm.environment.set(\"tenant_id\", t);",
                      "  pm.environment.set(\"project_id\", p);",
                      "  pm.environment.set(\"namespace\", ns);",
                      "  pm.collectionVariables.set(\"tenant_id\", t);",
                      "  pm.collectionVariables.set(\"project_id\", p);",
                      "  pm.collectionVariables.set(\"namespace\", ns);",
                      "  console.log(\"Activated tenancy \" + ns + \" for subsequent requests.\");",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandbox/v1/admin/quotas/{tenant}/{project}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Admin-Key",
                    "value": "{{SANDBOX_ADMIN_API_KEY}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/admin/quotas/{{new_tenant_id}}/{{new_project_id}}",
                "description": "Read the operator quota row for `new_tenant_id`/`new_project_id`."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                      "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "DELETE /sandbox/v1/admin/quotas/{tenant}/{project}",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "X-Sandbox-Admin-Key",
                    "value": "{{SANDBOX_ADMIN_API_KEY}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/admin/quotas/{{new_tenant_id}}/{{new_project_id}}",
                "description": "Remove the operator quota override for `new_tenant_id`/`new_project_id`."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                      "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "Credential plane (KeyHive mode)",
              "description": "Live when `llm_credential_mode=keyhive` and the cluster has KeyHive enabled. Set `provider` + `provider_api_key`. Skipped under gateway mode.",
              "item": [
                {
                  "name": "POST /sandbox/v1/admin/credential-plane/teams",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/teams",
                    "description": "Ensure a KeyHive team for `new_tenant:new_project`. Idempotent.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"keys\": {}\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if ([200,201].includes(pm.response.code)) {",
                          "  const j = pm.response.json();",
                          "  if (j.token) {",
                          "    pm.collectionVariables.set(\"KEYHIVE_TEAM_TOKEN\", j.token);",
                          "    pm.environment.set(\"KEYHIVE_TEAM_TOKEN\", j.token);",
                          "  }",
                          "  const ns = (j.namespace || (",
                          "    (pm.variables.get(\"new_tenant_id\") || \"\") + \":\" +",
                          "    (pm.variables.get(\"new_project_id\") || \"\")",
                          "  )).trim();",
                          "  if (ns && ns !== \":\") {",
                          "    pm.collectionVariables.set(\"namespace\", ns);",
                          "    pm.environment.set(\"namespace\", ns);",
                          "    const parts = ns.split(\":\");",
                          "    if (parts.length === 2 && parts[0] && parts[1]) {",
                          "      pm.environment.set(\"tenant_id\", parts[0]);",
                          "      pm.environment.set(\"project_id\", parts[1]);",
                          "      pm.collectionVariables.set(\"tenant_id\", parts[0]);",
                          "      pm.collectionVariables.set(\"project_id\", parts[1]);",
                          "    }",
                          "  }",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /sandbox/v1/admin/credential-plane/keys",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/keys",
                    "description": "Append a model-provider key to the namespace pool.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"provider\": \"{{provider}}\",\n  \"key\": \"{{provider_api_key}}\"\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "if (!pm.variables.get(\"provider_api_key\")) {",
                          "  console.log(\"Skipping: provider_api_key is not set. Paste a provider key to append to the pool.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if ([200,201].includes(pm.response.code)) {",
                          "  const j = pm.response.json();",
                          "  if (j.key_id) {",
                          "    pm.collectionVariables.set(\"key_id\", j.key_id);",
                          "    pm.environment.set(\"key_id\", j.key_id);",
                          "  }",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "GET /sandbox/v1/admin/credential-plane/keys",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/keys?namespace={{new_tenant_id}}:{{new_project_id}}",
                    "description": "List key ids/labels (never key material)."
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (pm.response.code === 200) {",
                          "  const j = pm.response.json();",
                          "  const items = j.items || j.keys || (Array.isArray(j) ? j : []);",
                          "  const first = items[0];",
                          "  const id = first && (first.key_id || first.id);",
                          "  if (id) {",
                          "    pm.collectionVariables.set(\"key_id\", id);",
                          "    pm.environment.set(\"key_id\", id);",
                          "  }",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /sandbox/v1/admin/credential-plane/keys/{key_id}/rotate",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/keys/{{key_id}}/rotate",
                    "description": "Replace one pool row in place.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"key\": \"{{provider_api_key}}\"\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "if (!pm.variables.get(\"key_id\")) {",
                          "  console.log(\"Skipping: key_id is not set. List keys first to capture key_id.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "if (!pm.variables.get(\"provider_api_key\")) {",
                          "  console.log(\"Skipping: provider_api_key is not set. Need a replacement provider key value.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "DELETE /sandbox/v1/admin/credential-plane/keys/{key_id}",
                  "request": {
                    "method": "DELETE",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/keys/{{key_id}}",
                    "description": "Deactivate one key in the pool."
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "if (!pm.variables.get(\"key_id\")) {",
                          "  console.log(\"Skipping: key_id is not set. List keys first to capture key_id.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /sandbox/v1/admin/keyhive/teams (legacy alias)",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/keyhive/teams",
                    "description": "Older path for create-team. Prefer credential-plane.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"keys\": {}\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /sandbox/v1/admin/keyhive/keys (legacy alias)",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/keyhive/keys",
                    "description": "Older path for add-key. Prefer credential-plane.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"provider\": \"{{provider}}\",\n  \"key\": \"{{provider_api_key}}\"\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"keyhive\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "if (!pm.variables.get(\"provider_api_key\")) {",
                          "  console.log(\"Skipping: provider_api_key is not set. Paste a provider key to append.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                }
              ]
            },
            {
              "name": "Credential plane (Gateway mode \u2192 410)",
              "description": "When `llm_credential_mode=gateway`, Sandbox credential-plane routes return HTTP 410. Skipped under keyhive mode.",
              "item": [
                {
                  "name": "POST /sandbox/v1/admin/credential-plane/teams \u2192 410",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/teams",
                    "description": "Gateway mode: expect HTTP 410 \u2014 BYOK on LLM Gateway.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"keys\": {}\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /sandbox/v1/admin/credential-plane/keys \u2192 410",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/keys",
                    "description": "Gateway mode: expect HTTP 410.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"provider\": \"{{provider}}\",\n  \"key\": \"gateway-mode-do-not-use\"\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "GET /sandbox/v1/admin/credential-plane/keys \u2192 410",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/keys?namespace={{new_tenant_id}}:{{new_project_id}}",
                    "description": "Gateway mode: expect HTTP 410."
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /sandbox/v1/admin/keyhive/teams \u2192 410",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/keyhive/teams",
                    "description": "Gateway mode KeyHive alias: expect HTTP 410.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"keys\": {}\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /sandbox/v1/admin/keyhive/keys \u2192 410",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Admin-Key",
                        "value": "{{SANDBOX_ADMIN_API_KEY}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/v1/admin/keyhive/keys",
                    "description": "Gateway mode KeyHive alias: expect HTTP 410.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"provider\": \"{{provider}}\",\n  \"key\": \"gateway-mode-do-not-use\"\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                          "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                          "  pm.execution.skipRequest();",
                          "}",
                          "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                          "if (mode !== \"gateway\") {",
                          "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need gateway).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                }
              ]
            },
            {
              "name": "GET /sandbox/v1/providers (informational)",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/providers",
                "description": "Provider inventory for the stamped tenancy. Real under KeyHive; often empty/503 under Gateway."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"provider inventory responded\", function () {",
                      "  pm.expect(pm.response.code, String(pm.response.text() || \"\").slice(0, 200)).to.be.oneOf([",
                      "    200, 503,",
                      "  ]);",
                      "});",
                      "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                      "if (pm.response.code === 200) {",
                      "  const body = pm.response.json();",
                      "  const items = Array.isArray(body) ? body : (body.items || body.providers || []);",
                      "  pm.expect(Array.isArray(items)).to.be.true;",
                      "  const tenant = (pm.variables.get(\"tenant_id\") || \"\").trim();",
                      "  const project = (pm.variables.get(\"project_id\") || \"\").trim();",
                      "  console.log(\"scoped to \" + (tenant || \"?\") + \":\" + (project || \"?\") + \" mode=\" + mode);",
                      "  const lines = items.map((item) => {",
                      "    if (typeof item === \"string\") return item;",
                      "    return (item.provider || \"?\") + \" (\" + (item.source || \"unknown\") + \")\";",
                      "  });",
                      "  const emptyHint =",
                      "    mode === \"keyhive\"",
                      "      ? \"(none \u2014 append keys via Admin \u2192 Credential plane KeyHive)\"",
                      "      : \"(none \u2014 LLM BYOK is on LLM Gateway when llm_credential_mode=gateway)\";",
                      "  console.log(\"providers:\", lines.join(\", \") || emptyHint);",
                      "  pm.collectionVariables.set(",
                      "    \"wandb_available\",",
                      "    String(items.some((item) => (item.provider || item) === \"wandb\"))",
                      "  );",
                      "} else {",
                      "  pm.collectionVariables.set(\"wandb_available\", \"false\");",
                      "  console.log(",
                      "    mode === \"keyhive\"",
                      "      ? \"provider inventory unavailable (credential plane down?)\"",
                      "      : \"provider inventory unavailable (gateway mode \u2014 use LLM Gateway BYOK)\"",
                      "  );",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "Onboard tenant",
          "description": "Ordered walkthrough to point this environment at a `tenant:project` and set **compute quota** on a hosted gateway.\n\nWhen `llm_credential_mode=keyhive`, also create the team (and optionally append `provider_api_key`). When `gateway`, configure BYOK on LLM Gateway separately.\n\n**Before you run:** set `SANDBOX_API_KEY`, `SANDBOX_ADMIN_API_KEY`, `new_tenant_id`, `new_project_id`.\n\nSend top \u2192 bottom. Step 1 upserts quota and activates `new_*` into `tenant_id` / `project_id` / `namespace`.",
          "item": [
            {
              "name": "1. Set concurrency quota for new_tenant:new_project",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "X-Sandbox-Admin-Key",
                    "value": "{{SANDBOX_ADMIN_API_KEY}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/admin/quotas/{{new_tenant_id}}/{{new_project_id}}",
                "description": "Path-scoped quota for the new tenant/project. Adjust `max_concurrent` as needed. Activates `new_*` tenancy on success.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"max_concurrent\": 4\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                      "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if ([200,201].includes(pm.response.code)) {",
                      "  pm.test(\"quota upserted\", function () {",
                      "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                      "  });",
                      "}",
                      "const t = (pm.environment.get(\"new_tenant_id\") || pm.variables.get(\"new_tenant_id\") || \"\").trim();",
                      "const p = (pm.environment.get(\"new_project_id\") || pm.variables.get(\"new_project_id\") || \"\").trim();",
                      "if (!t || !p) {",
                      "  console.log(\"Skipping activate: set new_tenant_id and new_project_id first.\");",
                      "} else {",
                      "  const ns = t + \":\" + p;",
                      "  pm.environment.set(\"tenant_id\", t);",
                      "  pm.environment.set(\"project_id\", p);",
                      "  pm.environment.set(\"namespace\", ns);",
                      "  pm.collectionVariables.set(\"tenant_id\", t);",
                      "  pm.collectionVariables.set(\"project_id\", p);",
                      "  pm.collectionVariables.set(\"namespace\", ns);",
                      "  console.log(\"Activated tenancy \" + ns + \" for subsequent requests.\");",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "1b. Create KeyHive team (keyhive mode)",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Admin-Key",
                    "value": "{{SANDBOX_ADMIN_API_KEY}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/teams",
                "description": "Skipped unless llm_credential_mode=keyhive.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"keys\": {}\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                      "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                      "  pm.execution.skipRequest();",
                      "}",
                      "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                      "if (mode !== \"keyhive\") {",
                      "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "1c. Append provider key (keyhive mode)",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Admin-Key",
                    "value": "{{SANDBOX_ADMIN_API_KEY}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/admin/credential-plane/keys",
                "description": "Skipped unless keyhive mode + provider_api_key set.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"namespace\": \"{{new_tenant_id}}:{{new_project_id}}\",\n  \"provider\": \"{{provider}}\",\n  \"key\": \"{{provider_api_key}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"SANDBOX_ADMIN_API_KEY\")) {",
                      "  console.log(\"Skipping: SANDBOX_ADMIN_API_KEY is not set. These routes are for platform operators; consumers do not need them.\");",
                      "  pm.execution.skipRequest();",
                      "}",
                      "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                      "if (mode !== \"keyhive\") {",
                      "  console.log(\"Skipping: llm_credential_mode=\" + mode + \" (need keyhive).\");",
                      "  pm.execution.skipRequest();",
                      "}",
                      "if (!pm.variables.get(\"provider_api_key\")) {",
                      "  console.log(\"Skipping: provider_api_key is not set. Optional under keyhive \u2014 paste to provision BYOK.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "2. GET /quota as the new tenant",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{new_tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{new_project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/quota",
                "description": "Consumer view of effective concurrency for the **new** tenancy (explicit headers)."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"response ok\", function () {",
                      "  pm.response.to.have.status(200);",
                      "});",
                      "const tenant = (pm.variables.get(\"tenant_id\") || \"\").trim();",
                      "const project = (pm.variables.get(\"project_id\") || \"\").trim();",
                      "console.log(\"scoped to \" + (tenant || \"?\") + \":\" + (project || \"?\"));"
                    ]
                  }
                }
              ]
            },
            {
              "name": "3. Activate new tenancy in this environment",
              "request": {
                "method": "GET",
                "header": [],
                "url": "{{baseUrl}}/healthz",
                "description": "Copies `new_*` into `tenant_id`/`project_id`/`namespace` for the rest of the collection.",
                "auth": {
                  "type": "noauth"
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const t = (pm.environment.get(\"new_tenant_id\") || pm.variables.get(\"new_tenant_id\") || \"\").trim();",
                      "const p = (pm.environment.get(\"new_project_id\") || pm.variables.get(\"new_project_id\") || \"\").trim();",
                      "if (!t || !p) {",
                      "  console.log(\"Skipping activate: set new_tenant_id and new_project_id first.\");",
                      "} else {",
                      "  const ns = t + \":\" + p;",
                      "  pm.environment.set(\"tenant_id\", t);",
                      "  pm.environment.set(\"project_id\", p);",
                      "  pm.environment.set(\"namespace\", ns);",
                      "  pm.collectionVariables.set(\"tenant_id\", t);",
                      "  pm.collectionVariables.set(\"project_id\", p);",
                      "  pm.collectionVariables.set(\"namespace\", ns);",
                      "  console.log(\"Activated tenancy \" + ns + \" for subsequent requests.\");",
                      "}",
                      "const t = (pm.environment.get(\"new_tenant_id\") || \"\").trim();",
                      "const p = (pm.environment.get(\"new_project_id\") || \"\").trim();",
                      "if (!t || !p) {",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"environment now points at new_tenant:new_project\", function () {",
                      "  const t = pm.environment.get(\"tenant_id\");",
                      "  const p = pm.environment.get(\"project_id\");",
                      "  const nt = pm.environment.get(\"new_tenant_id\");",
                      "  const np = pm.environment.get(\"new_project_id\");",
                      "  pm.expect(t).to.eql(nt);",
                      "  pm.expect(p).to.eql(np);",
                      "});"
                    ]
                  }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "Harbor",
      "description": "All Harbor API variants. Prefer **v2**. Set `task_archive_url` before datapoint / execute-tasks. Pass@N on hosted envs uses Temporal \u2014 see **v2 Pass@N (Temporal)**.",
      "item": [
        {
          "name": "Ops (capabilities / health)",
          "item": [
            {
              "name": "GET /capabilities",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/capabilities",
                "description": ""
              }
            },
            {
              "name": "GET /api-versions",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/api-versions",
                "description": ""
              }
            },
            {
              "name": "GET /healthz",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/healthz",
                "description": ""
              }
            },
            {
              "name": "GET /docs",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/docs",
                "description": ""
              }
            },
            {
              "name": "GET /openapi.json",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/openapi.json",
                "description": ""
              }
            }
          ]
        },
        {
          "name": "v2 (preferred)",
          "description": "The datapoint, verify-task, and job API under `/v2`. Every request sends `X-Sandbox-Tenant-Id` / `X-Sandbox-Project-Id` (from `tenant_id` / `project_id`). Start a run with one of the first four requests; the rest read the job id it saves, and skip until then. For Pass@N + Temporal routing see **Harbor \u2192 v2 Pass@N (Temporal)**.",
          "item": [
            {
              "name": "GET /v2/capabilities",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/capabilities",
                "description": "Versioned capabilities (not on unversioned alias)."
              }
            },
            {
              "name": "POST /v2/run/datapoint",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/run/datapoint",
                "description": "Runs a datapoint and holds the connection open until it finishes. 400 if the archive is not a zip, 504 if the run outlives the wait (the job keeps going \u2014 follow it with the job id in the response headers).",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-sync\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1,\n      \"harbor_extensions\": {\n        \"agent_env\": {\n          \"FOO\": \"bar\"\n        }\n      }\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v2/jobs/execute-tasks",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-v2 (preferred)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/execute-tasks",
                "description": "Queues the same work and returns a job id immediately. Prefer this over the synchronous route for anything that takes minutes. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-hello\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"artifacts\": [],\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v2/verify-task",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/verify-task",
                "description": "Verifier-only task authoring: runs tests/test.sh with visible_seed/ and optional workspace_fixture_url. Holds the connection until finished.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-verify\",\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v2/jobs/verify-task",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-verify-v2 (preferred)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/verify-task",
                "description": "Async verify-task: queues verifier-only validation and returns job_id. Set workspace_fixture_url to an HTTPS zip merged into /workspace.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-verify-fixture\",\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"workspace_fixture_url\": \"{{workspace_fixture_url}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{{job_id}}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}",
                "description": "Status, timings and result for one job. Requires the same tenant/project headers as submit (shown in Headers). On datapoint jobs, `result.outcome.trials_detail` lists each pass@k attempt (`completed` vs `errored`). Wrong answers stay `completed` with reward 0.0 \u2014 only `errored` rows are refill candidates."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v2/jobs/{{job_id}}/cancel",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/cancel",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v2/jobs/{{job_id}}/retry-errored-trials",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-retry-v2 (preferred)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/retry-errored-trials",
                "description": "Batch-refill incomplete pass@k attempts: enqueues a **new** job with `pass_at_k = N_errored` and `metadata.retry_of` set to this job. Does **not** re-run completed trials (including reward 0.0). Parent archive stays immutable; combine scores client-side. Default clears notifications/deliver/writeback (`?include_side_effects=true` to keep them). Send Idempotency-Key to avoid duplicate children on retry. v1: single-agent datapoints only. 400 if nothing errored or the parent has no request snapshot. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"retry_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}",
                      "if (pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.retry_of) console.log(\"retry_of=\" + j.retry_of + \" pass_at_k=\" + j.pass_at_k);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v2/jobs/{{job_id}}/retry-provider-blocked",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-provider-retry-v2 (preferred)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/retry-provider-blocked",
                "description": "Full pass@k retry after provider quota/auth blocked the parent (`result.outcome.failure_class=provider`). Unlike `retry-errored-trials`, re-runs the original k budget with fresh LLM Gateway credentials (ADR 0020). Sets `metadata.retry_of` / `retry_kind=provider_blocked`. Send Idempotency-Key to avoid duplicate children. v1: single-agent datapoints only.",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"provider_retry_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}",
                      "if (pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.retry_of) console.log(\"retry_of=\" + j.retry_of + \" pass_at_k=\" + j.pass_at_k + \" kind=\" + j.retry_kind);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{{job_id}}/events (SSE)",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Accept",
                    "value": "text/event-stream"
                  },
                  {
                    "key": "Last-Event-ID",
                    "value": "0"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/events",
                "description": "SSE phase stream until the job finishes. In Postman use **Send and Download** (plain Send often looks hung). Requires the same tenant/project as submit. `Last-Event-ID=0` replays from the start."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{{job_id}}/artifacts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/artifacts",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{{job_id}}/artifacts/archive",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/artifacts/archive",
                "description": "ZIP download when archive exists (404 otherwise)."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{{job_id}}/artifacts/archive?presigned=1",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/artifacts/archive?presigned=1",
                "description": "302 redirect to presigned GET URL when archive exists."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{{job_id}}/artifacts/test-stdout/{path}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/artifacts/test-stdout/{{test_stdout_path}}",
                "description": "Verifier stdout object; set collection var test_stdout_path."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "v2 Pass@N (Temporal)",
          "description": "Pass@N-eligible `execute-tasks` for Temporal routing on hosted envs (`SANDBOX_TEMPORAL_PASSN=1`). Payload uses oracle with `pass_at_k=3` and `labels.operation=passn`. Same `job_id` contract \u2014 poll GET job / SSE as usual. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
          "item": [
            {
              "name": "POST /v2/jobs/execute-tasks (pass@3 \u2192 Temporal)",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-passn-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/execute-tasks",
                "description": "Eligibility: `pass_at_k > 1` and/or `labels.operation=passn`. Returns 202 + job_id when Temporal is healthy; **503** when the flag is on but Temporal is unavailable.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-passn\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 3\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\",\n    \"operation\": \"passn\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set task_archive_url to a Harbor task zip URL.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{job_id} (Pass@N status)",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}",
                "description": "Poll until terminal. On Pass@N jobs, `result.outcome.trials_detail` lists each attempt (`completed` vs `errored`). Timeouts may set `failure_class=timeout` \u2014 do not treat as 'too easy'."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run Pass@N execute-tasks first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v2/jobs/{job_id}/retry-errored-trials (Pass@N refill)",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-passn-retry-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/retry-errored-trials",
                "description": "Refills only `errored` trials (not reward 0.0). Also routes through Temporal when flag + eligible. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run Pass@N execute-tasks and wait for errored trials first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"retry_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}",
                      "if (pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.retry_of) console.log(\"retry_of=\" + j.retry_of + \" pass_at_k=\" + j.pass_at_k);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "v2 deliver",
          "item": [
            {
              "name": "POST /v2/jobs/execute-tasks + deliver",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-v2-deliver-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/execute-tasks",
                "description": "v2 customer delivery: the run's zip is PUT to `deliver.agent_run_zip.url` when it finishes. Set `deliver_url` to a presigned PUT URL you control.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-v2-deliver\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"deliver\": {\n    \"agent_run_zip\": {\n      \"url\": \"{{deliver_url}}\",\n      \"method\": \"PUT\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"deliver_url\")) {",
                      "  console.log(\"Skipping: deliver_url is not set. Set it to a presigned PUT URL you own, plus task_archive_url. The worker really uploads the run zip there.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "v1",
          "description": "The datapoint, verify-task, and job API under `/v1`. Every request sends `X-Sandbox-Tenant-Id` / `X-Sandbox-Project-Id` (from `tenant_id` / `project_id`). Start a run with one of the first four requests; the rest read the job id it saves, and skip until then. For Pass@N + Temporal routing see **Harbor \u2192 v2 Pass@N (Temporal)**.",
          "item": [
            {
              "name": "GET /v1/capabilities",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/capabilities",
                "description": "Versioned capabilities (not on unversioned alias)."
              }
            },
            {
              "name": "POST /v1/run/datapoint",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/run/datapoint",
                "description": "Runs a datapoint and holds the connection open until it finishes. 400 if the archive is not a zip, 504 if the run outlives the wait (the job keeps going \u2014 follow it with the job id in the response headers).",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-sync\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1,\n      \"harbor_extensions\": {\n        \"agent_env\": {\n          \"FOO\": \"bar\"\n        }\n      }\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v1/jobs/execute-tasks",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-v1 (TB compat)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/execute-tasks",
                "description": "Queues the same work and returns a job id immediately. Prefer this over the synchronous route for anything that takes minutes. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-hello\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"artifacts\": [],\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v1/verify-task",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/verify-task",
                "description": "Verifier-only task authoring: runs tests/test.sh with visible_seed/ and optional workspace_fixture_url. Holds the connection until finished.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-verify\",\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v1/jobs/verify-task",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-verify-v1 (TB compat)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/verify-task",
                "description": "Async verify-task: queues verifier-only validation and returns job_id. Set workspace_fixture_url to an HTTPS zip merged into /workspace.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-verify-fixture\",\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"workspace_fixture_url\": \"{{workspace_fixture_url}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{{job_id}}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}",
                "description": "Status, timings and result for one job. Requires the same tenant/project headers as submit (shown in Headers). On datapoint jobs, `result.outcome.trials_detail` lists each pass@k attempt (`completed` vs `errored`). Wrong answers stay `completed` with reward 0.0 \u2014 only `errored` rows are refill candidates."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v1/jobs/{{job_id}}/cancel",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}/cancel",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v1/jobs/{{job_id}}/retry-errored-trials",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-retry-v1 (TB compat)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}/retry-errored-trials",
                "description": "Batch-refill incomplete pass@k attempts: enqueues a **new** job with `pass_at_k = N_errored` and `metadata.retry_of` set to this job. Does **not** re-run completed trials (including reward 0.0). Parent archive stays immutable; combine scores client-side. Default clears notifications/deliver/writeback (`?include_side_effects=true` to keep them). Send Idempotency-Key to avoid duplicate children on retry. v1: single-agent datapoints only. 400 if nothing errored or the parent has no request snapshot. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"retry_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}",
                      "if (pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.retry_of) console.log(\"retry_of=\" + j.retry_of + \" pass_at_k=\" + j.pass_at_k);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v1/jobs/{{job_id}}/retry-provider-blocked",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-provider-retry-v1 (TB compat)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}/retry-provider-blocked",
                "description": "Full pass@k retry after provider quota/auth blocked the parent (`result.outcome.failure_class=provider`). Unlike `retry-errored-trials`, re-runs the original k budget with fresh LLM Gateway credentials (ADR 0020). Sets `metadata.retry_of` / `retry_kind=provider_blocked`. Send Idempotency-Key to avoid duplicate children. v1: single-agent datapoints only.",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"provider_retry_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}",
                      "if (pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.retry_of) console.log(\"retry_of=\" + j.retry_of + \" pass_at_k=\" + j.pass_at_k + \" kind=\" + j.retry_kind);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{{job_id}}/events (SSE)",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Accept",
                    "value": "text/event-stream"
                  },
                  {
                    "key": "Last-Event-ID",
                    "value": "0"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}/events",
                "description": "SSE phase stream until the job finishes. In Postman use **Send and Download** (plain Send often looks hung). Requires the same tenant/project as submit. `Last-Event-ID=0` replays from the start."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{{job_id}}/artifacts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}/artifacts",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{{job_id}}/artifacts/archive",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}/artifacts/archive",
                "description": "ZIP download when archive exists (404 otherwise)."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{{job_id}}/artifacts/archive?presigned=1",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}/artifacts/archive?presigned=1",
                "description": "302 redirect to presigned GET URL when archive exists."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{{job_id}}/artifacts/test-stdout/{path}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v1/jobs/{{job_id}}/artifacts/test-stdout/{{test_stdout_path}}",
                "description": "Verifier stdout object; set collection var test_stdout_path."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "Unversioned (=v1)",
          "description": "The datapoint, verify-task, and job API under `/ (unversioned -> v1)`. Every request sends `X-Sandbox-Tenant-Id` / `X-Sandbox-Project-Id` (from `tenant_id` / `project_id`). Start a run with one of the first four requests; the rest read the job id it saves, and skip until then. For Pass@N + Temporal routing see **Harbor \u2192 v2 Pass@N (Temporal)**.",
          "item": [
            {
              "name": "POST /run/datapoint",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/run/datapoint",
                "description": "Runs a datapoint and holds the connection open until it finishes. 400 if the archive is not a zip, 504 if the run outlives the wait (the job keeps going \u2014 follow it with the job id in the response headers).",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-sync\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1,\n      \"harbor_extensions\": {\n        \"agent_env\": {\n          \"FOO\": \"bar\"\n        }\n      }\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /jobs/execute-tasks",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-unversioned (=v1)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/execute-tasks",
                "description": "Queues the same work and returns a job id immediately. Prefer this over the synchronous route for anything that takes minutes. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-hello\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"artifacts\": [],\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /verify-task",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/verify-task",
                "description": "Verifier-only task authoring: runs tests/test.sh with visible_seed/ and optional workspace_fixture_url. Holds the connection until finished.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-verify\",\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /jobs/verify-task",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-verify-unversioned (=v1)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/verify-task",
                "description": "Async verify-task: queues verifier-only validation and returns job_id. Set workspace_fixture_url to an HTTPS zip merged into /workspace.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-verify-fixture\",\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"workspace_fixture_url\": \"{{workspace_fixture_url}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory that the cluster can reach (a presigned URL, not a path on your laptop).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{{job_id}}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}",
                "description": "Status, timings and result for one job. Requires the same tenant/project headers as submit (shown in Headers). On datapoint jobs, `result.outcome.trials_detail` lists each pass@k attempt (`completed` vs `errored`). Wrong answers stay `completed` with reward 0.0 \u2014 only `errored` rows are refill candidates."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /jobs/{{job_id}}/cancel",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}/cancel",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /jobs/{{job_id}}/retry-errored-trials",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-retry-unversioned (=v1)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}/retry-errored-trials",
                "description": "Batch-refill incomplete pass@k attempts: enqueues a **new** job with `pass_at_k = N_errored` and `metadata.retry_of` set to this job. Does **not** re-run completed trials (including reward 0.0). Parent archive stays immutable; combine scores client-side. Default clears notifications/deliver/writeback (`?include_side_effects=true` to keep them). Send Idempotency-Key to avoid duplicate children on retry. v1: single-agent datapoints only. 400 if nothing errored or the parent has no request snapshot. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"retry_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}",
                      "if (pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.retry_of) console.log(\"retry_of=\" + j.retry_of + \" pass_at_k=\" + j.pass_at_k);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /jobs/{{job_id}}/retry-provider-blocked",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-provider-retry-unversioned (=v1)-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}/retry-provider-blocked",
                "description": "Full pass@k retry after provider quota/auth blocked the parent (`result.outcome.failure_class=provider`). Unlike `retry-errored-trials`, re-runs the original k budget with fresh LLM Gateway credentials (ADR 0020). Sets `metadata.retry_of` / `retry_kind=provider_blocked`. Send Idempotency-Key to avoid duplicate children. v1: single-agent datapoints only.",
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"provider_retry_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}",
                      "if (pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.retry_of) console.log(\"retry_of=\" + j.retry_of + \" pass_at_k=\" + j.pass_at_k + \" kind=\" + j.retry_kind);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{{job_id}}/events (SSE)",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Accept",
                    "value": "text/event-stream"
                  },
                  {
                    "key": "Last-Event-ID",
                    "value": "0"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}/events",
                "description": "SSE phase stream until the job finishes. In Postman use **Send and Download** (plain Send often looks hung). Requires the same tenant/project as submit. `Last-Event-ID=0` replays from the start."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{{job_id}}/artifacts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}/artifacts",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{{job_id}}/artifacts/archive",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}/artifacts/archive",
                "description": "ZIP download when archive exists (404 otherwise)."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{{job_id}}/artifacts/archive?presigned=1",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}/artifacts/archive?presigned=1",
                "description": "302 redirect to presigned GET URL when archive exists."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{{job_id}}/artifacts/test-stdout/{path}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/jobs/{{job_id}}/artifacts/test-stdout/{{test_stdout_path}}",
                "description": "Verifier stdout object; set collection var test_stdout_path."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run a datapoint, execute-tasks, or verify-task request above first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "SSE",
      "description": "Live Harbor + Agent event streams. Use **Send and Download**. Set job_id / agent_run_job_id and tenant_id / project_id first.",
      "item": [
        {
          "name": "1. Harbor v2 \u2014 GET /jobs/{{job_id}}/events",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "Last-Event-ID",
                "value": "0"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/events",
            "description": "Live Harbor job phases (credentials, materialize, agent, artifacts) then `done`. Use **Send and Download**. Same tenant/project as submit or you get 404."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"job_id\")) {",
                  "  console.log(\"Skipping: job_id is not set. Set job_id (or run Harbor \u2192 v2 \u2192 execute-tasks first).\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "2. Harbor v2 \u2014 resume SSE (Last-Event-ID)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "Last-Event-ID",
                "value": "{{last_event_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/events",
            "description": "Resume a Harbor SSE stream after disconnect. Set `last_event_id` to the last event `id:` you received (not 0)."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"job_id\")) {",
                  "  console.log(\"Skipping: job_id is not set. Set job_id and last_event_id (from a prior stream id: line).\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "3. Agent \u2014 GET /v1/runs/{{agent_run_job_id}}/events",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "Last-Event-ID",
                "value": "0"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs/{{agent_run_job_id}}/events",
            "description": "Live Agent Runtime phases until `done`. Use **Send and Download**."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"agent_run_job_id\")) {",
                  "  console.log(\"Skipping: agent_run_job_id is not set. Set agent_run_job_id (or run Agent \u2192 POST /v1/runs first).\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "4. Agent \u2014 resume SSE (Last-Event-ID)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "Last-Event-ID",
                "value": "{{last_event_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs/{{agent_run_job_id}}/events",
            "description": "Resume an Agent SSE stream. Set `last_event_id` from the last `id:` line of a prior stream."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"agent_run_job_id\")) {",
                  "  console.log(\"Skipping: agent_run_job_id is not set. Set agent_run_job_id and last_event_id.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Agent",
      "item": [
        {
          "name": "GET /capabilities",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/capabilities",
            "description": ""
          }
        },
        {
          "name": "GET /v1/agents (catalog \u222a Harbor factory)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/agents",
            "description": "Tier 1 curated agents merged with Harbor AgentFactory; each item has `source`."
          }
        },
        {
          "name": "GET /agents/{{agent_id}}",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/agents/{{agent_id}}",
            "description": ""
          }
        },
        {
          "name": "POST /agents",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/agents",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"id\": \"postman-custom-agent\",\n  \"display_name\": \"Postman Custom\",\n  \"requires_model\": true,\n  \"mcp_adapter\": null,\n  \"air_gap_capable\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  const j = pm.response.json();",
                  "  if (j.id) pm.collectionVariables.set(\"agent_id\", j.id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /agents/postman-custom-agent",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/agents/postman-custom-agent",
            "description": ""
          }
        },
        {
          "name": "GET /healthz (proxied agent)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/healthz",
            "description": "Agent service health via gateway proxy strip."
          }
        },
        {
          "name": "GET /docs (proxied agent OpenAPI UI)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/docs",
            "description": ""
          }
        },
        {
          "name": "GET /openapi.json (proxied agent)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/openapi.json",
            "description": ""
          }
        },
        {
          "name": "POST /v1/runs (Agent Runtime)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs",
            "description": "Enqueue an agent run. The 202 carries `status_url` and `events_url`; the job id is saved to `agent_run_job_id`, so the next two requests work without copying anything.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"{{agent_id}}\",\n  \"instruction\": \"Postman smoke \\u2014 fix the noop task.\",\n  \"model\": \"{{model}}\",\n  \"workspace\": {\n    \"files\": {\n      \"notes.txt\": \"hello from postman\"\n    }\n  },\n  \"harbor_extensions\": {\n    \"agent_env\": {\n      \"POSTMAN\": \"1\"\n    }\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const code = pm.response.code;",
                  "if (code === 200 || code === 202) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.job_id) pm.collectionVariables.set(\"agent_run_job_id\", j.job_id);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /v1/runs/{{agent_run_job_id}} (status)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs/{{agent_run_job_id}}",
            "description": "Point-in-time status, timings and result for the run enqueued above. Answers 404 for a run that does not exist in your tenancy \u2014 send the same tenant/project headers."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"agent_run_job_id\")) {",
                  "  console.log(\"Skipping: agent_run_job_id is not set. Send POST /v1/runs first; it saves the id.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /v1/runs/{{agent_run_job_id}}/events (SSE)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs/{{agent_run_job_id}}/events",
            "description": "Follow the run as it happens: one frame per phase (credentials, materialize, agent, artifacts), then `done`. The connection stays open until the run finishes, which for a real agent is minutes \u2014 that is the point, but it means this request blocks a collection run, so stop it when you have seen enough. Send `Last-Event-ID` to resume after a dropped connection instead of replaying from the start."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"agent_run_job_id\")) {",
                  "  console.log(\"Skipping: agent_run_job_id is not set. Send POST /v1/runs first; it saves the id.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Options & edge cases",
          "description": "Tier 1 catalog vs Tier 2 Harbor breadth (warn locally) and the bounded options passthrough \u2014 agent_options on the agentic surface, harbor_extensions on the datapoint one. Agent Runtime stays catalog-strict.",
          "item": [
            {
              "name": "GET /sandbox/agent/v1/agents (tier union)",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/agent/v1/agents",
                "description": "Each item includes source: catalog | harbor_factory."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"agent registry\", function () {",
                      "  pm.response.to.have.status(200);",
                      "  const j = pm.response.json();",
                      "  pm.expect(j.items).to.be.an(\"array\");",
                      "  pm.expect(j.count).to.be.at.least(4);",
                      "});"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /agent/v1/runs \u2014 agent_options",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/agent/v1/runs",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"agent_id\": \"{{agent_id}}\",\n  \"instruction\": \"Local smoke with agent_options\",\n  \"model\": \"{{model}}\",\n  \"agent_options\": {\n    \"agent_env\": {\n      \"POSTMAN\": \"1\"\n    },\n    \"n_concurrent\": 1\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"agent_run_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /harbor/v2/run/datapoint \u2014 harbor_extensions",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/harbor/v2/run/datapoint",
                "description": "Harbor datapoint accepts non-catalog agents when SANDBOX_CATALOG_ENFORCE_AGENTS=warn (local default).",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"postman-sync\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1,\n      \"harbor_extensions\": {\n        \"agent_env\": {\n          \"FOO\": \"bar\"\n        }\n      }\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set it to an HTTPS zip of your task directory.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"harbor_job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /agent/v1/runs \u2014 unknown agent \u2192 400",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/agent/v1/runs",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"agent_id\": \"not-in-catalog-xyz\",\n  \"instruction\": \"should fail\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"strict agent runtime\", function () {",
                      "  pm.expect([400, 422]).to.include(pm.response.code);",
                      "});"
                    ]
                  }
                }
              ]
            }
          ]
        }
      ],
      "description": "Agent catalog, enqueue runs, status, events."
    },
    {
      "name": "Code Edit",
      "description": "Execution catalog + CodeEdit runs (via gateway).",
      "item": [
        {
          "name": "Catalog & executions",
          "description": "Unified execution catalog read + non-Harbor L3 executors (via gateway strip prefix).",
          "item": [
            {
              "name": "GET /sandbox/v1/catalog",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/catalog",
                "description": "L2 Execution Catalog (languages, agents, profiles, desktop_apps)."
              }
            },
            {
              "name": "GET /sandbox/v1/catalog?kind=language",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/catalog?kind=language",
                "description": ""
              }
            },
            {
              "name": "GET /sandbox/v1/catalog?kind=agent",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/catalog?kind=agent",
                "description": ""
              }
            },
            {
              "name": "GET /sandbox/v1/catalog?kind=desktop_app",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/catalog?kind=desktop_app",
                "description": "Curated software registry for Template Builder (platform-owned recipes). Includes chrome, libreoffice, vlc, gimp, vscode, thunderbird, evince, eog, firefox. See docs/sandbox/runbooks/add-desktop-app.md."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200) {",
                      "  const j = pm.response.json();",
                      "  const ids = (j.items || []).map((e) => e.id);",
                      "  pm.test(\"desktop_app catalog lists chrome\", () => pm.expect(ids).to.include(\"chrome\"));",
                      "  pm.test(\"desktop_app catalog lists vscode\", () => pm.expect(ids).to.include(\"vscode\"));",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandbox/v1/catalog?kind=desktop_app_bundle",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/catalog?kind=desktop_app_bundle",
                "description": "Named desktop software presets (e.g. osworld). Use bundle=id on POST \u2026/images/build instead of listing apps manually."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200) {",
                      "  const j = pm.response.json();",
                      "  const ids = (j.items || []).map((e) => e.id);",
                      "  pm.test(\"desktop_app_bundle lists osworld\", () => pm.expect(ids).to.include(\"osworld\"));",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandbox/v1/providers",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/v1/providers",
                "description": "Which model providers you can actually run a model from: only the providers your `tenant:project` holds an API key for (no shared fallback). Each item has `source=tenant`. Set `provider` (e.g. `wandb`) to assert that provider is present. Pair with the agent catalog above \u2014 an agent with `requires_model: true` needs a `provider/model` whose provider appears here."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "pm.test(\"provider inventory responded\", function () {",
                      "  pm.expect(pm.response.code, String(pm.response.text() || \"\").slice(0, 200)).to.be.oneOf([",
                      "    200, 503,",
                      "  ]);",
                      "});",
                      "const mode = (pm.variables.get(\"llm_credential_mode\") || \"keyhive\").trim().toLowerCase();",
                      "if (pm.response.code === 200) {",
                      "  const body = pm.response.json();",
                      "  const items = Array.isArray(body) ? body : (body.items || body.providers || []);",
                      "  pm.expect(Array.isArray(items)).to.be.true;",
                      "  const tenant = (pm.variables.get(\"tenant_id\") || \"\").trim();",
                      "  const project = (pm.variables.get(\"project_id\") || \"\").trim();",
                      "  console.log(\"scoped to \" + (tenant || \"?\") + \":\" + (project || \"?\") + \" mode=\" + mode);",
                      "  const lines = items.map((item) => {",
                      "    if (typeof item === \"string\") return item;",
                      "    return (item.provider || \"?\") + \" (\" + (item.source || \"unknown\") + \")\";",
                      "  });",
                      "  const emptyHint =",
                      "    mode === \"keyhive\"",
                      "      ? \"(none \u2014 append keys via Admin \u2192 Credential plane KeyHive)\"",
                      "      : \"(none \u2014 LLM BYOK is on LLM Gateway when llm_credential_mode=gateway)\";",
                      "  console.log(\"providers:\", lines.join(\", \") || emptyHint);",
                      "  pm.collectionVariables.set(",
                      "    \"wandb_available\",",
                      "    String(items.some((item) => (item.provider || item) === \"wandb\"))",
                      "  );",
                      "} else {",
                      "  pm.collectionVariables.set(\"wandb_available\", \"false\");",
                      "  console.log(",
                      "    mode === \"keyhive\"",
                      "      ? \"provider inventory unavailable (credential plane down?)\"",
                      "      : \"provider inventory unavailable (gateway mode \u2014 use LLM Gateway BYOK)\"",
                      "  );",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /codeedit/healthz",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/codeedit/healthz",
                "description": "A per-plane probe behind the gateway, so it needs a key. For an unauthenticated check use GET /healthz on the gateway itself."
              }
            },
            {
              "name": "GET /codeedit/v1/languages",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/codeedit/v1/languages",
                "description": ""
              }
            },
            {
              "name": "POST /codeedit/v1/executions",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/codeedit/v1/executions",
                "description": "Requires docker/k8s backend locally; may 500 without runtime.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"language\": \"python3.12\",\n  \"files\": {\n    \"main.py\": \"print(42)\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            }
          ]
        }
      ]
    },
    {
      "name": "LLM",
      "description": "One-shot completions via `/sandbox/llm/v1/completions` (JSON or SSE). Keys from KeyHive or LLM Gateway per `llm_credential_mode`.",
      "item": [
        {
          "name": "POST /llm/v1/completions",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/llm/v1/completions",
            "description": "Sync JSON completion. Needs a provider key for the model's provider under the active tenant/project (or Gateway M2M in gateway mode).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"{{model}}\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Reply with exactly: ok\"\n    }\n  ],\n  \"temperature\": 0,\n  \"max_tokens\": 64,\n  \"stream\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"completions shape\", function () {",
                  "  if (pm.response.code !== 200) return;",
                  "  const j = pm.response.json();",
                  "  pm.expect(j).to.have.property(\"text\");",
                  "  pm.expect(j).to.have.property(\"model\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /llm/v1/completions (SSE stream)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/llm/v1/completions",
            "description": "SSE token stream (`event: delta` then `event: done`). Use **Send and Download** in Postman for long streams.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"{{model}}\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Reply with exactly: ok\"\n    }\n  ],\n  \"temperature\": 0,\n  \"max_tokens\": 64,\n  \"stream\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Sandboxes",
      "description": "Long-lived sandboxes. Subfolders **GenStudio** (author/bake), **Canvases** (reuse tabs + Pass@K execute + job artifacts), and **Shared**. Profile `desktop-osworld` is the GenStudio OSWorld desktop (GKE container). Full OSWorld version matrix also under top-level **OSWorld jobs**. Guide: docs/sandbox/GENSTUDIO_OSWORLD.md.",
      "item": [
        {
          "name": "GenStudio",
          "description": "Authoring / expert path: create `desktop-osworld`, bake OCI images (`bundle=osworld`), pin `image_ref`. For Pass@K execute + artifact download see **Canvases**. Guide: docs/sandbox/GENSTUDIO_OSWORLD.md.",
          "item": [
            {
              "name": "POST /sandboxes/v1 (create desktop-osworld)",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1",
                "description": "Long-lived GenStudio OSWorld desktop in a GKE pod.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"profile\": \"desktop-osworld\",\n  \"task_id\": \"{{gs_task_id}}\",\n  \"autostop_sec\": 1800,\n  \"ttl_sec\": 7200\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200 || pm.response.code === 201 || pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.sandbox_id) pm.collectionVariables.set(\"sandbox_id\", j.sandbox_id);",
                      "    if (j.reuse_fingerprint) {",
                      "      pm.collectionVariables.set(\"reuse_fingerprint\", j.reuse_fingerprint);",
                      "    }",
                      "    if (j.viewer && j.viewer.url) pm.collectionVariables.set(\"viewer_url\", j.viewer.url);",
                      "    if (j.events_url) pm.collectionVariables.set(\"sandbox_events_url\", j.events_url);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/images/build",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/images/build",
                "description": "Build/resolve a content-addressed desktop OCI image from curated catalog apps (no caller Dockerfile).",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"profile\": \"desktop-osworld\",\n  \"apps\": [\n    \"chrome\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.image_uri) pm.collectionVariables.set(\"desktop_image_uri\", j.image_uri);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/images/build (OSWorld app bundle)",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/images/build",
                "description": "Bakes the catalog `osworld` *app bundle* onto the desktop-osworld OCI image.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"profile\": \"desktop-osworld\",\n  \"bundle\": \"osworld\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.image_uri) pm.collectionVariables.set(\"desktop_image_uri\", j.image_uri);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1 (create with OCI image_ref pin)",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1",
                "description": "Create `desktop-osworld` pinned to an OCI image_uri from images/build.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"profile\": \"desktop-osworld\",\n  \"image_ref\": \"{{desktop_image_uri}}\",\n  \"autostop_sec\": 1800,\n  \"ttl_sec\": 7200\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"desktop_image_uri\")) {",
                      "  console.log(\"Skipping: desktop_image_uri is not set. Send images/build first; it saves the URI.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200 || pm.response.code === 201 || pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.sandbox_id) pm.collectionVariables.set(\"sandbox_id\", j.sandbox_id);",
                      "    if (j.reuse_fingerprint) {",
                      "      pm.collectionVariables.set(\"reuse_fingerprint\", j.reuse_fingerprint);",
                      "    }",
                      "    if (j.viewer && j.viewer.url) pm.collectionVariables.set(\"viewer_url\", j.viewer.url);",
                      "    if (j.events_url) pm.collectionVariables.set(\"sandbox_events_url\", j.events_url);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandboxes/v1 (list by task_id)",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1?task_id={{gs_task_id}}",
                "description": "Discover sandboxes for a Gen Studio task_id / workspace key without creating. Also supports ?status=running."
              }
            }
          ]
        },
        {
          "name": "Canvases",
          "description": "What Canvas uses day-to-day: sticky tab sessions (reuse), **Pass@K execute** on `/sandbox/osworld`, and **job artifact egress**. Interactive authoring stays under GenStudio / Shared. Full version matrix also under top-level **OSWorld jobs**. Guide: docs/sandbox/GENSTUDIO_OSWORLD.md.",
          "item": [
            {
              "name": "Session (reuse tab)",
              "description": "Sticky sandbox per Canvas tab. Labels purpose=template-sandbox + template_id participate in the reuse fingerprint. Omit reuse for Pass@K create-always / episode reset.",
              "item": [
                {
                  "name": "POST /sandboxes/v1 (create with reuse fingerprint)",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/sandboxes/v1",
                    "description": "Canvas / Gen Studio tab \u2014 opt-in dedup. Fingerprint = owner salt + reuse_salt + tenant/project + profile + image_ref + workspace_key + purpose/template labels. First call provisions (201/202, reused=false); same intent returns 200 + reused=true + same sandbox_id (starts if stopped). Rotate reuse_salt for a fresh session.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"profile\": \"desktop-osworld\",\n  \"task_id\": \"{{gs_task_id}}\",\n  \"reuse\": true,\n  \"reuse_salt\": \"{{reuse_salt}}\",\n  \"labels\": {\n    \"purpose\": \"template-sandbox\",\n    \"template_id\": \"postman-example\",\n    \"app\": \"generation-studio\"\n  },\n  \"autostop_sec\": 1800,\n  \"ttl_sec\": 7200\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (pm.response.code === 200 || pm.response.code === 201 || pm.response.code === 202) {",
                          "  try {",
                          "    const j = pm.response.json();",
                          "    if (j.sandbox_id) pm.collectionVariables.set(\"sandbox_id\", j.sandbox_id);",
                          "    if (j.reuse_fingerprint) {",
                          "      pm.collectionVariables.set(\"reuse_fingerprint\", j.reuse_fingerprint);",
                          "    }",
                          "    if (j.viewer && j.viewer.url) pm.collectionVariables.set(\"viewer_url\", j.viewer.url);",
                          "    if (j.events_url) pm.collectionVariables.set(\"sandbox_events_url\", j.events_url);",
                          "  } catch (e) {}",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "GET /sandboxes/v1 (list by reuse_fingerprint)",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/sandboxes/v1?reuse_fingerprint={{reuse_fingerprint}}",
                    "description": "Lookup by create-intent fingerprint (sha256:\u2026) returned on create when task_id + owner/reuse_salt are present."
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"reuse_fingerprint\")) {",
                          "  console.log(\"Skipping: reuse_fingerprint is not set. Send create-with-reuse first; it saves reuse_fingerprint.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                }
              ]
            },
            {
              "name": "Pass@K (OSWorld execute)",
              "description": "Scored DesktopEnv episodes \u2014 primary Canvas eval path. `pass_at_k > 1` (+ labels.operation=passn) routes to Temporal when `SANDBOX_TEMPORAL_PASSN=1`. Hosted envs (dev/preprod/prod) set `SANDBOX_TEMPORAL_PASSN=1`. Pass@N-eligible jobs (`pass_at_k > 1`, `labels.operation=passn|confuser_matrix`, or `labels.pass`/`lane` in {3,5,8,\u2026}) route to **Temporal** instead of Pub/Sub. If Temporal is down while the flag is on, enqueue returns **503** (no ADR fallback). Runbook: `docs/sandbox/runbooks/temporal-passn.md`.",
              "item": [
                {
                  "name": "POST /osworld/v2/jobs/execute-tasks (pass@k)",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "Idempotency-Key",
                        "value": "canvas-passk-{{$guid}}"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/execute-tasks",
                    "description": "Enqueue Pass@K DesktopEnv job(s). Canvas body: `agents[].harbor_agent=osworld`, `pass_at_k`, `metadata.task_archive_url`. Optional `metadata.image_ref` from GenStudio images/build. Returns 202 + job_id.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"task_slug\": \"canvas-osworld-passk\",\n  \"agents\": [\n    {\n      \"name\": \"osworld-agent\",\n      \"harbor_agent\": \"osworld\",\n      \"model\": \"{{model}}\",\n      \"pass_at_k\": 3\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\",\n    \"operation\": \"passn\",\n    \"app\": \"generation-studio\",\n    \"purpose\": \"canvas-passk\"\n  }\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"task_archive_url\")) {",
                          "  console.log(\"Skipping: task_archive_url is not set. Set task_archive_url to an HTTPS zip of an OSWorld task.json tree (or sandbox-object://).\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const code = pm.response.code;",
                          "if (code === 200 || code === 202) {",
                          "  try {",
                          "    const j = pm.response.json();",
                          "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                          "  } catch (e) {}",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /osworld/jobs/execute-tasks (unversioned=v2)",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "Idempotency-Key",
                        "value": "canvas-passk-uv-{{$guid}}"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      },
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/osworld/jobs/execute-tasks",
                    "description": "Same handlers as v2. Some GenStudio/Canvas clients still post the unversioned path.",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"task_slug\": \"canvas-osworld-passk\",\n  \"agents\": [\n    {\n      \"name\": \"osworld-agent\",\n      \"harbor_agent\": \"osworld\",\n      \"model\": \"{{model}}\",\n      \"pass_at_k\": 3\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  },\n  \"labels\": {\n    \"trainer\": \"{{label_trainer}}\",\n    \"pass\": \"{{label_pass}}\",\n    \"program\": \"{{label_program}}\",\n    \"operation\": \"passn\",\n    \"app\": \"generation-studio\",\n    \"purpose\": \"canvas-passk\"\n  }\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    }
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"task_archive_url\")) {",
                          "  console.log(\"Skipping: task_archive_url is not set. Set task_archive_url first.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    },
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "const code = pm.response.code;",
                          "if (code === 200 || code === 202) {",
                          "  try {",
                          "    const j = pm.response.json();",
                          "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                          "  } catch (e) {}",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "GET /osworld/v2/jobs/{job_id}",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}",
                    "description": "Poll until terminal. On Pass@K, inspect `result.outcome.trials_detail` per attempt. `failure_class=timeout` is not 'too easy'."
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"job_id\")) {",
                          "  console.log(\"Skipping: job_id is not set. Run Pass@K execute-tasks first; it saves job_id.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "GET /osworld/v2/jobs/{job_id}/events (SSE)",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "Accept",
                        "value": "text/event-stream"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}/events",
                    "description": "Live job phases until `done`. Use **Send and Download** in Postman."
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"job_id\")) {",
                          "  console.log(\"Skipping: job_id is not set. Run Pass@K execute-tasks first.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "POST /osworld/v2/jobs/{job_id}/cancel",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}/cancel",
                    "description": ""
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"job_id\")) {",
                          "  console.log(\"Skipping: job_id is not set. Run Pass@K execute-tasks first.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                }
              ]
            },
            {
              "name": "Artifacts (job egress)",
              "description": "Durable Pass@K / episode artifacts under the same tenant/project as enqueue. Prefer after job is succeeded/failed \u2014 not volatile worker disk. Also listed under **OSWorld jobs**.",
              "item": [
                {
                  "name": "GET /osworld/v2/jobs/{job_id}/artifacts",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}/artifacts",
                    "description": "List trajectories, screenshots, result.json, and job-archive inventory. Mid-run lists live trees; after publish includes final zip. Cross-tenant \u2192 404."
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"job_id\")) {",
                          "  console.log(\"Skipping: job_id is not set. Run Pass@K execute-tasks first.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                },
                {
                  "name": "GET /osworld/v2/jobs/{job_id}/artifacts/archive",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "X-Sandbox-Tenant-Id",
                        "value": "{{tenant_id}}"
                      },
                      {
                        "key": "X-Sandbox-Project-Id",
                        "value": "{{project_id}}"
                      },
                      {
                        "key": "x-correlation-id",
                        "value": "{{correlation_id}}"
                      }
                    ],
                    "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}/artifacts/archive",
                    "description": "Download job-archive.zip (trajectories, screenshots, result.json). Use **Send and Download**. Prefer after terminal status; may also appear on `result.artifact_download_urls.job_archive_url`."
                  },
                  "event": [
                    {
                      "listen": "prerequest",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (!pm.variables.get(\"job_id\")) {",
                          "  console.log(\"Skipping: job_id is not set. Run Pass@K execute-tasks first.\");",
                          "  pm.execution.skipRequest();",
                          "}"
                        ]
                      }
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "Shared \u2014 exec / files / lifecycle",
          "description": "Works for GenStudio / Canvases (and sandboxes-default) once you have a sandbox_id. Viewer live stream is under Desktop viewer.",
          "item": [
            {
              "name": "POST /sandboxes/v1 (create session)",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"profile\": \"sandboxes-default\",\n  \"autostop_sec\": 600,\n  \"ttl_sec\": 3600\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200 || pm.response.code === 201 || pm.response.code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.sandbox_id) pm.collectionVariables.set(\"sandbox_id\", j.sandbox_id);",
                      "    if (j.reuse_fingerprint) {",
                      "      pm.collectionVariables.set(\"reuse_fingerprint\", j.reuse_fingerprint);",
                      "    }",
                      "    if (j.viewer && j.viewer.url) pm.collectionVariables.set(\"viewer_url\", j.viewer.url);",
                      "    if (j.events_url) pm.collectionVariables.set(\"sandbox_events_url\", j.events_url);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandboxes/v1 (list)",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1",
                "description": ""
              }
            },
            {
              "name": "GET /sandboxes/v1/{sandbox_id}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Send POST /sandboxes/v1 first; it saves the id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/{sandbox_id}/exec",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/exec",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"command\": [\n    \"/bin/sh\",\n    \"-c\",\n    \"echo postman-sandbox-ok\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "PUT /sandboxes/v1/{sandbox_id}/files",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "text/plain"
                  },
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/files?path=notes.txt",
                "description": "Writes into the session workspace `workspace/{task_id|sandbox_id}/` (no guest SSH).",
                "body": {
                  "mode": "raw",
                  "raw": "\"hello from postman\"",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandboxes/v1/{sandbox_id}/files",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/files?path=notes.txt",
                "description": "Reads from the same session workspace."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "DELETE /sandboxes/v1/{sandbox_id}/files",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/files?path=notes.txt",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/{sandbox_id}/workspace/sync",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/workspace/sync",
                "description": "Gen Studio: push session SandboxWorkspace \u2192 GCS snapshot, or pull (direction=pull) into the session. Not guest SSH.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"direction\": \"push\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/{sandbox_id}/capture",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/capture",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.capture_id) pm.collectionVariables.set(\"capture_id\", j.capture_id);",
                      "    if (j.url) pm.collectionVariables.set(\"capture_url\", j.url);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandboxes/v1/{sandbox_id}/artifacts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/artifacts?kind=screenshot&limit=10",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /sandboxes/v1/{sandbox_id}/artifacts/{capture_id}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/artifacts/{{capture_id}}",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"capture_id\")) {",
                      "  console.log(\"Skipping: capture_id is not set. POST /capture first; it saves capture_id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/{sandbox_id}/verify",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/verify",
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"require_verifier_evidence\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/{sandbox_id}/stop",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/stop",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/{sandbox_id}/start",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/start",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "DELETE /sandboxes/v1/{sandbox_id}",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"sandbox_id\")) {",
                      "  console.log(\"Skipping: sandbox_id is not set. Create a sandbox first.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /sandboxes/v1/_reap",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/sandboxes/v1/_reap",
                "description": "Ops-only idle/TTL sweep for the caller's tenancy."
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Desktop viewer",
      "description": "Live desktop viewer (viewer.url), SSE lifecycle, capture. C1 gateway streams WSS websockify directly to the session pod IP.",
      "item": [
        {
          "name": "POST /sandboxes/v1 (create desktop-ubuntu)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"profile\": \"desktop-ubuntu\",\n  \"autostop_sec\": 1800,\n  \"ttl_sec\": 7200\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201 || pm.response.code === 202) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.sandbox_id) pm.collectionVariables.set(\"sandbox_id\", j.sandbox_id);",
                  "    if (j.reuse_fingerprint) {",
                  "      pm.collectionVariables.set(\"reuse_fingerprint\", j.reuse_fingerprint);",
                  "    }",
                  "    if (j.viewer && j.viewer.url) pm.collectionVariables.set(\"viewer_url\", j.viewer.url);",
                  "    if (j.events_url) pm.collectionVariables.set(\"sandbox_events_url\", j.events_url);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /sandboxes/v1/{sandbox_id}/events (SSE until running)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/events",
            "description": "Streams meta + lifecycle events. Send and Download \u2014 stop when you see lifecycle running, then open viewer_url in a browser."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Send POST /sandboxes/v1 (desktop) first; it saves the id.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /sandboxes/v1/{sandbox_id}/viewer (mint viewer.url)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/viewer",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "try {",
                  "  const j = pm.response.json();",
                  "  if (j.url) pm.collectionVariables.set(\"viewer_url\", j.url);",
                  "  if (j.expires_at) pm.collectionVariables.set(\"viewer_expires_at\", String(j.expires_at));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/viewer/token (remint)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/viewer/token",
            "description": "Remint a fresh signed viewer.url + expires_at when the previous token is near expiry. Requires API key / Keycloak \u2014 not an expired viewer cookie. Replace the iframe src with the new absolute URL."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "try {",
                  "  const j = pm.response.json();",
                  "  if (j.url) pm.collectionVariables.set(\"viewer_url\", j.url);",
                  "  if (j.expires_at) pm.collectionVariables.set(\"viewer_expires_at\", String(j.expires_at));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/viewer/start",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/viewer/start",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/viewer/stop",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/viewer/stop",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/capture",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/capture",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.capture_id) pm.collectionVariables.set(\"capture_id\", j.capture_id);",
                  "    if (j.url) pm.collectionVariables.set(\"capture_url\", j.url);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/viewer/recordings",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "video/webm"
              },
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/viewer/recordings?duration_sec=12.5",
            "description": "Upload a screen recording of the session. The viewer overlay does this automatically when you press Stop; to send manually, switch the body to 'binary' and attach a .webm or .mp4 file. Stored as an artifact with kind=recording."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/viewer/screenshots",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "image/png"
              },
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/viewer/screenshots",
            "description": "Upload a still captured from the viewer canvas (body mode 'binary', a PNG file). Use POST /capture instead for a server-side screenshot that works with no browser attached."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/viewer/actions",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/viewer/actions",
            "description": "Operator interaction log, time-aligned to a recording. Stored as newline-delimited JSON with kind=actions.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"recording_id\": \"{{capture_id}}\",\n  \"events\": [\n    {\n      \"at\": 120.0,\n      \"type\": \"click\",\n      \"x\": 640,\n      \"y\": 360\n    },\n    {\n      \"at\": 900.0,\n      \"type\": \"scroll\",\n      \"delta_y\": -120.0\n    },\n    {\n      \"at\": 1500.0,\n      \"type\": \"search\",\n      \"text\": \"quarterly revenue\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/viewer/annotations",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/viewer/annotations",
            "description": "Task-ambiguity label for the session. clarity is clear|ambiguous; ambiguity_types is required when ambiguous and must be empty when clear. Stored as an artifact with kind=annotation.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"clarity\": \"ambiguous\",\n  \"ambiguity_types\": [\n    \"intent\",\n    \"referential\"\n  ],\n  \"severity\": \"high\",\n  \"risk\": \"medium\",\n  \"feasibility\": \"partially_feasible\",\n  \"alternate_answers\": [\n    \"Q3 gross revenue\",\n    \"Q3 recurring revenue\"\n  ],\n  \"root_of_confusion\": \"'revenue' is not qualified as gross or net\",\n  \"task_prompt\": \"Report Q3 revenue from the open spreadsheet.\",\n  \"annotator\": \"you@turing.com\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /sandboxes/v1/{sandbox_id}/artifacts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/artifacts?kind=screenshot&limit=10",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "DELETE /sandboxes/v1/{sandbox_id}",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Cloud IDE",
      "description": "ide-ubuntu OpenVSCode + terminal agents. KeyHive injects session keys when llm_credential_mode=keyhive; Gateway mode uses URL hints.",
      "item": [
        {
          "name": "POST /sandboxes/v1 (create ide-ubuntu)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"profile\": \"ide-ubuntu\",\n  \"autostop_sec\": 1800,\n  \"ttl_sec\": 7200\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201 || pm.response.code === 202) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.sandbox_id) pm.collectionVariables.set(\"sandbox_id\", j.sandbox_id);",
                  "    if (j.reuse_fingerprint) {",
                  "      pm.collectionVariables.set(\"reuse_fingerprint\", j.reuse_fingerprint);",
                  "    }",
                  "    if (j.viewer && j.viewer.url) pm.collectionVariables.set(\"viewer_url\", j.viewer.url);",
                  "    if (j.events_url) pm.collectionVariables.set(\"sandbox_events_url\", j.events_url);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /sandboxes/v1/{sandbox_id}/events (SSE until running)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/events",
            "description": "Wait for lifecycle running, then open viewer.url (viewer.mode=openvscode) in a browser."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Send POST /sandboxes/v1 (ide-ubuntu) first; it saves the id.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /sandboxes/v1/{sandbox_id} (viewer descriptor)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create an ide-ubuntu sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "try {",
                  "  const j = pm.response.json();",
                  "  const v = j.viewer || {};",
                  "  if (v.url) pm.collectionVariables.set(\"viewer_url\", v.url);",
                  "  pm.test(\"viewer.mode is openvscode\", () => pm.expect(v.mode).to.eql(\"openvscode\"));",
                  "} catch (e) {}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1/{sandbox_id}/exec (agent CLIs present)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/exec",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"command\": [\n    \"/bin/bash\",\n    \"-lc\",\n    \"command -v claude && command -v opencode && command -v codex\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create an ide-ubuntu sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /agent/v1/runs (attach claude-code to ide session)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"claude-code\",\n  \"model\": \"{{model}}\",\n  \"instruction\": \"Create IDE_ATTACH_OK.txt containing ide-attach-verify-ok\",\n  \"sandbox_id\": \"{{sandbox_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create ide-ubuntu sandbox first; LLM via KeyHive or Gateway per mode.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const code = pm.response.code;",
                  "if (code === 200 || code === 202) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.job_id) pm.collectionVariables.set(\"agent_run_job_id\", j.job_id);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /agent/v1/runs (attach opencode to ide session)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"opencode\",\n  \"model\": \"{{model}}\",\n  \"instruction\": \"Create OPENCODE_ATTACH_OK.txt with the same phrase\",\n  \"sandbox_id\": \"{{sandbox_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create ide-ubuntu sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const code = pm.response.code;",
                  "if (code === 200 || code === 202) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.job_id) pm.collectionVariables.set(\"agent_run_job_id\", j.job_id);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /agent/v1/runs (attach codex to ide session)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"codex\",\n  \"model\": \"openai/gpt-4o-mini\",\n  \"instruction\": \"Create CODEX_ATTACH_OK.txt with the same phrase\",\n  \"sandbox_id\": \"{{sandbox_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create ide-ubuntu sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const code = pm.response.code;",
                  "if (code === 200 || code === 202) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.job_id) pm.collectionVariables.set(\"agent_run_job_id\", j.job_id);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /agent/v1/runs/{agent_run_job_id} (attached run status)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/agent/v1/runs/{{agent_run_job_id}}",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"agent_run_job_id\")) {",
                  "  console.log(\"Skipping: agent_run_job_id is not set. Run an attach POST /agent/v1/runs first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "DELETE /sandboxes/v1/{sandbox_id}",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create an ide-ubuntu sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Desktop eval (Harbor)",
      "description": "Harbor async execute-tasks for desktop-ubuntu-smoke.",
      "item": [
        {
          "name": "POST /harbor/v2/jobs/execute-tasks (desktop-ubuntu-smoke)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "postman-desktop-smoke-{{$guid}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/execute-tasks",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"task_slug\": \"desktop-ubuntu-smoke\",\n  \"agents\": [\n    {\n      \"name\": \"oracle-run\",\n      \"harbor_agent\": \"oracle\",\n      \"pass_at_k\": 1\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"task_archive_url\")) {",
                  "  console.log(\"Skipping: task_archive_url is not set. Set task_archive_url to the desktop-ubuntu-smoke task zip URL.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const code = pm.response.code;",
                  "if (code === 200 || code === 202) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /harbor/v2/jobs/{job_id}",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"job_id\")) {",
                  "  console.log(\"Skipping: job_id is not set. Run execute-tasks first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /harbor/v2/jobs/{job_id}/events (SSE)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "text/event-stream"
              },
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/harbor/v2/jobs/{{job_id}}/events",
            "description": ""
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"job_id\")) {",
                  "  console.log(\"Skipping: job_id is not set. Run execute-tasks first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "OSWorld jobs (DesktopEnv execute API)",
      "description": "Service `sandbox-osworld` under `/sandbox/osworld` \u2014 DesktopEnv episodes, Pass@K / Temporal, artifacts.\n\n**Canvas shortcut:** same Pass@K + artifact requests live under **Sandboxes \u2192 Canvases** (what GenStudio Canvas uses day-to-day).\n\n**Versions (all real):** prefer **v2**; **v1** is a compatibility alias with the same routes; **unversioned** aliases to v2 (`GET /api-versions` \u2192 default=v2, supported=[v1,v2]).\n\nInteractive desktops: GenStudio OSWorld desktop \u2192 Sandboxes (`desktop-osworld`).\n\nProduct agents: osworld / claude-computer-use (not screenshot-llm). Ingress: HTTPS `task_archive_url` \u2192 platform GCS (`sandbox-object://`). Egress: artifacts / artifacts/archive after complete.",
      "item": [
        {
          "name": "GET /osworld/api-versions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/osworld/api-versions",
            "description": "Returns `{default: v2, supported: [v1, v2], unversioned_alias: v2}`. Confirm before integrating; new clients should call `/v2/\u2026`."
          }
        },
        {
          "name": "OSWorld v2",
          "description": "**Preferred.** Default for new clients. `GET /sandbox/osworld/api-versions` \u2192 default=v2.",
          "item": [
            {
              "name": "GET /v2/capabilities",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v2/capabilities",
                "description": ""
              }
            },
            {
              "name": "POST /v2/jobs/execute-tasks",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-osw-v2-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/execute-tasks",
                "description": "Enqueue DesktopEnv episode(s). Prefer async + poll/SSE. `metadata.task_archive_url` may be a consumer HTTPS zip (snapshotted to platform GCS on enqueue) or an existing `sandbox-object://` URL \u2014 same Harbor ingress contract.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"osworld-smoke\",\n  \"agents\": [\n    {\n      \"name\": \"osworld-agent\",\n      \"harbor_agent\": \"osworld\",\n      \"model\": \"{{model}}\",\n      \"pass_at_k\": 1\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set task_archive_url to an HTTPS zip of an OSWorld task.json tree (or sandbox-object:// after a prior snapshot).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{job_id}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v2/jobs/{job_id}/cancel",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}/cancel",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{job_id}/events",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}/events",
                "description": "SSE job events. Use Send and Download for long streams."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{job_id}/artifacts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}/artifacts",
                "description": "List durable job artifacts under tenant/project (Harbor parity). Includes live trajectories mid-run and final inventory after publish. Cross-tenant \u2192 404."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v2/jobs/{job_id}/artifacts/archive",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v2/jobs/{{job_id}}/artifacts/archive",
                "description": "Download job-archive.zip (trajectories, screenshots, result.json). Published to platform GCS before worker pod cleanup \u2014 do not rely on volatile disk. Prefer after job status is succeeded/failed."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "OSWorld v1",
          "description": "**Compatibility alias** \u2014 same route set as v2 today (`api_version` is only echoed in capabilities / job payload). Prefer v2 for new integrations.",
          "item": [
            {
              "name": "GET /v1/capabilities",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v1/capabilities",
                "description": ""
              }
            },
            {
              "name": "POST /v1/jobs/execute-tasks",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-osw-v1-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v1/jobs/execute-tasks",
                "description": "Enqueue DesktopEnv episode(s). Prefer async + poll/SSE. `metadata.task_archive_url` may be a consumer HTTPS zip (snapshotted to platform GCS on enqueue) or an existing `sandbox-object://` URL \u2014 same Harbor ingress contract.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"osworld-smoke\",\n  \"agents\": [\n    {\n      \"name\": \"osworld-agent\",\n      \"harbor_agent\": \"osworld\",\n      \"model\": \"{{model}}\",\n      \"pass_at_k\": 1\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set task_archive_url to an HTTPS zip of an OSWorld task.json tree (or sandbox-object:// after a prior snapshot).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{job_id}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v1/jobs/{{job_id}}",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /v1/jobs/{job_id}/cancel",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v1/jobs/{{job_id}}/cancel",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{job_id}/events",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v1/jobs/{{job_id}}/events",
                "description": "SSE job events. Use Send and Download for long streams."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{job_id}/artifacts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v1/jobs/{{job_id}}/artifacts",
                "description": "List durable job artifacts under tenant/project (Harbor parity). Includes live trajectories mid-run and final inventory after publish. Cross-tenant \u2192 404."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /v1/jobs/{job_id}/artifacts/archive",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/v1/jobs/{{job_id}}/artifacts/archive",
                "description": "Download job-archive.zip (trajectories, screenshots, result.json). Published to platform GCS before worker pod cleanup \u2014 do not rely on volatile disk. Prefer after job status is succeeded/failed."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "OSWorld unversioned",
          "description": "**Unversioned = v2.** GenStudio often posts `/jobs/execute-tasks` here. Identical handlers to the v2 folder.",
          "item": [
            {
              "name": "GET /capabilities",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/capabilities",
                "description": ""
              }
            },
            {
              "name": "POST /jobs/execute-tasks",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "postman-osw-unversioned-{{$guid}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/jobs/execute-tasks",
                "description": "Enqueue DesktopEnv episode(s). Prefer async + poll/SSE. `metadata.task_archive_url` may be a consumer HTTPS zip (snapshotted to platform GCS on enqueue) or an existing `sandbox-object://` URL \u2014 same Harbor ingress contract.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"task_slug\": \"osworld-smoke\",\n  \"agents\": [\n    {\n      \"name\": \"osworld-agent\",\n      \"harbor_agent\": \"osworld\",\n      \"model\": \"{{model}}\",\n      \"pass_at_k\": 1\n    }\n  ],\n  \"metadata\": {\n    \"task_archive_url\": \"{{task_archive_url}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"task_archive_url\")) {",
                      "  console.log(\"Skipping: task_archive_url is not set. Set task_archive_url to an HTTPS zip of an OSWorld task.json tree (or sandbox-object:// after a prior snapshot).\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "const code = pm.response.code;",
                      "if (code === 200 || code === 202) {",
                      "  try {",
                      "    const j = pm.response.json();",
                      "    if (j.job_id) pm.collectionVariables.set(\"job_id\", j.job_id);",
                      "  } catch (e) {}",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{job_id}",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/jobs/{{job_id}}",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "POST /jobs/{job_id}/cancel",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/jobs/{{job_id}}/cancel",
                "description": ""
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{job_id}/events",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/jobs/{{job_id}}/events",
                "description": "SSE job events. Use Send and Download for long streams."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{job_id}/artifacts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/jobs/{{job_id}}/artifacts",
                "description": "List durable job artifacts under tenant/project (Harbor parity). Includes live trajectories mid-run and final inventory after publish. Cross-tenant \u2192 404."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "GET /jobs/{job_id}/artifacts/archive",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Sandbox-Tenant-Id",
                    "value": "{{tenant_id}}"
                  },
                  {
                    "key": "X-Sandbox-Project-Id",
                    "value": "{{project_id}}"
                  },
                  {
                    "key": "x-correlation-id",
                    "value": "{{correlation_id}}"
                  }
                ],
                "url": "{{baseUrl}}/sandbox/osworld/jobs/{{job_id}}/artifacts/archive",
                "description": "Download job-archive.zip (trajectories, screenshots, result.json). Published to platform GCS before worker pod cleanup \u2014 do not rely on volatile disk. Prefer after job status is succeeded/failed."
              },
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (!pm.variables.get(\"job_id\")) {",
                      "  console.log(\"Skipping: job_id is not set. Run OSWorld execute-tasks first; it saves the job id.\");",
                      "  pm.execution.skipRequest();",
                      "}"
                    ]
                  }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "OSWorld stack (guest compat)",
      "description": "guest compat :5000 via exec on `desktop-osworld`, episode reset (destroy + recreate same OCI image_ref). Not the OSWorld jobs execute API.",
      "item": [
        {
          "name": "POST /exec \u2192 guest_compat /healthz",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/exec",
            "description": "Requires sandbox-desktop-ubuntu image with guest_compat supervisord program (RFC 0005). ide-ubuntu has no :5000 listener.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"command\": [\n    \"curl\",\n    \"-fsS\",\n    \"http://127.0.0.1:5000/healthz\"\n  ],\n  \"timeout_sec\": 30\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop-ubuntu sandbox first (folder 04b or 05).\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200) {",
                  "  const j = pm.response.json();",
                  "  pm.test(\"guest_compat healthz exit 0\", () => pm.expect(j.exit_code).to.eql(0));",
                  "  pm.test(\"guest_compat healthz body\", () => pm.expect(j.stdout).to.include(\"ok\"));",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /exec \u2192 guest_compat /execute",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/exec",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"command\": [\n    \"curl\",\n    \"-fsS\",\n    \"-X\",\n    \"POST\",\n    \"http://127.0.0.1:5000/execute\",\n    \"-H\",\n    \"Content-Type: application/json\",\n    \"-d\",\n    \"{\\\"command\\\":[\\\"echo\\\",\\\"guest-compat\\\"],\\\"shell\\\":false}\"\n  ],\n  \"timeout_sec\": 30\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop-ubuntu sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200) {",
                  "  const j = pm.response.json();",
                  "  pm.test(\"guest_compat execute exit 0\", () => pm.expect(j.exit_code).to.eql(0));",
                  "  pm.test(\"guest_compat execute output\", () => pm.expect(j.stdout).to.include(\"guest-compat\"));",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /exec \u2192 write episode marker",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/exec",
            "description": "Dirty the workspace before episode reset.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"command\": [\n    \"touch\",\n    \"/workspace/.postman-episode-marker\"\n  ],\n  \"timeout_sec\": 30\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop-ubuntu sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "DELETE /sandboxes/v1/{sandbox_id} (episode reset)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}",
            "description": "Destroy the session. Next request recreates with the same image_ref pin \u2014 do not reuse sandbox_id across scored episodes."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Create a desktop-ubuntu sandbox first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.collectionVariables.unset(\"sandbox_id\");"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /sandboxes/v1 (episode reset recreate)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1",
            "description": "Fresh pod from the immutable image_ref. See docs/sandbox/runbooks/desktop-episode-reset.md.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"profile\": \"desktop-ubuntu\",\n  \"image_ref\": \"{{desktop_image_uri}}\",\n  \"autostop_sec\": 1800,\n  \"ttl_sec\": 7200\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"desktop_image_uri\")) {",
                  "  console.log(\"Skipping: desktop_image_uri is not set. Run POST /images/build first; episode reset requires the same pin.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201 || pm.response.code === 202) {",
                  "  try {",
                  "    const j = pm.response.json();",
                  "    if (j.sandbox_id) pm.collectionVariables.set(\"sandbox_id\", j.sandbox_id);",
                  "    if (j.reuse_fingerprint) {",
                  "      pm.collectionVariables.set(\"reuse_fingerprint\", j.reuse_fingerprint);",
                  "    }",
                  "    if (j.viewer && j.viewer.url) pm.collectionVariables.set(\"viewer_url\", j.viewer.url);",
                  "    if (j.events_url) pm.collectionVariables.set(\"sandbox_events_url\", j.events_url);",
                  "  } catch (e) {}",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /exec \u2192 episode marker absent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "x-correlation-id",
                "value": "{{correlation_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{baseUrl}}/sandbox/sandboxes/v1/{{sandbox_id}}/exec",
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"command\": [\n    \"test\",\n    \"!\",\n    \"-f\",\n    \"/workspace/.postman-episode-marker\"\n  ],\n  \"timeout_sec\": 30\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get(\"sandbox_id\")) {",
                  "  console.log(\"Skipping: sandbox_id is not set. Run episode reset recreate first.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200) {",
                  "  const j = pm.response.json();",
                  "  pm.test(\"workspace clean after reset\", () => pm.expect(j.exit_code).to.eql(0));",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Local",
      "description": "Service ports on localhost \u2014 skipped unless baseUrl is local.",
      "item": [
        {
          "name": "Harbor direct GET /healthz :8781",
          "request": {
            "method": "GET",
            "header": [],
            "url": "http://localhost:8781/healthz",
            "description": "",
            "auth": {
              "type": "noauth"
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const base = pm.variables.get(\"baseUrl\") || \"\";",
                  "if (!/localhost|127\\.0\\.0\\.1/.test(base)) {",
                  "  console.log(\"Skipping: service ports are only reachable on a local stack.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Harbor direct GET /v2/capabilities :8781",
          "request": {
            "method": "GET",
            "header": [],
            "url": "http://localhost:8781/v2/capabilities",
            "description": "Uses collection X-Api-Key auth."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const base = pm.variables.get(\"baseUrl\") || \"\";",
                  "if (!/localhost|127\\.0\\.0\\.1/.test(base)) {",
                  "  console.log(\"Skipping: service ports are only reachable on a local stack.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Agent direct GET /healthz :8782",
          "request": {
            "method": "GET",
            "header": [],
            "url": "http://localhost:8782/healthz",
            "description": "",
            "auth": {
              "type": "noauth"
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const base = pm.variables.get(\"baseUrl\") || \"\";",
                  "if (!/localhost|127\\.0\\.0\\.1/.test(base)) {",
                  "  console.log(\"Skipping: service ports are only reachable on a local stack.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Agent direct GET /capabilities :8782",
          "request": {
            "method": "GET",
            "header": [],
            "url": "http://localhost:8782/capabilities",
            "description": "Uses collection X-Api-Key auth."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const base = pm.variables.get(\"baseUrl\") || \"\";",
                  "if (!/localhost|127\\.0\\.0\\.1/.test(base)) {",
                  "  console.log(\"Skipping: service ports are only reachable on a local stack.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "LLM direct GET /healthz :8785",
          "request": {
            "method": "GET",
            "header": [],
            "url": "http://localhost:8785/healthz",
            "description": "",
            "auth": {
              "type": "noauth"
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const base = pm.variables.get(\"baseUrl\") || \"\";",
                  "if (!/localhost|127\\.0\\.0\\.1/.test(base)) {",
                  "  console.log(\"Skipping: service ports are only reachable on a local stack.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "LLM direct POST /v1/completions :8785",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Sandbox-Tenant-Id",
                "value": "{{tenant_id}}"
              },
              {
                "key": "X-Sandbox-Project-Id",
                "value": "{{project_id}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "http://localhost:8785/v1/completions",
            "description": "Uses collection X-Api-Key + tenancy headers.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"{{model}}\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Reply with exactly: ok\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const base = pm.variables.get(\"baseUrl\") || \"\";",
                  "if (!/localhost|127\\.0\\.0\\.1/.test(base)) {",
                  "  console.log(\"Skipping: service ports are only reachable on a local stack.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}
