---
name: cloud-apply
description: Open a GitHub issue requesting access to the WorkPilot Cloud Gateway allowlist
---

## Cloud Gateway Allowlist Request

File a `Cloud Allowlist Request` issue on the WorkPilot repo. A bot
workflow gathers open requests, opens a batch PR, and a maintainer
reviews and merges. The user does **not** edit any files directly.

### Step 1 — Resolve the user's OID

Try these sources in order; stop at the first that yields a valid GUID:

1. The `OID:` field under `## Identity` in `USER.md` (already in your
   context — no extra file read needed).
2. The `MCP_user` server's self-profile tool (e.g.
   `MCP_user_GetMyProfile` — pick the matching tool from the registry).
   Call it and read `id`.
3. Otherwise ask the user to enable the `MCP_user` server (via
   `wp init` → *MCP Servers*, or `wp mcp setup`) so a subsequent run
   can resolve the OID automatically — or to paste their OID into the
   `OID:` field in `USER.md`. Then stop.

Validate the value is a GUID (8-4-4-4-12 hex). If not, ask the user to
fix it — do not guess.

### Step 2 — Open the issue

Body uses the same heading as the issue form so anyone reading the
issue sees familiar structure:

```
### Entra OID

<oid-lowercase>
```

**Prefer the `MCP_github_issue_write` tool** when available. Call it with:

  - `method`: `"create"`
  - `owner`: `"gim-home"`, `repo`: `"WorkPilot"`
  - `title`: `"allowlist: request access"`
  - `labels`: `["allowlist-request"]`
  - `body`: the markdown block above

Fall back to the `shell` tool only if `MCP_github` isn't configured:

```
gh issue create \
  --repo gim-home/WorkPilot \
  --title "allowlist: request access" \
  --label "allowlist-request" \
  --body-file - <<'EOF'
### Entra OID

<oid-lowercase>
EOF
```

Do **not** include UPN / email / name in the body — the OID is enough,
and identity is reconstructable from the issue author's GitHub account.

### Step 3 — Report back

Print the issue URL **and** the WorkPilot Teams announcement post
(the thread with the intro / enable-instructions; replies on that
post chase approval):

```
https://teams.microsoft.com/l/message/19:jkCVVdg5tiYN-Je7PKZwHzvuzA5NXpD8CbJNReUuiMw1@thread.tacv2/1778511533132?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=387dd60d-7314-4d56-835d-602e77cd7a25&parentMessageId=1778511533132&teamName=WorkPilot&channelName=WorkPilot&createdTime=1778511533132
```

Then tell the user:

> Submitted. A maintainer will review and merge the batch PR.
> Reply on the WorkPilot Teams post above to chase approval or
> read how to enable cloud features once you're on the list.
